diff --git a/bin/sparql-to-json b/bin/sparql-to-json index 2d73d5a7..81def480 100755 --- a/bin/sparql-to-json +++ b/bin/sparql-to-json @@ -22,6 +22,6 @@ var query = '', source = args[0] ? fs.createReadStream(args[0]) : process.stdin; source.setEncoding('utf8'); source.on('data', function (data) { query += data; }); source.on('end', function () { - var parseTree = new SparqlParser({ sparqlStar: !strictMode }).parse(query); + var parseTree = new SparqlParser({ reifiedTriples: !strictMode }).parse(query); process.stdout.write(JSON.stringify(parseTree, null, ' ') + '\n'); }); diff --git a/lib/sparql.jison b/lib/sparql.jison index d981ab06..7aa6c76c 100644 --- a/lib/sparql.jison +++ b/lib/sparql.jison @@ -11,6 +11,7 @@ RDF_FIRST = RDF + 'first', RDF_REST = RDF + 'rest', RDF_NIL = RDF + 'nil', + RDF_REIFIES = RDF + 'reifies', XSD = 'http://www.w3.org/2001/XMLSchema#', XSD_INTEGER = XSD + 'integer', XSD_DECIMAL = XSD + 'decimal', @@ -164,13 +165,31 @@ return Parser.factory.quad(subject, predicate, object); } + function reifiedTriple(subject, predicate, object, reifier) { + + // TODO: Remove this when it is caught by the grammar + if (!('termType' in predicate)) { + throw new Error('Reified triples cannot contain paths'); + } + + if (!reifier) { + reifier = blank(); + } + + const tripleTerm = Parser.factory.quad(subject, predicate, object); + reifier.reifyingTriple = Parser.factory.quad(reifier, Parser.factory.namedNode(RDF_REIFIES), tripleTerm); + + return reifier; + } + // Creates a triple with the given subject, predicate, and object - function triple(subject, predicate, object, annotations) { + function triple(subject, predicate, object, annotations, reifier) { var triple = {}; - if (subject != null) triple.subject = subject; - if (predicate != null) triple.predicate = predicate; - if (object != null) triple.object = object; - if (annotations != null) triple.annotations = annotations; + if (subject != null) triple.subject = subject; + if (predicate != null) triple.predicate = predicate; + if (object != null) triple.object = object; + if (reifier != null) triple.reifier = reifier; + if (annotations != null && annotations.length) triple.annotations = annotations; return triple; } @@ -254,12 +273,32 @@ var objects = [], triples = []; objectList.forEach(function (l) { let annotation = null; - if (l.annotation) { - annotation = l.annotation - l = l.object; + let reifier = null; + if (l.reifierAnnotations) { + let firstAnnotation = true; + for (const reifierAnnotation of l.reifierAnnotations) { + if (reifierAnnotation.reifier) { + ensureReifiedTriples(); + reifier = reifierAnnotation.reifier; + annotation = []; + } + if (reifierAnnotation.annotation) { + annotation = reifierAnnotation.annotation + } + if (l.object) { + l = l.object; + } + const t = triple(null, predicate, l.entity, annotation, reifier); + t.firstAnnotation = firstAnnotation; + objects.push(t); + appendAllTo(triples, l.triples); + + firstAnnotation = false; + } + } else { + objects.push(triple(null, predicate, l.entity, [])); + appendAllTo(triples, l.triples); } - objects.push(triple(null, predicate, l.entity, annotation)); - appendAllTo(triples, l.triples); }); return unionAll(objects, otherTriples || [], triples); } @@ -381,8 +420,27 @@ return value; } + function ensureReifiedTriples(value) { + if (!Parser.reifiedTriples) { + throw new Error('Reified triples support is not enabled'); + } + return value; + } + + function ensureReifiedTriplesOrSparqlStar(valueReifiedTriples, valueSparqlStar) { + if (!Parser.reifiedTriples && !Parser.sparqlStar) { + throw new Error('Reified triples support or SPARQL-star support is not enabled'); + } + return Parser.reifiedTriples ? valueReifiedTriples() : valueSparqlStar(); + } + function _applyAnnotations(subject, annotations, arr) { for (const annotation of annotations) { + if (annotation.object.reifyingTriple) { + arr.push(annotation.object.reifyingTriple); + delete annotation.object.reifyingTriple; + } + const t = triple( // If the annotation already has a subject then just push the // annotation to the upper scope as it is a blank node introduced @@ -405,7 +463,32 @@ } function applyAnnotations(triples) { - if (Parser.sparqlStar) { + if (Parser.reifiedTriples) { + const newTriples = []; + + triples.forEach(t => { + let s = triple(t.subject, t.predicate, t.object); + + pushReifyingTriples(s, newTriples); + + if (t.annotations || t.reifier) { + if (t.firstAnnotation) + newTriples.push(s); + + let reifier = reifiedTriple(s.subject, s.predicate, s.object, t.reifier); + if (t.annotations) + _applyAnnotations(reifier, t.annotations, newTriples); + if (!t.annotations || t.firstAnnotation) + newTriples.push(reifier.reifyingTriple); + delete reifier.reifyingTriple; + } else { + newTriples.push(s); + } + }); + + return newTriples; + } + else if (Parser.sparqlStar) { const newTriples = []; triples.forEach(t => { @@ -423,6 +506,33 @@ return triples; } + function reifiedTripleDeclaration(reifiedTriple) { + const triples = []; + pushReifyingTriples(reifiedTriple.reifyingTriple, triples); + return triples; + } + + function pushReifyingTriples(triple, newTriples) { + if (triple.subject.reifyingTriple) { + const reifyingTriple = triple.subject.reifyingTriple; + delete triple.subject.reifyingTriple; + newTriples.push(reifyingTriple); + pushReifyingTriples(reifyingTriple, newTriples); + } + if (triple.object.reifyingTriple) { + const reifyingTriple = triple.object.reifyingTriple; + delete triple.object.reifyingTriple; + newTriples.push(reifyingTriple); + pushReifyingTriples(reifyingTriple, newTriples); + } + if (triple.subject.termType === 'Quad') { + pushReifyingTriples(triple.subject, newTriples); + } + if (triple.object.termType === 'Quad') { + pushReifyingTriples(triple.object, newTriples); + } + } + function ensureSparqlStarNestedQuads(value) { if (!Parser.sparqlStarNestedQuads) { throw new Error('Lenient SPARQL-star support with nested quads is not enabled'); @@ -597,8 +707,11 @@ SPACES_COMMENTS (\s+|{COMMENT}\n\r?)+ "MINUS" return 'MINUS' "UNION" return 'UNION' "FILTER" return 'FILTER' +"<<(" return '<<(' +")>>" return ')>>' "<<" return '<<' ">>" return '>>' +"~" return '~' "{|" return '{|' "|}" return '|}' "," return ',' @@ -1109,8 +1222,8 @@ InlineDataFull DataBlockValue : iri | Literal - // @see https://w3c.github.io/rdf-star/cg-spec/editors_draft.html#sparql-star-grammar - | QuotedTriple -> ensureSparqlStar($1) + | TripleTerm + | ReifiedTriple | 'UNDEF' -> undefined ; @@ -1155,7 +1268,9 @@ ConstructTriples // [75] TriplesSameSubject - : VarOrTermOrQuotedTP PropertyListNotEmpty -> applyAnnotations($2.map(t => extend(triple($1), t))) + : VarOrTerm PropertyListNotEmpty -> applyAnnotations($2.map(t => extend(triple($1), t))) + | TripleTermPattern PropertyListNotEmpty -> applyAnnotations($2.map(t => extend(triple($1), t))) + | ReifiedTriplePattern PropertyList -> $2 ? applyAnnotations($2.map(t => extend(triple($1), t))) : reifiedTripleDeclaration($1) | TriplesNode PropertyList -> applyAnnotations(appendAllTo($2.map(t => extend(triple($1.entity), t)), $1.triples)) /* the subject is a blank node, possibly with more triples */ ; @@ -1189,12 +1304,24 @@ ObjectList // [80] Object - : GraphNode AnnotationPattern? -> $2 ? { annotation: $2, object: $1 } : $1 + : GraphNode ReifierAnnotationSequence? -> $2 ? { reifierAnnotations: $2, object: $1 } : $1 ; +ReifierAnnotationSequence + : ReifierAnnotationSequenceElement* ReifierAnnotationSequenceElement -> $1.length ? appendTo($1, $2) : [ $2 ] + ; + +ReifierAnnotationSequenceElement + : '~' ReifierOrVar -> { reifier: $2 } + | AnnotationPattern -> { annotation: $1 } + ; + + // [81] TriplesSameSubjectPath - : VarOrTermOrQuotedTP PropertyListPathNotEmpty -> applyAnnotations($2.map(t => extend(triple($1), t))) + : VarOrTerm PropertyListPathNotEmpty -> applyAnnotations($2.map(t => extend(triple($1), t))) + | TripleTermPattern PropertyListPathNotEmpty -> applyAnnotations($2.map(t => extend(triple($1), t))) + | ReifiedTriplePattern PropertyListPath -> $2 ? applyAnnotations($2.map(t => extend(triple($1), t))) : reifiedTripleDeclaration($1) | TriplesNodePath PropertyListPathNotEmpty? -> !$2 ? $1.triples : applyAnnotations(appendAllTo($2.map(t => extend(triple($1.entity), t)), $1.triples)) /* the subject is a blank node, possibly with more triples */ ; @@ -1205,6 +1332,10 @@ PropertyListPathNotEmpty : O PropertyListPathNotEmptyTail* -> objectListToTriples(...$1, $2) ; +PropertyListPath + : PropertyListPathNotEmpty? + ; + PropertyListPathNotEmptyTail : ';' -> [] | ';' O -> objectListToTriples(...$2) @@ -1220,7 +1351,16 @@ ObjectListPath // [87] ObjectPath - : GraphNodePath AnnotationPatternPath? -> $2 ? { object: $1, annotation: $2 } : $1; + : GraphNodePath ReifierAnnotationPathSequence? -> $2 ? { reifierAnnotations: $2, object: $1 } : $1 + ; + +ReifierAnnotationPathSequence + : ReifierAnnotationPathSequenceElement* ReifierAnnotationPathSequenceElement -> $1.length ? appendTo($1, $2) : [ $2 ] + ; + +ReifierAnnotationPathSequenceElement + : '~' ReifierOrVar -> { reifier: $2 } + | AnnotationPatternPath -> { annotation: $1 } ; // [88] Path [89] PathAlternative @@ -1274,18 +1414,18 @@ TriplesNodePath // [104] GraphNode - : VarOrTermOrQuotedTPExpr /* for consistency with TriplesNode */ + : VarOrTermOrReifiedTriplePatternExpr /* for consistency with TriplesNode */ | TriplesNode ; // [105] GraphNodePath - : VarOrTermOrQuotedTPExpr /* for consistency with TriplesNodePath */ + : VarOrTermOrReifiedTriplePatternExpr /* for consistency with TriplesNodePath */ | TriplesNodePath ; -VarOrTermOrQuotedTPExpr - : VarOrTermOrQuotedTP -> { entity: $1, triples: [] } +VarOrTermOrReifiedTriplePatternExpr + : VarOrTermOrReifiedTriplePattern -> { entity: $1, triples: [] } ; // [106] @@ -1382,7 +1522,7 @@ PrimaryExpression | FunctionCall | Literal | Var - | ExprQuotedTP + | ExprReifiedTriple ; // [120] @@ -1395,10 +1535,10 @@ BuiltInCall : Aggregate | FUNC_ARITY0 NIL -> operation(lowercase($1)) | FUNC_ARITY1 '(' Expression ')' -> operation(lowercase($1), [$3]) - | FUNC_ARITY1_SPARQL_STAR '(' Expression ')' -> ensureSparqlStar(operation(lowercase($1), [$3])) + | FUNC_ARITY1_SPARQL_STAR '(' Expression ')' -> ensureReifiedTriplesOrSparqlStar(() => operation(lowercase($1), [$3]), () => operation(lowercase($1), [$3])) | FUNC_ARITY2 '(' Expression ',' Expression ')' -> operation(lowercase($1), [$3, $5]) | FUNC_ARITY3 '(' Expression ',' Expression ',' Expression ')' -> operation(lowercase($1), [$3, $5, $7]) - | FUNC_ARITY3_SPARQL_STAR '(' Expression ',' Expression ',' Expression ')' -> ensureSparqlStar(operation(lowercase($1), [$3, $5, $7])) + | FUNC_ARITY3_SPARQL_STAR '(' Expression ',' Expression ',' Expression ')' -> ensureReifiedTriplesOrSparqlStar(() => operation(lowercase($1), [$3, $5, $7]), () => operation(lowercase($1), [$3, $5, $7])) // [122], [123], [124] | ( 'CONCAT' | 'COALESCE' | 'SUBSTR' | 'REGEX' | 'REPLACE' ) ExpressionList -> operation(lowercase($1), $2) | 'BOUND' '(' VAR ')' -> operation('bound', [toVar($3)]) @@ -1493,60 +1633,98 @@ BlankNode // Note [139] - [173] are grammar terms that are written above // -// [174] -QuotedTP - : '<<' qtSubjectOrObject Verb qtSubjectOrObject '>>' -> ensureSparqlStar(nestedTriple($2, $3, $4)) +TripleTermPattern + : '<<(' TripleTermPatternSubject Verb ReifiedTriplePatternObject ')>>' -> ensureReifiedTriples(nestedTriple($2, $3, $4)) + ; + +ReifiedTriplePattern + : '<<' ReifiedTriplePatternSubject Verb ReifiedTriplePatternObject '>>' -> ensureReifiedTriplesOrSparqlStar(() => reifiedTriple($2, $3, $4, undefined), () => nestedTriple($2, $3, $4)) + | '<<' ReifiedTriplePatternSubject Verb ReifiedTriplePatternObject '~' ReifierOrVar '>>' -> ensureReifiedTriples(reifiedTriple($2, $3, $4, $6)) + ; + +TripleTerm + : '<<(' TripleTermSubject IriOrA ReifiedTripleObject ')>>' -> ensureReifiedTriples(nestedTriple($2, $3, $4)) ; -// [175] -QuotedTriple - : '<<' DataValueTerm IriOrA DataValueTerm '>>' -> ensureSparqlStar(nestedTriple($2, $3, $4)) +ReifiedTriple + : '<<' ReifiedTripleSubject IriOrA ReifiedTripleObject '>>' -> ensureReifiedTriplesOrSparqlStar(() => reifiedTriple($2, $3, $4, undefined), () => nestedTriple($2, $3, $4)) + | '<<' ReifiedTripleSubject IriOrA ReifiedTripleObject '~' Reifier '>>' -> ensureReifiedTriples(reifiedTriple($2, $3, $4, $6)) ; -// [176] -qtSubjectOrObject +ReifiedTriplePatternSubject : Var | iri | BlankNode + | ReifiedTriplePattern + ; + +ReifiedTriplePatternObject + : ReifiedTriplePatternSubject | Literal - | QuotedTP + | TripleTermPattern + ; + +TripleTermPatternSubject + : Var + | iri + | BlankNode ; +TripleTermSubject + : iri + | BlankNode + ; -// [177] -DataValueTerm +Reifier : iri + | BlankNode + ; + +ReifierOrVar + : Reifier + | Var + ; + +ReifiedTripleSubject + : iri + | ReifiedTriple + ; + +ReifiedTripleObject + : ReifiedTripleSubject | Literal - | QuotedTP + | TripleTerm ; // [178] -VarOrTermOrQuotedTP +VarOrTermOrReifiedTriplePattern : Var | GraphTerm - | QuotedTP + | TripleTermPattern + | ReifiedTriplePattern ; // [179] AnnotationPattern - : '{|' PropertyListNotEmpty '|}' -> ensureSparqlStar($2) + : '{|' PropertyListNotEmpty '|}' -> ensureReifiedTriplesOrSparqlStar(() => $2, () => $2) ; // [180] AnnotationPatternPath - : '{|' PropertyListPathNotEmpty '|}' -> ensureSparqlStar($2) + : '{|' PropertyListPathNotEmpty '|}' -> ensureReifiedTriplesOrSparqlStar(() => $2, () => $2) ; // [181] -ExprQuotedTP - : '<<' ExprVarOrTerm Verb ExprVarOrTerm '>>' -> ensureSparqlStar(nestedTriple($2, $3, $4)) +ExprReifiedTriple + : '<<(' ExprVarOrTerm Verb ExprVarOrTerm ')>>' -> ensureReifiedTriples(nestedTriple($2, $3, $4)) + | '<<' ExprVarOrTerm Verb ExprVarOrTerm '>>' -> ensureSparqlStar(nestedTriple($2, $3, $4)) ; // [182] ExprVarOrTerm : VarOrIri - | ExprQuotedTP + | ExprReifiedTriple | Literal ; diff --git a/queries/sparql-1-2-invalid/sparql-1-2-alternate-path-anonreifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-alternate-path-anonreifier.sparql new file mode 100644 index 00000000..4cca759c --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-alternate-path-anonreifier.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + <>. +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-alternate-path-reifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-alternate-path-reifier.sparql new file mode 100644 index 00000000..117b1598 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-alternate-path-reifier.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + <>. +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-alternate-path-tripleterm.sparql b/queries/sparql-1-2-invalid/sparql-1-2-alternate-path-tripleterm.sparql new file mode 100644 index 00000000..78bd8497 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-alternate-path-tripleterm.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + <<(s :p|:q ?o)>>. +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-alternate-path.sparql b/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-alternate-path.sparql new file mode 100644 index 00000000..0d7a8b7f --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-alternate-path.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + ?s :p|:q ?o {| ?pp ?oo |} . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-list-predicate.sparql b/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-list-predicate.sparql new file mode 100644 index 00000000..4cc91db7 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-list-predicate.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + :p ("abc") :o {| :q 123 |} . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-oneOrMore.sparql b/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-oneOrMore.sparql new file mode 100644 index 00000000..945b5fd3 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-oneOrMore.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + ?s :p+ ?o {| ?pp ?oo |} . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-optional.sparql b/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-optional.sparql new file mode 100644 index 00000000..000f586c --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-optional.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + :s :p? :o {| ?p ?o |} +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-path-on-start.sparql b/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-path-on-start.sparql new file mode 100644 index 00000000..d5eea04e --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-path-on-start.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + :s+ :p ?o {| ?pp ?oo |} . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-path.sparql b/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-path.sparql new file mode 100644 index 00000000..40d17362 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-path.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + ?s :p/:q ?o {| ?pp ?oo |}. +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-variable-path.sparql b/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-variable-path.sparql new file mode 100644 index 00000000..ddb6328c --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-annotated-anonreifier-variable-path.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + ?s1 ?p1/?p2 ?o1 {| ?p2 ?o2 |} +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-list-predicate.sparql b/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-list-predicate.sparql new file mode 100644 index 00000000..34cfdeb9 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-list-predicate.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + :p ("abc") :o ~ :iri {| :q 123 |} . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-oneOrMore.sparql b/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-oneOrMore.sparql new file mode 100644 index 00000000..7a593e8c --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-oneOrMore.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + ?s :p+ ?o ~ :iri {| ?pp ?oo |} . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-optional.sparql b/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-optional.sparql new file mode 100644 index 00000000..ed718d69 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-optional.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + :s :p? :o ~ :iri {| ?p ?o |} +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-path-on-start.sparql b/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-path-on-start.sparql new file mode 100644 index 00000000..d3018826 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-path-on-start.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + :s+ :p ?o ~ :iri {| ?pp ?oo |} . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-path.sparql b/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-path.sparql new file mode 100644 index 00000000..9c6a6361 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-path.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + ?s :p/:q ?o ~ :iri {| ?pp ?oo |}. +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-reifier-alternate-path.sparql b/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-reifier-alternate-path.sparql new file mode 100644 index 00000000..a1d1ba24 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-reifier-alternate-path.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + ?s :p|:q ?o ~ :iri {| ?pp ?oo |} . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-variable-path.sparql b/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-variable-path.sparql new file mode 100644 index 00000000..a8aa1ab6 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-annotated-reifier-variable-path.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + ?s1 ?p1/?p2 ?o1 ~ :iri {| ?p2 ?o2 |} +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-bind-anonreified.sparql b/queries/sparql-1-2-invalid/sparql-1-2-bind-anonreified.sparql new file mode 100644 index 00000000..8beb6066 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-bind-anonreified.sparql @@ -0,0 +1,4 @@ +SELECT * { + ?s ?p ?o . + BIND(<< ?s ?p ?o >> AS ?t ) +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-bind-reified.sparql b/queries/sparql-1-2-invalid/sparql-1-2-bind-reified.sparql new file mode 100644 index 00000000..c5125d1d --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-bind-reified.sparql @@ -0,0 +1,4 @@ +SELECT * { + ?s ?p ?o . + BIND(<< ?s ?p ?o ~ :iri >> AS ?t ) +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-bindbnode-anonreifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-bindbnode-anonreifier.sparql new file mode 100644 index 00000000..7bab89ea --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-bindbnode-anonreifier.sparql @@ -0,0 +1,4 @@ +SELECT * { + ?s ?p ?o . + BIND(<< [] ?p ?o >> AS ?t ) +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-bindbnode-reifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-bindbnode-reifier.sparql new file mode 100644 index 00000000..3a40a3d1 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-bindbnode-reifier.sparql @@ -0,0 +1,4 @@ +SELECT * { + ?s ?p ?o . + BIND(<< [] ?p ?o ~ :iri >> AS ?t ) +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-bindbnode-tripleterm.sparql b/queries/sparql-1-2-invalid/sparql-1-2-bindbnode-tripleterm.sparql new file mode 100644 index 00000000..1952fc80 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-bindbnode-tripleterm.sparql @@ -0,0 +1,4 @@ +SELECT * { + ?s ?p ?o . + BIND(<<( [] ?p ?o )>> AS ?t ) +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-bnode-predicate-anonreifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-bnode-predicate-anonreifier.sparql new file mode 100644 index 00000000..28b9547b --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-bnode-predicate-anonreifier.sparql @@ -0,0 +1,3 @@ +SELECT * WHERE { + <> ?p2 ?o2 . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-bnode-predicate-reifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-bnode-predicate-reifier.sparql new file mode 100644 index 00000000..9b1fadc8 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-bnode-predicate-reifier.sparql @@ -0,0 +1,3 @@ +SELECT * WHERE { + <> ?p2 ?o2 . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-bnode-predicate-tripleterm.sparql b/queries/sparql-1-2-invalid/sparql-1-2-bnode-predicate-tripleterm.sparql new file mode 100644 index 00000000..d5801ff7 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-bnode-predicate-tripleterm.sparql @@ -0,0 +1,3 @@ +SELECT * WHERE { + <<(?s [] ?o)>> ?p2 ?o2 . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-list-anonreifier-01.sparql b/queries/sparql-1-2-invalid/sparql-1-2-list-anonreifier-01.sparql new file mode 100644 index 00000000..b2354eac --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-list-anonreifier-01.sparql @@ -0,0 +1,9 @@ +PREFIX ex: +PREFIX rdf: + +SELECT * WHERE { + <> ex:author ex:Bob . + << ex:Moscow a ex:City >> ex:author ?person . + # TODO: See if this should be throwing an error + << _:b ex:x () >> ex:broken true . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-list-anonreifier-02.sparql b/queries/sparql-1-2-invalid/sparql-1-2-list-anonreifier-02.sparql new file mode 100644 index 00000000..8ff44240 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-list-anonreifier-02.sparql @@ -0,0 +1,9 @@ +PREFIX ex: +PREFIX rdf: + +SELECT * WHERE { + <> ex:author ex:Bob . + << ex:Moscow a ex:City >> ex:author ?person . + # TODO: See if this should be throwing an error + << _:b ex:x ( 1 2 3 ) >> ex:broken true . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-list-reifier-01.sparql b/queries/sparql-1-2-invalid/sparql-1-2-list-reifier-01.sparql new file mode 100644 index 00000000..74628c1c --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-list-reifier-01.sparql @@ -0,0 +1,9 @@ +PREFIX ex: +PREFIX rdf: + +SELECT * WHERE { + <> ex:author ex:Bob . + << ex:Moscow a ex:City ~ :iri >> ex:author ?person . + # TODO: See if this should be throwing an error + << _:b ex:x () ~ :iri >> ex:broken true . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-list-reifier-02.sparql b/queries/sparql-1-2-invalid/sparql-1-2-list-reifier-02.sparql new file mode 100644 index 00000000..56f9334a --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-list-reifier-02.sparql @@ -0,0 +1,9 @@ +PREFIX ex: +PREFIX rdf: + +SELECT * WHERE { + <> ex:author ex:Bob . + << ex:Moscow a ex:City ~ :iri >> ex:author ?person . + # TODO: See if this should be throwing an error + << _:b ex:x ( 1 2 3 ) ~ :iri >> ex:broken true . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-list-tripleterm-01.sparql b/queries/sparql-1-2-invalid/sparql-1-2-list-tripleterm-01.sparql new file mode 100644 index 00000000..689fccf5 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-list-tripleterm-01.sparql @@ -0,0 +1,9 @@ +PREFIX ex: +PREFIX rdf: + +SELECT * WHERE { + <<(?s ?p ?o)>> ex:author ex:Bob . + <<( ex:Moscow a ex:City )>> ex:author ?person . + # TODO: See if this should be throwing an error + <<( _:b ex:x () )>> ex:broken true . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-list-tripleterm-02.sparql b/queries/sparql-1-2-invalid/sparql-1-2-list-tripleterm-02.sparql new file mode 100644 index 00000000..5d21947f --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-list-tripleterm-02.sparql @@ -0,0 +1,9 @@ +PREFIX ex: +PREFIX rdf: + +SELECT * WHERE { + <<(?s ?p ?o)>> ex:author ex:Bob . + <<( ex:Moscow a ex:City )>> ex:author ?person . + # TODO: See if this should be throwing an error + <<( _:b ex:x ( 1 2 3 ) )>> ex:broken true . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-nested-annotated-path-anonreifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-nested-annotated-path-anonreifier.sparql new file mode 100644 index 00000000..f12ed561 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-nested-annotated-path-anonreifier.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + ?s ?p ?o {| :p/:q ?oo {| ?a ?b |} |}. +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-nested-annotated-path-reifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-nested-annotated-path-reifier.sparql new file mode 100644 index 00000000..3fdc552e --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-nested-annotated-path-reifier.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + ?s ?p ?o ~ :iri {| :p/:q ?oo ~ :iri {| ?a ?b |} |}. +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-object-anonreifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-object-anonreifier.sparql new file mode 100644 index 00000000..c07dcdee --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-object-anonreifier.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <> :q 123 . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-object-reifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-object-reifier.sparql new file mode 100644 index 00000000..d7d69813 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-object-reifier.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <> :q 123 . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-object-tripleterm.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-object-tripleterm.sparql new file mode 100644 index 00000000..b3f99d2b --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-object-tripleterm.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<(?s :p ("abc") )>> :q 123 . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-predicate-anonreifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-predicate-anonreifier.sparql new file mode 100644 index 00000000..c07dcdee --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-predicate-anonreifier.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <> :q 123 . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-predicate-reifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-predicate-reifier.sparql new file mode 100644 index 00000000..d7d69813 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-predicate-reifier.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <> :q 123 . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-predicate-tripleterm.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-predicate-tripleterm.sparql new file mode 100644 index 00000000..b3f99d2b --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-predicate-tripleterm.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<(?s :p ("abc") )>> :q 123 . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-subject-anonreifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-subject-anonreifier.sparql new file mode 100644 index 00000000..207ff627 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-subject-anonreifier.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<("abc") :p :o >> :q 123 . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-subject-reifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-subject-reifier.sparql new file mode 100644 index 00000000..1ffb2435 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-subject-reifier.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<("abc") :p :o ~ :iri >> :q 123 . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-subject-tripleterm.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-subject-tripleterm.sparql new file mode 100644 index 00000000..934a0140 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-list-subject-tripleterm.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<(("abc") :p :o )>> :q 123 . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-anonreifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-anonreifier.sparql new file mode 100644 index 00000000..61e1eaa9 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-anonreifier.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + <>. +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-bind-anonreifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-bind-anonreifier.sparql new file mode 100644 index 00000000..139bda23 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-bind-anonreifier.sparql @@ -0,0 +1,6 @@ +PREFIX : + +SELECT * { + ?s ?p ?o . + BIND(<< ?s :p/:q ?o >> AS ?t ) +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-bind-reifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-bind-reifier.sparql new file mode 100644 index 00000000..bc456f3f --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-bind-reifier.sparql @@ -0,0 +1,6 @@ +PREFIX : + +SELECT * { + ?s ?p ?o . + BIND(<< ?s :p/:q ?o ~ :iri >> AS ?t ) +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-bind-tripleterm.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-bind-tripleterm.sparql new file mode 100644 index 00000000..124a4001 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-bind-tripleterm.sparql @@ -0,0 +1,6 @@ +PREFIX : + +SELECT * { + ?s ?p ?o . + BIND(<<( ?s :p/:q ?o )>> AS ?t ) +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-reifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-reifier.sparql new file mode 100644 index 00000000..d2e893a8 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-reifier.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + <>. +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-tripleterm.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-tripleterm.sparql new file mode 100644 index 00000000..ae50e1e8 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-path-tripleterm.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + <<(?s :p/:q ?o)>>. +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-variable-path-anonreifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-variable-path-anonreifier.sparql new file mode 100644 index 00000000..aa081b1d --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-variable-path-anonreifier.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + <> +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-variable-path-reifier.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-variable-path-reifier.sparql new file mode 100644 index 00000000..3bd39e81 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-variable-path-reifier.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + <> +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-quoted-variable-path-tripleterm.sparql b/queries/sparql-1-2-invalid/sparql-1-2-quoted-variable-path-tripleterm.sparql new file mode 100644 index 00000000..5c714e85 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-quoted-variable-path-tripleterm.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + <<(?s1 ?p1/?p2 ?o1)>> +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-syntax-basic-tripleterm-subject.sparql b/queries/sparql-1-2-invalid/sparql-1-2-syntax-basic-tripleterm-subject.sparql new file mode 100644 index 00000000..05637003 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-syntax-basic-tripleterm-subject.sparql @@ -0,0 +1,10 @@ +PREFIX : + +SELECT * { + VALUES ?x { + <<(:s :p :o )>> + <<( <<(:s :p :o )>> :q :z )>> + } + VALUES (?y ?z) { (<<(:s :p :o )>> 123 ) + (123 <<(:s :p :o )>> ) } +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-syntax-compound-tripleterm-subject.sparql b/queries/sparql-1-2-invalid/sparql-1-2-syntax-compound-tripleterm-subject.sparql new file mode 100644 index 00000000..ebde1a79 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-syntax-compound-tripleterm-subject.sparql @@ -0,0 +1,10 @@ +PREFIX : + +SELECT * { + + <<(:x ?R :z )>> :p <<(:a :b ?C )>> . + + <<( <<(:x ?R :z )>> :p <<(:a :b [] )>> )>> + :q + <<( <<([] ?R :z )>> :p <<(:a :b [] )>> )>> . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-syntax-subject-tripleterm.sparql b/queries/sparql-1-2-invalid/sparql-1-2-syntax-subject-tripleterm.sparql new file mode 100644 index 00000000..81997905 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-syntax-subject-tripleterm.sparql @@ -0,0 +1,10 @@ +PREFIX : + +SELECT * { + + <<:x ?R :z >> :p <<:a :b ?C ~ _:bnode >> . + + << <<(:x ?R :z )>> :p <<:a :b [] >> ~ _:bnode >> + :q + << <<[] ?R :z ~ :iri >> :p <<:a :b [] >> >> . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-syntax-update-anonreifier-01.sparql b/queries/sparql-1-2-invalid/sparql-1-2-syntax-update-anonreifier-01.sparql new file mode 100644 index 00000000..f592be61 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-syntax-update-anonreifier-01.sparql @@ -0,0 +1,7 @@ +PREFIX : + +DELETE { + ?s :r ?o {| :added 'Property :r' |} +} WHERE { + ?s :p ?o {| :q1+ 'ABC' |} +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-syntax-update-anonreifier-02.sparql b/queries/sparql-1-2-invalid/sparql-1-2-syntax-update-anonreifier-02.sparql new file mode 100644 index 00000000..af933e37 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-syntax-update-anonreifier-02.sparql @@ -0,0 +1,11 @@ +PREFIX : + +DELETE DATA { + :s :p :o1 {| :added 'Test' |} +} +; +INSERT DATA { + :s :p :o2 {| :added 'Test' |} +} + + diff --git a/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-01.sparql b/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-01.sparql new file mode 100644 index 00000000..497b9895 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + <<( ?s ?p ?o )>> . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-02.sparql b/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-02.sparql new file mode 100644 index 00000000..91a6d9dc --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-02.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + <<( :s :p :o )>> . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-03.sparql b/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-03.sparql new file mode 100644 index 00000000..0cf5b5ea --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-03.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + <<( :s :p <<( ?s :p2 :o2 )>> )>> . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-04.sparql b/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-04.sparql new file mode 100644 index 00000000..b2f4a016 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-04.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + <<( ?s ?p ?o )>> . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-05.sparql b/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-05.sparql new file mode 100644 index 00000000..7e55f929 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-05.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + <<( :s :p :o )>> . +} diff --git a/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-06.sparql b/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-06.sparql new file mode 100644 index 00000000..cddd7b61 --- /dev/null +++ b/queries/sparql-1-2-invalid/sparql-1-2-tripleterm-separate-06.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + <<( :s :p <<( ?s :p2 :o2 )>> )>> . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-01.sparql b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-01.sparql new file mode 100644 index 00000000..efe35adb --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?s ?p ?o {| :r ?Z |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-02.sparql b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-02.sparql new file mode 100644 index 00000000..e06599fd --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-02.sparql @@ -0,0 +1,12 @@ +PREFIX : +PREFIX xsd: + +SELECT * { + :s :p :o {| :source [ :graph ; + :date "2020-01-20"^^xsd:date + ] ; + ?source [ :graph ; + :date "2020-12-31"^^xsd:date + ] + |} +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-03.sparql b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-03.sparql new file mode 100644 index 00000000..b1b7a91d --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-03.sparql @@ -0,0 +1,6 @@ +PREFIX : +PREFIX xsd: + +SELECT * { + :s :p <<:a :b :c>> {| ?q ?z |} +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-04.sparql b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-04.sparql new file mode 100644 index 00000000..7d39ec1e --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-04.sparql @@ -0,0 +1,6 @@ +PREFIX : +PREFIX xsd: + +SELECT * { + :s :p <<:a :b :c>> {| ?q <<:s1 :p1 ?z>> |} +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-05.sparql b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-05.sparql new file mode 100644 index 00000000..638804da --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-05.sparql @@ -0,0 +1,6 @@ +PREFIX : +PREFIX xsd: + +SELECT * { + <> ?p ?o {| :r ?Z |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-06.sparql b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-06.sparql new file mode 100644 index 00000000..cad28149 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-06.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?s ?p ?o {| :r/:q 'ABC' |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-07.sparql b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-07.sparql new file mode 100644 index 00000000..c6bb787e --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-07.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?s ?p ?o {| :r [ :p1|:p2 'ABC'] |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-08.sparql b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-08.sparql new file mode 100644 index 00000000..e8af673c --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-08.sparql @@ -0,0 +1,6 @@ +PREFIX : + +CONSTRUCT { + ?s ?p ?o {| :source ?g |} +} +WHERE { GRAPH ?g { ?s ?p ?o } } diff --git a/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-09.sparql b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-09.sparql new file mode 100644 index 00000000..2694e566 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-09.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + ?s :p ?o {| :q1 ?z |} +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-01.sparql b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-01.sparql new file mode 100644 index 00000000..ee64e8c5 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?s :p ?o {| :r1 ?Z1 |} {| :r2 ?Z2 |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-02.sparql b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-02.sparql new file mode 100644 index 00000000..60cbcae6 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-02.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?s ?p ?o {| :r1 ?Z1 |} {| :r2 ?Z2 |} {| :r3 ?Z3 |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-03.sparql b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-03.sparql new file mode 100644 index 00000000..50ec7430 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-03.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + ?s :p ?o {| :r1 ?Z1 |} {| :r2 ?Z2 |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-04.sparql b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-04.sparql new file mode 100644 index 00000000..73922f07 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-04.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + ?s ?p ?o {| :r1 ?Z1 |} {| :r2 ?Z2 |} {| :r3 ?Z3 |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-01.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-01.sparql new file mode 100644 index 00000000..072d4249 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?s ?p ?o ~ :iri {| :r ?Z |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-02.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-02.sparql new file mode 100644 index 00000000..a658edd5 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-02.sparql @@ -0,0 +1,12 @@ +PREFIX : +PREFIX xsd: + +SELECT * { + :s :p :o ~ :iri {| :source [ :graph ; + :date "2020-01-20"^^xsd:date + ] ; + ?source [ :graph ; + :date "2020-12-31"^^xsd:date + ] + |} +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-03.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-03.sparql new file mode 100644 index 00000000..d1a62bef --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-03.sparql @@ -0,0 +1,6 @@ +PREFIX : +PREFIX xsd: + +SELECT * { + :s :p <<:a :b :c>> ~ _:bnode {| ?q ?z |} +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-04.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-04.sparql new file mode 100644 index 00000000..5b2701e9 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-04.sparql @@ -0,0 +1,6 @@ +PREFIX : +PREFIX xsd: + +SELECT * { + :s :p <<:a :b :c>> ~ :iri {| ?q <<:s1 :p1 ?z>> |} +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-05.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-05.sparql new file mode 100644 index 00000000..8ae34730 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-05.sparql @@ -0,0 +1,6 @@ +PREFIX : +PREFIX xsd: + +SELECT * { + <> ?p ?o ~ :iri {| :r ?Z |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-06.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-06.sparql new file mode 100644 index 00000000..9f682e64 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-06.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?s ?p ?o ~ :iri {| :r/:q 'ABC' |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-07.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-07.sparql new file mode 100644 index 00000000..659d668a --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-07.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?s ?p ?o ~ :iri {| :r [ :p1|:p2 'ABC'] |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-08.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-08.sparql new file mode 100644 index 00000000..68c27967 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-08.sparql @@ -0,0 +1,6 @@ +PREFIX : + +CONSTRUCT { + ?s ?p ?o ~ :iri {| :source ?g |} +} +WHERE { GRAPH ?g { ?s ?p ?o } } diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-09.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-09.sparql new file mode 100644 index 00000000..3e46b0d3 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-09.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + ?s :p ?o ~ _:bnode {| :q1 ?z |} +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-01.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-01.sparql new file mode 100644 index 00000000..2c17910b --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?s ?p ?o ~ :iri . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-02.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-02.sparql new file mode 100644 index 00000000..40039351 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-02.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?s :p ?o ~ :iri1 {| :r1 ?Z1 |} ~:iri2 . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-03.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-03.sparql new file mode 100644 index 00000000..087f3308 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-03.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?s :p ?o ~ :iri1 {| :r1 ?Z1 |} ~:iri2 {| :r2 ?Z2 |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-04.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-04.sparql new file mode 100644 index 00000000..ecbac66f --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-04.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?s ?p ?o ~ :iri1 {| :r1 ?Z1 |} ~ :iri2 {| :r2 ?Z2 |} ~ :iri3 {| :r3 ?Z3 |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-05.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-05.sparql new file mode 100644 index 00000000..93401c99 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-05.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?s ?p ?o ~ :iri1 ~ :iri2 {| :r1 ?Z1 |} {| :r2 ?Z2 |} ~ :iri3 {| :r3 ?Z3 |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-06.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-06.sparql new file mode 100644 index 00000000..fd3f1607 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-06.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + ?s ?p ?o ~ :iri . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-07.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-07.sparql new file mode 100644 index 00000000..ebac267c --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-07.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + ?s :p ?o ~ :iri1 {| :r1 ?Z1 |} ~:iri2 . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-08.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-08.sparql new file mode 100644 index 00000000..7679344f --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-08.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + ?s :p ?o ~ :iri1 {| :r1 ?Z1 |} ~:iri2 {| :r2 ?Z2 |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-09.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-09.sparql new file mode 100644 index 00000000..45ca4614 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-09.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + ?s ?p ?o ~ :iri1 {| :r1 ?Z1 |} ~ :iri2 {| :r2 ?Z2 |} ~ :iri3 {| :r3 ?Z3 |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-10.sparql b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-10.sparql new file mode 100644 index 00000000..b19bb157 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-10.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + ?s ?p ?o ~ :iri1 ~ :iri2 {| :r1 ?Z1 |} {| :r2 ?Z2 |} ~ :iri3 {| :r3 ?Z3 |} . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-01.sparql new file mode 100644 index 00000000..d48d407b --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + << :a :b :c >> :p1 :o1. +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-02.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-02.sparql new file mode 100644 index 00000000..9660efec --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-02.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + :s :p << :a :b "c" >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-03.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-03.sparql new file mode 100644 index 00000000..e4cbd4c7 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-03.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + << ?s ?p ?o >> ?Y ?Z . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-04.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-04.sparql new file mode 100644 index 00000000..a036a8e9 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-04.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?S ?P << ?a ?b ?c >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-06.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-06.sparql new file mode 100644 index 00000000..88fe48d1 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-06.sparql @@ -0,0 +1,4 @@ +PREFIX : + +CONSTRUCT { <<:s :p :o >> :q :z } +WHERE {} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-07.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-07.sparql new file mode 100644 index 00000000..d0af4d4d --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-07.sparql @@ -0,0 +1,6 @@ +PREFIX : + +CONSTRUCT WHERE { + <> ?q ?z . + ?a ?b <> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-08.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-08.sparql new file mode 100644 index 00000000..b4efdfd2 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-08.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + << ?s ?p ?o >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-09.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-09.sparql new file mode 100644 index 00000000..30d0c846 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-09.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + << :s :p :o >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-10.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-10.sparql new file mode 100644 index 00000000..148ed1e2 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-10.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + << :s :p << ?s :p2 :o2 >> >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-11.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-11.sparql new file mode 100644 index 00000000..3444956c --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-11.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + << ?s ?p ?o >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-12.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-12.sparql new file mode 100644 index 00000000..c8e813a0 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-12.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + << :s :p :o >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-13.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-13.sparql new file mode 100644 index 00000000..1219f480 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-13.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + << :s :p << ?s :p2 :o2 >> >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-01.sparql new file mode 100644 index 00000000..115d6a31 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + << :a :b :c ~ :iri >> :p1 :o1. +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-02.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-02.sparql new file mode 100644 index 00000000..20e1db93 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-02.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + :s :p << :a :b "c" ~ :iri >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-03.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-03.sparql new file mode 100644 index 00000000..b93c63fe --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-03.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + << ?s ?p ?o ~ _:bnode >> ?Y ?Z . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-04.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-04.sparql new file mode 100644 index 00000000..c30f2b6a --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-04.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?S ?P << ?a ?b ?c ~ :iri >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-06.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-06.sparql new file mode 100644 index 00000000..09b392fe --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-06.sparql @@ -0,0 +1,4 @@ +PREFIX : + +CONSTRUCT { <<:s :p :o ~ :iri >> :q :z } +WHERE {} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-07.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-07.sparql new file mode 100644 index 00000000..9257c6c5 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-07.sparql @@ -0,0 +1,6 @@ +PREFIX : + +CONSTRUCT WHERE { + <> ?q ?z . + ?a ?b <> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-08.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-08.sparql new file mode 100644 index 00000000..a5485c4c --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-08.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + << ?s ?p ?o ~ :iri >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-09.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-09.sparql new file mode 100644 index 00000000..ebcd537c --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-09.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + << :s :p :o ~ :iri >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-10.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-10.sparql new file mode 100644 index 00000000..bf6a5a20 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-10.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * WHERE { + << :s :p << ?s :p2 :o2 ~ :iri2 >> ~ :iri1 >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-11.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-11.sparql new file mode 100644 index 00000000..0ee2b9f3 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-11.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + << ?s ?p ?o ~ :iri >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-12.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-12.sparql new file mode 100644 index 00000000..da5bc7ee --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-12.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + << :s :p :o ~ :iri >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-13.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-13.sparql new file mode 100644 index 00000000..8aecb8f0 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-reifier-13.sparql @@ -0,0 +1,5 @@ +PREFIX : + +CONSTRUCT WHERE { + << :s :p << ?s :p2 :o2 ~ :iri2 >> ~ :iri1 >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-01.sparql new file mode 100644 index 00000000..b2e6757d --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<( :a :b :c )>> :p1 :o1. +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-02.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-02.sparql new file mode 100644 index 00000000..d2754ae1 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-02.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + :s :p <<( :a :b "c" )>> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-03.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-03.sparql new file mode 100644 index 00000000..5fdcad65 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-03.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<( ?s ?p ?o )>> ?Y ?Z . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-04.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-04.sparql new file mode 100644 index 00000000..d8441ab9 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-04.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ?S ?P <<( ?a ?b ?c )>> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-05.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-05.sparql new file mode 100644 index 00000000..c3388891 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-05.sparql @@ -0,0 +1,10 @@ +PREFIX : + +SELECT * { + VALUES ?x { + <<(:s :p :o )>> + <<( :x :q <<(:s :p :o )>> )>> + } + VALUES (?y ?z) { (<<(:s :p :o )>> 123 ) + (123 <<(:s :p :o )>> ) } +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-06.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-06.sparql new file mode 100644 index 00000000..81488a26 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-06.sparql @@ -0,0 +1,4 @@ +PREFIX : + +CONSTRUCT { :s :q <<(:s :p :o )>> } +WHERE {} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-07.sparql b/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-07.sparql new file mode 100644 index 00000000..a6b45b4f --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-07.sparql @@ -0,0 +1,6 @@ +PREFIX : + +CONSTRUCT WHERE { + :s ?q <<(?s ?p :o )>> . + ?a ?b <<(?s ?p ?o )>> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-01.sparql new file mode 100644 index 00000000..01e549be --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<_:a :p :o >> :q 456 . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-02.sparql b/queries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-02.sparql new file mode 100644 index 00000000..8bebeb24 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-02.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<:s :p _:a >> :q 456 . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-03.sparql b/queries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-03.sparql new file mode 100644 index 00000000..8af6ea71 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-03.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<[] :p [] >> :q :z . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-01.sparql new file mode 100644 index 00000000..86e96d99 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<_:a :p :o ~ :iri >> :q 456 . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-02.sparql b/queries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-02.sparql new file mode 100644 index 00000000..1aca35d6 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-02.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<:s :p _:a ~ _:bnode >> :q 456 . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-03.sparql b/queries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-03.sparql new file mode 100644 index 00000000..8a68c066 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-03.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<[] :p [] ~ :iri >> :q :z . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-01.sparql new file mode 100644 index 00000000..6709094d --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<(_:a :p :o )>> :q 456 . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-02.sparql b/queries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-02.sparql new file mode 100644 index 00000000..f30a4a8c --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-02.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<(:s :p _:a )>> :q 456 . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-03.sparql b/queries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-03.sparql new file mode 100644 index 00000000..573301ea --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-03.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + <<([] :p [] )>> :q :z . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-compound-all.sparql b/queries/sparql-1-2/sparql-1-2-syntax-compound-all.sparql new file mode 100644 index 00000000..79f30c34 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-compound-all.sparql @@ -0,0 +1,10 @@ +PREFIX : + +SELECT * { + + <<:x ?R :z >> :p <<:a :b ?C ~ _:bnode >> . + + << <<:x ?R :z >> :p <<(:a :b [] )>> ~ _:bnode >> + :q + << <<[] ?R :z ~ :iri >> :p <<:a :b [] >> >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-compound-anonreifier.sparql b/queries/sparql-1-2/sparql-1-2-syntax-compound-anonreifier.sparql new file mode 100644 index 00000000..ee448d4e --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-compound-anonreifier.sparql @@ -0,0 +1,10 @@ +PREFIX : + +SELECT * { + + <<:x ?R :z >> :p <<:a :b ?C >> . + + << <<:x ?R :z >> :p <<:a :b [] >> >> + :q + << <<[] ?R :z >> :p <<:a :b [] >> >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-compound-reifier.sparql b/queries/sparql-1-2/sparql-1-2-syntax-compound-reifier.sparql new file mode 100644 index 00000000..f2f56ef0 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-compound-reifier.sparql @@ -0,0 +1,10 @@ +PREFIX : + +SELECT * { + + <<:x ?R :z ~ :iri1 >> :p <<:a :b ?C ~ :iri2 >> . + + << <<:x ?R :z ~ _:bnode1 >> :p <<:a :b [] ~ _:bnode1 >> ~ :iri3 >> + :q + << <<[] ?R :z ~ _:bnode2 >> :p <<:a :b [] ~_:bnode2 >> ~:iri3 >> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-compound-tripleterm.sparql b/queries/sparql-1-2/sparql-1-2-syntax-compound-tripleterm.sparql new file mode 100644 index 00000000..872fbfad --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-compound-tripleterm.sparql @@ -0,0 +1,9 @@ +PREFIX : + +SELECT * { + + ?s :p <<(:a :b ?C )>> . + ?s + :q + <<( ?s1 :p <<(:a :b [] )>> )>> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-01.sparql new file mode 100644 index 00000000..d7133da1 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-01.sparql @@ -0,0 +1,6 @@ +PREFIX : + +SELECT * { + ?s ?p ?o . + BIND(<<(?s ?p ?o)>> AS ?t) +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-03.sparql b/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-03.sparql new file mode 100644 index 00000000..83526adb --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-03.sparql @@ -0,0 +1,6 @@ +PREFIX : + +SELECT * { + ?s ?p ?o . + BIND(TRIPLE(?s, ?p, ?o) AS ?t1) +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-04.sparql b/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-04.sparql new file mode 100644 index 00000000..1d7e04ce --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-04.sparql @@ -0,0 +1,6 @@ +PREFIX : + +SELECT * { + ?s ?p ?o . + BIND(TRIPLE(?s, ?p, str(?o)) AS ?t2) +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-05.sparql b/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-05.sparql new file mode 100644 index 00000000..5b3d6020 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-05.sparql @@ -0,0 +1,9 @@ +PREFIX : + +SELECT * { + ?t :source :g + FILTER(isTriple(?t)) + FILTER(SUBJECT(?t) = :s) + FILTER(PREDICATE(?t) = :p) + FILTER(OBJECT(?t) = :o) +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-06.sparql b/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-06.sparql new file mode 100644 index 00000000..f7450d3f --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-06.sparql @@ -0,0 +1,10 @@ +PREFIX : + +CONSTRUCT { + ?t :graph ?g . +} WHERE { + GRAPH ?g { + ?s ?p ?o . + BIND(<<(?s ?p ?o)>> AS ?t) + } +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-inside-anonreifier-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-inside-anonreifier-01.sparql new file mode 100644 index 00000000..7f2cc1eb --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-inside-anonreifier-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + [ ?Q <<:s ?P :o>> ] :b :c . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-inside-anonreifier-02.sparql b/queries/sparql-1-2/sparql-1-2-syntax-inside-anonreifier-02.sparql new file mode 100644 index 00000000..f94cbdc2 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-inside-anonreifier-02.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ( <> <> ) :q 123 . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-inside-reifier-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-inside-reifier-01.sparql new file mode 100644 index 00000000..4c3f39cd --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-inside-reifier-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + [ ?Q <<:s ?P :o ~ :iri>> ] :b :c . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-inside-reifier-02.sparql b/queries/sparql-1-2/sparql-1-2-syntax-inside-reifier-02.sparql new file mode 100644 index 00000000..aa8d396d --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-inside-reifier-02.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ( <> <> ) :q 123 . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-inside-tripleterm-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-inside-tripleterm-01.sparql new file mode 100644 index 00000000..11d5ec3b --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-inside-tripleterm-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + [ ?Q <<(:s ?P :o)>> ] :b :c . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-inside-tripleterm-02.sparql b/queries/sparql-1-2/sparql-1-2-syntax-inside-tripleterm-02.sparql new file mode 100644 index 00000000..8d497177 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-inside-tripleterm-02.sparql @@ -0,0 +1,5 @@ +PREFIX : + +SELECT * { + ( <<(?S1 :p :o1)>> <<(?S2 :p :o2)>> ) :q 123 . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-nested-anonreifier-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-nested-anonreifier-01.sparql new file mode 100644 index 00000000..7905cffa --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-nested-anonreifier-01.sparql @@ -0,0 +1,6 @@ +PREFIX : + +SELECT * { + <> :r :z . + << <> :r :z >> :q 1 . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-nested-anonreifier-02.sparql b/queries/sparql-1-2/sparql-1-2-syntax-nested-anonreifier-02.sparql new file mode 100644 index 00000000..df1e2891 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-nested-anonreifier-02.sparql @@ -0,0 +1,6 @@ +PREFIX : + +SELECT * { + :a :q <<:s :p ?O >> . + << :a :q <<:s :p ?O >>>> :r :z . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-nested-reifier-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-nested-reifier-01.sparql new file mode 100644 index 00000000..ed0fb15d --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-nested-reifier-01.sparql @@ -0,0 +1,6 @@ +PREFIX : + +SELECT * { + <> :r :z . + << <> :r :z ~ _:bnode >> :q 1 . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-nested-reifier-02.sparql b/queries/sparql-1-2/sparql-1-2-syntax-nested-reifier-02.sparql new file mode 100644 index 00000000..a51f5401 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-nested-reifier-02.sparql @@ -0,0 +1,6 @@ +PREFIX : + +SELECT * { + :a :q <<:s :p ?O ~ :iri >> . + << :a :q <<:s :p ?O ~ :iri >> ~ _:bnode>> :r :z . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-nested-tripleterm-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-nested-tripleterm-01.sparql new file mode 100644 index 00000000..e8abaaf1 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-nested-tripleterm-01.sparql @@ -0,0 +1,6 @@ +PREFIX : + +SELECT * { + :s :r <<(?S :p :o )>> . + :s :q <<( :s1 :r <<(?S :p :o )>> )>> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-01.sparql new file mode 100644 index 00000000..bbaa7b31 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +INSERT DATA { + << :a :b :c >> :p :o . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-02.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-02.sparql new file mode 100644 index 00000000..181b5737 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-02.sparql @@ -0,0 +1,5 @@ +PREFIX : + +INSERT DATA { + :s :p :o {| :y :z |} +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-03.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-03.sparql new file mode 100644 index 00000000..006d8ede --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-03.sparql @@ -0,0 +1,8 @@ +PREFIX : + +INSERT { + << :a :b :c >> ?P :o2 {| ?Y ?Z |} +} WHERE { + << :a :b :c >> ?P :o1 {| ?Y ?Z |} +} + diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-04.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-04.sparql new file mode 100644 index 00000000..3eb66943 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-04.sparql @@ -0,0 +1,8 @@ +PREFIX : + +INSERT { + << :a :b :c >> ?P :o2 {| ?Y <<:s1 :p1 ?Z>> |} +} WHERE { + << :a :b :c >> ?P :o1 {| ?Y <<:s1 :p1 ?Z>> |} +} + diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-05.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-05.sparql new file mode 100644 index 00000000..91865b70 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-05.sparql @@ -0,0 +1,7 @@ +PREFIX : + +INSERT { + ?S ?P << :a :b ?O >> {| ?Y ?Z |} +} WHERE { + ?S ?P << :a :b ?O >> {| ?Y ?Z |} +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-06.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-06.sparql new file mode 100644 index 00000000..0fb22acd --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-06.sparql @@ -0,0 +1,7 @@ +PREFIX : + +INSERT { + ?s :r ?o {| :added 'Property :r' |} +} WHERE { + ?s :p/:q ?o . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-01.sparql new file mode 100644 index 00000000..faec9203 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +INSERT DATA { + << :a :b :c ~ :iri >> :p :o . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-02.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-02.sparql new file mode 100644 index 00000000..0e63cbbe --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-02.sparql @@ -0,0 +1,5 @@ +PREFIX : + +INSERT DATA { + :s :p :o ~ :iri {| :y :z |} +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-03.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-03.sparql new file mode 100644 index 00000000..9113f1a9 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-03.sparql @@ -0,0 +1,8 @@ +PREFIX : + +INSERT { + << :a :b :c ~ :iri >> ?P :o2 {| ?Y ?Z |} +} WHERE { + << :a :b :c ~ :iri >> ?P :o1 {| ?Y ?Z |} +} + diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-04.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-04.sparql new file mode 100644 index 00000000..e822d77b --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-04.sparql @@ -0,0 +1,8 @@ +PREFIX : + +INSERT { + << :a :b :c ~ _:bnode >> ?P :o2 {| ?Y <<:s1 :p1 ?Z ~ :iri>> |} +} WHERE { + << :a :b :c ~ _:bnode >> ?P :o1 {| ?Y <<:s1 :p1 ?Z ~ :iri>> |} +} + diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-05.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-05.sparql new file mode 100644 index 00000000..3b93d0df --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-05.sparql @@ -0,0 +1,7 @@ +PREFIX : + +INSERT { + ?S ?P << :a :b ?O~ :iri >> {| ?Y ?Z |} +} WHERE { + ?S ?P << :a :b ?O~ :iri >> {| ?Y ?Z |} +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-06.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-06.sparql new file mode 100644 index 00000000..6fafaced --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-06.sparql @@ -0,0 +1,7 @@ +PREFIX : + +INSERT { + ?s :r ?o~ :iri {| :added 'Property :r' |} +} WHERE { + ?s :p/:q ?o . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-07.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-07.sparql new file mode 100644 index 00000000..c712cf17 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-07.sparql @@ -0,0 +1,7 @@ +PREFIX : + +DELETE { + ?s :r ?o~ :iri {| :added 'Property :r' |} +} WHERE { + ?s :p ?o~ :iri {| :q1+ 'ABC' |} +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-08.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-08.sparql new file mode 100644 index 00000000..160ec1f1 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-reifier-08.sparql @@ -0,0 +1,11 @@ +PREFIX : + +DELETE DATA { + :s :p :o1 ~ :iri {| :added 'Test' |} +} +; +INSERT DATA { + :s :p :o2 ~ :iri {| :added 'Test' |} +} + + diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-01.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-01.sparql new file mode 100644 index 00000000..77c31669 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-01.sparql @@ -0,0 +1,5 @@ +PREFIX : + +INSERT DATA { + :s :p <<( :a :b :c )>> . +} diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-03.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-03.sparql new file mode 100644 index 00000000..8f7b07c4 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-03.sparql @@ -0,0 +1,8 @@ +PREFIX : + +INSERT { + ?S ?P <<( :a :b :c )>> {| ?Y ?Z |} +} WHERE { + :s ?P <<( :a :b :c )>> {| ?Y ?Z |} +} + diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-04.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-04.sparql new file mode 100644 index 00000000..486fed57 --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-04.sparql @@ -0,0 +1,8 @@ +PREFIX : + +INSERT { + :s ?P <<( :a :b :c )>> {| ?Y <<(:s1 :p1 ?Z)>> |} +} WHERE { + ?s ?P <<( :a :b :c )>> {| ?Y <<(:s1 :p1 ?Z)>> |} +} + diff --git a/queries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-05.sparql b/queries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-05.sparql new file mode 100644 index 00000000..ac50de9d --- /dev/null +++ b/queries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-05.sparql @@ -0,0 +1,7 @@ +PREFIX : + +INSERT { + ?S ?P <<( :a :b ?O )>> {| ?Y ?Z |} +} WHERE { + ?S ?P <<( :a :b ?O )>> {| ?Y ?Z |} +} diff --git a/sparql.js b/sparql.js index c41d648f..b6765543 100644 --- a/sparql.js +++ b/sparql.js @@ -20,6 +20,7 @@ function _Parser({ factory, pathOnly, sparqlStar, + reifiedTriples, skipValidation, skipUngroupedVariableCheck, } = {}) { @@ -36,6 +37,7 @@ function _Parser({ Parser.prefixes = Object.create(prefixesCopy); Parser.factory = factory || new DataFactory(); Parser.sparqlStar = Boolean(sparqlStar); + Parser.reifiedTriples = Boolean(reifiedTriples); Parser.pathOnly = Boolean(pathOnly); // We keep skipUngroupedVariableCheck for compatibility reasons. Parser.skipValidation = Boolean(skipValidation) || Boolean(skipUngroupedVariableCheck) diff --git a/test/SparqlParser-test.js b/test/SparqlParser-test.js index 1e5a62c7..7e2e5100 100644 --- a/test/SparqlParser-test.js +++ b/test/SparqlParser-test.js @@ -21,6 +21,7 @@ describe('A SPARQL parser', function () { describe('in SPARQL mode', () => { testQueries('sparql', {}); + testQueries('sparql-1-2', { mustError: true }); testQueries('sparqlstar', { mustError: true }); testQueries('sparql-skip-validation', { mustError: true }); testQueries('sparqlstar-spec', { mustError: true }); @@ -28,6 +29,7 @@ describe('A SPARQL parser', function () { describe('in SPARQL mode with skipValidation', () => { testQueries('sparql', { skipValidation: true }); + testQueries('sparql-1-2', { skipValidation: true, mustError: true }); testQueries('sparqlstar', { skipValidation: true, mustError: true }); testQueries('sparqlstar-annotated', { skipValidation: true, mustError: true }); testQueries('sparqlstar-nested-quads', { skipValidation: true, mustError: true }); @@ -36,6 +38,13 @@ describe('A SPARQL parser', function () { testQueries('sparqlstar-spec', { mustError: true }); }); + describe('in SPARQL-1.2 mode', () => { + testQueries('sparql', { reifiedTriples: true }); + testQueries('sparql-1-2', { reifiedTriples: true }); + testQueries('sparql-skip-validation', { reifiedTriples: true, mustError: true }); + testQueries('sparql-1-2-invalid', { reifiedTriples: true, mustError: true }); + }); + describe('in SPARQL-star mode', () => { testQueries('sparql', { sparqlStar: true }); testQueries('sparqlstar', { sparqlStar: true }); @@ -451,6 +460,11 @@ function testQueries(directory, settings) { queries.sort(); queries.forEach(function (query) { + // Skip hidden files + if (query.startsWith('.')) { + return; + } + var sparql = fs.readFileSync(queriesPath + directory + '/' + query + '.sparql', 'utf8'); var parsedQueryFile = parsedQueriesPath + directory + '/' + query + '.json'; diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-01.json new file mode 100644 index 00000000..8ffd612c --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-01.json @@ -0,0 +1,84 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-02.json new file mode 100644 index 00000000..31e8013c --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-02.json @@ -0,0 +1,165 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#source" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "Variable", + "value": "source" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#graph" + }, + "object": { + "termType": "NamedNode", + "value": "http://host2/" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#date" + }, + "object": { + "termType": "Literal", + "value": "2020-12-31", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#date" + } + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#graph" + }, + "object": { + "termType": "NamedNode", + "value": "http://host1/" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#date" + }, + "object": { + "termType": "Literal", + "value": "2020-01-20", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#date" + } + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-03.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-03.json new file mode 100644 index 00000000..6d44d152 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-03.json @@ -0,0 +1,121 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "Variable", + "value": "q" + }, + "object": { + "termType": "Variable", + "value": "z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-04.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-04.json new file mode 100644 index 00000000..910280a6 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-04.json @@ -0,0 +1,157 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + "object": { + "termType": "Variable", + "value": "z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "Variable", + "value": "q" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-05.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-05.json new file mode 100644 index 00000000..953c991e --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-05.json @@ -0,0 +1,121 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-06.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-06.json new file mode 100644 index 00000000..d64b3499 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-06.json @@ -0,0 +1,99 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "type": "path", + "pathType": "/", + "items": [ + { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + } + ] + }, + "object": { + "termType": "Literal", + "value": "ABC", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#string" + } + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-07.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-07.json new file mode 100644 index 00000000..7297357a --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-07.json @@ -0,0 +1,113 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "type": "path", + "pathType": "|", + "items": [ + { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + { + "termType": "NamedNode", + "value": "http://example.com/ns#p2" + } + ] + }, + "object": { + "termType": "Literal", + "value": "ABC", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#string" + } + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-08.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-08.json new file mode 100644 index 00000000..3c4b39d6 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-08.json @@ -0,0 +1,103 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#source" + }, + "object": { + "termType": "Variable", + "value": "g" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ], + "where": [ + { + "type": "graph", + "patterns": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + } + ] + } + ], + "name": { + "termType": "Variable", + "value": "g" + } + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-09.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-09.json new file mode 100644 index 00000000..8b645970 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-09.json @@ -0,0 +1,144 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q1" + }, + "object": { + "termType": "Variable", + "value": "z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q1" + }, + "object": { + "termType": "Variable", + "value": "z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-01.json new file mode 100644 index 00000000..b3b8713f --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-01.json @@ -0,0 +1,98 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-02.json new file mode 100644 index 00000000..602342a7 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-02.json @@ -0,0 +1,112 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r3" + }, + "object": { + "termType": "Variable", + "value": "Z3" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-03.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-03.json new file mode 100644 index 00000000..eb7f7eb2 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-03.json @@ -0,0 +1,172 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-04.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-04.json new file mode 100644 index 00000000..9822c8ff --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-anonreifier-multiple-04.json @@ -0,0 +1,200 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r3" + }, + "object": { + "termType": "Variable", + "value": "Z3" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r3" + }, + "object": { + "termType": "Variable", + "value": "Z3" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-01.json new file mode 100644 index 00000000..6523197d --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-01.json @@ -0,0 +1,84 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-02.json new file mode 100644 index 00000000..a6356e86 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-02.json @@ -0,0 +1,165 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#source" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "Variable", + "value": "source" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#graph" + }, + "object": { + "termType": "NamedNode", + "value": "http://host2/" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#date" + }, + "object": { + "termType": "Literal", + "value": "2020-12-31", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#date" + } + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#graph" + }, + "object": { + "termType": "NamedNode", + "value": "http://host1/" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#date" + }, + "object": { + "termType": "Literal", + "value": "2020-01-20", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#date" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-03.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-03.json new file mode 100644 index 00000000..446add9c --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-03.json @@ -0,0 +1,121 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "Variable", + "value": "q" + }, + "object": { + "termType": "Variable", + "value": "z" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-04.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-04.json new file mode 100644 index 00000000..0a5f3332 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-04.json @@ -0,0 +1,157 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + "object": { + "termType": "Variable", + "value": "z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "Variable", + "value": "q" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-05.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-05.json new file mode 100644 index 00000000..140ed532 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-05.json @@ -0,0 +1,121 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#", + "xsd": "http://www.w3.org/2001/XMLSchema#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-06.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-06.json new file mode 100644 index 00000000..28caea41 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-06.json @@ -0,0 +1,99 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "type": "path", + "pathType": "/", + "items": [ + { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + } + ] + }, + "object": { + "termType": "Literal", + "value": "ABC", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#string" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-07.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-07.json new file mode 100644 index 00000000..cb8660fc --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-07.json @@ -0,0 +1,113 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "type": "path", + "pathType": "|", + "items": [ + { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + { + "termType": "NamedNode", + "value": "http://example.com/ns#p2" + } + ] + }, + "object": { + "termType": "Literal", + "value": "ABC", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#string" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-08.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-08.json new file mode 100644 index 00000000..ce9ad433 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-08.json @@ -0,0 +1,103 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#source" + }, + "object": { + "termType": "Variable", + "value": "g" + } + } + ], + "where": [ + { + "type": "graph", + "patterns": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + } + ] + } + ], + "name": { + "termType": "Variable", + "value": "g" + } + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-09.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-09.json new file mode 100644 index 00000000..7e4ca468 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-09.json @@ -0,0 +1,144 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q1" + }, + "object": { + "termType": "Variable", + "value": "z" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q1" + }, + "object": { + "termType": "Variable", + "value": "z" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-01.json new file mode 100644 index 00000000..0c989d84 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-01.json @@ -0,0 +1,70 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-02.json new file mode 100644 index 00000000..3a064855 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-02.json @@ -0,0 +1,120 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-03.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-03.json new file mode 100644 index 00000000..d4829897 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-03.json @@ -0,0 +1,134 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-04.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-04.json new file mode 100644 index 00000000..c4f2a953 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-04.json @@ -0,0 +1,184 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r3" + }, + "object": { + "termType": "Variable", + "value": "Z3" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-05.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-05.json new file mode 100644 index 00000000..98332f72 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-05.json @@ -0,0 +1,184 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r3" + }, + "object": { + "termType": "Variable", + "value": "Z3" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-06.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-06.json new file mode 100644 index 00000000..b5d3b074 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-06.json @@ -0,0 +1,116 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-07.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-07.json new file mode 100644 index 00000000..3aa79136 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-07.json @@ -0,0 +1,216 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-08.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-08.json new file mode 100644 index 00000000..09a322cc --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-08.json @@ -0,0 +1,244 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-09.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-09.json new file mode 100644 index 00000000..78d1285c --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-09.json @@ -0,0 +1,344 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r3" + }, + "object": { + "termType": "Variable", + "value": "Z3" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r3" + }, + "object": { + "termType": "Variable", + "value": "Z3" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-10.json b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-10.json new file mode 100644 index 00000000..28e8929f --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-annotation-reifier-multiple-10.json @@ -0,0 +1,344 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r3" + }, + "object": { + "termType": "Variable", + "value": "Z3" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r1" + }, + "object": { + "termType": "Variable", + "value": "Z1" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r2" + }, + "object": { + "termType": "Variable", + "value": "Z2" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r3" + }, + "object": { + "termType": "Variable", + "value": "Z3" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-01.json new file mode 100644 index 00000000..74d09674 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-01.json @@ -0,0 +1,66 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-02.json new file mode 100644 index 00000000..5f22c2e1 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-02.json @@ -0,0 +1,71 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Literal", + "value": "c", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#string" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-03.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-03.json new file mode 100644 index 00000000..2ee750d7 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-03.json @@ -0,0 +1,70 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-04.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-04.json new file mode 100644 index 00000000..0c3bed96 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-04.json @@ -0,0 +1,70 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "a" + }, + "predicate": { + "termType": "Variable", + "value": "b" + }, + "object": { + "termType": "Variable", + "value": "c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-06.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-06.json new file mode 100644 index 00000000..111b1bf4 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-06.json @@ -0,0 +1,60 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + } + } + ], + "where": [], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-07.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-07.json new file mode 100644 index 00000000..4c4fedf4 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-07.json @@ -0,0 +1,216 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "q" + }, + "object": { + "termType": "Variable", + "value": "z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "Variable", + "value": "a" + }, + "predicate": { + "termType": "Variable", + "value": "b" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "q" + }, + "object": { + "termType": "Variable", + "value": "z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "Variable", + "value": "a" + }, + "predicate": { + "termType": "Variable", + "value": "b" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-08.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-08.json new file mode 100644 index 00000000..1a908084 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-08.json @@ -0,0 +1,56 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-09.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-09.json new file mode 100644 index 00000000..a33f7e36 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-09.json @@ -0,0 +1,56 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-10.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-10.json new file mode 100644 index 00000000..7473a3f5 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-10.json @@ -0,0 +1,92 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p2" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-11.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-11.json new file mode 100644 index 00000000..0651a7ac --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-11.json @@ -0,0 +1,88 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-12.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-12.json new file mode 100644 index 00000000..cc43791a --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-12.json @@ -0,0 +1,88 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-13.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-13.json new file mode 100644 index 00000000..69215ca2 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-anonreifier-13.json @@ -0,0 +1,160 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p2" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p2" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-01.json new file mode 100644 index 00000000..2425c58a --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-01.json @@ -0,0 +1,66 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-02.json new file mode 100644 index 00000000..796d02e0 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-02.json @@ -0,0 +1,71 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Literal", + "value": "c", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#string" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-03.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-03.json new file mode 100644 index 00000000..53a1d3a0 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-03.json @@ -0,0 +1,70 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-04.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-04.json new file mode 100644 index 00000000..2e31ae58 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-04.json @@ -0,0 +1,70 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "a" + }, + "predicate": { + "termType": "Variable", + "value": "b" + }, + "object": { + "termType": "Variable", + "value": "c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-06.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-06.json new file mode 100644 index 00000000..b6cfd3b0 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-06.json @@ -0,0 +1,60 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + } + } + ], + "where": [], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-07.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-07.json new file mode 100644 index 00000000..6e70962b --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-07.json @@ -0,0 +1,216 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "Variable", + "value": "q" + }, + "object": { + "termType": "Variable", + "value": "z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "Variable", + "value": "a" + }, + "predicate": { + "termType": "Variable", + "value": "b" + }, + "object": { + "termType": "BlankNode", + "value": "e_bnode" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "Variable", + "value": "q" + }, + "object": { + "termType": "Variable", + "value": "z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "Variable", + "value": "a" + }, + "predicate": { + "termType": "Variable", + "value": "b" + }, + "object": { + "termType": "BlankNode", + "value": "e_bnode" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-08.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-08.json new file mode 100644 index 00000000..35e63154 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-08.json @@ -0,0 +1,56 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-09.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-09.json new file mode 100644 index 00000000..ed648f45 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-09.json @@ -0,0 +1,56 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-10.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-10.json new file mode 100644 index 00000000..d770f83c --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-10.json @@ -0,0 +1,92 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p2" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-11.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-11.json new file mode 100644 index 00000000..7bc5393f --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-11.json @@ -0,0 +1,88 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-12.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-12.json new file mode 100644 index 00000000..aa9edb8f --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-12.json @@ -0,0 +1,88 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-13.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-13.json new file mode 100644 index 00000000..28ce7cad --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-reifier-13.json @@ -0,0 +1,160 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p2" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p2" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-01.json new file mode 100644 index 00000000..5d8fe511 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-01.json @@ -0,0 +1,49 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Quad", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-02.json new file mode 100644 index 00000000..4e15fe8b --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-02.json @@ -0,0 +1,54 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Quad", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Literal", + "value": "c", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#string" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-03.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-03.json new file mode 100644 index 00000000..8e50c149 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-03.json @@ -0,0 +1,49 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Quad", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-04.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-04.json new file mode 100644 index 00000000..016e79ed --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-04.json @@ -0,0 +1,49 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "Quad", + "subject": { + "termType": "Variable", + "value": "a" + }, + "predicate": { + "termType": "Variable", + "value": "b" + }, + "object": { + "termType": "Variable", + "value": "c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-05.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-05.json new file mode 100644 index 00000000..5db09480 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-05.json @@ -0,0 +1,147 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "values", + "values": [ + { + "?x": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "?x": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#x" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + } + ] + }, + { + "type": "values", + "values": [ + { + "?y": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "?z": { + "termType": "Literal", + "value": "123", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#integer" + } + } + }, + { + "?y": { + "termType": "Literal", + "value": "123", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#integer" + } + }, + "?z": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-06.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-06.json new file mode 100644 index 00000000..6fd7dd28 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-06.json @@ -0,0 +1,40 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + } + ], + "where": [], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-07.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-07.json new file mode 100644 index 00000000..f2f602ff --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-basic-tripleterm-07.json @@ -0,0 +1,136 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "Variable", + "value": "q" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "subject": { + "termType": "Variable", + "value": "a" + }, + "predicate": { + "termType": "Variable", + "value": "b" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "Variable", + "value": "q" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "subject": { + "termType": "Variable", + "value": "a" + }, + "predicate": { + "termType": "Variable", + "value": "b" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-01.json new file mode 100644 index 00000000..2ffe33de --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-01.json @@ -0,0 +1,75 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Literal", + "value": "456", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#integer" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-02.json new file mode 100644 index 00000000..29995059 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-02.json @@ -0,0 +1,75 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "e_a" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Literal", + "value": "456", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#integer" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-03.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-03.json new file mode 100644 index 00000000..76c5bac5 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-anonreifier-03.json @@ -0,0 +1,70 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-01.json new file mode 100644 index 00000000..b9a45cd2 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-01.json @@ -0,0 +1,75 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Literal", + "value": "456", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#integer" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-02.json new file mode 100644 index 00000000..afa14352 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-02.json @@ -0,0 +1,75 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "e_a" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Literal", + "value": "456", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#integer" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-03.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-03.json new file mode 100644 index 00000000..c72665c0 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-reifier-03.json @@ -0,0 +1,70 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-01.json new file mode 100644 index 00000000..4152a8a2 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-01.json @@ -0,0 +1,54 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Quad", + "subject": { + "termType": "BlankNode", + "value": "e_a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Literal", + "value": "456", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#integer" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-02.json new file mode 100644 index 00000000..d1b7cf39 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-02.json @@ -0,0 +1,54 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Quad", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "e_a" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Literal", + "value": "456", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#integer" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-03.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-03.json new file mode 100644 index 00000000..192bd07e --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-bnode-tripleterm-03.json @@ -0,0 +1,49 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Quad", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-compound-all.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-compound-all.json new file mode 100644 index 00000000..093c226b --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-compound-all.json @@ -0,0 +1,316 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#x" + }, + "predicate": { + "termType": "Variable", + "value": "R" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Variable", + "value": "C" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "e_bnode" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "BlankNode", + "value": "g_2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#x" + }, + "predicate": { + "termType": "Variable", + "value": "R" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_6" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_5" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_3" + }, + "predicate": { + "termType": "Variable", + "value": "R" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_5" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "BlankNode", + "value": "g_4" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "BlankNode", + "value": "g_6" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-compound-anonreifier.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-compound-anonreifier.json new file mode 100644 index 00000000..c6389cb8 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-compound-anonreifier.json @@ -0,0 +1,336 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#x" + }, + "predicate": { + "termType": "Variable", + "value": "R" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Variable", + "value": "C" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_5" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_4" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#x" + }, + "predicate": { + "termType": "Variable", + "value": "R" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_4" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "BlankNode", + "value": "g_3" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_10" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_7" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "g_9" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_7" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_6" + }, + "predicate": { + "termType": "Variable", + "value": "R" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_9" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "BlankNode", + "value": "g_8" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_5" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "BlankNode", + "value": "g_10" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-compound-reifier.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-compound-reifier.json new file mode 100644 index 00000000..df788c9a --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-compound-reifier.json @@ -0,0 +1,336 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#x" + }, + "predicate": { + "termType": "Variable", + "value": "R" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Variable", + "value": "C" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri2" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "e_bnode1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#x" + }, + "predicate": { + "termType": "Variable", + "value": "R" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "BlankNode", + "value": "e_bnode2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "Variable", + "value": "R" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "BlankNode", + "value": "g_2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri3" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-compound-tripleterm.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-compound-tripleterm.json new file mode 100644 index 00000000..dfde4b3a --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-compound-tripleterm.json @@ -0,0 +1,96 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Variable", + "value": "C" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-01.json new file mode 100644 index 00000000..573093a7 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-01.json @@ -0,0 +1,60 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + } + ] + }, + { + "type": "bind", + "variable": { + "termType": "Variable", + "value": "t" + }, + "expression": { + "termType": "Quad", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-03.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-03.json new file mode 100644 index 00000000..3055dec1 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-03.json @@ -0,0 +1,59 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + } + ] + }, + { + "type": "bind", + "variable": { + "termType": "Variable", + "value": "t1" + }, + "expression": { + "type": "operation", + "operator": "triple", + "args": [ + { + "termType": "Variable", + "value": "s" + }, + { + "termType": "Variable", + "value": "p" + }, + { + "termType": "Variable", + "value": "o" + } + ] + } + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-04.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-04.json new file mode 100644 index 00000000..45e84993 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-04.json @@ -0,0 +1,65 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + } + ] + }, + { + "type": "bind", + "variable": { + "termType": "Variable", + "value": "t2" + }, + "expression": { + "type": "operation", + "operator": "triple", + "args": [ + { + "termType": "Variable", + "value": "s" + }, + { + "termType": "Variable", + "value": "p" + }, + { + "type": "operation", + "operator": "str", + "args": [ + { + "termType": "Variable", + "value": "o" + } + ] + } + ] + } + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-05.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-05.json new file mode 100644 index 00000000..7c4b57b1 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-05.json @@ -0,0 +1,116 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "t" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#source" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#g" + } + } + ] + }, + { + "type": "filter", + "expression": { + "type": "operation", + "operator": "istriple", + "args": [ + { + "termType": "Variable", + "value": "t" + } + ] + } + }, + { + "type": "filter", + "expression": { + "type": "operation", + "operator": "=", + "args": [ + { + "type": "operation", + "operator": "subject", + "args": [ + { + "termType": "Variable", + "value": "t" + } + ] + }, + { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + } + ] + } + }, + { + "type": "filter", + "expression": { + "type": "operation", + "operator": "=", + "args": [ + { + "type": "operation", + "operator": "predicate", + "args": [ + { + "termType": "Variable", + "value": "t" + } + ] + }, + { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + } + ] + } + }, + { + "type": "filter", + "expression": { + "type": "operation", + "operator": "=", + "args": [ + { + "type": "operation", + "operator": "object", + "args": [ + { + "termType": "Variable", + "value": "t" + } + ] + }, + { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + } + ] + } + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-06.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-06.json new file mode 100644 index 00000000..5eda8f08 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-expr-tripleterm-06.json @@ -0,0 +1,79 @@ +{ + "queryType": "CONSTRUCT", + "template": [ + { + "subject": { + "termType": "Variable", + "value": "t" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#graph" + }, + "object": { + "termType": "Variable", + "value": "g" + } + } + ], + "where": [ + { + "type": "graph", + "patterns": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + } + ] + }, + { + "type": "bind", + "variable": { + "termType": "Variable", + "value": "t" + }, + "expression": { + "termType": "Quad", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + } + ], + "name": { + "termType": "Variable", + "value": "g" + } + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-anonreifier-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-anonreifier-01.json new file mode 100644 index 00000000..d39f5c7f --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-anonreifier-01.json @@ -0,0 +1,84 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "Variable", + "value": "Q" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-anonreifier-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-anonreifier-02.json new file mode 100644 index 00000000..ff3fe9f9 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-anonreifier-02.json @@ -0,0 +1,167 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Literal", + "value": "123", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#integer" + } + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest" + }, + "object": { + "termType": "BlankNode", + "value": "g_3" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest" + }, + "object": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-reifier-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-reifier-01.json new file mode 100644 index 00000000..25897285 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-reifier-01.json @@ -0,0 +1,84 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "Q" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-reifier-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-reifier-02.json new file mode 100644 index 00000000..54855bf3 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-reifier-02.json @@ -0,0 +1,167 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Literal", + "value": "123", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#integer" + } + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first" + }, + "object": { + "termType": "BlankNode", + "value": "e_bnode" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest" + }, + "object": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-tripleterm-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-tripleterm-01.json new file mode 100644 index 00000000..1ec807e0 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-tripleterm-01.json @@ -0,0 +1,63 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "Q" + }, + "object": { + "termType": "Quad", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-tripleterm-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-tripleterm-02.json new file mode 100644 index 00000000..6bbe4351 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-inside-tripleterm-02.json @@ -0,0 +1,125 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Literal", + "value": "123", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#integer" + } + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first" + }, + "object": { + "termType": "Quad", + "subject": { + "termType": "Variable", + "value": "S1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#first" + }, + "object": { + "termType": "Quad", + "subject": { + "termType": "Variable", + "value": "S2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest" + }, + "object": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-anonreifier-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-anonreifier-01.json new file mode 100644 index 00000000..a0699099 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-anonreifier-01.json @@ -0,0 +1,161 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Literal", + "value": "1", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#integer" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-anonreifier-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-anonreifier-02.json new file mode 100644 index 00000000..a8c9e042 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-anonreifier-02.json @@ -0,0 +1,156 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "O" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "O" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-reifier-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-reifier-01.json new file mode 100644 index 00000000..d7bf35be --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-reifier-01.json @@ -0,0 +1,161 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Literal", + "value": "1", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#integer" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-reifier-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-reifier-02.json new file mode 100644 index 00000000..e7f7bfee --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-reifier-02.json @@ -0,0 +1,156 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "O" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "O" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-tripleterm-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-tripleterm-01.json new file mode 100644 index 00000000..93f66966 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-nested-tripleterm-01.json @@ -0,0 +1,96 @@ +{ + "queryType": "SELECT", + "variables": [ + { + "termType": "Wildcard", + "value": "*" + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + } + ] + } + ], + "type": "query", + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-01.json new file mode 100644 index 00000000..d3ee54c9 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-01.json @@ -0,0 +1,68 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insert", + "insert": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-02.json new file mode 100644 index 00000000..a2bbc368 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-02.json @@ -0,0 +1,82 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insert", + "insert": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#y" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-03.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-03.json new file mode 100644 index 00000000..2d9c52f6 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-03.json @@ -0,0 +1,226 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insertdelete", + "delete": [], + "insert": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_3" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-04.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-04.json new file mode 100644 index 00000000..aa6e8228 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-04.json @@ -0,0 +1,298 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insertdelete", + "delete": [], + "insert": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + "object": { + "termType": "Variable", + "value": "Z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "BlankNode", + "value": "g_1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_3" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_4" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + "object": { + "termType": "Variable", + "value": "Z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_5" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "BlankNode", + "value": "g_4" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_5" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_3" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-05.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-05.json new file mode 100644 index 00000000..203c506d --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-05.json @@ -0,0 +1,226 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insertdelete", + "delete": [], + "insert": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Variable", + "value": "O" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "BlankNode", + "value": "g_0" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_2" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Variable", + "value": "O" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "BlankNode", + "value": "g_2" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_3" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_3" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "BlankNode", + "value": "g_2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-06.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-06.json new file mode 100644 index 00000000..5f84b5fc --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-anonreifier-06.json @@ -0,0 +1,119 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insertdelete", + "delete": [], + "insert": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#added" + }, + "object": { + "termType": "Literal", + "value": "Property :r", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#string" + } + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "type": "path", + "pathType": "/", + "items": [ + { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + } + ] + }, + "object": { + "termType": "Variable", + "value": "o" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-01.json new file mode 100644 index 00000000..6093761f --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-01.json @@ -0,0 +1,68 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insert", + "insert": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-02.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-02.json new file mode 100644 index 00000000..6c0c47a2 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-02.json @@ -0,0 +1,82 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insert", + "insert": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#y" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#z" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-03.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-03.json new file mode 100644 index 00000000..7b8a322c --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-03.json @@ -0,0 +1,226 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insertdelete", + "delete": [], + "insert": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-04.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-04.json new file mode 100644 index 00000000..1cc9d13d --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-04.json @@ -0,0 +1,298 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insertdelete", + "delete": [], + "insert": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + "object": { + "termType": "Variable", + "value": "Z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + "object": { + "termType": "Variable", + "value": "Z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "e_bnode" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-05.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-05.json new file mode 100644 index 00000000..cb7ead20 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-05.json @@ -0,0 +1,226 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insertdelete", + "delete": [], + "insert": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Variable", + "value": "O" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Variable", + "value": "O" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-06.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-06.json new file mode 100644 index 00000000..b1882006 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-06.json @@ -0,0 +1,119 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insertdelete", + "delete": [], + "insert": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#added" + }, + "object": { + "termType": "Literal", + "value": "Property :r", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#string" + } + } + } + ] + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "type": "path", + "pathType": "/", + "items": [ + { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + { + "termType": "NamedNode", + "value": "http://example.com/ns#q" + } + ] + }, + "object": { + "termType": "Variable", + "value": "o" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-07.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-07.json new file mode 100644 index 00000000..414c3326 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-07.json @@ -0,0 +1,170 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insertdelete", + "delete": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#r" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#added" + }, + "object": { + "termType": "Literal", + "value": "Property :r", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#string" + } + } + } + ] + } + ], + "insert": [], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Variable", + "value": "o" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "type": "path", + "pathType": "+", + "items": [ + { + "termType": "NamedNode", + "value": "http://example.com/ns#q1" + } + ] + }, + "object": { + "termType": "Literal", + "value": "ABC", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#string" + } + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-08.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-08.json new file mode 100644 index 00000000..5fa6949d --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-reifier-08.json @@ -0,0 +1,166 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "delete", + "delete": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o1" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#added" + }, + "object": { + "termType": "Literal", + "value": "Test", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#string" + } + } + } + ] + } + ] + }, + { + "updateType": "insert", + "insert": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#o2" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#iri" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#added" + }, + "object": { + "termType": "Literal", + "value": "Test", + "language": "", + "datatype": { + "termType": "NamedNode", + "value": "http://www.w3.org/2001/XMLSchema#string" + } + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-01.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-01.json new file mode 100644 index 00000000..82bea0d5 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-01.json @@ -0,0 +1,48 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insert", + "insert": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-03.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-03.json new file mode 100644 index 00000000..d144fb2b --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-03.json @@ -0,0 +1,218 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insertdelete", + "delete": [], + "insert": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-04.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-04.json new file mode 100644 index 00000000..57511c39 --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-04.json @@ -0,0 +1,250 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insertdelete", + "delete": [], + "insert": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + "object": { + "termType": "Variable", + "value": "Z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#s1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#p1" + }, + "object": { + "termType": "Variable", + "value": "Z" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "s" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "NamedNode", + "value": "http://example.com/ns#c" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +} diff --git a/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-05.json b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-05.json new file mode 100644 index 00000000..c924c45c --- /dev/null +++ b/test/parsedQueries/sparql-1-2/sparql-1-2-syntax-update-tripleterm-05.json @@ -0,0 +1,218 @@ +{ + "type": "update", + "updates": [ + { + "updateType": "insertdelete", + "delete": [], + "insert": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Variable", + "value": "O" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_0" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Variable", + "value": "O" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ], + "where": [ + { + "type": "bgp", + "triples": [ + { + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Variable", + "value": "O" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + }, + { + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "Variable", + "value": "Y" + }, + "object": { + "termType": "Variable", + "value": "Z" + } + }, + { + "termType": "Quad", + "value": "", + "subject": { + "termType": "BlankNode", + "value": "g_1" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "Variable", + "value": "S" + }, + "predicate": { + "termType": "Variable", + "value": "P" + }, + "object": { + "termType": "Quad", + "value": "", + "subject": { + "termType": "NamedNode", + "value": "http://example.com/ns#a" + }, + "predicate": { + "termType": "NamedNode", + "value": "http://example.com/ns#b" + }, + "object": { + "termType": "Variable", + "value": "O" + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + }, + "graph": { + "termType": "DefaultGraph", + "value": "" + } + } + ] + } + ] + } + ], + "prefixes": { + "": "http://example.com/ns#" + } +}