{
  "context": [
    {
      "type": "contextDef",
      "subType": "prefix",
      "key": "foaf",
      "value": {
        "type": "term",
        "subType": "namedNode",
        "value": "http://xmlns.com/foaf/0.1/",
        "loc": {
          "sourceLocationType": "source",
          "start": 16,
          "end": 44
        }
      },
      "loc": {
        "sourceLocationType": "source",
        "start": 0,
        "end": 44
      }
    },
    {
      "type": "contextDef",
      "subType": "prefix",
      "key": "vcard",
      "value": {
        "type": "term",
        "subType": "namedNode",
        "value": "http://www.w3.org/2001/vcard-rdf/3.0#",
        "loc": {
          "sourceLocationType": "source",
          "start": 61,
          "end": 100
        }
      },
      "loc": {
        "sourceLocationType": "source",
        "start": 45,
        "end": 100
      }
    }
  ],
  "subType": "construct",
  "template": {
    "type": "pattern",
    "subType": "bgp",
    "triples": [
      {
        "type": "triple",
        "subject": {
          "type": "term",
          "subType": "variable",
          "value": "x",
          "loc": {
            "sourceLocationType": "source",
            "start": 114,
            "end": 116
          }
        },
        "predicate": {
          "type": "term",
          "subType": "namedNode",
          "value": "N",
          "loc": {
            "sourceLocationType": "source",
            "start": 118,
            "end": 125
          },
          "prefix": "vcard"
        },
        "object": {
          "type": "term",
          "subType": "blankNode",
          "loc": {
            "sourceLocationType": "source",
            "start": 126,
            "end": 129
          },
          "label": "e_v"
        },
        "loc": {
          "sourceLocationType": "source",
          "start": 114,
          "end": 129
        }
      },
      {
        "type": "triple",
        "subject": {
          "type": "term",
          "subType": "blankNode",
          "loc": {
            "sourceLocationType": "source",
            "start": 144,
            "end": 147
          },
          "label": "e_v"
        },
        "predicate": {
          "type": "term",
          "subType": "namedNode",
          "value": "givenName",
          "loc": {
            "sourceLocationType": "source",
            "start": 148,
            "end": 163
          },
          "prefix": "vcard"
        },
        "object": {
          "type": "term",
          "subType": "variable",
          "value": "gname",
          "loc": {
            "sourceLocationType": "source",
            "start": 164,
            "end": 170
          }
        },
        "loc": {
          "sourceLocationType": "source",
          "start": 144,
          "end": 170
        }
      },
      {
        "type": "triple",
        "subject": {
          "type": "term",
          "subType": "blankNode",
          "loc": {
            "sourceLocationType": "source",
            "start": 185,
            "end": 188
          },
          "label": "e_v"
        },
        "predicate": {
          "type": "term",
          "subType": "namedNode",
          "value": "familyName",
          "loc": {
            "sourceLocationType": "source",
            "start": 189,
            "end": 205
          },
          "prefix": "vcard"
        },
        "object": {
          "type": "term",
          "subType": "variable",
          "value": "fname",
          "loc": {
            "sourceLocationType": "source",
            "start": 206,
            "end": 212
          }
        },
        "loc": {
          "sourceLocationType": "source",
          "start": 185,
          "end": 212
        }
      }
    ],
    "loc": {
      "sourceLocationType": "source",
      "start": 114,
      "end": 172
    }
  },
  "datasets": {
    "type": "datasetClauses",
    "clauses": [],
    "loc": {
      "sourceLocationType": "noMaterialize"
    }
  },
  "where": {
    "type": "pattern",
    "subType": "group",
    "patterns": [
      {
        "type": "pattern",
        "subType": "union",
        "patterns": [
          {
            "type": "pattern",
            "subType": "group",
            "patterns": [
              {
                "type": "pattern",
                "subType": "bgp",
                "triples": [
                  {
                    "type": "triple",
                    "subject": {
                      "type": "term",
                      "subType": "variable",
                      "value": "x",
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 230,
                        "end": 232
                      }
                    },
                    "predicate": {
                      "type": "term",
                      "subType": "namedNode",
                      "value": "firstname",
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 233,
                        "end": 247
                      },
                      "prefix": "foaf"
                    },
                    "object": {
                      "type": "term",
                      "subType": "variable",
                      "value": "gname",
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 248,
                        "end": 254
                      }
                    },
                    "loc": {
                      "sourceLocationType": "source",
                      "start": 230,
                      "end": 254
                    }
                  }
                ],
                "loc": {
                  "sourceLocationType": "source",
                  "start": 230,
                  "end": 254
                }
              }
            ],
            "loc": {
              "sourceLocationType": "source",
              "start": 228,
              "end": 256
            }
          },
          {
            "type": "pattern",
            "subType": "group",
            "patterns": [
              {
                "type": "pattern",
                "subType": "bgp",
                "triples": [
                  {
                    "type": "triple",
                    "subject": {
                      "type": "term",
                      "subType": "variable",
                      "value": "x",
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 266,
                        "end": 268
                      }
                    },
                    "predicate": {
                      "type": "term",
                      "subType": "namedNode",
                      "value": "givenname",
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 269,
                        "end": 283
                      },
                      "prefix": "foaf"
                    },
                    "object": {
                      "type": "term",
                      "subType": "variable",
                      "value": "gname",
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 286,
                        "end": 292
                      }
                    },
                    "loc": {
                      "sourceLocationType": "source",
                      "start": 266,
                      "end": 292
                    }
                  }
                ],
                "loc": {
                  "sourceLocationType": "source",
                  "start": 266,
                  "end": 292
                }
              }
            ],
            "loc": {
              "sourceLocationType": "source",
              "start": 264,
              "end": 294
            }
          }
        ],
        "loc": {
          "sourceLocationType": "source",
          "start": 228,
          "end": 294
        }
      },
      {
        "type": "pattern",
        "subType": "union",
        "patterns": [
          {
            "type": "pattern",
            "subType": "group",
            "patterns": [
              {
                "type": "pattern",
                "subType": "bgp",
                "triples": [
                  {
                    "type": "triple",
                    "subject": {
                      "type": "term",
                      "subType": "variable",
                      "value": "x",
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 303,
                        "end": 305
                      }
                    },
                    "predicate": {
                      "type": "term",
                      "subType": "namedNode",
                      "value": "surname",
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 306,
                        "end": 318
                      },
                      "prefix": "foaf"
                    },
                    "object": {
                      "type": "term",
                      "subType": "variable",
                      "value": "fname",
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 321,
                        "end": 327
                      }
                    },
                    "loc": {
                      "sourceLocationType": "source",
                      "start": 303,
                      "end": 327
                    }
                  }
                ],
                "loc": {
                  "sourceLocationType": "source",
                  "start": 303,
                  "end": 327
                }
              }
            ],
            "loc": {
              "sourceLocationType": "source",
              "start": 301,
              "end": 329
            }
          },
          {
            "type": "pattern",
            "subType": "group",
            "patterns": [
              {
                "type": "pattern",
                "subType": "bgp",
                "triples": [
                  {
                    "type": "triple",
                    "subject": {
                      "type": "term",
                      "subType": "variable",
                      "value": "x",
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 339,
                        "end": 341
                      }
                    },
                    "predicate": {
                      "type": "term",
                      "subType": "namedNode",
                      "value": "family_name",
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 342,
                        "end": 358
                      },
                      "prefix": "foaf"
                    },
                    "object": {
                      "type": "term",
                      "subType": "variable",
                      "value": "fname",
                      "loc": {
                        "sourceLocationType": "source",
                        "start": 359,
                        "end": 365
                      }
                    },
                    "loc": {
                      "sourceLocationType": "source",
                      "start": 339,
                      "end": 365
                    }
                  }
                ],
                "loc": {
                  "sourceLocationType": "source",
                  "start": 339,
                  "end": 365
                }
              }
            ],
            "loc": {
              "sourceLocationType": "source",
              "start": 337,
              "end": 367
            }
          }
        ],
        "loc": {
          "sourceLocationType": "source",
          "start": 301,
          "end": 367
        }
      }
    ],
    "loc": {
      "sourceLocationType": "source",
      "start": 222,
      "end": 372
    }
  },
  "solutionModifiers": {},
  "loc": {
    "sourceLocationType": "inlinedSource",
    "newSource": "PREFIX foaf:    <http://xmlns.com/foaf/0.1/>\nPREFIX vcard:   <http://www.w3.org/2001/vcard-rdf/3.0#>\n\nCONSTRUCT { ?x  vcard:N _:v .\n            _:v vcard:givenName ?gname .\n            _:v vcard:familyName ?fname }\nWHERE\n {\n    { ?x foaf:firstname ?gname } UNION  { ?x foaf:givenname   ?gname } .\n    { ?x foaf:surname   ?fname } UNION  { ?x foaf:family_name ?fname } .\n }\n",
    "start": 0,
    "end": 9007199254740991,
    "loc": {
      "sourceLocationType": "source",
      "start": 0,
      "end": 372
    },
    "startOnNew": 0,
    "endOnNew": 372
  },
  "type": "query"
}
