diff --git a/jena-arq/Grammar/CDTs/cdt_literals.jj b/jena-arq/Grammar/CDTs/cdt_literals.jj new file mode 100644 index 00000000000..d2e098b906c --- /dev/null +++ b/jena-arq/Grammar/CDTs/cdt_literals.jj @@ -0,0 +1,370 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +options +{ + // Use \ u escapes in streams AND use a reader for the query + // => get both raw and escaped unicode + + JAVA_UNICODE_ESCAPE = true ; + UNICODE_INPUT = false ; + + STATIC = false ; +// DEBUG_PARSER = true ; +// DEBUG_TOKEN_MANAGER = true ; +} + +PARSER_BEGIN(CDTLiteralParser) +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt.parser; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.jena.cdt.*; +import org.apache.jena.graph.Node; + +import static org.apache.jena.riot.lang.extra.LangParserLib.*; + +public class CDTLiteralParser extends CDTLiteralParserBase +{ +} +PARSER_END(CDTLiteralParser) + +// --- Entry point for cdt:List literals + +List List() : { List l = new ArrayList(); } +{ + + + ( NonEmptyListContent(l) )? + + + + { return l; } +} + +void NonEmptyListContent(List l) : { } +{ + ListElement(l) + + ( ListElement(l) )* +} + +void ListElement(List l) : { String iri; Node n; List subList; Map m; } +{ + iri = IRI_REF() { n = createURI(iri, token.beginLine, token.beginColumn); l.add( CDTFactory.createValue(n) ); } +| + n = BlankNode() { l.add( CDTFactory.createValue(n) ); } +| + n = RDFLiteral() { l.add( CDTFactory.createValue(n) ); } +| + n = NumericLiteral() { l.add( CDTFactory.createValue(n) ); } +| + n = BooleanLiteral() { l.add( CDTFactory.createValue(n) ); } +| + { l.add( CDTFactory.getNullValue() ); } +| + subList = List() { l.add( CDTFactory.createValue(subList) ); } +| + m = Map() { l.add( CDTFactory.createValue(m) ); } +} + +// --- Entry point for cdt:Map literals + +Map Map() : { Map m = new HashMap(); } +{ + + + ( NonEmptyMapContent(m) )? + + + + { return m; } +} + +void NonEmptyMapContent(Map m) : { } +{ + MapEntry(m) + + ( MapEntry(m) )* +} + +void MapEntry(Map m) : { CDTKey key; CDTValue value; } +{ + key = MapKey() + + + + value = MapValue() + + { + final CDTValue oldValue = m.put(key, value); + if ( oldValue != null ) throw new ParseException("map with non-unique key (" + key.toString() + ")"); + } +} + +CDTKey MapKey() : { String iri; Node n; } +{ + iri = IRI_REF() { n = createURI(iri, token.beginLine, token.beginColumn); return CDTFactory.createKey(n); } +| + n = RDFLiteral() { return CDTFactory.createKey(n); } +| + n = NumericLiteral() { return CDTFactory.createKey(n); } +| + n = BooleanLiteral() { return CDTFactory.createKey(n); } +} + +CDTValue MapValue() : { String iri; Node n; List subList; Map m; } +{ + iri = IRI_REF() { n = createURI(iri, token.beginLine, token.beginColumn); return CDTFactory.createValue(n); } +| + n = BlankNode() { return CDTFactory.createValue(n); } +| + n = RDFLiteral() { return CDTFactory.createValue(n); } +| + n = NumericLiteral() { return CDTFactory.createValue(n); } +| + n = BooleanLiteral() { return CDTFactory.createValue(n); } +| + { return CDTFactory.getNullValue(); } +| + subList = List() { return CDTFactory.createValue(subList); } +| + m = Map() { return CDTFactory.createValue(m); } +} + + +// ---- Basic terms + +String IRI_REF() : { Token t ; } +{ + t = + { return resolveQuotedIRI(t.image, t.beginLine, t.beginColumn) ; } +} + +Node BlankNode() : { Token t = null ; } +{ + t = + + { + return createBNode(t.image, t.beginLine, t.beginColumn); + } +} + +Node NumericLiteral() : { Token t ; } +{ + t = { return createLiteralInteger(t.image, t.beginLine, t.beginColumn); } +| t = { return createLiteralDecimal(t.image, t.beginLine, t.beginColumn); } +| t = { return createLiteralDouble(t.image, t.beginLine, t.beginColumn); } +} + +Node BooleanLiteral() : {} +{ + { return XSD_TRUE; } + | + { return XSD_FALSE; } +} + +Node RDFLiteral() : { String lex = null ; } +{ + lex = String() + // Optional lang tag and datatype. + { String lang = null ; String dt = null ; } + ( + lang = Langtag() + | + ( dt = IRI_REF() ) // divergence from the Turtle parser here; instead of IRIref(), we only permit IRI_REF() + )? + + { + return createLiteral(lex, lang, dt, token.beginLine, token.beginColumn); + } +} + +String Langtag() : { Token t ; } +{ + t = // divergence from the Turtle parser here, which also permits AnyDirective() at this point + { String lang = stripChars(t.image, 1) ; return lang ; } +} + +String String() : { Token t ; String lex ; } +{ + ( t = { lex = stripQuotes(t.image) ; } + | t = { lex = stripQuotes(t.image) ; } + | t = { lex = stripQuotes3(t.image) ; } + | t = { lex = stripQuotes3(t.image) ; } + ) + { lex = unescapeStr(lex, t.beginLine, t.beginColumn) ; + return lex ; + } +} + + +// ------------------------------------------ +// Tokens + +// Comments and whitespace + +SKIP : { " " | "\t" | "\n" | "\r" | "\f" } + +TOKEN: { <#WS: " " | "\t" | "\n" | "\r" | "\f"> } + + +// ------------------------------------------------- +// Keywords + +TOKEN [IGNORE_CASE] : +{ + < TRUE: "true" > +| < FALSE: "false" > + +// ------------------------------------------------- + +| < INTEGER: (["-","+"])? > +| + < DECIMAL: (["-","+"])? + (()+ "." ()* | "." ()+) + > + // Required exponent. +| < DOUBLE: + (["+","-"])? + ( + (["0"-"9"])+ "." (["0"-"9"])* + | "." (["0"-"9"])+ () + | (["0"-"9"])+ + ) + > +| < #EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ > +| < #QUOTE_3D: "\"\"\""> +| < #QUOTE_3S: "'''"> +// "u" done by javacc input stream. +// "U" escapes not supported yet for Java strings +| + +| < STRING_LITERAL1: + // Single quoted string + "'" ( (~["'","\\","\n","\r"]) | )* "'" > + +| < STRING_LITERAL2: + // Double quoted string + "\"" ( (~["\"","\\","\n","\r"]) | )* "\"" > + +| < STRING_LITERAL_LONG1: + + ( ~["'","\\"] | | ("'" ~["'"]) | ("''" ~["'"]))* + > + +| < STRING_LITERAL_LONG2: + + ( ~["\"","\\"] | | ("\"" ~["\""]) | ("\"\"" ~["\""]))* + > +| < DIGITS: (["0"-"9"])+> +// | +} + +TOKEN: +{ + // Includes # for relative URIs + ","<", "\"", "{", "}", "^", "\\", "|", "`", + "\u0000"-"\u0020"])* ">" > +| > +| ()+("-" ()+)* > +| <#A2Z: ["a"-"z","A"-"Z"]> +| <#A2ZN: ["a"-"z","A"-"Z","0"-"9"]> +} + + +TOKEN : +{ + < NULL: "null" > + +| < LBRACE: "{" > +| < RBRACE: "}" > + +| < LBRACKET: "[" > +| < RBRACKET: "]" > + +| < COMMA: "," > +| < COLON: ":" > +} + +// Operator + +TOKEN : +{ + < DATATYPE: "^^"> +| < AT: "@"> +} + +TOKEN: +{ + <#PN_CHARS_BASE: + ["A"-"Z"] | ["a"-"z"] | + ["\u00C0"-"\u00D6"] | ["\u00D8"-"\u00F6"] | ["\u00F8"-"\u02FF"] | + ["\u0370"-"\u037D"] | ["\u037F"-"\u1FFF"] | + ["\u200C"-"\u200D"] | ["\u2070"-"\u218F"] | ["\u2C00"-"\u2FEF"] | + ["\u3001"-"\uD7FF"] | ["\uF900"-"\uFFFD"] + > + // [#x10000-#xEFFFF] +| + <#PN_CHARS_U: | "_" > +| +// No DOT + <#PN_CHARS: ( | "-" | ["0"-"9"] | "\u00B7" | + ["\u0300"-"\u036F"] | ["\u203F"-"\u2040"] ) > +| + // With a leading "_", no dot at end of local name. + <#PN_LOCAL: ( | ["0"-"9"]) ((|".")* )? > +} + +// Catch-all tokens. Must be last. +// Any non-whitespace. Causes a parser exception, rather than a +// token manager error (with hidden line numbers). +// Only bad IRIs (e.g. spaces) now give unhelpful parse errors. +TOKEN: +{ + <#UNKNOWN: (~[" ","\t","\n","\r","\f" ])+ > +} + +/* +# Local Variables: +# tab-width: 4 +# indent-tabs-mode: nil +# comment-default-style: "//" +# End: +*/ diff --git a/jena-arq/Grammar/CDTs/generate b/jena-arq/Grammar/CDTs/generate new file mode 100755 index 00000000000..687b81f0532 --- /dev/null +++ b/jena-arq/Grammar/CDTs/generate @@ -0,0 +1,65 @@ +#!/bin/bash +## Licensed to the Apache Software Foundation (ASF) under one +## or more contributor license agreements. See the NOTICE file +## distributed with this work for additional information +## regarding copyright ownership. The ASF licenses this file +## to you under the Apache License, Version 2.0 (the +## "License"); you may not use this file except in compliance +## with the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. + +# Parser builder + +DIR="../../src/main/java/org/apache/jena/cdt/parser" +FILE=cdt_literals.jj +CLASS=CDTLiteralParser + +(cd "$DIR" ; rm -f *.java ) + +echo "---- Process grammar ----" + +javacc -OUTPUT_DIRECTORY=$DIR -JDK_VERSION=1.8 "$FILE" + +RC=$? +[ "$RC" = 0 ] || return + +echo "---- Create text form ----" +jjdoc -TEXT=true -OUTPUT_FILE=${FILE%%.jj}.txt "${FILE}" + +echo "---- Fixing Java warnings in TokenMgrError" +F="$DIR/TokenMgrError.java" +if [ -e "$F" ] +then + sed -e 's/public class TokenMgrError/\n@SuppressWarnings("all")\npublic class TokenMgrError/' < $F > F + mv F $F +fi + +## JavaCharStream -- SimpleCharStream is OK. +echo "---- Fixing Java warnings in JavaCharStream..." +F="$DIR/JavaCharStream.java" +if [ -e "$F" ] +then + sed -e 's/public/\n@SuppressWarnings("all")\npublic/' < $F > F + mv F $F +fi + +echo "---- Fixing Java warnings in ${CLASS} ..." +F="$DIR/${CLASS}.java" +sed -e 's/@SuppressWarnings("serial")//' \ + < $F > F +mv F $F + +echo "---- Create HTML form ----" +../jj2html ${FILE%%.jj}.txt '../tokens.txt' > ${FILE%%.jj}-1.html +../grammarExtracts < ${FILE%%.jj}-1.html > ${FILE%%.jj}-2.html + +echo "Check X and Y for IRI_REF because \" became '" + +echo "---- Done" diff --git a/jena-arq/Grammar/arq.jj b/jena-arq/Grammar/arq.jj index 2432ac5085b..24f421a5d68 100644 --- a/jena-arq/Grammar/arq.jj +++ b/jena-arq/Grammar/arq.jj @@ -300,6 +300,26 @@ void OrderCondition() : else getQuery().addOrderBy(v, direction) ; } } +SortCondition OrderConditionForAggregationFunction() : +{ int direction = 0 ; Expr expr = null ; Node v = null ; } +{ + { direction = Query.ORDER_DEFAULT ; } + ( + ( + ( { direction = Query.ORDER_ASCENDING ; } + | { direction = Query.ORDER_DESCENDING ; } ) + expr = BrackettedExpression() + ) + | + ( expr = Constraint() + | v = Var() + ) + ) + { if ( v == null ) + return new SortCondition(expr, direction) ; + else + return new SortCondition(v, direction) ; } +} void LimitOffsetClauses() : { } { ( @@ -634,6 +654,8 @@ Element GraphPatternNotTriples() : { Element el = null ; } el = ExistsElt() | el = NotExistsElt() + | + el = Unfold() ) { return el ; } } @@ -758,6 +780,17 @@ Element NotExistsElt() : { Element el ; } el = GroupGraphPattern() { return new ElementNotExists(el) ; } } +Element Unfold() : { Var v1 ; Var v2 = null ; Expr expr ; } +{ + + + expr = Expression() + + v1 = Var() + ( v2 = Var() { ; } )? + + { return new ElementUnfold(expr, v1, v2) ; } +} Element MinusGraphPattern() : { Element el ; } { @@ -1611,6 +1644,26 @@ Expr Aggregate() : { Aggregator agg = null ; String sep = null ; { agg = AggregatorFactory.createCustom(AggURI.var_samp, distinct, expr) ; } | t = ( { distinct = true ; } )? expr = Expression() { agg = AggregatorFactory.createCustom(AggURI.var_pop, distinct, expr) ; } + | t = + { java.util.List scs = null ; + SortCondition sc = null ; } + + ( { distinct = true ; } )? + expr = Expression() + ( expr2 = Expression() )? + ( + + ( + sc = OrderConditionForAggregationFunction() + { + if ( scs == null ) + scs = new java.util.ArrayList(); + scs.add(sc); + } + )+ + )? + + { agg = AggregatorFactory.createFold(distinct, expr, expr2, scs) ; } | t = { String iri ; } iri = iri() @@ -1785,11 +1838,13 @@ TOKEN [IGNORE_CASE] : | < SERVICE: "service" > | < LET: "LET" > | < LATERAL: "LATERAL" > +| < UNFOLD: "unfold" > | < TRIPLE: "TRIPLE" > | < IS_TRIPLE: "isTRIPLE" > | < SUBJECT: "SUBJECT" > | < PREDICATE: "PREDICATE" > | < OBJECT: "OBJECT" > +| < UNFOLD: "unfold" > | < EXISTS: "exists" > | < NOT: "not" > | < AS: "as" > @@ -1810,6 +1865,7 @@ TOKEN [IGNORE_CASE] : | < VARIANCE: "variance" > | < VAR_SAMP: "var_samp" > | < VAR_POP: "var_pop" > +| < FOLD: "fold" > | < SAMPLE: "sample" > | < GROUP_CONCAT: "group_concat" > | < FILTER: "filter" > diff --git a/jena-arq/Grammar/main.jj b/jena-arq/Grammar/main.jj index 757e0055e5f..46ff197b3b3 100644 --- a/jena-arq/Grammar/main.jj +++ b/jena-arq/Grammar/main.jj @@ -480,6 +480,27 @@ void OrderCondition() : getQuery().addOrderBy(v, direction) ; } } +SortCondition OrderConditionForAggregationFunction() : +{ int direction = 0 ; Expr expr = null ; Node v = null ; } +{ + { direction = Query.ORDER_DEFAULT ; } + ( + ( // These are for clarity in the HTML + ( { direction = Query.ORDER_ASCENDING ; } + | { direction = Query.ORDER_DESCENDING ; } ) + expr = BrackettedExpression() + ) + | + ( expr = Constraint() + | v = Var() //{ expr = asExpr(v) ; } + ) + ) + { if ( v == null ) + return new SortCondition(expr, direction) ; + else + return new SortCondition(v, direction) ; } +} + void LimitOffsetClauses() : { } { // SPARQL does not care about the order here. @@ -902,10 +923,14 @@ Element GraphPatternNotTriples() : { Element el = null ; } #ifdef ARQ | el = Assignment() + | + el = Unfold() | el = ExistsElt() | el = NotExistsElt() + | + el = Unfold() #endif ) { return el ; } @@ -1038,6 +1063,18 @@ Element Assignment() : { Var v ; Expr expr ; } { return new ElementAssign(v, expr) ; } } +Element Unfold() : { Var v1 ; Var v2 = null ; Expr expr ; } +{ + + + expr = Expression() + + v1 = Var() + ( v2 = Var() { ; } )? + + { return new ElementUnfold(expr, v1, v2) ; } +} + Element ExistsElt() : { Element el ; } { @@ -1051,6 +1088,18 @@ Element NotExistsElt() : { Element el ; } el = GroupGraphPattern() { return new ElementNotExists(el) ; } } + +Element Unfold() : { Var v1 ; Var v2 = null ; Expr expr ; } +{ + + + expr = Expression() + + v1 = Var() + ( v2 = Var() { ; } )? + + { return new ElementUnfold(expr, v1, v2) ; } +} #endif Element MinusGraphPattern() : { Element el ; } @@ -2234,6 +2283,27 @@ Expr Aggregate() : { Aggregator agg = null ; String sep = null ; | t = ( { distinct = true ; } )? expr = Expression() { agg = AggregatorFactory.createCustom(AggURI.var_pop, distinct, expr) ; } + | t = + { java.util.List scs = null ; + SortCondition sc = null ; } + + ( { distinct = true ; } )? + expr = Expression() + ( expr2 = Expression() )? + ( + + ( + sc = OrderConditionForAggregationFunction() + { + if ( scs == null ) + scs = new java.util.ArrayList(); + scs.add(sc); + } + )+ + )? + + { agg = AggregatorFactory.createFold(distinct, expr, expr2, scs) ; } + /* Explicit syntax (aggregate even if not registered) */ | t = { String iri ; } @@ -2499,6 +2569,7 @@ TOKEN [IGNORE_CASE] : #ifdef ARQ | < LET: "LET" > | < LATERAL: "LATERAL" > +| < UNFOLD: "unfold" > #endif | < TRIPLE: "TRIPLE" > @@ -2529,6 +2600,9 @@ TOKEN [IGNORE_CASE] : | < VARIANCE: "variance" > | < VAR_SAMP: "var_samp" > | < VAR_POP: "var_pop" > +#ifdef ARQ +| < FOLD: "fold" > +#endif | < SAMPLE: "sample" > | < GROUP_CONCAT: "group_concat" > diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/CDTFactory.java b/jena-arq/src/main/java/org/apache/jena/cdt/CDTFactory.java new file mode 100644 index 00000000000..9af154467a6 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/CDTFactory.java @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt; + +import java.util.List; +import java.util.Map; + +import org.apache.jena.graph.Node; +import org.apache.jena.graph.NodeFactory; + +public class CDTFactory +{ + public static CDTKey createKey( final Node n ) { + return new CDTKey() { + @Override public Node asNode() { return n; } + }; + } + + public static CDTValue createValue( final Node n ) { + return new CDTValue() { + @Override public boolean isNode() { return true; } + @Override public Node asNode() { return n; } + }; + } + + public static CDTValue createValue( final List l ) { + final Node n = NodeFactory.createLiteralByValue(l, CompositeDatatypeList.type); + return createValue(n); + } + + public static CDTValue createValue( final Map m ) { + final Node n = NodeFactory.createLiteralByValue(m, CompositeDatatypeMap.type); + return createValue(n); + } + + public static CDTValue getNullValue() { + if ( nullValue == null ) { + return new CDTValue() { + @Override public boolean isNull() { return true; } + }; + } + + return nullValue; + } + + private static CDTValue nullValue = null; + +} diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/CDTKey.java b/jena-arq/src/main/java/org/apache/jena/cdt/CDTKey.java new file mode 100644 index 00000000000..7631565e88c --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/CDTKey.java @@ -0,0 +1,66 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt; + +import org.apache.jena.graph.Node; +import org.apache.jena.riot.out.NodeFmtLib; + +public abstract class CDTKey +{ + /** + * Returns this object as an RDF term (i.e., an IRI, a literal, + * or a blank node), assuming it is one. If it is not, then an + * {@link UnsupportedOperationException} is thrown. + */ + public Node asNode() { + throw new UnsupportedOperationException( this + " is not an RDF term" ); + } + + @Override + public boolean equals( final Object other ) { + if ( other instanceof CDTKey ) { + final CDTKey otherKey = (CDTKey) other; + + final Node n1 = asNode(); + final Node n2 = otherKey.asNode(); + return n1.equals(n2); + } + + return false; + } + + @Override + public int hashCode() { + return asNode().hashCode(); + } + + @Override + public String toString() { + return asNode().toString(); + } + + /** + * Returns a string representation of this element + * to be included in the lexical form of literals. + */ + public String asLexicalForm() { + return NodeFmtLib.strTTL( asNode() ); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/CDTLiteralParseException.java b/jena-arq/src/main/java/org/apache/jena/cdt/CDTLiteralParseException.java new file mode 100644 index 00000000000..01325265fc1 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/CDTLiteralParseException.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt; + +import org.apache.jena.shared.JenaException; + +public class CDTLiteralParseException extends JenaException +{ + private static final long serialVersionUID = -6244204787118953600L; + + public CDTLiteralParseException() { super(); } + public CDTLiteralParseException(Throwable cause) { super(cause); } + public CDTLiteralParseException(String msg) { super(msg); } + public CDTLiteralParseException(String msg, Throwable cause) { super(msg, cause); } +} diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/CDTLiteralParserBase.java b/jena-arq/src/main/java/org/apache/jena/cdt/CDTLiteralParserBase.java new file mode 100644 index 00000000000..7e26446c20f --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/CDTLiteralParserBase.java @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt; + +import org.apache.jena.graph.Node; +import org.apache.jena.riot.lang.extra.LangParserBase; + +public class CDTLiteralParserBase extends LangParserBase +{ + @Override + protected Node createBNode( final String label, final int line, final int column ) { + // We need to cut away the leading '_:' of the given blank node label. + // This is necessary because the Turtle parser does the same. If we + // would not do it here for the blank node labels obtained from the + // lexical forms of CDT literals, then the label-to-bnode mapping of + // the shared parser state fails to map the same blank node identifiers + // inside and outside of CDT literals to the same blank node. + final String lbl = label.startsWith("_:") ? label.substring(2) : label; + return super.createBNode(lbl, line, column); + } + + @Override + protected Node createLiteral( final String lex, final String langTag, final String datatypeURI, final int line, final int column ) { + if ( CompositeDatatypeList.uri.equals(datatypeURI) ) { + return profile.createTypedLiteral(lex, CompositeDatatypeList.type, 0L, 0L); + } + + if ( CompositeDatatypeMap.uri.equals(datatypeURI) ) { + return profile.createTypedLiteral(lex, CompositeDatatypeMap.type, 0L, 0L); + } + + return super.createLiteral(lex, langTag, datatypeURI, line, column); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/CDTValue.java b/jena-arq/src/main/java/org/apache/jena/cdt/CDTValue.java new file mode 100644 index 00000000000..3baed568f3e --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/CDTValue.java @@ -0,0 +1,144 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt; + +import org.apache.jena.graph.Node; +import org.apache.jena.riot.out.NodeFmtLib; +import org.apache.jena.sparql.expr.ExprEvalException; + +public abstract class CDTValue +{ + /** + * Returns true if this is a null value (in which + * case {@link #isNode()} must return false). + */ + public boolean isNull() { + return false; + } + + /** + * Returns true if this object is an RDF term (i.e., an IRI, a literal, + * or a blank node). In that case, {@link #asNode()} can be used to get + * a corresponding {@link Node} representation of this RDF term. + */ + public boolean isNode() { + return false; + } + + /** + * Returns this object as an RDF term (i.e., an IRI, a literal, + * or a blank node), assuming it is one. If it is not, then an + * {@link UnsupportedOperationException} is thrown. + */ + public Node asNode() { + throw new UnsupportedOperationException( this + " is not an RDF term" ); + } + + @Override + public String toString() { + if ( isNode() ) + return asNode().toString(); + + if ( isNull() ) + return "null"; + + throw new IllegalArgumentException( "not null and not a Node (" + this.getClass().getName() + ")" ); + } + + @Override + public int hashCode() { + if ( isNode() ) + return asNode().hashCode();; + + if ( isNull() ) + return 1; + + throw new IllegalArgumentException( "not null and not a Node (" + this.getClass().getName() + ")" ); + } + + @Override + public boolean equals( final Object other ) { + try { + return sameAs(other); + } + catch ( final ExprEvalException ex ) { + return false; + } + } + + public boolean sameAs( final Object other ) throws ExprEvalException { + if ( isNull() ) { + throw new ExprEvalException("nulls cannot be compared"); + } + + if ( other instanceof CDTValue ) { + final CDTValue otherValue = (CDTValue) other; + + if ( otherValue.isNull() ) { + throw new ExprEvalException("nulls cannot be compared"); + } + + if ( isNode() ) { + return otherValue.isNode() && asNode().sameValueAs( otherValue.asNode() ); + } + + throw new IllegalStateException( "unexpected type of CDTValue: " + this.getClass().getName() ); + } + + return false; + } + + public final boolean sameAs( final CDTValue otherValue ) throws ExprEvalException { + if ( isNull() ) { + throw new ExprEvalException("nulls cannot be compared"); + } + + if ( otherValue.isNull() ) { + throw new ExprEvalException("nulls cannot be compared"); + } + + if ( isNode() ) { + return otherValue.isNode() && asNode().sameValueAs( otherValue.asNode() ); + } + + throw new IllegalStateException( "unexpected type of CDTValue: " + this.getClass().getName() ); + } + + public String asLexicalForm() { + if ( isNull() ) { + return "null"; + } + + if ( isNode() ) { + final Node n = asNode(); + if ( CompositeDatatypeList.isListLiteral(n) ) { + return n.getLiteralLexicalForm(); + } + else if ( CompositeDatatypeMap.isMapLiteral(n) ) { + return n.getLiteralLexicalForm(); + } + else { + return NodeFmtLib.strTTL(n); + } + } + + throw new IllegalStateException( "unexpected type of CDTValue: " + this.getClass().getName() ); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/CompositeDatatypeBase.java b/jena-arq/src/main/java/org/apache/jena/cdt/CompositeDatatypeBase.java new file mode 100644 index 00000000000..ffeff44314d --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/CompositeDatatypeBase.java @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt; + +import org.apache.jena.datatypes.DatatypeFormatException; +import org.apache.jena.datatypes.RDFDatatype; +import org.apache.jena.graph.impl.LiteralLabel; +import org.apache.jena.sparql.expr.Expr; + +public abstract class CompositeDatatypeBase implements RDFDatatype +{ + @Override + public Class getJavaClass() { + return null; + } + + @Override + public Object cannonicalise( final Object value ) { + return value; + } + + @Override + public Object extendedTypeDefinition() { + return null; + } + + @Override + public RDFDatatype normalizeSubType( final Object value, final RDFDatatype dt ) { + return this; + } + + @Override + public abstract T parse( final String lexicalForm ) throws DatatypeFormatException; + + public abstract String unparseValue( final T value ); + + // helper for the compare function in each of the subclasses + protected static int compareByLexicalForms( final LiteralLabel value1, final LiteralLabel value2 ) { + final int lexCmp = value1.getLexicalForm().compareTo( value2.getLexicalForm() ); + if ( lexCmp < 0 ) return Expr.CMP_LESS; + if ( lexCmp > 0 ) return Expr.CMP_GREATER; + return Expr.CMP_EQUAL; + } +} diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/CompositeDatatypeList.java b/jena-arq/src/main/java/org/apache/jena/cdt/CompositeDatatypeList.java new file mode 100644 index 00000000000..c377b607d4a --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/CompositeDatatypeList.java @@ -0,0 +1,353 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt; + +import java.util.Iterator; +import java.util.List; + +import org.apache.jena.datatypes.DatatypeFormatException; +import org.apache.jena.graph.Node; +import org.apache.jena.graph.impl.LiteralLabel; +import org.apache.jena.sparql.expr.Expr; +import org.apache.jena.sparql.expr.ExprEvalException; +import org.apache.jena.sparql.expr.ExprNotComparableException; +import org.apache.jena.sparql.expr.NodeValue; + +public class CompositeDatatypeList extends CompositeDatatypeBase> +{ + public final static String uri = "http://w3id.org/awslabs/neptune/SPARQL-CDTs/List"; + public final static CompositeDatatypeList type = new CompositeDatatypeList(); + + protected CompositeDatatypeList() {} + + @Override + public String getURI() { + return uri; + } + + @Override + public boolean isValidValue( final Object value ) { + if ( !(value instanceof List) ) { + return false; + } + + final List l = (List) value; + for ( final Object e : l ) { + if ( !(e instanceof CDTValue) ) { + return false; + } + } + + return true; + } + + @Override + public boolean isValidLiteral( final LiteralLabel lit ) { + final String dtURI = lit.getDatatypeURI(); + if ( dtURI == null || ! dtURI.equals(uri) ) { + return false; + } + + final String lang = lit.language(); + if ( lang != null && ! lang.isEmpty() ) { + return false; + } + + final String lex = lit.getLexicalForm(); + return isValid(lex); + } + + @Override + public boolean isValid( final String lexicalForm ) { + try { + ParserForCDTLiterals.parseListLiteral(lexicalForm); + return true; + } + catch ( final Exception ex ) { + return false; + } + } + + @Override + public List parse( final String lexicalForm ) throws DatatypeFormatException { + try { + return ParserForCDTLiterals.parseListLiteral(lexicalForm); + } + catch ( final Exception ex ) { + throw new DatatypeFormatException(lexicalForm, type, ex); + } + } + + @Override + public String unparse( final Object value ) { + if ( !(value instanceof List) ) { + throw new IllegalArgumentException(); + } + + @SuppressWarnings("unchecked") + final List list = (List) value; + + return unparseValue(list); + } + + @Override + public String unparseValue( final List list ) { + final StringBuilder sb = new StringBuilder(); + sb.append("["); + if ( ! list.isEmpty() ) { + final Iterator it = list.iterator(); + final CDTValue firstElmt = it.next(); + final String firstElmtAsString = unparseListElement(firstElmt); + sb.append(firstElmtAsString); + while ( it.hasNext() ) { + final CDTValue nextElmt = it.next(); + final String nextElmtAsString = unparseListElement(nextElmt); + sb.append(", "); + sb.append(nextElmtAsString); + } + } + sb.append("]"); + return sb.toString(); + } + + protected String unparseListElement( final CDTValue elmt ) { + return elmt.asLexicalForm(); + } + + @Override + public int getHashCode( final LiteralLabel lit ) { + return lit.hashCode(); + } + + @Override + public boolean isEqual( final LiteralLabel value1, final LiteralLabel value2 ) { + if ( ! isListLiteral(value1) || ! isListLiteral(value2) ) { + return false; + } + + final List list1 = getValue(value1); + final List list2 = getValue(value2); + + if ( list1.size() != list2.size() ) return false; + if ( list1.isEmpty() ) return true; + + final Iterator it1 = list1.iterator(); + final Iterator it2 = list2.iterator(); + while ( it1.hasNext() ) { + final CDTValue v1 = it1.next(); + final CDTValue v2 = it2.next(); + + if ( v1.isNull() || v2.isNull() ) { + if ( ! v1.isNull() || ! v2.isNull() ) { + return false; + } + } + else { + final Node n1 = v1.asNode(); + final Node n2 = v2.asNode(); + + if ( n1.isBlank() || n2.isBlank() ) { + // If at least one of the two elements is a blank node, + // throw an error unless both elements are *the same* + // blank node. + if ( ! n1.equals(n2) ) { + throw new ExprEvalException("blank nodes in lists cannot be compared"); + } + } + + if ( ! n1.sameValueAs(n2) ) { + return false; + } + } + } + + return true; + } + + /** + * Assumes that the datatype of both of the given literals is cdt:List. + * If 'sortOrderingCompare' is true, the two lists are compared as per the + * semantics for ORDER BY. If 'sortOrderingCompare' is false, the comparison + * applies the list-less-than semantics. + */ + public static int compare( final LiteralLabel value1, final LiteralLabel value2, final boolean sortOrderingCompare ) throws ExprNotComparableException { + // Verify first that both literals are well-formed. If at least one of + // them is not well-formed, then their relative order is undefined. + if ( ! value1.isWellFormed() || ! value2.isWellFormed() ) + throw new ExprNotComparableException("Can't compare "+value1+" and "+value2); + + final List list1; + final List list2; + try { + list1 = getValue(value1); + list2 = getValue(value2); + } + catch ( final Exception e ) { + throw new ExprNotComparableException("Can't compare "+value1+" and "+value2); + } + + // If at least one of the two lists is empty, then we can decide their + // relative order without a pair-wise comparison of the list elements. + if ( list1.isEmpty() || list2.isEmpty() ) { + // The literal with the non-empty list is greater + // than the literal with the empty list. + if ( ! list1.isEmpty() ) return Expr.CMP_GREATER; + if ( ! list2.isEmpty() ) return Expr.CMP_LESS; + + // If both lists are empty, under the ORDER BY semantics we then + // decide the order based on the lexical forms, and under the + // list-less-than semantics, both literals are considered equal. + if ( sortOrderingCompare ) + return compareByLexicalForms(value1, value2); + else + return Expr.CMP_EQUAL; + } + + // Now we go into the pair-wise comparison of the list elements. + final int n = Math.min( list1.size(), list2.size() ); + for ( int i = 0; i < n; i++ ) { + final CDTValue elmt1 = list1.get(i); + final CDTValue elmt2 = list2.get(i); + + if ( ! elmt1.isNull() && ! elmt2.isNull() ) { + final NodeValue nv1 = NodeValue.makeNode( elmt1.asNode() ); + final NodeValue nv2 = NodeValue.makeNode( elmt2.asNode() ); + + if ( ! sortOrderingCompare && nv1.isBlank() && nv2.isBlank() ) { + throw new ExprNotComparableException("Can't compare "+value1+" and "+value2); + } + + // Compare the values represented by the two list elements + // in terms of which of them is greater than the other one. + try { + final int c; + if ( sortOrderingCompare ) + c = NodeValue.compareAlways(nv1, nv2); + else + c = NodeValue.compare(nv1, nv2); + + // If one of the two values is greater than the other one, + // return this result as the result for comparing the two + // lists. + if ( c < 0 ) return Expr.CMP_LESS; + if ( c > 0 ) return Expr.CMP_GREATER; + } + catch ( final Exception e ) { + // If the comparison failed, simply move on to the + // next code block (i.e., nothing to do here). + } + + // If the comparison of nv1 and nv2 failed with an exception + // or none of them is greater than the other, we test whether + // they are the same value (i.e., comparing them using = + // results in true). + boolean sameValueTestResult = false; + boolean sameValueTestFailed = false; + try { + sameValueTestResult = NodeValue.sameValueAs(nv1, nv2); + } + catch ( final Exception e ) { + sameValueTestFailed = true; + } + + // If nv1 and nv2 are not the same value or testing whether + // they are the same value failed, we can terminate the whole + // comparison (as being done in the following if block). + // If, however, nv1 and nv2 are indeed the same value (in which + // case the following if condition is not true), we continue to + // the next pair of list elements. + if ( sameValueTestFailed == true || sameValueTestResult == false ) { + if ( sortOrderingCompare ) + return Expr.CMP_INDETERMINATE; + else + throw new ExprNotComparableException("Can't compare "+value1+" and "+value2); + } + } + else { + // This else-branch covers cases in which at least one of the + // two list elements is null. + if ( ! sortOrderingCompare ) { + // When comparing as per the list-less-than semantics, + // null cannot be compared to anything other than null. + if ( ! elmt1.isNull() || ! elmt2.isNull() ) + throw new ExprNotComparableException("Can't compare "+value1+" and "+value2); + } + else { + // When comparing as per the ORDER BY semantics, nulls are + // ordered the same. Hence, if both elements are null, we + // don't do anything here and simply advance to the next + // pair of elements. + // However, if only one of the two elements is null, then + // the literal with this element is ordered lower than the + // other literal. + if ( elmt1.isNull() && ! elmt2.isNull() ) + return Expr.CMP_LESS; + + if ( elmt2.isNull() && ! elmt1.isNull() ) + return Expr.CMP_GREATER; + } + } + } + + // At this point, the pair-wise comparison of list elements has not + // led to any decision. Now, we decide based on the size of the lists. + final int sizeDiff = list1.size() - list2.size(); + if ( sizeDiff < 0 ) return Expr.CMP_LESS; + if ( sizeDiff > 0 ) return Expr.CMP_GREATER; + + if ( sortOrderingCompare ) + return compareByLexicalForms(value1, value2); + else + return Expr.CMP_EQUAL; + } + + /** + * Returns true if the given node is a literal with {@link #uri} + * as its datatype URI. Notice that this does not mean that this + * literal is actually valid; for checking validity, use + * {@link #isValidLiteral(LiteralLabel)}. + */ + public static boolean isListLiteral( final Node n ) { + return n.isLiteral() && n.getLiteralDatatypeURI().equals(uri); + } + + /** + * Returns true if the datatype URI of the given literal is {@link #uri}. + * Notice that this does not mean that this literal is actually valid; + * for checking validity, use {@link #isValidLiteral(LiteralLabel)}. + */ + public static boolean isListLiteral( final LiteralLabel lit ) { + return lit.getDatatypeURI().equals(uri); + } + + /** + * Assumes that the datatype of the given literal is cdt:List. + */ + public static List getValue( final LiteralLabel lit ) throws DatatypeFormatException { + final Object value = lit.getValue(); + if ( value == null || ! (value instanceof List) ) { + throw new IllegalArgumentException( lit.toString() + " - " + value ); + } + + @SuppressWarnings("unchecked") + final List list = (List) value; + return list; + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/CompositeDatatypeMap.java b/jena-arq/src/main/java/org/apache/jena/cdt/CompositeDatatypeMap.java new file mode 100644 index 00000000000..d3070127f98 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/CompositeDatatypeMap.java @@ -0,0 +1,413 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt; + +import java.util.Comparator; +import java.util.Iterator; +import java.util.Map; +import java.util.TreeSet; + +import org.apache.jena.datatypes.DatatypeFormatException; +import org.apache.jena.datatypes.xsd.impl.RDFLangString; +import org.apache.jena.graph.Node; +import org.apache.jena.graph.impl.LiteralLabel; +import org.apache.jena.sparql.expr.Expr; +import org.apache.jena.sparql.expr.ExprEvalException; +import org.apache.jena.sparql.expr.ExprNotComparableException; +import org.apache.jena.sparql.expr.NodeValue; + +public class CompositeDatatypeMap extends CompositeDatatypeBase> +{ + public final static String uri = "http://w3id.org/awslabs/neptune/SPARQL-CDTs/Map"; + public final static CompositeDatatypeMap type = new CompositeDatatypeMap(); + + protected CompositeDatatypeMap() {} + + @Override + public String getURI() { + return uri; + } + + @Override + public boolean isValidValue( final Object value ) { + if ( !(value instanceof Map) ) { + return false; + } + + final Map m = (Map) value; + for ( final Map.Entry e : m.entrySet() ) { + if ( !(e.getKey() instanceof CDTKey) ) { + return false; + } + if ( !(e.getValue() instanceof CDTValue) ) { + return false; + } + } + + return true; + } + + @Override + public boolean isValidLiteral( final LiteralLabel lit ) { + final String dtURI = lit.getDatatypeURI(); + if ( dtURI == null || ! dtURI.equals(uri) ) { + return false; + } + + final String lang = lit.language(); + if ( lang != null && ! lang.isEmpty() ) { + return false; + } + + final String lex = lit.getLexicalForm(); + return isValid(lex); + } + + @Override + public boolean isValid( final String lexicalForm ) { + try { + ParserForCDTLiterals.parseMapLiteral(lexicalForm); + return true; + } + catch ( final Exception ex ) { + return false; + } + } + + @Override + public Map parse( final String lexicalForm ) throws DatatypeFormatException { + try { + return ParserForCDTLiterals.parseMapLiteral(lexicalForm); + } + catch ( final Exception ex ) { + throw new DatatypeFormatException(lexicalForm, type, ex); + } + } + + @Override + public String unparse( final Object value ) { + if ( !(value instanceof Map) ) { + throw new IllegalArgumentException(); + } + + @SuppressWarnings("unchecked") + final Map map = (Map) value; + + return unparseValue(map); + } + + @Override + public String unparseValue( final Map map ) { + final StringBuilder sb = new StringBuilder(); + sb.append("{"); + if ( ! map.isEmpty() ) { + final Iterator> it = map.entrySet().iterator(); + + final Map.Entry firstEntry = it.next(); + unparseMapEntry(firstEntry, sb); + + while ( it.hasNext() ) { + sb.append(", "); + + final Map.Entry nextEntry = it.next(); + unparseMapEntry(nextEntry, sb); + } + } + + sb.append("}"); + return sb.toString(); + } + + protected void unparseMapEntry( final Map.Entry entry, final StringBuilder sb ) { + sb.append( entry.getKey().asLexicalForm() ); + sb.append(" : "); + sb.append( entry.getValue().asLexicalForm() ); + } + + @Override + public int getHashCode( final LiteralLabel lit ) { + return lit.hashCode(); + } + + @Override + public boolean isEqual( final LiteralLabel lit1, final LiteralLabel lit2 ) { + if ( ! isMapLiteral(lit1) || ! isMapLiteral(lit2) ) { + return false; + } + + final Map map1 = getValue(lit1); + final Map map2 = getValue(lit2); + + if ( map1.size() != map2.size() ) return false; + + for ( final Map.Entry entry1 : map1.entrySet() ) { + final CDTValue v1 = entry1.getValue(); + final CDTValue v2 = map2.get( entry1.getKey() ); + if ( v2 == null ) return false; + + if ( v1.isNull() || v2.isNull() ) { + if ( ! v1.isNull() || ! v2.isNull() ) { + return false; + } + } + else { + final Node n1 = v1.asNode(); + final Node n2 = v2.asNode(); + + if ( n1.isBlank() || n2.isBlank() ) { + // If at least one of the two elements is a blank node, + // throw an error unless both elements are *the same* + // blank node. + if ( ! n1.equals(n2) ) { + throw new ExprEvalException("blank nodes in maps cannot be compared"); + } + } + + if ( ! n1.sameValueAs(n2) ) return false; + } + } + + return true; + } + + /** + * Assumes that the datatype of both of the given literals is cdt:Map. + * + * If 'sortOrderingCompare' is true, the two maps are compared as per the + * semantics for ORDER BY. If 'sortOrderingCompare' is false, the comparison + * applies the map-less-than semantics. + */ + public static int compare( final LiteralLabel value1, final LiteralLabel value2, final boolean sortOrderingCompare ) throws ExprNotComparableException { + // Verify first that both literals are well-formed. If at least one of + // them is not well-formed, then their relative order is undefined. + if ( ! value1.isWellFormed() || ! value2.isWellFormed() ) + throw new ExprNotComparableException("Can't compare "+value1+" and "+value2); + + final Map map1; + final Map map2; + try { + map1 = getValue(value1); + map2 = getValue(value2); + } + catch ( final Exception e ) { + throw new ExprNotComparableException("Can't compare "+value1+" and "+value2); + } + + // If at least one of the two maps is empty, then we can decide their + // relative order without a pair-wise comparison of the map entries. + if ( map1.isEmpty() || map2.isEmpty() ) { + // The literal with the non-empty map is greater + // than the literal with the empty map. + if ( ! map1.isEmpty() ) return Expr.CMP_GREATER; + if ( ! map2.isEmpty() ) return Expr.CMP_LESS; + + // If both maps are empty, under the ORDER BY semantics we then + // decide the order based on the lexical forms, and under the + // map-less-than semantics, both literals are considered equal. + if ( sortOrderingCompare ) + return compareByLexicalForms(value1, value2); + else + return Expr.CMP_EQUAL; + } + + // Now we go into the pair-wise comparison of the map entries. + // To this end, we first need to sort the map entries. + final CDTKeySorter keySorter = new CDTKeySorter(); + final TreeSet sortedKeys1 = new TreeSet<>(keySorter); + final TreeSet sortedKeys2 = new TreeSet<>(keySorter); + sortedKeys1.addAll( map1.keySet() ); + sortedKeys2.addAll( map2.keySet() ); + + // Now we can perform the pair-wise comparison of the map entries. + final Iterator it1 = sortedKeys1.iterator(); + final Iterator it2 = sortedKeys2.iterator(); + final int n = Math.min( sortedKeys1.size(), sortedKeys2.size() ); + for ( int i = 0; i < n; i++ ) { + final CDTKey k1 = it1.next(); + final CDTKey k2 = it2.next(); + + final int kCmp = keySorter.compare(k1, k2); + if ( kCmp < 0 ) return Expr.CMP_LESS; + if ( kCmp > 0 ) return Expr.CMP_GREATER; + + final CDTValue v1 = map1.get(k1); + final CDTValue v2 = map2.get(k2); + if ( ! v1.isNull() && ! v2.isNull() ) { + final NodeValue nv1 = NodeValue.makeNode( v1.asNode() ); + final NodeValue nv2 = NodeValue.makeNode( v2.asNode() ); + + // Compare the actual values represented by the two map values + // in terms of which of them is greater than the other one. + try { + final int c; + if ( sortOrderingCompare ) + c = NodeValue.compareAlways(nv1, nv2); + else + c = NodeValue.compare(nv1, nv2); + + // If one of the two values is greater than the other one, + // return this result as the result for comparing the two + // maps. + if ( c < 0 ) return Expr.CMP_LESS; + if ( c > 0 ) return Expr.CMP_GREATER; + } + catch ( final Exception e ) { + // If the comparison failed, simply move on to the + // next code block (i.e., nothing to do here). + } + + // If the comparison of nv1 and nv2 failed with an exception + // or none of them is greater than the other, we test whether + // they are the same value (i.e., comparing them using = + // results in true). + boolean sameValueTestResult = false; + boolean sameValueTestFailed = false; + try { + sameValueTestResult = NodeValue.sameValueAs(nv1, nv2); + } + catch ( final Exception e ) { + sameValueTestFailed = true; + } + + // If nv1 and nv2 are not the same value or testing whether + // they are the same value failed, we can terminate the whole + // comparison (as being done in the following if block). + // If, however, nv1 and nv2 are indeed the same value (in which + // case the following if condition is not true), we continue to + // the next pair of map entries. + if ( sameValueTestFailed == true || sameValueTestResult == false ) { + if ( sortOrderingCompare ) + return Expr.CMP_INDETERMINATE; + else + throw new ExprNotComparableException("Can't compare "+value1+" and "+value2); + } + } + else { + // This else-branch covers cases in which at least one of the + // two map entries has null as its value. + if ( ! sortOrderingCompare ) { + // When comparing as per the map-less-than semantics, + // null cannot be compared to anything other than null. + if ( ! v1.isNull() || ! v2.isNull() ) + throw new ExprNotComparableException("Can't compare "+value1+" and "+value2); + } + else { + // When comparing as per the ORDER BY semantics, nulls are + // ordered the same. Hence, if both map entries have null + // as their value, we don't do anything here and simply + // advance to the next pair of map entries. + // However, if the map value of only one of the two map + // entries is null, then the literal with this map entry + // is ordered lower than the other literal. + if ( v1.isNull() && ! v2.isNull() ) + return Expr.CMP_LESS; + + if ( v2.isNull() && ! v1.isNull() ) + return Expr.CMP_GREATER; + } + } + } + + // At this point, the pair-wise comparison of map entries has not led + // to any decision. Now, we decide based on the size of the maps. + final int sizeDiff = map1.size() - map2.size(); + if ( sizeDiff < 0 ) return Expr.CMP_LESS; + if ( sizeDiff > 0 ) return Expr.CMP_GREATER; + + if ( sortOrderingCompare ) + return compareByLexicalForms(value1, value2); + else + return Expr.CMP_EQUAL; + } + + /** + * Returns true if the given node is a literal with {@link #uri} + * as its datatype URI. Notice that this does not mean that this + * literal is actually valid; for checking validity, use + * {@link #isValidLiteral(LiteralLabel)}. + */ + public static boolean isMapLiteral( final Node n ) { + return n.isLiteral() && n.getLiteralDatatypeURI().equals(uri); + } + + /** + * Returns true if the datatype URI of the given {@link LiteralLabel} is + * {@link #uri}. Notice that this does not mean that this LiteralLabel is + * actually valid; for checking validity, use {@link #isValidLiteral(LiteralLabel)}. + */ + public static boolean isMapLiteral( final LiteralLabel lit ) { + return lit.getDatatypeURI().equals(uri); + } + + /** + * Assumes that the datatype of the given literal is cdt:Map. + */ + public static Map getValue( final LiteralLabel lit ) throws DatatypeFormatException { + final Object value = lit.getValue(); + if ( value == null || ! (value instanceof Map) ) { + throw new IllegalArgumentException( lit.toString() + " - " + value ); + } + + @SuppressWarnings("unchecked") + final Map map = (Map) value; + return map; + } + + protected static class CDTKeySorter implements Comparator { + @Override + public int compare( final CDTKey k1, final CDTKey k2 ) { + final Node n1 = k1.asNode(); + final Node n2 = k2.asNode(); + + if ( n1.isURI() ) { + if ( ! n2.isURI() ) { + return Expr.CMP_LESS; + } + + final String uri1 = n1.getURI(); + final String uri2 = n2.getURI(); + return uri1.compareTo(uri2); + } + else if ( n2.isURI() ) { + return Expr.CMP_GREATER; + } + + // at this point, both RDF terms (n1 and n2) should be literals + final String dt1 = n1.getLiteralDatatypeURI(); + final String dt2 = n2.getLiteralDatatypeURI(); + final int dtCmp = dt1.compareTo(dt2); + if ( dtCmp != 0 ) { + return dtCmp; + } + + final String lex1 = n1.getLiteralLexicalForm(); + final String lex2 = n2.getLiteralLexicalForm(); + final int lexCmp = lex1.compareTo(lex2); + if ( lexCmp != 0 || ! RDFLangString.rdfLangString.getURI().equals(dt1) ) { + return lexCmp; + } + + // at this point, both literals are rdf:LangString literals with the same value + final String lang1 = n1.getLiteralLanguage(); + final String lang2 = n2.getLiteralLanguage(); + return lang1.compareTo(lang2); + } + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/ParserForCDTLiterals.java b/jena-arq/src/main/java/org/apache/jena/cdt/ParserForCDTLiterals.java new file mode 100644 index 00000000000..28b376f7f44 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/ParserForCDTLiterals.java @@ -0,0 +1,115 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt; + +import java.io.IOException; +import java.io.Reader; +import java.io.StringReader; +import java.util.List; +import java.util.Map; + +import org.apache.jena.cdt.parser.CDTLiteralParser; +import org.apache.jena.cdt.parser.ParseException; +import org.apache.jena.cdt.parser.TokenMgrError; +import org.apache.jena.riot.system.ParserProfile; +import org.apache.jena.riot.system.RiotLib; + +public class ParserForCDTLiterals +{ + public static List parseListLiteral( final String lex ) { + return parseListLiteral( RiotLib.dftProfile(), lex ); + } + + public static List parseListLiteral( final ParserProfile pp, final String lex ) { + final Reader reader = new StringReader(lex); + final List result = parseListLiteral(pp, reader); + + try { reader.close(); } catch ( final IOException e ) { + throw new CDTLiteralParseException("Closing the reader caused an exception.", e); + } + + return result; + } + + public static List parseListLiteral( final Reader reader ) { + return parseListLiteral( RiotLib.dftProfile(), reader ); + } + + public static List parseListLiteral( final ParserProfile pp, final Reader reader ) { + final CDTLiteralParser parser = new CDTLiteralParser(reader); + parser.setProfile(pp); + + final List list; + try { + list = parser.List(); + } + catch ( final ParseException | TokenMgrError ex ) { + throw new CDTLiteralParseException( ex.getMessage() ); + } + catch ( final CDTLiteralParseException ex ) { + throw ex; + } + catch ( final Throwable th ) { + throw new CDTLiteralParseException( th.getMessage(), th ); + } + + return list; + } + + public static Map parseMapLiteral( final String lex ) { + return parseMapLiteral( RiotLib.dftProfile(), lex ); + } + + public static Map parseMapLiteral( final ParserProfile pp, final String lex ) { + final Reader reader = new StringReader(lex); + final Map result = parseMapLiteral(pp, reader); + + try { reader.close(); } catch ( final IOException e ) { + throw new CDTLiteralParseException("Closing the reader caused an exception.", e); + } + + return result; + } + + public static Map parseMapLiteral( final Reader reader ) { + return parseMapLiteral( RiotLib.dftProfile(), reader ); + } + + public static Map parseMapLiteral( final ParserProfile pp, final Reader reader ) { + final CDTLiteralParser parser = new CDTLiteralParser(reader); + parser.setProfile(pp); + + final Map map; + try { + map = parser.Map(); + } + catch ( final ParseException | TokenMgrError ex ) { + throw new CDTLiteralParseException( ex.getMessage() ); + } + catch ( final CDTLiteralParseException ex ) { + throw ex; + } + catch ( final Throwable th ) { + throw new CDTLiteralParseException( th.getMessage(), th ); + } + + return map; + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/parser/CDTLiteralParser.java b/jena-arq/src/main/java/org/apache/jena/cdt/parser/CDTLiteralParser.java new file mode 100644 index 00000000000..febae9906be --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/parser/CDTLiteralParser.java @@ -0,0 +1,560 @@ +/* Generated By:JavaCC: Do not edit this line. CDTLiteralParser.java */ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt.parser; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.jena.cdt.*; +import org.apache.jena.graph.Node; + +import static org.apache.jena.riot.lang.extra.LangParserLib.*; + +public class CDTLiteralParser extends CDTLiteralParserBase implements CDTLiteralParserConstants { + +// --- Entry point for cdt:List literals + final public List List() throws ParseException { + List l = new ArrayList(); + jj_consume_token(LBRACKET); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case TRUE: + case FALSE: + case INTEGER: + case DECIMAL: + case DOUBLE: + case STRING_LITERAL1: + case STRING_LITERAL2: + case STRING_LITERAL_LONG1: + case STRING_LITERAL_LONG2: + case IRIref: + case BLANK_NODE_LABEL: + case NULL: + case LBRACE: + case LBRACKET: + NonEmptyListContent(l); + break; + default: + jj_la1[0] = jj_gen; + ; + } + jj_consume_token(RBRACKET); + {if (true) return l;} + throw new Error("Missing return statement in function"); + } + + final public void NonEmptyListContent(List l) throws ParseException { + ListElement(l); + label_1: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + ; + break; + default: + jj_la1[1] = jj_gen; + break label_1; + } + jj_consume_token(COMMA); + ListElement(l); + } + } + + final public void ListElement(List l) throws ParseException { + String iri; Node n; List subList; Map m; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IRIref: + iri = IRI_REF(); + n = createURI(iri, token.beginLine, token.beginColumn); l.add( CDTFactory.createValue(n) ); + break; + case BLANK_NODE_LABEL: + n = BlankNode(); + l.add( CDTFactory.createValue(n) ); + break; + case STRING_LITERAL1: + case STRING_LITERAL2: + case STRING_LITERAL_LONG1: + case STRING_LITERAL_LONG2: + n = RDFLiteral(); + l.add( CDTFactory.createValue(n) ); + break; + case INTEGER: + case DECIMAL: + case DOUBLE: + n = NumericLiteral(); + l.add( CDTFactory.createValue(n) ); + break; + case TRUE: + case FALSE: + n = BooleanLiteral(); + l.add( CDTFactory.createValue(n) ); + break; + case NULL: + jj_consume_token(NULL); + l.add( CDTFactory.getNullValue() ); + break; + case LBRACKET: + subList = List(); + l.add( CDTFactory.createValue(subList) ); + break; + case LBRACE: + m = Map(); + l.add( CDTFactory.createValue(m) ); + break; + default: + jj_la1[2] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + +// --- Entry point for cdt:Map literals + final public Map Map() throws ParseException { + Map m = new HashMap(); + jj_consume_token(LBRACE); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case TRUE: + case FALSE: + case INTEGER: + case DECIMAL: + case DOUBLE: + case STRING_LITERAL1: + case STRING_LITERAL2: + case STRING_LITERAL_LONG1: + case STRING_LITERAL_LONG2: + case IRIref: + NonEmptyMapContent(m); + break; + default: + jj_la1[3] = jj_gen; + ; + } + jj_consume_token(RBRACE); + {if (true) return m;} + throw new Error("Missing return statement in function"); + } + + final public void NonEmptyMapContent(Map m) throws ParseException { + MapEntry(m); + label_2: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + ; + break; + default: + jj_la1[4] = jj_gen; + break label_2; + } + jj_consume_token(COMMA); + MapEntry(m); + } + } + + final public void MapEntry(Map m) throws ParseException { + CDTKey key; CDTValue value; + key = MapKey(); + jj_consume_token(COLON); + value = MapValue(); + final CDTValue oldValue = m.put(key, value); + if ( oldValue != null ) {if (true) throw new ParseException("map with non-unique key (" + key.toString() + ")");} + } + + final public CDTKey MapKey() throws ParseException { + String iri; Node n; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IRIref: + iri = IRI_REF(); + n = createURI(iri, token.beginLine, token.beginColumn); {if (true) return CDTFactory.createKey(n);} + break; + case STRING_LITERAL1: + case STRING_LITERAL2: + case STRING_LITERAL_LONG1: + case STRING_LITERAL_LONG2: + n = RDFLiteral(); + {if (true) return CDTFactory.createKey(n);} + break; + case INTEGER: + case DECIMAL: + case DOUBLE: + n = NumericLiteral(); + {if (true) return CDTFactory.createKey(n);} + break; + case TRUE: + case FALSE: + n = BooleanLiteral(); + {if (true) return CDTFactory.createKey(n);} + break; + default: + jj_la1[5] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + + final public CDTValue MapValue() throws ParseException { + String iri; Node n; List subList; Map m; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IRIref: + iri = IRI_REF(); + n = createURI(iri, token.beginLine, token.beginColumn); {if (true) return CDTFactory.createValue(n);} + break; + case BLANK_NODE_LABEL: + n = BlankNode(); + {if (true) return CDTFactory.createValue(n);} + break; + case STRING_LITERAL1: + case STRING_LITERAL2: + case STRING_LITERAL_LONG1: + case STRING_LITERAL_LONG2: + n = RDFLiteral(); + {if (true) return CDTFactory.createValue(n);} + break; + case INTEGER: + case DECIMAL: + case DOUBLE: + n = NumericLiteral(); + {if (true) return CDTFactory.createValue(n);} + break; + case TRUE: + case FALSE: + n = BooleanLiteral(); + {if (true) return CDTFactory.createValue(n);} + break; + case NULL: + jj_consume_token(NULL); + {if (true) return CDTFactory.getNullValue();} + break; + case LBRACKET: + subList = List(); + {if (true) return CDTFactory.createValue(subList);} + break; + case LBRACE: + m = Map(); + {if (true) return CDTFactory.createValue(m);} + break; + default: + jj_la1[6] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + +// ---- Basic terms + final public String IRI_REF() throws ParseException { + Token t ; + t = jj_consume_token(IRIref); + {if (true) return resolveQuotedIRI(t.image, t.beginLine, t.beginColumn) ;} + throw new Error("Missing return statement in function"); + } + + final public Node BlankNode() throws ParseException { + Token t = null ; + t = jj_consume_token(BLANK_NODE_LABEL); + {if (true) return createBNode(t.image, t.beginLine, t.beginColumn);} + throw new Error("Missing return statement in function"); + } + + final public Node NumericLiteral() throws ParseException { + Token t ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INTEGER: + t = jj_consume_token(INTEGER); + {if (true) return createLiteralInteger(t.image, t.beginLine, t.beginColumn);} + break; + case DECIMAL: + t = jj_consume_token(DECIMAL); + {if (true) return createLiteralDecimal(t.image, t.beginLine, t.beginColumn);} + break; + case DOUBLE: + t = jj_consume_token(DOUBLE); + {if (true) return createLiteralDouble(t.image, t.beginLine, t.beginColumn);} + break; + default: + jj_la1[7] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + + final public Node BooleanLiteral() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case TRUE: + jj_consume_token(TRUE); + {if (true) return XSD_TRUE;} + break; + case FALSE: + jj_consume_token(FALSE); + {if (true) return XSD_FALSE;} + break; + default: + jj_la1[8] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + + final public Node RDFLiteral() throws ParseException { + String lex = null ; + lex = String(); + String lang = null ; String dt = null ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LANGTAG: + case DATATYPE: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LANGTAG: + lang = Langtag(); + break; + case DATATYPE: + jj_consume_token(DATATYPE); + dt = IRI_REF(); + break; + default: + jj_la1[9] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + default: + jj_la1[10] = jj_gen; + ; + } + {if (true) return createLiteral(lex, lang, dt, token.beginLine, token.beginColumn);} + throw new Error("Missing return statement in function"); + } + + final public String Langtag() throws ParseException { + Token t ; + t = jj_consume_token(LANGTAG); + String lang = stripChars(t.image, 1) ; {if (true) return lang ;} + throw new Error("Missing return statement in function"); + } + + final public String String() throws ParseException { + Token t ; String lex ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case STRING_LITERAL1: + t = jj_consume_token(STRING_LITERAL1); + lex = stripQuotes(t.image) ; + break; + case STRING_LITERAL2: + t = jj_consume_token(STRING_LITERAL2); + lex = stripQuotes(t.image) ; + break; + case STRING_LITERAL_LONG1: + t = jj_consume_token(STRING_LITERAL_LONG1); + lex = stripQuotes3(t.image) ; + break; + case STRING_LITERAL_LONG2: + t = jj_consume_token(STRING_LITERAL_LONG2); + lex = stripQuotes3(t.image) ; + break; + default: + jj_la1[11] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + lex = unescapeStr(lex, t.beginLine, t.beginColumn) ; + {if (true) return lex ;} + throw new Error("Missing return statement in function"); + } + + /** Generated Token Manager. */ + public CDTLiteralParserTokenManager token_source; + JavaCharStream jj_input_stream; + /** Current token. */ + public Token token; + /** Next token. */ + public Token jj_nt; + private int jj_ntk; + private int jj_gen; + final private int[] jj_la1 = new int[12]; + static private int[] jj_la1_0; + static private int[] jj_la1_1; + static { + jj_la1_init_0(); + jj_la1_init_1(); + } + private static void jj_la1_init_0() { + jj_la1_0 = new int[] {0x2c6f0f80,0x80000000,0x2c6f0f80,0x2f0f80,0x80000000,0x2f0f80,0x2c6f0f80,0xe00,0x180,0x800000,0x800000,0xf0000,}; + } + private static void jj_la1_init_1() { + jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x2,0x0,}; + } + + /** Constructor with InputStream. */ + public CDTLiteralParser(java.io.InputStream stream) { + this(stream, null); + } + /** Constructor with InputStream and supplied encoding */ + public CDTLiteralParser(java.io.InputStream stream, String encoding) { + try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } + token_source = new CDTLiteralParserTokenManager(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 12; i++) jj_la1[i] = -1; + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream stream) { + ReInit(stream, null); + } + /** Reinitialise. */ + public void ReInit(java.io.InputStream stream, String encoding) { + try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } + token_source.ReInit(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 12; i++) jj_la1[i] = -1; + } + + /** Constructor. */ + public CDTLiteralParser(java.io.Reader stream) { + jj_input_stream = new JavaCharStream(stream, 1, 1); + token_source = new CDTLiteralParserTokenManager(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 12; i++) jj_la1[i] = -1; + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader stream) { + jj_input_stream.ReInit(stream, 1, 1); + token_source.ReInit(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 12; i++) jj_la1[i] = -1; + } + + /** Constructor with generated Token Manager. */ + public CDTLiteralParser(CDTLiteralParserTokenManager tm) { + token_source = tm; + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 12; i++) jj_la1[i] = -1; + } + + /** Reinitialise. */ + public void ReInit(CDTLiteralParserTokenManager tm) { + token_source = tm; + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 12; i++) jj_la1[i] = -1; + } + + private Token jj_consume_token(int kind) throws ParseException { + Token oldToken; + if ((oldToken = token).next != null) token = token.next; + else token = token.next = token_source.getNextToken(); + jj_ntk = -1; + if (token.kind == kind) { + jj_gen++; + return token; + } + token = oldToken; + jj_kind = kind; + throw generateParseException(); + } + + +/** Get the next Token. */ + final public Token getNextToken() { + if (token.next != null) token = token.next; + else token = token.next = token_source.getNextToken(); + jj_ntk = -1; + jj_gen++; + return token; + } + +/** Get the specific Token. */ + final public Token getToken(int index) { + Token t = token; + for (int i = 0; i < index; i++) { + if (t.next != null) t = t.next; + else t = t.next = token_source.getNextToken(); + } + return t; + } + + private int jj_ntk() { + if ((jj_nt=token.next) == null) + return (jj_ntk = (token.next=token_source.getNextToken()).kind); + else + return (jj_ntk = jj_nt.kind); + } + + private java.util.List jj_expentries = new java.util.ArrayList(); + private int[] jj_expentry; + private int jj_kind = -1; + + /** Generate ParseException. */ + public ParseException generateParseException() { + jj_expentries.clear(); + boolean[] la1tokens = new boolean[40]; + if (jj_kind >= 0) { + la1tokens[jj_kind] = true; + jj_kind = -1; + } + for (int i = 0; i < 12; i++) { + if (jj_la1[i] == jj_gen) { + for (int j = 0; j < 32; j++) { + if ((jj_la1_0[i] & (1<", + "\" \"", + "\"\\t\"", + "\"\\n\"", + "\"\\r\"", + "\"\\f\"", + "", + "\"true\"", + "\"false\"", + "", + "", + "", + "", + "\"\\\"\\\"\\\"\"", + "\"\\\'\\\'\\\'\"", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\"null\"", + "\"{\"", + "\"}\"", + "\"[\"", + "\"]\"", + "\",\"", + "\":\"", + "\"^^\"", + "\"@\"", + "", + "", + "", + "", + "", + }; + +} diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/parser/CDTLiteralParserTokenManager.java b/jena-arq/src/main/java/org/apache/jena/cdt/parser/CDTLiteralParserTokenManager.java new file mode 100644 index 00000000000..9f7b775c892 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/parser/CDTLiteralParserTokenManager.java @@ -0,0 +1,1045 @@ +/* Generated By:JavaCC: Do not edit this line. CDTLiteralParserTokenManager.java */ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt.parser; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.apache.jena.cdt.*; +import org.apache.jena.graph.Node; +import static org.apache.jena.riot.lang.extra.LangParserLib.*; + +/** Token Manager. */ +public class CDTLiteralParserTokenManager implements CDTLiteralParserConstants +{ + + /** Debug output. */ + public java.io.PrintStream debugStream = System.out; + /** Set debug output. */ + public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } +private int jjStopAtPos(int pos, int kind) +{ + jjmatchedKind = kind; + jjmatchedPos = pos; + return pos + 1; +} +private int jjMoveStringLiteralDfa0_0() +{ + switch(curChar) + { + case 9: + jjmatchedKind = 2; + return jjMoveNfa_0(0, 0); + case 10: + jjmatchedKind = 3; + return jjMoveNfa_0(0, 0); + case 12: + jjmatchedKind = 5; + return jjMoveNfa_0(0, 0); + case 13: + jjmatchedKind = 4; + return jjMoveNfa_0(0, 0); + case 32: + jjmatchedKind = 1; + return jjMoveNfa_0(0, 0); + case 44: + jjmatchedKind = 31; + return jjMoveNfa_0(0, 0); + case 58: + jjmatchedKind = 32; + return jjMoveNfa_0(0, 0); + case 64: + jjmatchedKind = 34; + return jjMoveNfa_0(0, 0); + case 70: + return jjMoveStringLiteralDfa1_0(0x100L); + case 84: + return jjMoveStringLiteralDfa1_0(0x80L); + case 91: + jjmatchedKind = 29; + return jjMoveNfa_0(0, 0); + case 93: + jjmatchedKind = 30; + return jjMoveNfa_0(0, 0); + case 94: + return jjMoveStringLiteralDfa1_0(0x200000000L); + case 102: + return jjMoveStringLiteralDfa1_0(0x100L); + case 110: + return jjMoveStringLiteralDfa1_0(0x4000000L); + case 116: + return jjMoveStringLiteralDfa1_0(0x80L); + case 123: + jjmatchedKind = 27; + return jjMoveNfa_0(0, 0); + case 125: + jjmatchedKind = 28; + return jjMoveNfa_0(0, 0); + default : + return jjMoveNfa_0(0, 0); + } +} +private int jjMoveStringLiteralDfa1_0(long active0) +{ + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return jjMoveNfa_0(0, 0); + } + switch(curChar) + { + case 65: + return jjMoveStringLiteralDfa2_0(active0, 0x100L); + case 82: + return jjMoveStringLiteralDfa2_0(active0, 0x80L); + case 94: + if ((active0 & 0x200000000L) != 0L) + { + jjmatchedKind = 33; + jjmatchedPos = 1; + } + break; + case 97: + return jjMoveStringLiteralDfa2_0(active0, 0x100L); + case 114: + return jjMoveStringLiteralDfa2_0(active0, 0x80L); + case 117: + return jjMoveStringLiteralDfa2_0(active0, 0x4000000L); + default : + break; + } + return jjMoveNfa_0(0, 1); +} +private int jjMoveStringLiteralDfa2_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjMoveNfa_0(0, 1); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return jjMoveNfa_0(0, 1); + } + switch(curChar) + { + case 76: + return jjMoveStringLiteralDfa3_0(active0, 0x100L); + case 85: + return jjMoveStringLiteralDfa3_0(active0, 0x80L); + case 108: + return jjMoveStringLiteralDfa3_0(active0, 0x4000100L); + case 117: + return jjMoveStringLiteralDfa3_0(active0, 0x80L); + default : + break; + } + return jjMoveNfa_0(0, 2); +} +private int jjMoveStringLiteralDfa3_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjMoveNfa_0(0, 2); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return jjMoveNfa_0(0, 2); + } + switch(curChar) + { + case 69: + if ((active0 & 0x80L) != 0L) + { + jjmatchedKind = 7; + jjmatchedPos = 3; + } + break; + case 83: + return jjMoveStringLiteralDfa4_0(active0, 0x100L); + case 101: + if ((active0 & 0x80L) != 0L) + { + jjmatchedKind = 7; + jjmatchedPos = 3; + } + break; + case 108: + if ((active0 & 0x4000000L) != 0L) + { + jjmatchedKind = 26; + jjmatchedPos = 3; + } + break; + case 115: + return jjMoveStringLiteralDfa4_0(active0, 0x100L); + default : + break; + } + return jjMoveNfa_0(0, 3); +} +private int jjMoveStringLiteralDfa4_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjMoveNfa_0(0, 3); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return jjMoveNfa_0(0, 3); + } + switch(curChar) + { + case 69: + if ((active0 & 0x100L) != 0L) + { + jjmatchedKind = 8; + jjmatchedPos = 4; + } + break; + case 101: + if ((active0 & 0x100L) != 0L) + { + jjmatchedKind = 8; + jjmatchedPos = 4; + } + break; + default : + break; + } + return jjMoveNfa_0(0, 4); +} +static final long[] jjbitVec0 = { + 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL +}; +static final long[] jjbitVec2 = { + 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL +}; +static final long[] jjbitVec3 = { + 0xfffe7000fffffff6L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0x7e00000000ffffffL +}; +static final long[] jjbitVec4 = { + 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL +}; +static final long[] jjbitVec5 = { + 0x0L, 0xbfff000000000000L, 0xffffffffffffffffL, 0xffffffffffffffffL +}; +static final long[] jjbitVec6 = { + 0x3000L, 0xffff000000000000L, 0xffffffffffffffffL, 0xffffffffffffffffL +}; +static final long[] jjbitVec7 = { + 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L +}; +static final long[] jjbitVec8 = { + 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffL +}; +static final long[] jjbitVec9 = { + 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0x3fffffffffffffffL +}; +static final long[] jjbitVec10 = { + 0x0L, 0x0L, 0x80000000000000L, 0xff7fffffff7fffffL +}; +static final long[] jjbitVec11 = { + 0xffffffffffffffffL, 0xbfffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL +}; +static final long[] jjbitVec12 = { + 0x8000000000003000L, 0xffff000000000001L, 0xffffffffffffffffL, 0xffffffffffffffffL +}; +private int jjMoveNfa_0(int startState, int curPos) +{ + int strKind = jjmatchedKind; + int strPos = jjmatchedPos; + int seenUpto; + input_stream.backup(seenUpto = curPos + 1); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { throw new Error("Internal Error"); } + curPos = 0; + int startsAt = 0; + jjnewStateCnt = 74; + int i = 1; + jjstateSet[0] = startState; + int kind = 0x7fffffff; + for (;;) + { + if (++jjround == 0x7fffffff) + ReInitRounds(); + if (curChar < 64) + { + long l = 1L << curChar; + do + { + switch(jjstateSet[--i]) + { + case 0: + if ((0x3ff000000000000L & l) != 0L) + { + if (kind > 9) + kind = 9; + jjCheckNAddStates(0, 7); + } + else if ((0x280000000000L & l) != 0L) + jjCheckNAddStates(8, 12); + else if (curChar == 46) + jjCheckNAddTwoStates(54, 56); + else if (curChar == 60) + jjCheckNAddTwoStates(37, 38); + else if (curChar == 34) + jjstateSet[jjnewStateCnt++] = 34; + else if (curChar == 39) + jjstateSet[jjnewStateCnt++] = 22; + if (curChar == 34) + jjCheckNAddStates(13, 15); + else if (curChar == 39) + jjCheckNAddStates(16, 18); + break; + case 1: + if ((0x8400000000L & l) != 0L && kind > 15) + kind = 15; + break; + case 2: + if (curChar == 39) + jjCheckNAddStates(16, 18); + break; + case 3: + if ((0xffffff7fffffdbffL & l) != 0L) + jjCheckNAddStates(16, 18); + break; + case 5: + if ((0x8400000000L & l) != 0L) + jjCheckNAddStates(16, 18); + break; + case 6: + if (curChar == 39 && kind > 16) + kind = 16; + break; + case 7: + if (curChar == 34) + jjCheckNAddStates(13, 15); + break; + case 8: + if ((0xfffffffbffffdbffL & l) != 0L) + jjCheckNAddStates(13, 15); + break; + case 10: + if ((0x8400000000L & l) != 0L) + jjCheckNAddStates(13, 15); + break; + case 11: + if (curChar == 34 && kind > 17) + kind = 17; + break; + case 12: + if (curChar == 39) + jjCheckNAddStates(19, 22); + break; + case 13: + case 17: + if ((0xffffff7fffffffffL & l) != 0L) + jjCheckNAddStates(19, 22); + break; + case 15: + if ((0x8400000000L & l) != 0L) + jjCheckNAddStates(19, 22); + break; + case 16: + case 19: + if (curChar == 39) + jjCheckNAdd(17); + break; + case 18: + if (curChar == 39) + jjAddStates(23, 24); + break; + case 20: + if (curChar == 39 && kind > 18) + kind = 18; + break; + case 21: + if (curChar == 39) + jjstateSet[jjnewStateCnt++] = 20; + break; + case 22: + if (curChar == 39) + jjstateSet[jjnewStateCnt++] = 12; + break; + case 23: + if (curChar == 39) + jjstateSet[jjnewStateCnt++] = 22; + break; + case 24: + if (curChar == 34) + jjCheckNAddStates(25, 28); + break; + case 25: + case 29: + if ((0xfffffffbffffffffL & l) != 0L) + jjCheckNAddStates(25, 28); + break; + case 27: + if ((0x8400000000L & l) != 0L) + jjCheckNAddStates(25, 28); + break; + case 28: + case 31: + if (curChar == 34) + jjCheckNAdd(29); + break; + case 30: + if (curChar == 34) + jjAddStates(29, 30); + break; + case 32: + if (curChar == 34 && kind > 19) + kind = 19; + break; + case 33: + if (curChar == 34) + jjstateSet[jjnewStateCnt++] = 32; + break; + case 34: + if (curChar == 34) + jjstateSet[jjnewStateCnt++] = 24; + break; + case 35: + if (curChar == 34) + jjstateSet[jjnewStateCnt++] = 34; + break; + case 36: + if (curChar == 60) + jjCheckNAddTwoStates(37, 38); + break; + case 37: + if ((0xaffffffa00000000L & l) != 0L) + jjCheckNAddTwoStates(37, 38); + break; + case 38: + if (curChar == 62 && kind > 21) + kind = 21; + break; + case 39: + if (curChar == 58) + jjstateSet[jjnewStateCnt++] = 40; + break; + case 40: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 22) + kind = 22; + jjCheckNAddTwoStates(41, 42); + break; + case 41: + if ((0x3ff600000000000L & l) != 0L) + jjCheckNAddTwoStates(41, 42); + break; + case 42: + if ((0x3ff200000000000L & l) != 0L && kind > 22) + kind = 22; + break; + case 46: + if (curChar == 45) + jjCheckNAdd(47); + break; + case 47: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 23) + kind = 23; + jjCheckNAddTwoStates(46, 47); + break; + case 48: + if ((0x280000000000L & l) != 0L) + jjCheckNAddStates(8, 12); + break; + case 49: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 9) + kind = 9; + jjCheckNAdd(49); + break; + case 50: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(50, 51); + break; + case 51: + if (curChar != 46) + break; + if (kind > 10) + kind = 10; + jjCheckNAdd(52); + break; + case 52: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 10) + kind = 10; + jjCheckNAdd(52); + break; + case 53: + if (curChar == 46) + jjCheckNAdd(54); + break; + case 54: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 10) + kind = 10; + jjCheckNAdd(54); + break; + case 55: + if (curChar == 46) + jjCheckNAdd(56); + break; + case 56: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(56, 57); + break; + case 58: + if ((0x280000000000L & l) != 0L) + jjCheckNAdd(59); + break; + case 59: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 11) + kind = 11; + jjCheckNAdd(59); + break; + case 60: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddStates(31, 34); + break; + case 61: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(61, 62); + break; + case 62: + if (curChar == 46) + jjCheckNAddTwoStates(63, 64); + break; + case 63: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(63, 64); + break; + case 65: + if ((0x280000000000L & l) != 0L) + jjCheckNAdd(66); + break; + case 66: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 11) + kind = 11; + jjCheckNAdd(66); + break; + case 67: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(67, 68); + break; + case 69: + if ((0x280000000000L & l) != 0L) + jjCheckNAdd(70); + break; + case 70: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 11) + kind = 11; + jjCheckNAdd(70); + break; + case 71: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 9) + kind = 9; + jjCheckNAddStates(0, 7); + break; + case 72: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 20) + kind = 20; + jjCheckNAdd(72); + break; + case 73: + if (curChar == 46) + jjCheckNAddTwoStates(54, 56); + break; + default : break; + } + } while(i != startsAt); + } + else if (curChar < 128) + { + long l = 1L << (curChar & 077); + do + { + switch(jjstateSet[--i]) + { + case 0: + if (curChar == 64) + jjCheckNAdd(45); + else if (curChar == 95) + jjstateSet[jjnewStateCnt++] = 39; + else if (curChar == 92) + jjstateSet[jjnewStateCnt++] = 1; + break; + case 1: + if ((0x14404410144044L & l) != 0L && kind > 15) + kind = 15; + break; + case 3: + if ((0xffffffffefffffffL & l) != 0L) + jjCheckNAddStates(16, 18); + break; + case 4: + if (curChar == 92) + jjstateSet[jjnewStateCnt++] = 5; + break; + case 5: + if ((0x14404410144044L & l) != 0L) + jjCheckNAddStates(16, 18); + break; + case 8: + if ((0xffffffffefffffffL & l) != 0L) + jjCheckNAddStates(13, 15); + break; + case 9: + if (curChar == 92) + jjstateSet[jjnewStateCnt++] = 10; + break; + case 10: + if ((0x14404410144044L & l) != 0L) + jjCheckNAddStates(13, 15); + break; + case 13: + if ((0xffffffffefffffffL & l) != 0L) + jjCheckNAddStates(19, 22); + break; + case 14: + if (curChar == 92) + jjstateSet[jjnewStateCnt++] = 15; + break; + case 15: + if ((0x14404410144044L & l) != 0L) + jjCheckNAddStates(19, 22); + break; + case 17: + jjCheckNAddStates(19, 22); + break; + case 25: + if ((0xffffffffefffffffL & l) != 0L) + jjCheckNAddStates(25, 28); + break; + case 26: + if (curChar == 92) + jjstateSet[jjnewStateCnt++] = 27; + break; + case 27: + if ((0x14404410144044L & l) != 0L) + jjCheckNAddStates(25, 28); + break; + case 29: + jjCheckNAddStates(25, 28); + break; + case 37: + if ((0xc7fffffeafffffffL & l) != 0L) + jjAddStates(35, 36); + break; + case 40: + if ((0x7fffffe87fffffeL & l) == 0L) + break; + if (kind > 22) + kind = 22; + jjCheckNAddTwoStates(41, 42); + break; + case 41: + if ((0x7fffffe87fffffeL & l) != 0L) + jjCheckNAddTwoStates(41, 42); + break; + case 42: + if ((0x7fffffe87fffffeL & l) != 0L && kind > 22) + kind = 22; + break; + case 43: + if (curChar == 95) + jjstateSet[jjnewStateCnt++] = 39; + break; + case 44: + if (curChar == 64) + jjCheckNAdd(45); + break; + case 45: + if ((0x7fffffe07fffffeL & l) == 0L) + break; + if (kind > 23) + kind = 23; + jjCheckNAddTwoStates(45, 46); + break; + case 47: + if ((0x7fffffe07fffffeL & l) == 0L) + break; + if (kind > 23) + kind = 23; + jjCheckNAddTwoStates(46, 47); + break; + case 57: + if ((0x2000000020L & l) != 0L) + jjAddStates(37, 38); + break; + case 64: + if ((0x2000000020L & l) != 0L) + jjAddStates(39, 40); + break; + case 68: + if ((0x2000000020L & l) != 0L) + jjAddStates(41, 42); + break; + default : break; + } + } while(i != startsAt); + } + else + { + int hiByte = (int)(curChar >> 8); + int i1 = hiByte >> 6; + long l1 = 1L << (hiByte & 077); + int i2 = (curChar & 0xff) >> 6; + long l2 = 1L << (curChar & 077); + do + { + switch(jjstateSet[--i]) + { + case 3: + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + jjAddStates(16, 18); + break; + case 8: + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + jjAddStates(13, 15); + break; + case 13: + case 17: + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + jjCheckNAddStates(19, 22); + break; + case 25: + case 29: + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + jjCheckNAddStates(25, 28); + break; + case 37: + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + jjAddStates(35, 36); + break; + case 40: + if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) + break; + if (kind > 22) + kind = 22; + jjCheckNAddTwoStates(41, 42); + break; + case 41: + if (jjCanMove_2(hiByte, i1, i2, l1, l2)) + jjCheckNAddTwoStates(41, 42); + break; + case 42: + if (jjCanMove_2(hiByte, i1, i2, l1, l2) && kind > 22) + kind = 22; + break; + default : break; + } + } while(i != startsAt); + } + if (kind != 0x7fffffff) + { + jjmatchedKind = kind; + jjmatchedPos = curPos; + kind = 0x7fffffff; + } + ++curPos; + if ((i = jjnewStateCnt) == (startsAt = 74 - (jjnewStateCnt = startsAt))) + break; + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { break; } + } + if (jjmatchedPos > strPos) + return curPos; + + int toRet = Math.max(curPos, seenUpto); + + if (curPos < toRet) + for (i = toRet - Math.min(curPos, seenUpto); i-- > 0; ) + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { throw new Error("Internal Error : Please send a bug report."); } + + if (jjmatchedPos < strPos) + { + jjmatchedKind = strKind; + jjmatchedPos = strPos; + } + else if (jjmatchedPos == strPos && jjmatchedKind > strKind) + jjmatchedKind = strKind; + + return toRet; +} +static final int[] jjnextStates = { + 49, 50, 51, 61, 62, 67, 68, 72, 49, 50, 53, 55, 60, 8, 9, 11, + 3, 4, 6, 13, 14, 16, 18, 19, 21, 25, 26, 28, 30, 31, 33, 61, + 62, 67, 68, 37, 38, 58, 59, 65, 66, 69, 70, +}; +private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) +{ + switch(hiByte) + { + case 0: + return ((jjbitVec2[i2] & l2) != 0L); + default : + if ((jjbitVec0[i1] & l1) != 0L) + return true; + return false; + } +} +private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2) +{ + switch(hiByte) + { + case 0: + return ((jjbitVec4[i2] & l2) != 0L); + case 3: + return ((jjbitVec5[i2] & l2) != 0L); + case 32: + return ((jjbitVec6[i2] & l2) != 0L); + case 33: + return ((jjbitVec7[i2] & l2) != 0L); + case 47: + return ((jjbitVec8[i2] & l2) != 0L); + case 48: + return ((jjbitVec0[i2] & l2) != 0L); + case 255: + return ((jjbitVec9[i2] & l2) != 0L); + default : + if ((jjbitVec3[i1] & l1) != 0L) + return true; + return false; + } +} +private static final boolean jjCanMove_2(int hiByte, int i1, int i2, long l1, long l2) +{ + switch(hiByte) + { + case 0: + return ((jjbitVec10[i2] & l2) != 0L); + case 3: + return ((jjbitVec11[i2] & l2) != 0L); + case 32: + return ((jjbitVec12[i2] & l2) != 0L); + case 33: + return ((jjbitVec7[i2] & l2) != 0L); + case 47: + return ((jjbitVec8[i2] & l2) != 0L); + case 48: + return ((jjbitVec0[i2] & l2) != 0L); + case 255: + return ((jjbitVec9[i2] & l2) != 0L); + default : + if ((jjbitVec3[i1] & l1) != 0L) + return true; + return false; + } +} + +/** Token literal values. */ +public static final String[] jjstrLiteralImages = { +"", null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, +"\156\165\154\154", "\173", "\175", "\133", "\135", "\54", "\72", "\136\136", "\100", null, null, +null, null, null, }; + +/** Lexer state names. */ +public static final String[] lexStateNames = { + "DEFAULT", +}; +static final long[] jjtoToken = { + 0x7fcff8f81L, +}; +static final long[] jjtoSkip = { + 0x3eL, +}; +protected JavaCharStream input_stream; +private final int[] jjrounds = new int[74]; +private final int[] jjstateSet = new int[148]; +protected char curChar; +/** Constructor. */ +public CDTLiteralParserTokenManager(JavaCharStream stream){ + if (JavaCharStream.staticFlag) + throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); + input_stream = stream; +} + +/** Constructor. */ +public CDTLiteralParserTokenManager(JavaCharStream stream, int lexState){ + this(stream); + SwitchTo(lexState); +} + +/** Reinitialise parser. */ +public void ReInit(JavaCharStream stream) +{ + jjmatchedPos = jjnewStateCnt = 0; + curLexState = defaultLexState; + input_stream = stream; + ReInitRounds(); +} +private void ReInitRounds() +{ + int i; + jjround = 0x80000001; + for (i = 74; i-- > 0;) + jjrounds[i] = 0x80000000; +} + +/** Reinitialise parser. */ +public void ReInit(JavaCharStream stream, int lexState) +{ + ReInit(stream); + SwitchTo(lexState); +} + +/** Switch to specified lex state. */ +public void SwitchTo(int lexState) +{ + if (lexState >= 1 || lexState < 0) + throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); + else + curLexState = lexState; +} + +protected Token jjFillToken() +{ + final Token t; + final String curTokenImage; + final int beginLine; + final int endLine; + final int beginColumn; + final int endColumn; + String im = jjstrLiteralImages[jjmatchedKind]; + curTokenImage = (im == null) ? input_stream.GetImage() : im; + beginLine = input_stream.getBeginLine(); + beginColumn = input_stream.getBeginColumn(); + endLine = input_stream.getEndLine(); + endColumn = input_stream.getEndColumn(); + t = Token.newToken(jjmatchedKind, curTokenImage); + + t.beginLine = beginLine; + t.endLine = endLine; + t.beginColumn = beginColumn; + t.endColumn = endColumn; + + return t; +} + +int curLexState = 0; +int defaultLexState = 0; +int jjnewStateCnt; +int jjround; +int jjmatchedPos; +int jjmatchedKind; + +/** Get the next Token. */ +public Token getNextToken() +{ + Token matchedToken; + int curPos = 0; + + EOFLoop : + for (;;) + { + try + { + curChar = input_stream.BeginToken(); + } + catch(java.io.IOException e) + { + jjmatchedKind = 0; + matchedToken = jjFillToken(); + return matchedToken; + } + + jjmatchedKind = 0x7fffffff; + jjmatchedPos = 0; + curPos = jjMoveStringLiteralDfa0_0(); + if (jjmatchedKind != 0x7fffffff) + { + if (jjmatchedPos + 1 < curPos) + input_stream.backup(curPos - jjmatchedPos - 1); + if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) + { + matchedToken = jjFillToken(); + return matchedToken; + } + else + { + continue EOFLoop; + } + } + int error_line = input_stream.getEndLine(); + int error_column = input_stream.getEndColumn(); + String error_after = null; + boolean EOFSeen = false; + try { input_stream.readChar(); input_stream.backup(1); } + catch (java.io.IOException e1) { + EOFSeen = true; + error_after = curPos <= 1 ? "" : input_stream.GetImage(); + if (curChar == '\n' || curChar == '\r') { + error_line++; + error_column = 0; + } + else + error_column++; + } + if (!EOFSeen) { + input_stream.backup(1); + error_after = curPos <= 1 ? "" : input_stream.GetImage(); + } + throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); + } +} + +private void jjCheckNAdd(int state) +{ + if (jjrounds[state] != jjround) + { + jjstateSet[jjnewStateCnt++] = state; + jjrounds[state] = jjround; + } +} +private void jjAddStates(int start, int end) +{ + do { + jjstateSet[jjnewStateCnt++] = jjnextStates[start]; + } while (start++ != end); +} +private void jjCheckNAddTwoStates(int state1, int state2) +{ + jjCheckNAdd(state1); + jjCheckNAdd(state2); +} + +private void jjCheckNAddStates(int start, int end) +{ + do { + jjCheckNAdd(jjnextStates[start]); + } while (start++ != end); +} + +} diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/parser/JavaCharStream.java b/jena-arq/src/main/java/org/apache/jena/cdt/parser/JavaCharStream.java new file mode 100644 index 00000000000..0db07c051d1 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/parser/JavaCharStream.java @@ -0,0 +1,703 @@ +/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 5.0 */ +/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt.parser; + +/** + * An implementation of interface CharStream, where the stream is assumed to + * contain only ASCII characters (with java-like unicode escape processing). + */ + + +@SuppressWarnings("all") +public +class JavaCharStream +{ + /** Whether parser is static. */ + +@SuppressWarnings("all") +public static final boolean staticFlag = false; + + static final int hexval(char c) throws java.io.IOException { + switch(c) + { + case '0' : + return 0; + case '1' : + return 1; + case '2' : + return 2; + case '3' : + return 3; + case '4' : + return 4; + case '5' : + return 5; + case '6' : + return 6; + case '7' : + return 7; + case '8' : + return 8; + case '9' : + return 9; + + case 'a' : + case 'A' : + return 10; + case 'b' : + case 'B' : + return 11; + case 'c' : + case 'C' : + return 12; + case 'd' : + case 'D' : + return 13; + case 'e' : + case 'E' : + return 14; + case 'f' : + case 'F' : + return 15; + } + + throw new java.io.IOException(); // Should never come here + } + +/** Position in buffer. */ + +@SuppressWarnings("all") +public int bufpos = -1; + int bufsize; + int available; + int tokenBegin; + protected int bufline[]; + protected int bufcolumn[]; + + protected int column = 0; + protected int line = 1; + + protected boolean prevCharIsCR = false; + protected boolean prevCharIsLF = false; + + protected java.io.Reader inputStream; + + protected char[] nextCharBuf; + protected char[] buffer; + protected int maxNextCharInd = 0; + protected int nextCharInd = -1; + protected int inBuf = 0; + protected int tabSize = 8; + + protected void setTabSize(int i) { tabSize = i; } + protected int getTabSize(int i) { return tabSize; } + + protected void ExpandBuff(boolean wrapAround) + { + char[] newbuffer = new char[bufsize + 2048]; + int newbufline[] = new int[bufsize + 2048]; + int newbufcolumn[] = new int[bufsize + 2048]; + + try + { + if (wrapAround) + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); + bufcolumn = newbufcolumn; + + bufpos += (bufsize - tokenBegin); + } + else + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + bufcolumn = newbufcolumn; + + bufpos -= tokenBegin; + } + } + catch (Throwable t) + { + throw new Error(t.getMessage()); + } + + available = (bufsize += 2048); + tokenBegin = 0; + } + + protected void FillBuff() throws java.io.IOException + { + int i; + if (maxNextCharInd == 4096) + maxNextCharInd = nextCharInd = 0; + + try { + if ((i = inputStream.read(nextCharBuf, maxNextCharInd, + 4096 - maxNextCharInd)) == -1) + { + inputStream.close(); + throw new java.io.IOException(); + } + else + maxNextCharInd += i; + return; + } + catch(java.io.IOException e) { + if (bufpos != 0) + { + --bufpos; + backup(0); + } + else + { + bufline[bufpos] = line; + bufcolumn[bufpos] = column; + } + throw e; + } + } + + protected char ReadByte() throws java.io.IOException + { + if (++nextCharInd >= maxNextCharInd) + FillBuff(); + + return nextCharBuf[nextCharInd]; + } + +/** @return starting character for token. */ + +@SuppressWarnings("all") +public char BeginToken() throws java.io.IOException + { + if (inBuf > 0) + { + --inBuf; + + if (++bufpos == bufsize) + bufpos = 0; + + tokenBegin = bufpos; + return buffer[bufpos]; + } + + tokenBegin = 0; + bufpos = -1; + + return readChar(); + } + + protected void AdjustBuffSize() + { + if (available == bufsize) + { + if (tokenBegin > 2048) + { + bufpos = 0; + available = tokenBegin; + } + else + ExpandBuff(false); + } + else if (available > tokenBegin) + available = bufsize; + else if ((tokenBegin - available) < 2048) + ExpandBuff(true); + else + available = tokenBegin; + } + + protected void UpdateLineColumn(char c) + { + column++; + + if (prevCharIsLF) + { + prevCharIsLF = false; + line += (column = 1); + } + else if (prevCharIsCR) + { + prevCharIsCR = false; + if (c == '\n') + { + prevCharIsLF = true; + } + else + line += (column = 1); + } + + switch (c) + { + case '\r' : + prevCharIsCR = true; + break; + case '\n' : + prevCharIsLF = true; + break; + case '\t' : + column--; + column += (tabSize - (column % tabSize)); + break; + default : + break; + } + + bufline[bufpos] = line; + bufcolumn[bufpos] = column; + } + +/** Read a character. */ + +@SuppressWarnings("all") +public char readChar() throws java.io.IOException + { + if (inBuf > 0) + { + --inBuf; + + if (++bufpos == bufsize) + bufpos = 0; + + return buffer[bufpos]; + } + + char c; + + if (++bufpos == available) + AdjustBuffSize(); + + if ((buffer[bufpos] = c = ReadByte()) == '\\') + { + UpdateLineColumn(c); + + int backSlashCnt = 1; + + for (;;) // Read all the backslashes + { + if (++bufpos == available) + AdjustBuffSize(); + + try + { + if ((buffer[bufpos] = c = ReadByte()) != '\\') + { + UpdateLineColumn(c); + // found a non-backslash char. + if ((c == 'u') && ((backSlashCnt & 1) == 1)) + { + if (--bufpos < 0) + bufpos = bufsize - 1; + + break; + } + + backup(backSlashCnt); + return '\\'; + } + } + catch(java.io.IOException e) + { + // We are returning one backslash so we should only backup (count-1) + if (backSlashCnt > 1) + backup(backSlashCnt-1); + + return '\\'; + } + + UpdateLineColumn(c); + backSlashCnt++; + } + + // Here, we have seen an odd number of backslash's followed by a 'u' + try + { + while ((c = ReadByte()) == 'u') + ++column; + + buffer[bufpos] = c = (char)(hexval(c) << 12 | + hexval(ReadByte()) << 8 | + hexval(ReadByte()) << 4 | + hexval(ReadByte())); + + column += 4; + } + catch(java.io.IOException e) + { + throw new Error("Invalid escape character at line " + line + + " column " + column + "."); + } + + if (backSlashCnt == 1) + return c; + else + { + backup(backSlashCnt - 1); + return '\\'; + } + } + else + { + UpdateLineColumn(c); + return c; + } + } + + @Deprecated + /** + * @deprecated + * @see #getEndColumn + */ + +@SuppressWarnings("all") +public int getColumn() { + return bufcolumn[bufpos]; + } + + @Deprecated + /** + * @deprecated + * @see #getEndLine + */ + +@SuppressWarnings("all") +public int getLine() { + return bufline[bufpos]; + } + +/** Get end column. */ + +@SuppressWarnings("all") +public int getEndColumn() { + return bufcolumn[bufpos]; + } + +/** Get end line. */ + +@SuppressWarnings("all") +public int getEndLine() { + return bufline[bufpos]; + } + +/** @return column of token start */ + +@SuppressWarnings("all") +public int getBeginColumn() { + return bufcolumn[tokenBegin]; + } + +/** @return line number of token start */ + +@SuppressWarnings("all") +public int getBeginLine() { + return bufline[tokenBegin]; + } + +/** Retreat. */ + +@SuppressWarnings("all") +public void backup(int amount) { + + inBuf += amount; + if ((bufpos -= amount) < 0) + bufpos += bufsize; + } + +/** Constructor. */ + +@SuppressWarnings("all") +public JavaCharStream(java.io.Reader dstream, + int startline, int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + nextCharBuf = new char[4096]; + } + +/** Constructor. */ + +@SuppressWarnings("all") +public JavaCharStream(java.io.Reader dstream, + int startline, int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + +/** Constructor. */ + +@SuppressWarnings("all") +public JavaCharStream(java.io.Reader dstream) + { + this(dstream, 1, 1, 4096); + } +/** Reinitialise. */ + +@SuppressWarnings("all") +public void ReInit(java.io.Reader dstream, + int startline, int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + if (buffer == null || buffersize != buffer.length) + { + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + nextCharBuf = new char[4096]; + } + prevCharIsLF = prevCharIsCR = false; + tokenBegin = inBuf = maxNextCharInd = 0; + nextCharInd = bufpos = -1; + } + +/** Reinitialise. */ + +@SuppressWarnings("all") +public void ReInit(java.io.Reader dstream, + int startline, int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } + +/** Reinitialise. */ + +@SuppressWarnings("all") +public void ReInit(java.io.Reader dstream) + { + ReInit(dstream, 1, 1, 4096); + } +/** Constructor. */ + +@SuppressWarnings("all") +public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + +/** Constructor. */ + +@SuppressWarnings("all") +public JavaCharStream(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); + } + +/** Constructor. */ + +@SuppressWarnings("all") +public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, startline, startcolumn, 4096); + } + +/** Constructor. */ + +@SuppressWarnings("all") +public JavaCharStream(java.io.InputStream dstream, int startline, + int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + +/** Constructor. */ + +@SuppressWarnings("all") +public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, 1, 1, 4096); + } + +/** Constructor. */ + +@SuppressWarnings("all") +public JavaCharStream(java.io.InputStream dstream) + { + this(dstream, 1, 1, 4096); + } + +/** Reinitialise. */ + +@SuppressWarnings("all") +public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + +/** Reinitialise. */ + +@SuppressWarnings("all") +public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); + } +/** Reinitialise. */ + +@SuppressWarnings("all") +public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, startline, startcolumn, 4096); + } +/** Reinitialise. */ + +@SuppressWarnings("all") +public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } +/** Reinitialise. */ + +@SuppressWarnings("all") +public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, 1, 1, 4096); + } + +/** Reinitialise. */ + +@SuppressWarnings("all") +public void ReInit(java.io.InputStream dstream) + { + ReInit(dstream, 1, 1, 4096); + } + + /** @return token image as String */ + +@SuppressWarnings("all") +public String GetImage() + { + if (bufpos >= tokenBegin) + return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); + else + return new String(buffer, tokenBegin, bufsize - tokenBegin) + + new String(buffer, 0, bufpos + 1); + } + + /** @return suffix */ + +@SuppressWarnings("all") +public char[] GetSuffix(int len) + { + char[] ret = new char[len]; + + if ((bufpos + 1) >= len) + System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); + else + { + System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, + len - bufpos - 1); + System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); + } + + return ret; + } + + /** Set buffers back to null when finished. */ + +@SuppressWarnings("all") +public void Done() + { + nextCharBuf = null; + buffer = null; + bufline = null; + bufcolumn = null; + } + + /** + * Method to adjust line and column numbers for the start of a token. + */ + +@SuppressWarnings("all") +public void adjustBeginLineColumn(int newLine, int newCol) + { + int start = tokenBegin; + int len; + + if (bufpos >= tokenBegin) + { + len = bufpos - tokenBegin + inBuf + 1; + } + else + { + len = bufsize - tokenBegin + bufpos + 1 + inBuf; + } + + int i = 0, j = 0, k = 0; + int nextColDiff = 0, columnDiff = 0; + + while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) + { + bufline[j] = newLine; + nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; + bufcolumn[j] = newCol + columnDiff; + columnDiff = nextColDiff; + i++; + } + + if (i < len) + { + bufline[j] = newLine++; + bufcolumn[j] = newCol + columnDiff; + + while (i++ < len) + { + if (bufline[j = start % bufsize] != bufline[++start % bufsize]) + bufline[j] = newLine++; + else + bufline[j] = newLine; + } + } + + line = bufline[j]; + column = bufcolumn[j]; + } + +} +/* JavaCC - OriginalChecksum=2ebc561fdb294979325bb97dfcdf1b61 (do not edit this line) */ diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/parser/ParseException.java b/jena-arq/src/main/java/org/apache/jena/cdt/parser/ParseException.java new file mode 100644 index 00000000000..9fff7e2c63a --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/parser/ParseException.java @@ -0,0 +1,205 @@ +/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */ +/* JavaCCOptions:KEEP_LINE_COL=null */ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt.parser; + +/** + * This exception is thrown when parse errors are encountered. + * You can explicitly create objects of this exception type by + * calling the method generateParseException in the generated + * parser. + * + * You can modify this class to customize your error reporting + * mechanisms so long as you retain the public fields. + */ +public class ParseException extends Exception { + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /** + * This constructor is used by the method "generateParseException" + * in the generated parser. Calling this constructor generates + * a new object of this type with the fields "currentToken", + * "expectedTokenSequences", and "tokenImage" set. + */ + public ParseException(Token currentTokenVal, + int[][] expectedTokenSequencesVal, + String[] tokenImageVal + ) + { + super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal)); + currentToken = currentTokenVal; + expectedTokenSequences = expectedTokenSequencesVal; + tokenImage = tokenImageVal; + } + + /** + * The following constructors are for use by you for whatever + * purpose you can think of. Constructing the exception in this + * manner makes the exception behave in the normal way - i.e., as + * documented in the class "Throwable". The fields "errorToken", + * "expectedTokenSequences", and "tokenImage" do not contain + * relevant information. The JavaCC generated code does not use + * these constructors. + */ + + public ParseException() { + super(); + } + + /** Constructor with message. */ + public ParseException(String message) { + super(message); + } + + + /** + * This is the last token that has been consumed successfully. If + * this object has been created due to a parse error, the token + * followng this token will (therefore) be the first error token. + */ + public Token currentToken; + + /** + * Each entry in this array is an array of integers. Each array + * of integers represents a sequence of tokens (by their ordinal + * values) that is expected at this point of the parse. + */ + public int[][] expectedTokenSequences; + + /** + * This is a reference to the "tokenImage" array of the generated + * parser within which the parse error occurred. This array is + * defined in the generated ...Constants interface. + */ + public String[] tokenImage; + + /** + * It uses "currentToken" and "expectedTokenSequences" to generate a parse + * error message and returns it. If this object has been created + * due to a parse error, and you do not catch it (it gets thrown + * from the parser) the correct error message + * gets displayed. + */ + private static String initialise(Token currentToken, + int[][] expectedTokenSequences, + String[] tokenImage) { + String eol = System.getProperty("line.separator", "\n"); + StringBuffer expected = new StringBuffer(); + int maxSize = 0; + for (int i = 0; i < expectedTokenSequences.length; i++) { + if (maxSize < expectedTokenSequences[i].length) { + maxSize = expectedTokenSequences[i].length; + } + for (int j = 0; j < expectedTokenSequences[i].length; j++) { + expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' '); + } + if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { + expected.append("..."); + } + expected.append(eol).append(" "); + } + String retval = "Encountered \""; + Token tok = currentToken.next; + for (int i = 0; i < maxSize; i++) { + if (i != 0) retval += " "; + if (tok.kind == 0) { + retval += tokenImage[0]; + break; + } + retval += " " + tokenImage[tok.kind]; + retval += " \""; + retval += add_escapes(tok.image); + retval += " \""; + tok = tok.next; + } + retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; + retval += "." + eol; + if (expectedTokenSequences.length == 1) { + retval += "Was expecting:" + eol + " "; + } else { + retval += "Was expecting one of:" + eol + " "; + } + retval += expected.toString(); + return retval; + } + + /** + * The end of line string for this machine. + */ + protected String eol = System.getProperty("line.separator", "\n"); + + /** + * Used to convert raw characters to their escaped version + * when these raw version cannot be used as part of an ASCII + * string literal. + */ + static String add_escapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case 0 : + continue; + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); + } else { + retval.append(ch); + } + continue; + } + } + return retval.toString(); + } + +} +/* JavaCC - OriginalChecksum=0bd53902852438cd5670da2f50328753 (do not edit this line) */ diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/parser/Token.java b/jena-arq/src/main/java/org/apache/jena/cdt/parser/Token.java new file mode 100644 index 00000000000..3e7793689f3 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/parser/Token.java @@ -0,0 +1,149 @@ +/* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */ +/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt.parser; + +/** + * Describes the input token stream. + */ + +public class Token implements java.io.Serializable { + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /** + * An integer that describes the kind of this token. This numbering + * system is determined by JavaCCParser, and a table of these numbers is + * stored in the file ...Constants.java. + */ + public int kind; + + /** The line number of the first character of this Token. */ + public int beginLine; + /** The column number of the first character of this Token. */ + public int beginColumn; + /** The line number of the last character of this Token. */ + public int endLine; + /** The column number of the last character of this Token. */ + public int endColumn; + + /** + * The string image of the token. + */ + public String image; + + /** + * A reference to the next regular (non-special) token from the input + * stream. If this is the last token from the input stream, or if the + * token manager has not read tokens beyond this one, this field is + * set to null. This is true only if this token is also a regular + * token. Otherwise, see below for a description of the contents of + * this field. + */ + public Token next; + + /** + * This field is used to access special tokens that occur prior to this + * token, but after the immediately preceding regular (non-special) token. + * If there are no such special tokens, this field is set to null. + * When there are more than one such special token, this field refers + * to the last of these special tokens, which in turn refers to the next + * previous special token through its specialToken field, and so on + * until the first special token (whose specialToken field is null). + * The next fields of special tokens refer to other special tokens that + * immediately follow it (without an intervening regular token). If there + * is no such token, this field is null. + */ + public Token specialToken; + + /** + * An optional attribute value of the Token. + * Tokens which are not used as syntactic sugar will often contain + * meaningful values that will be used later on by the compiler or + * interpreter. This attribute value is often different from the image. + * Any subclass of Token that actually wants to return a non-null value can + * override this method as appropriate. + */ + public Object getValue() { + return null; + } + + /** + * No-argument constructor + */ + public Token() {} + + /** + * Constructs a new token for the specified Image. + */ + public Token(int kind) + { + this(kind, null); + } + + /** + * Constructs a new token for the specified Image and Kind. + */ + public Token(int kind, String image) + { + this.kind = kind; + this.image = image; + } + + /** + * Returns the image. + */ + public String toString() + { + return image; + } + + /** + * Returns a new Token object, by default. However, if you want, you + * can create and return subclass objects based on the value of ofKind. + * Simply add the cases to the switch for all those special cases. + * For example, if you have a subclass of Token called IDToken that + * you want to create if ofKind is ID, simply add something like : + * + * case MyParserConstants.ID : return new IDToken(ofKind, image); + * + * to the following switch statement. Then you can cast matchedToken + * variable to the appropriate type and use sit in your lexical actions. + */ + public static Token newToken(int ofKind, String image) + { + switch(ofKind) + { + default : return new Token(ofKind, image); + } + } + + public static Token newToken(int ofKind) + { + return newToken(ofKind, null); + } + +} +/* JavaCC - OriginalChecksum=0bb1e7330fe557a4194caa87be20ae38 (do not edit this line) */ diff --git a/jena-arq/src/main/java/org/apache/jena/cdt/parser/TokenMgrError.java b/jena-arq/src/main/java/org/apache/jena/cdt/parser/TokenMgrError.java new file mode 100644 index 00000000000..307f2e7efde --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/cdt/parser/TokenMgrError.java @@ -0,0 +1,167 @@ +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */ +/* JavaCCOptions: */ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.cdt.parser; + +/** Token Manager Error. */ + +@SuppressWarnings("all") +public class TokenMgrError extends Error +{ + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /* + * Ordinals for various reasons why an Error of this type can be thrown. + */ + + /** + * Lexical error occurred. + */ + static final int LEXICAL_ERROR = 0; + + /** + * An attempt was made to create a second instance of a static token manager. + */ + static final int STATIC_LEXER_ERROR = 1; + + /** + * Tried to change to an invalid lexical state. + */ + static final int INVALID_LEXICAL_STATE = 2; + + /** + * Detected (and bailed out of) an infinite loop in the token manager. + */ + static final int LOOP_DETECTED = 3; + + /** + * Indicates the reason why the exception is thrown. It will have + * one of the above 4 values. + */ + int errorCode; + + /** + * Replaces unprintable characters by their escaped (or unicode escaped) + * equivalents in the given string + */ + protected static final String addEscapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case 0 : + continue; + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); + } else { + retval.append(ch); + } + continue; + } + } + return retval.toString(); + } + + /** + * Returns a detailed message for the Error when it is thrown by the + * token manager to indicate a lexical error. + * Parameters : + * EOFSeen : indicates if EOF caused the lexical error + * curLexState : lexical state in which this error occurred + * errorLine : line number when the error occurred + * errorColumn : column number when the error occurred + * errorAfter : prefix that was seen before this error occurred + * curchar : the offending character + * Note: You can customize the lexical error message by modifying this method. + */ + protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { + return("Lexical error at line " + + errorLine + ", column " + + errorColumn + ". Encountered: " + + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + + "after : \"" + addEscapes(errorAfter) + "\""); + } + + /** + * You can also modify the body of this method to customize your error messages. + * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not + * of end-users concern, so you can return something like : + * + * "Internal Error : Please file a bug report .... " + * + * from this method for such cases in the release version of your parser. + */ + public String getMessage() { + return super.getMessage(); + } + + /* + * Constructors of various flavors follow. + */ + + /** No arg constructor. */ + public TokenMgrError() { + } + + /** Constructor with message and reason. */ + public TokenMgrError(String message, int reason) { + super(message); + errorCode = reason; + } + + /** Full Constructor. */ + public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { + this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); + } +} +/* JavaCC - OriginalChecksum=8d2f5d5473ff1b03e240576a846cb262 (do not edit this line) */ diff --git a/jena-arq/src/main/java/org/apache/jena/query/ARQ.java b/jena-arq/src/main/java/org/apache/jena/query/ARQ.java index a104dcf8ca7..941f90f6c89 100644 --- a/jena-arq/src/main/java/org/apache/jena/query/ARQ.java +++ b/jena-arq/src/main/java/org/apache/jena/query/ARQ.java @@ -22,6 +22,9 @@ import java.util.concurrent.TimeUnit; import org.apache.jena.atlas.lib.Version; +import org.apache.jena.cdt.CompositeDatatypeList; +import org.apache.jena.cdt.CompositeDatatypeMap; +import org.apache.jena.datatypes.TypeMapper; import org.apache.jena.http.sys.HttpRequestModifier; import org.apache.jena.http.sys.RegistryRequestModifier; import org.apache.jena.riot.RIOT; @@ -664,6 +667,10 @@ public static void init() { AggregateRegistry.init(); PropertyFunctionRegistry.init(); + // Register the datatypes for the CDT literals + TypeMapper.getInstance().registerDatatype(CompositeDatatypeList.type) ; + TypeMapper.getInstance().registerDatatype(CompositeDatatypeMap.type) ; + JenaSystem.logLifecycle("ARQ.init - finish"); } } diff --git a/jena-arq/src/main/java/org/apache/jena/riot/RDFParser.java b/jena-arq/src/main/java/org/apache/jena/riot/RDFParser.java index 35c451d004c..f9e04c747c6 100644 --- a/jena-arq/src/main/java/org/apache/jena/riot/RDFParser.java +++ b/jena-arq/src/main/java/org/apache/jena/riot/RDFParser.java @@ -553,7 +553,7 @@ private ParserProfile makeParserProfile(Lang lang) { ? resolver : IRIxResolver.create().base(baseStr).resolve(resolve).allowRelative(allowRelative).build(); PrefixMap pmap = ( this.prefixMap != null ) ? this.prefixMap : PrefixMapFactory.create(); - ParserProfileStd parserFactory = new ParserProfileStd(factory, errorHandler, + ParserProfileStd parserFactory = new CDTAwareParserProfile(factory, errorHandler, parserResolver, pmap, context, checking$, strict); return parserFactory; diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/CDTAwareParserProfile.java b/jena-arq/src/main/java/org/apache/jena/riot/system/CDTAwareParserProfile.java new file mode 100644 index 00000000000..660b0c25807 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/riot/system/CDTAwareParserProfile.java @@ -0,0 +1,132 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.riot.system; + +import java.util.List; +import java.util.Map; + +import org.apache.jena.cdt.CDTKey; +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.cdt.CompositeDatatypeList; +import org.apache.jena.cdt.CompositeDatatypeMap; +import org.apache.jena.cdt.ParserForCDTLiterals; +import org.apache.jena.datatypes.DatatypeFormatException; +import org.apache.jena.datatypes.RDFDatatype; +import org.apache.jena.graph.Node; +import org.apache.jena.graph.NodeFactory; +import org.apache.jena.graph.impl.LiteralLabel; +import org.apache.jena.graph.impl.LiteralLabelFactory; +import org.apache.jena.irix.IRIxResolver; +import org.apache.jena.sparql.util.Context; + +/** + * This is a {@link ParserProfile} that supports parsing of CDT literals + * that occur within the parsed file. The main point is to share the + * {@link FactoryRDF} object of this parser profile with the parser of + * these literals in order to get the same blank nodes for the same + * blank node identifiers both within and outside of the literals, as + * well as across multiple CDT literals that occur in the parsed file. + */ +public class CDTAwareParserProfile extends ParserProfileStd { + + public CDTAwareParserProfile( final FactoryRDF factory, + final ErrorHandler errorHandler, + final IRIxResolver resolver, + final PrefixMap prefixMap, + final Context context, + final boolean checking, + final boolean strictMode ) { + super(factory, errorHandler, resolver, prefixMap, context, checking, strictMode); + } + + @Override + public Node createTypedLiteral( final String lex, final RDFDatatype datatype, final long line, final long col ) { + // cdt:List and cdt:Map literals need to be treated in a special way + // because we need to construct their value by parsing them using this + // same parser profile; this is necessary to make sure that blank node + // identifiers inside the lexical forms of multiple of these literals + // within the same file are all mapped to the same blank node, and so + // are all blank node identifers that occur directly in the file (i.e., + // ourside of CDT literals). + + if ( datatype.equals(CompositeDatatypeList.type) ) { + return createListLiteral(lex); + } + + if ( datatype.equals(CompositeDatatypeMap.type) ) { + return createMapLiteral(lex); + } + + return super.createTypedLiteral(lex, datatype, line, col); + } + + protected Node createListLiteral( final String lex ) { + // Attention: In contrast to the overridden createTypedLiteral function + // in the superclass, for literals of the CDT datatypes we do not perform + // a checkLiteral check because that would parse the lexical form of the + // literal already once before doing the other parse to obtain the value. + + // parse the given lexical form using this same parser profile + final List value; + try { + value = ParserForCDTLiterals.parseListLiteral(this, lex); + } + catch ( final Exception ex ) { + throw new DatatypeFormatException(lex, CompositeDatatypeList.type, ex); + } + + // At this point we have both the lexical form (which, after the + // parsing, we now know is well formed) and the corresponding value + // of the literal. We create a LiteralLabel with both of them, for + // the following reasons. + // If we were to create the LiteralLabel with the lexical form only, + // then the LiteralLabel implementation would parse that lexical form + // again, which gives us an unnecessary performance penalty (in + // particular for huge lists). + // If we were to create the LiteralLabel with the value only, then the + // LiteralLabel implementation would reproduce the lexical form, which + // may not be identical to the lexical form with which we have created + // the value here. The issue with that is that a SAMETERM comparison + // would incorrectly return false. + final LiteralLabel ll = LiteralLabelFactory.createIncludingValue(lex, value, CompositeDatatypeList.type); + return NodeFactory.createLiteral(ll); + } + + protected Node createMapLiteral( final String lex ) { + // Attention: In contrast to the overridden createTypedLiteral function + // in the superclass, for literals of the CDT datatypes we do not perform + // a checkLiteral check because that would parse the lexical form of the + // literal already once before doing the other parse to obtain the value. + + // parse the given lexical form using this same parser profile + final Map value; + try { + value = ParserForCDTLiterals.parseMapLiteral(this, lex); + } + catch ( final Exception ex ) { + throw new DatatypeFormatException(lex, CompositeDatatypeMap.type, ex); + } + + // We create a LiteralLabel with both the lexical form and the value, + // for the same reasons as described above in createListLiteral(). + final LiteralLabel ll = LiteralLabelFactory.createIncludingValue(lex, value, CompositeDatatypeMap.type); + return NodeFactory.createLiteral(ll); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java b/jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java index b81691b2891..11e3568a3e3 100644 --- a/jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java +++ b/jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java @@ -224,7 +224,7 @@ public static ParserProfile dftProfile() { * Create a {@link ParserProfile} with default settings, and a specific error handler. */ public static ParserProfile createParserProfile(FactoryRDF factory, ErrorHandler errorHandler, boolean checking) { - return new ParserProfileStd(factory, + return new CDTAwareParserProfile(factory, errorHandler, IRIxResolver.create(IRIs.getSystemBase()).build(), PrefixMapFactory.create(), @@ -238,7 +238,7 @@ public static ParserProfile createParserProfile(FactoryRDF factory, ErrorHandler */ public static ParserProfile createParserProfile(FactoryRDF factory, ErrorHandler errorHandler, IRIxResolver resolver, boolean checking) { - return new ParserProfileStd(factory, + return new CDTAwareParserProfile(factory, errorHandler, resolver, PrefixMapFactory.create(), diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/ARQConstants.java b/jena-arq/src/main/java/org/apache/jena/sparql/ARQConstants.java index 8f6ac06a24c..d18420b3f6d 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/ARQConstants.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/ARQConstants.java @@ -80,6 +80,9 @@ public class ARQConstants /** URI scheme that triggers the loader to load a java class */ public static final String javaClassURIScheme = "java:" ; + /** The ARQ function library URI space */ + public static final String CDTFunctionLibraryURI = "http://w3id.org/awslabs/neptune/SPARQL-CDTs/" ; + /** The ARQ function library URI space */ public static final String ARQFunctionLibraryURI = "http://jena.apache.org/ARQ/function#" ; diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/AlgebraGenerator.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/AlgebraGenerator.java index 5174505d0e5..016a0240c9d 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/AlgebraGenerator.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/AlgebraGenerator.java @@ -324,6 +324,10 @@ protected Op compileOneInGroup(Element elt, Op current, Deque acc) { if ( elt instanceof ElementNotExists elt2 ) return compileElementNotExists(current, elt2); + if ( elt instanceof ElementUnfold eltUnfold ) { + return new OpUnfold(current, eltUnfold.getExpr(), eltUnfold.getVar1(), eltUnfold.getVar2()); + } + // Filters were collected together by prepareGroup // This only handles filters left in place by some magic. if ( elt instanceof ElementFilter ef) diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpAsQuery.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpAsQuery.java index 1c74499dbdf..4b23ab44aa7 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpAsQuery.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpAsQuery.java @@ -828,6 +828,15 @@ public void visit(OpExtend opExtend) { }) ; } + @Override + public void visit(OpUnfold opUnfold) { + Element e = asElement(opUnfold.getSubOp()) ; + // If (unfold ... (table unit)), and first in group, don't add the empty group. + insertIntoGroup(currentGroup(), e) ; + Element elmtUnfold = new ElementUnfold( opUnfold.getExpr(), opUnfold.getVar1(), opUnfold.getVar2() ) ; + currentGroup().addElement(elmtUnfold) ; + } + @Override public void visit(OpList opList) { opList.getSubOp().visit(this) ; diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVars.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVars.java index dcdde83de9a..96c4b287bb7 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVars.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVars.java @@ -311,6 +311,14 @@ public void visit(OpExtend opExtend) { acc.addAll(opExtend.getVarExprList().getVars()); } + @Override + public void visit(OpUnfold opUnfold) { + acc.add( opUnfold.getVar1() ); + if ( opUnfold.getVar2() != null ) { + acc.add( opUnfold.getVar2() ); + } + } + @Override public void visit(OpPropFunc opPropFunc) { PropFuncArg.addVars(acc, opPropFunc.getSubjectArgs()); @@ -430,6 +438,14 @@ public void visit(OpExtend opExtend) { unknownAcc.addAll(opExtend.getVarExprList().getVars()); } + @Override + public void visit(OpUnfold opUnfold) { + unknownAcc.add( opUnfold.getVar1() ); + if ( opUnfold.getVar2() != null ) { + unknownAcc.add( opUnfold.getVar2() ); + } + } + @Override public void visit(OpPropFunc opPropFunc) { addvars(subjAcc, opPropFunc.getSubjectArgs()); @@ -496,6 +512,11 @@ public void visit(OpAssign opAssign) { visitExtendAssign(opAssign); } + @Override + public void visit(OpUnfold opUnfold) { + ExprVars.varsMentioned( acc, opUnfold.getExpr() ); + } + // The expression side of (extend) and (assign) private void visitExtendAssign(OpExtendAssign op) { op.getVarExprList().forEachExpr((v, e) -> ExprVars.varsMentioned(acc, e)); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitor.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitor.java index 15a13d5fd44..a7a74c79195 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitor.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitor.java @@ -42,6 +42,7 @@ public interface OpVisitor public void visit(OpLabel opLabel) ; public void visit(OpAssign opAssign) ; public void visit(OpExtend opExtend) ; + public void visit(OpUnfold opUnfold) ; // Op2 public void visit(OpJoin opJoin) ; diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorBase.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorBase.java index 8eccc40e9d2..89cbe7692de 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorBase.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorBase.java @@ -80,6 +80,8 @@ public OpVisitorBase() {} @Override public void visit(OpExtend opExtend) {} + @Override public void visit(OpUnfold opUnfold) {} + @Override public void visit(OpList opList) {} @Override public void visit(OpOrder opOrder) {} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorByType.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorByType.java index b331f817a5f..fd8f0b4b8b6 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorByType.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpVisitorByType.java @@ -150,6 +150,10 @@ public void visit(OpAssign opAssign) public void visit(OpExtend opExtend) { visit1(opExtend) ; } + @Override + public void visit(OpUnfold opUnfold) + { visit1(opUnfold) ; } + @Override public void visit(OpList opList) { visitModifer(opList) ; } diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/Transform.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/Transform.java index 98fbc1b872a..bdebe52b986 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/Transform.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/Transform.java @@ -44,6 +44,7 @@ public interface Transform public Op transform(OpLabel opLabel, Op subOp) ; public Op transform(OpAssign opAssign, Op subOp) ; public Op transform(OpExtend opExtend, Op subOp) ; + public Op transform(OpUnfold opUnfold, Op subOp) ; // Op2 public Op transform(OpJoin opJoin, Op left, Op right) ; diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/TransformCopy.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/TransformCopy.java index 32ecd34b178..6c21d89be85 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/TransformCopy.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/TransformCopy.java @@ -68,6 +68,8 @@ public class TransformCopy implements Transform public Op transform(OpAssign opAssign, Op subOp) { return xform(opAssign, subOp) ; } @Override public Op transform(OpExtend opExtend, Op subOp) { return xform(opExtend, subOp) ; } + @Override + public Op transform(OpUnfold opUnfold, Op subOp) { return xform(opUnfold, subOp) ; } @Override public Op transform(OpJoin opJoin, Op left, Op right) { return xform(opJoin, left, right) ; } diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/TransformSingle.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/TransformSingle.java index 5515cb85e75..69a525bd769 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/TransformSingle.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/TransformSingle.java @@ -64,6 +64,8 @@ public class TransformSingle implements Transform public Op transform(OpAssign opAssign, Op subOp) { return opAssign ; } @Override public Op transform(OpExtend opExtend, Op subOp) { return opExtend ; } + @Override + public Op transform(OpUnfold opUnfold, Op subOp) { return opUnfold ; } @Override public Op transform(OpJoin opJoin, Op left, Op right) { return opJoin ; } diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/TransformWrapper.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/TransformWrapper.java index 30bff50c707..0be481886f0 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/TransformWrapper.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/TransformWrapper.java @@ -66,6 +66,8 @@ public TransformWrapper(Transform transform) public Op transform(OpAssign opAssign, Op subOp) { return transform.transform(opAssign, subOp) ; } @Override public Op transform(OpExtend opExtend, Op subOp) { return transform.transform(opExtend, subOp) ; } + @Override + public Op transform(OpUnfold opUnfold, Op subOp) { return transform.transform(opUnfold, subOp) ; } @Override public Op transform(OpJoin opJoin, Op left, Op right) { return transform.transform(opJoin, left, right) ; } diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/op/OpUnfold.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/op/OpUnfold.java new file mode 100644 index 00000000000..55a193e1332 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/op/OpUnfold.java @@ -0,0 +1,102 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.algebra.op; + +import java.util.Objects; + +import org.apache.jena.sparql.algebra.Op; +import org.apache.jena.sparql.algebra.OpVisitor; +import org.apache.jena.sparql.algebra.Transform; +import org.apache.jena.sparql.core.Var; +import org.apache.jena.sparql.expr.Expr; +import org.apache.jena.sparql.sse.Tags; +import org.apache.jena.sparql.util.NodeIsomorphismMap; + +public class OpUnfold extends Op1 +{ + protected final Expr expr ; + protected final Var var1 ; + protected final Var var2 ; + + public OpUnfold(Op subOp, Expr expr, Var var1, Var var2) { + super(subOp) ; + this.expr = expr ; + this.var1 = var1 ; + this.var2 = var2 ; + } + + public Expr getExpr() + { + return expr ; + } + + public Var getVar1() + { + return var1 ; + } + + public Var getVar2() + { + return var2 ; + } + + @Override + public String getName() { + return Tags.tagUnfold ; + } + + @Override + public void visit(OpVisitor opVisitor) { + opVisitor.visit(this) ; + } + + @Override + public Op1 copy(Op subOp) { + OpUnfold op = new OpUnfold(subOp, expr, var1, var2) ; + return op ; + } + + @Override + public boolean equalTo(Op other, NodeIsomorphismMap labelMap) { + if ( !(other instanceof OpUnfold) ) + return false ; + OpUnfold unfold = (OpUnfold)other ; + + if ( !Objects.equals(var1, unfold.var1) ) + return false ; + if ( !Objects.equals(var2, unfold.var2) ) + return false ; + if ( !Objects.equals(expr, unfold.expr) ) + return false ; + return getSubOp().equalTo(unfold.getSubOp(), labelMap) ; + } + + @Override + public Op apply(Transform transform, Op subOp) { + return transform.transform(this, subOp) ; + } + + @Override + public int hashCode() { + if ( var2 == null ) + return getName().hashCode() ^ expr.hashCode() ^ var1.hashCode() ^ getSubOp().hashCode() ; + else + return getName().hashCode() ^ expr.hashCode() ^ var1.hashCode() ^ var2.hashCode() ^ getSubOp().hashCode() ; + } +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/VariableUsageVisitor.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/VariableUsageVisitor.java index 9cc3bb14139..747ee97bf5e 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/VariableUsageVisitor.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/VariableUsageVisitor.java @@ -41,6 +41,7 @@ import org.apache.jena.sparql.algebra.op.OpQuadPattern; import org.apache.jena.sparql.algebra.op.OpTable; import org.apache.jena.sparql.algebra.op.OpTopN; +import org.apache.jena.sparql.algebra.op.OpUnfold; import org.apache.jena.sparql.core.Quad; import org.apache.jena.sparql.core.Var; import org.apache.jena.sparql.core.Vars; @@ -169,6 +170,17 @@ public void visit(OpExtend opExtend) { action(vars); } + @Override + public void visit(OpUnfold opUnfold) { + Collection vars = new ArrayList<>(); + ExprVars.varsMentioned(vars, opUnfold.getExpr()); + vars.add( opUnfold.getVar1() ); + if ( opUnfold.getVar2() != null ) { + vars.add( opUnfold.getVar2() ); + } + action(vars); + } + @Override public void visit(OpOrder opOrder) { Collection vars = new ArrayList<>(); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/ApplyTransformVisitor.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/ApplyTransformVisitor.java index 19543334803..0e9ae51129c 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/ApplyTransformVisitor.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/ApplyTransformVisitor.java @@ -147,6 +147,15 @@ public void visit(OpExtend opExtend) { visit1(opExtend2) ; } + @Override + public void visit(OpUnfold opUnfold) { + final Expr e2 = pop(exprStack); + if ( ! opUnfold.getExpr().equals(e2) ) + throw new IllegalArgumentException("Expression on stack differs from expression of UNFOLD."); + + visit1(opUnfold) ; + } + // Special test cases for collectors. // Careful about order. diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/OpVisitorByType.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/OpVisitorByType.java index 3f373291f0f..2ec2fbb8020 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/OpVisitorByType.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/OpVisitorByType.java @@ -188,6 +188,11 @@ public default void visit(OpExtend opExtend) { visit1(opExtend); } + @Override + public default void visit(OpUnfold opUnfold) { + visit1(opUnfold); + } + @Override public default void visit(OpList opList) { visitModifer(opList); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/OpVisitorByTypeAndExpr.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/OpVisitorByTypeAndExpr.java index 5387afab57b..bf3d3589646 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/OpVisitorByTypeAndExpr.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/OpVisitorByTypeAndExpr.java @@ -215,6 +215,12 @@ public default void visit(OpExtend opExtend) { visit1(opExtend); } + @Override + public default void visit(OpUnfold opUnfold) { + visitExpr( new ExprList(opUnfold.getExpr()) ) ; + visit1(opUnfold); + } + @Override public default void visit(OpList opList) { visitModifer(opList); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/WalkerVisitor.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/WalkerVisitor.java index 6243225afc5..d1fa6e7e9eb 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/WalkerVisitor.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/walker/WalkerVisitor.java @@ -215,6 +215,15 @@ public void visit(OpExtend opExtend) { after(opExtend) ; } + @Override + public void visit(OpUnfold opUnfold) { + before(opUnfold) ; + ExprList varExpr = new ExprList( opUnfold.getExpr() ) ; + visitExpr(varExpr); + visit1$(opUnfold) ; + after(opUnfold) ; + } + // Transforming to quads needs the graph node handled before doing the sub-algebra ops // so it has to be done as before/after by the Walker. By the time visit(OpGraph) is called, // the sub-tree has already been visited. diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterUnfold.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterUnfold.java new file mode 100644 index 00000000000..6de9f31fc8f --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterUnfold.java @@ -0,0 +1,346 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.engine.iterator; + +import java.util.Iterator; +import java.util.Map; +import java.util.NoSuchElementException; + +import org.apache.jena.atlas.io.IndentedWriter; +import org.apache.jena.cdt.CDTKey; +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.cdt.CompositeDatatypeList; +import org.apache.jena.cdt.CompositeDatatypeMap; +import org.apache.jena.datatypes.xsd.XSDDatatype; +import org.apache.jena.graph.Node; +import org.apache.jena.graph.NodeFactory; +import org.apache.jena.graph.impl.LiteralLabel; +import org.apache.jena.sparql.core.Var; +import org.apache.jena.sparql.engine.ExecutionContext; +import org.apache.jena.sparql.engine.QueryIterator; +import org.apache.jena.sparql.engine.binding.Binding; +import org.apache.jena.sparql.engine.binding.BindingFactory; +import org.apache.jena.sparql.expr.Expr; +import org.apache.jena.sparql.expr.ExprEvalException; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.serializer.SerializationContext; + +public class QueryIterUnfold extends QueryIterRepeatApply +{ + protected final Expr expr ; + protected final Var var1 ; + protected final Var var2 ; + + public QueryIterUnfold(QueryIterator qIter, Expr expr, Var var1, Var var2, ExecutionContext execCxt) { + super(qIter, execCxt) ; + + this.expr = expr ; + this.var1 = var1 ; + this.var2 = var2 ; + } + + @Override + protected QueryIterator nextStage(Binding inputBinding) { + final NodeValue nv; + try { + nv = expr.eval( inputBinding, getExecContext() ); + } + catch ( final ExprEvalException ex ) { + // If the expression failed to evaluate, we create no + // no assignment (exactly as in the case of BIND, see + // the 'accept' method in 'QueryIterAssign') + + return QueryIterSingleton.create( inputBinding, getExecContext() ); + } + + Node n = nv.asNode(); + if ( n.isLiteral() ) { + String dtURI = n.getLiteralDatatypeURI(); + if ( CompositeDatatypeList.uri.equals(dtURI) ) + return unfoldList( n.getLiteral(), inputBinding ); + if ( CompositeDatatypeMap.uri.equals(dtURI) ) + return unfoldMap( n.getLiteral(), inputBinding ); + } + + return QueryIterSingleton.create( inputBinding, getExecContext() ); + } + + protected QueryIterator unfoldList( final LiteralLabel lit, final Binding inputBinding ) { + final Iterable itListElmts = CompositeDatatypeList.getValue(lit); + return new QueryIterUnfoldWorkerForLists(inputBinding, itListElmts); + } + + protected QueryIterator unfoldMap( final LiteralLabel lit, final Binding inputBinding ) { + final Iterable> itMapEntries = CompositeDatatypeMap.getValue(lit).entrySet(); + return new QueryIterUnfoldWorkerForMaps(inputBinding, itMapEntries); + } + + protected abstract class QueryIterUnfoldWorkerBase extends QueryIteratorBase { + protected final Binding inputBinding; + protected final Iterator itElmts; + + protected QueryIterUnfoldWorkerBase(Binding inputBinding, Iterator itElmts) { + this.inputBinding = inputBinding; + this.itElmts = itElmts; + } + + protected QueryIterUnfoldWorkerBase(Binding inputBinding, Iterable itElmts) { + this( inputBinding, itElmts.iterator() ); + } + + @Override + protected boolean hasNextBinding() { return itElmts.hasNext(); } + + @Override + protected void requestCancel() { } // nothing to do really + + @Override + protected void closeIterator() { } // nothing to do really + } + + + protected class QueryIterUnfoldWorkerForLists extends QueryIterUnfoldWorkerBase { + + protected int nextIndex = 0; + + public QueryIterUnfoldWorkerForLists(Binding inputBinding, Iterator itListElmts) { + super(inputBinding, itListElmts); + } + + public QueryIterUnfoldWorkerForLists(Binding inputBinding, Iterable itListElmts) { + super(inputBinding, itListElmts); + } + + @Override + public void output(IndentedWriter out, SerializationContext sCxt) { + out.write("QueryIterUnfoldWorkerForLists"); + } + + @Override + protected Binding moveToNextBinding() { + final CDTValue nextElmt = itElmts.next(); + nextIndex++; // index values to be assigned to the second variable start at 1 + + final Node indexNode; + if ( var2 != null ) { + final String indexStr = Integer.toString(nextIndex); + indexNode = NodeFactory.createLiteral(indexStr, XSDDatatype.XSDinteger); + } + else { + indexNode = null; + } + + if ( nextElmt.isNull() ) { + if ( var2 != null ) + return BindingFactory.binding(inputBinding, var2, indexNode); + else + return inputBinding; + } + + if ( nextElmt.isNode() ) { + final Node elmtNode = nextElmt.asNode(); + + if ( var2 != null ) + return BindingFactory.binding(inputBinding, var1, elmtNode, var2, indexNode); + else + return BindingFactory.binding(inputBinding, var1, elmtNode); + } + + throw new UnsupportedOperationException( "unexpected list element: " + nextElmt.getClass().getName() ); + } + } + + + protected class QueryIterUnfoldWorkerForMaps extends QueryIterUnfoldWorkerBase> { + + public QueryIterUnfoldWorkerForMaps(Binding inputBinding, Iterator> itMapElmts) { + super(inputBinding, itMapElmts); + } + + public QueryIterUnfoldWorkerForMaps(Binding inputBinding, Iterable> itMapElmts) { + super(inputBinding, itMapElmts); + } + + @Override + public void output(IndentedWriter out, SerializationContext sCxt) { + out.write("QueryIterUnfoldWorkerForMaps"); + } + + @Override + protected Binding moveToNextBinding() { + final Map.Entry elmt = itElmts.next(); + final CDTKey key = elmt.getKey(); + final CDTValue value = elmt.getValue(); + + final Node keyNode = key.asNode(); + + if ( value.isNull() || var2 == null ) { + return BindingFactory.binding( inputBinding, var1, keyNode ); + } + + if ( value.isNode() ) { + final Node valueNode = value.asNode(); + return BindingFactory.binding(inputBinding, var1, keyNode, var2, valueNode); + } + + throw new UnsupportedOperationException( "unexpected map value: " + value.getClass().getName() ); + } + } + + + protected static abstract class ElementExtractorBase implements Iterator { + protected final String str; + protected int cursor = 0; + private T nextElmt = null; + + protected ElementExtractorBase( final String str ) { + this.str = str.strip(); + } + + @Override + public boolean hasNext() { + if ( nextElmt != null ) + return true; + + nextElmt = produceNext(); + return ( nextElmt != null ); + } + + @Override + public T next() { + if ( ! hasNext() ) + throw new NoSuchElementException(); + + final T r = nextElmt; + nextElmt = null; + return r; + } + + protected abstract T produceNext(); + + protected void consumeWhiteSpace() { + while ( cursor < str.length() && str.charAt(cursor) == ' ' ) + cursor++; + } + + protected void advanceToEndOfSubList() { + while ( cursor < str.length() && str.charAt(cursor) != ']' ) { + cursor++; + if ( str.charAt(cursor) == '[' ) { + advanceToEndOfSubList(); + cursor++; + } + else if ( str.charAt(cursor) == '{' ) { + advanceToEndOfSubMap(); + cursor++; + } + } + } + + protected void advanceToEndOfSubMap() { + while ( cursor < str.length() && str.charAt(cursor) != '}' ) { + cursor++; + if ( str.charAt(cursor) == '[' ) { + advanceToEndOfSubList(); + cursor++; + } + else if ( str.charAt(cursor) == '{' ) { + advanceToEndOfSubMap(); + cursor++; + } + } + } + + protected void advanceToNextCommaOrEnd() { + while ( cursor < str.length() && str.charAt(cursor) != ',' ) + cursor++; + } + } + + + protected static class ListElementExtractor extends ElementExtractorBase { + public ListElementExtractor( final String listAsString ) { + super(listAsString); + } + + @Override + public String produceNext() { + consumeWhiteSpace(); + if ( cursor >= str.length() ) { + return null; + } + + final int nextElmtBegin = cursor; + if ( str.charAt(cursor) == '[' ) { + advanceToEndOfSubList(); + } + else if ( str.charAt(cursor) == '{' ) { + advanceToEndOfSubMap(); + } + advanceToNextCommaOrEnd(); + final String nextElmt = str.substring(nextElmtBegin, cursor).strip(); + cursor++; // move cursor to after comma + return nextElmt; + } + } + + + protected static class MapElementExtractor extends ElementExtractorBase> { + public MapElementExtractor( final String mapAsString ) { + super(mapAsString); + } + + @Override + public Map.Entry produceNext() { + consumeWhiteSpace(); + if ( cursor >= str.length() ) { + return null; + } + + final int nextKeyBegin = cursor; + advanceToNextColon(); + final String nextKey = str.substring(nextKeyBegin, cursor).strip(); + + cursor++; // move cursor to after colon + consumeWhiteSpace(); + final int nextValueBegin = cursor; + if ( str.charAt(cursor) == '[' ) { + advanceToEndOfSubList(); + } + else if ( str.charAt(cursor) == '{' ) { + advanceToEndOfSubMap(); + } + advanceToNextCommaOrEnd(); + final String nextValue = str.substring(nextValueBegin, cursor).strip(); + cursor++; // move cursor to after comma + + return new Map.Entry<>() { + @Override public String getKey() { return nextKey; } + @Override public String getValue() { return nextValue; } + @Override public String setValue(String v) { throw new UnsupportedOperationException(); } + }; + } + + protected void advanceToNextColon() { + while ( cursor < str.length() && str.charAt(cursor) != ':' ) + cursor++; + } + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/ExecutionDispatch.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/ExecutionDispatch.java index 923836a7bcb..96974249939 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/ExecutionDispatch.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/ExecutionDispatch.java @@ -272,6 +272,13 @@ public void visit(OpExtend opExtend) { push(qIter); } + @Override + public void visit(OpUnfold opUnfold) { + QueryIterator input = pop(); + QueryIterator qIter = opExecutor.execute(opUnfold, input); + push(qIter); + } + @Override public void visit(OpSlice opSlice) { QueryIterator input = pop(); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/OpExecutor.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/OpExecutor.java index 93b12bfed61..e7293e21ee3 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/OpExecutor.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/OpExecutor.java @@ -450,6 +450,12 @@ protected QueryIterator execute(OpExtend opExtend, QueryIterator input) { return qIter; } + protected QueryIterator execute(OpUnfold opUnfold, QueryIterator input) { + QueryIterator qIter = exec(opUnfold.getSubOp(), input); + qIter = new QueryIterUnfold(qIter, opUnfold.getExpr(), opUnfold.getVar1(), opUnfold.getVar2(), execCxt); + return qIter; + } + public static QueryIterator createRootQueryIterator(ExecutionContext execCxt) { return QueryIterRoot.create(execCxt); } diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/VarFinder.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/VarFinder.java index 882fa9b93dd..46d0f6dbc85 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/VarFinder.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/VarFinder.java @@ -122,7 +122,7 @@ static VarUsageVisitor apply(Op op) { Set filterMentions = null ; // Used in a filter, before defined Set filterMentionsOnly = null ; - // Used in assign or extend expression + // Used in assign or extend or unfold expression Set assignMentions = null ; VarUsageVisitor() { @@ -376,6 +376,18 @@ private boolean isLikelyToBeDefined(Expr expr) { return result; } + @Override + public void visit(OpUnfold opUnfold) { + opUnfold.getSubOp().visit(this); + + defines.add( opUnfold.getVar1() ); + + if ( opUnfold.getVar2() != null ) + defines.add( opUnfold.getVar2() ); + + ExprVars.nonOpVarsMentioned( assignMentions, opUnfold.getExpr() ); + } + @Override public void visit(OpProject opProject) { List vars = opProject.getVars(); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/ref/Evaluator.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/ref/Evaluator.java index 5299b5c1f7e..201ce5a8922 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/ref/Evaluator.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/ref/Evaluator.java @@ -29,6 +29,7 @@ import org.apache.jena.sparql.core.Var; import org.apache.jena.sparql.core.VarExprList; import org.apache.jena.sparql.engine.ExecutionContext; +import org.apache.jena.sparql.expr.Expr; import org.apache.jena.sparql.expr.ExprAggregator; import org.apache.jena.sparql.expr.ExprList; import org.apache.jena.sparql.pfunction.PropFuncArg; @@ -46,6 +47,7 @@ public interface Evaluator public Table assign(Table table, VarExprList exprs); public Table extend(Table table, VarExprList exprs); + public Table unfold(Table table, Expr expr, Var var1, Var var2); public Table join(Table tableLeft, Table tableRight); public Table leftJoin(Table tableLeft, Table tableRight, ExprList expr); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/ref/EvaluatorDispatch.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/ref/EvaluatorDispatch.java index f1b1de27902..b459ce606ba 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/ref/EvaluatorDispatch.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/ref/EvaluatorDispatch.java @@ -309,6 +309,13 @@ public void visit(OpExtend opExtend) { push(table); } + @Override + public void visit(OpUnfold opUnfold) { + Table table = eval(opUnfold.getSubOp()); + table = evaluator.unfold(table, opUnfold.getExpr(), opUnfold.getVar1(), opUnfold.getVar2()); + push(table); + } + @Override public void visit(OpGroup opGroup) { Table table = eval(opGroup.getSubOp()); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/ref/EvaluatorSimple.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/ref/EvaluatorSimple.java index c37b84a7cf0..a6db3df526d 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/ref/EvaluatorSimple.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/ref/EvaluatorSimple.java @@ -36,6 +36,7 @@ import org.apache.jena.sparql.engine.binding.BindingBuilder; import org.apache.jena.sparql.engine.iterator.*; import org.apache.jena.sparql.engine.main.QC; +import org.apache.jena.sparql.expr.Expr; import org.apache.jena.sparql.expr.ExprAggregator; import org.apache.jena.sparql.expr.ExprList; import org.apache.jena.sparql.pfunction.PropFuncArg; @@ -250,6 +251,13 @@ public Table extend(Table table, VarExprList exprs) { return new TableN(qIter); } + @Override + public Table unfold(Table table, Expr expr, Var var1, Var var2) { + QueryIterator qIter = table.iterator(getExecContext()); + qIter = new QueryIterUnfold(qIter, expr, var1, var2, getExecContext()); + return new TableN(qIter); + } + @Override public Table unit() { return TableFactory.createUnit(); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/NodeValueCmp.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/NodeValueCmp.java index 23fc679298c..280f37506d2 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/NodeValueCmp.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/NodeValueCmp.java @@ -28,8 +28,11 @@ import javax.xml.datatype.Duration; import org.apache.jena.atlas.lib.StrUtils; +import org.apache.jena.cdt.CompositeDatatypeList; +import org.apache.jena.cdt.CompositeDatatypeMap; import org.apache.jena.graph.Node; import org.apache.jena.graph.Triple; +import org.apache.jena.graph.impl.LiteralLabel; import org.apache.jena.sparql.ARQInternalErrorException; import org.apache.jena.sparql.SystemARQ; import org.apache.jena.sparql.expr.nodevalue.NodeFunctions; @@ -144,6 +147,17 @@ public static boolean sameValueAs(NodeValue nv1, NodeValue nv2) { raise(new ExprEvalException("Incompatible: " + nv1 + " and " + nv2)); // Not same node. return false; + + case VSPACE_CDT_LIST : { + final LiteralLabel lit1 = nv1.asNode().getLiteral() ; + final LiteralLabel lit2 = nv2.asNode().getLiteral() ; + return CompositeDatatypeList.type.isEqual(lit1, lit2) ; + } + case VSPACE_CDT_MAP : { + final LiteralLabel lit1 = nv1.asNode().getLiteral() ; + final LiteralLabel lit2 = nv2.asNode().getLiteral() ; + return CompositeDatatypeMap.type.isEqual(lit1, lit2) ; + } } throw new ARQInternalErrorException("sameValueAs failure " + nv1 + " and " + nv2); @@ -204,14 +218,17 @@ public static int compareAlways(NodeValue nv1, NodeValue nv2) { if ( nv2 == null ) return CMP_GREATER; - if ( nv1.hasNode() && nv2.hasNode() ) { + ValueSpace compType = classifyValueOp(nv1, nv2) ; + + if ( nv1.hasNode() + && nv2.hasNode() + && compType != ValueSpace.VSPACE_CDT_LIST + && compType != ValueSpace.VSPACE_CDT_MAP ) { // Fast path - same RDF term => CMP_EQUAL if ( nv1.getNode().equals(nv2.getNode()) ) return CMP_EQUAL; } - ValueSpace compType = classifyValueOp(nv1, nv2) ; - // Special case - date/dateTime comparison is affected by timezones and may be // indeterminate based on the value of the dateTime/date. // Do this first, so that indeterminate can drop through to a general ordering. @@ -349,6 +366,28 @@ public static int compareAlways(NodeValue nv1, NodeValue nv2) { raise(new ExprNotComparableException("Can't compare valiables as values "+nv1+" and "+nv2)) ; } + case VSPACE_CDT_LIST : { + final LiteralLabel lit1 = nv1.asNode().getLiteral() ; + final LiteralLabel lit2 = nv2.asNode().getLiteral() ; + try { + return CompositeDatatypeList.compare(lit1, lit2, sortOrderingCompare) ; + } + catch( final ExprNotComparableException e ) { + raise(e) ; + } + } + + case VSPACE_CDT_MAP : { + final LiteralLabel lit1 = nv1.asNode().getLiteral() ; + final LiteralLabel lit2 = nv2.asNode().getLiteral() ; + try { + return CompositeDatatypeMap.compare(lit1, lit2, sortOrderingCompare) ; + } + catch( final ExprNotComparableException e ) { + raise(e) ; + } + } + case VSPACE_UNKNOWN : { // One or two unknown value spaces. Node node1 = nv1.asNode() ; @@ -427,6 +466,18 @@ public static int compareWithOrdering(NodeValue nv1, NodeValue nv2) { return NodeCmp$compareRDFTerms(nv1, nv2); } + if ( vs1 == ValueSpace.VSPACE_CDT_LIST && vs2 == ValueSpace.VSPACE_CDT_LIST ) { + LiteralLabel l1 = nv1.asNode().getLiteral(); + LiteralLabel l2 = nv2.asNode().getLiteral(); + return CompositeDatatypeList.compare(l1, l2, true); + } + + if ( vs1 == ValueSpace.VSPACE_CDT_MAP && vs2 == ValueSpace.VSPACE_CDT_MAP ) { + LiteralLabel l1 = nv1.asNode().getLiteral(); + LiteralLabel l2 = nv2.asNode().getLiteral(); + return CompositeDatatypeMap.compare(l1, l2, true); + } + // XXX G and Date cases. int vsOrder = ValueSpace.comparisonOrder(vs1, vs2); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/ValueSpace.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/ValueSpace.java index 4ac00d4dab0..8440eff14ca 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/ValueSpace.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/ValueSpace.java @@ -18,6 +18,8 @@ package org.apache.jena.sparql.expr; +import org.apache.jena.cdt.CompositeDatatypeList; +import org.apache.jena.cdt.CompositeDatatypeMap; import org.apache.jena.sparql.SystemARQ; import org.apache.jena.sparql.util.NodeUtils; @@ -95,6 +97,9 @@ public enum ValueSpace { // VSPACE_G_MONTH(230), // VSPACE_G_DAY(240), + VSPACE_CDT_LIST(300), + VSPACE_CDT_MAP(301), + VSPACE_SORTKEY(900), VSPACE_QUOTED_TRIPLE(999), // RDF-star : Last recognized value space. @@ -188,6 +193,12 @@ public static ValueSpace valueSpace(NodeValue nv) { if ( nv.isSortKey() ) return VSPACE_SORTKEY ; + if ( nv.isLiteral() ) { + final String dtURI = nv.getDatatypeURI() ; + if ( CompositeDatatypeList.uri.equals(dtURI) ) return VSPACE_CDT_LIST ; + if ( CompositeDatatypeMap.uri.equals(dtURI) ) return VSPACE_CDT_MAP ; + } + //if ( nv.isLiteral() ) return VSPACE_UNKNOWN ; if ( nv.isBlank() ) return VSPACE_BLANKNODE; diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AccumulatorExpr.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AccumulatorExpr.java index d8c5de3f35a..4d59ad2632a 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AccumulatorExpr.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AccumulatorExpr.java @@ -35,7 +35,7 @@ public abstract class AccumulatorExpr implements Accumulator private long accCount = 0 ; protected long errorCount = 0 ; private final Expr expr ; - private final boolean makeDistinct; + protected final boolean makeDistinct; protected AccumulatorExpr(Expr expr, boolean makeDistinct) { this.expr = expr; diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggFoldList.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggFoldList.java new file mode 100644 index 00000000000..52687ef030c --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggFoldList.java @@ -0,0 +1,279 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.expr.aggregate; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Objects; + +import org.apache.jena.atlas.data.BagFactory; +import org.apache.jena.atlas.data.SerializationFactory; +import org.apache.jena.atlas.data.SortedDataBag; +import org.apache.jena.atlas.data.ThresholdPolicy; +import org.apache.jena.atlas.data.ThresholdPolicyFactory; +import org.apache.jena.atlas.io.IndentedLineBuffer; +import org.apache.jena.cdt.CDTFactory; +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.graph.Node; +import org.apache.jena.query.ARQ; +import org.apache.jena.query.SortCondition; +import org.apache.jena.sparql.engine.binding.Binding; +import org.apache.jena.sparql.engine.binding.BindingComparator; +import org.apache.jena.sparql.expr.Expr; +import org.apache.jena.sparql.expr.ExprList; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionEnv; +import org.apache.jena.sparql.function.library.cdt.CDTLiteralFunctionUtils; +import org.apache.jena.sparql.serializer.SerializationContext; +import org.apache.jena.sparql.sse.writers.WriterExpr; +import org.apache.jena.sparql.system.SerializationFactoryFinder; +import org.apache.jena.sparql.util.ExprUtils; + +public class AggFoldList extends AggregatorBase +{ + protected final List orderBy; + protected final ThresholdPolicy policy; + protected final Comparator comparator; + + public AggFoldList( final boolean isDistinct, final Expr expr1 ) { + this(isDistinct, expr1, null); + } + + public AggFoldList( final boolean isDistinct, final Expr expr1, final List orderBy ) { + // We need to extract the expressions from the sort conditions + // as well in order for them to be considered by the algebra + // transformer that renames variables from subqueries (see + // {@link TransformScopeRename#RenameByScope}). + super( "FOLD", isDistinct, collectExprs(expr1, orderBy) ); + + this.orderBy = orderBy; + + if ( orderBy != null && ! orderBy.isEmpty() ) { + policy = ThresholdPolicyFactory.policyFromContext( ARQ.getContext() ); + comparator = new BindingComparator(orderBy); + } + else { + policy = null; + comparator = null; + } + } + + protected static ExprList collectExprs( final Expr expr1, final List orderBy ) { + final ExprList l = new ExprList(expr1); + + if ( orderBy != null ) { + for ( final SortCondition c : orderBy ) { + l.add( c.getExpression() ); + } + } + + return l; + } + + @Override + public Aggregator copy( final ExprList exprs ) { + final Expr _expr1; + final List _orderBy; + if ( orderBy == null ) { + if ( exprs.size() != 1 ) throw new IllegalArgumentException(); + + _expr1 = exprs.get(0); + _orderBy = null; + } + else { + if ( exprs.size() != orderBy.size()+1 ) throw new IllegalArgumentException(); + + + final Iterator cit = orderBy.iterator(); + final Iterator eit = exprs.iterator(); + + _expr1 = eit.next(); + + _orderBy = new ArrayList<>( orderBy.size() ); + while ( eit.hasNext() ) { + final SortCondition c = new SortCondition( eit.next(), cit.next().getDirection() ); + _orderBy.add(c); + } + } + + return new AggFoldList(isDistinct, _expr1, _orderBy); + } + + @Override + public boolean equals( final Aggregator other, final boolean bySyntax ) { + if ( other == null ) return false; + if ( this == other ) return true; + if ( ! ( other instanceof AggFoldList ) ) + return false; + final AggFoldList fold = (AggFoldList) other; + return (isDistinct == fold.isDistinct) + && getExprList().get(0).equals(fold.getExprList().get(0), bySyntax) + && Objects.equals(orderBy, fold.orderBy); + } + + @Override + public Accumulator createAccumulator() { + if ( orderBy != null && ! orderBy.isEmpty() ) + return new SortingListAccumulator(); + else + return new BasicListAccumulator( getExprList().get(0), isDistinct ); + } + + @Override + public Node getValueEmpty() { + final List emptyList = new ArrayList<>(); + return CDTLiteralFunctionUtils.createNode(emptyList); + } + + @Override + public int hashCode() { + return HC_AggFoldList ^ getExpr().hashCode(); + } + + @Override + public String asSparqlExpr( final SerializationContext sCxt ) { + final IndentedLineBuffer out = new IndentedLineBuffer(); + out.append( getName() ); + out.append( "(" ); + + if ( isDistinct ) + out.append("DISTINCT "); + + ExprUtils.fmtSPARQL(out, getExprList().get(0), sCxt); + + if ( orderBy != null && ! orderBy.isEmpty() ) { + out.append(" ORDER BY "); + final Iterator it = orderBy.iterator(); + while ( it.hasNext() ) { + it.next().output(out, sCxt); + if ( it.hasNext() ) out.append(", "); + } + } + + out.append(")"); + return out.asString(); + } + + @Override + public String toPrefixString() { + final IndentedLineBuffer out = new IndentedLineBuffer(); + out.append("("); + out.append( getName().toLowerCase(Locale.ROOT) ); + out.incIndent(); + + if ( isDistinct ) + out.append(" distinct"); + + WriterExpr.output(out, getExprList().get(0), null); + + if ( orderBy != null && ! orderBy.isEmpty() ) { + out.append(" order by "); + out.incIndent(); + for ( final SortCondition c : orderBy ) { + c.output(out); + } + out.decIndent(); + } + + out.decIndent(); + out.append(")"); + return out.asString(); + } + + protected static class BasicListAccumulator extends AccumulatorExpr { + final protected List list = new ArrayList<>(); + protected boolean nullValueAdded = false; + + protected BasicListAccumulator( final Expr expr, final boolean makeDistinct ) { + super(expr, makeDistinct); + } + + @Override + protected void accumulate( final NodeValue nv, final Binding binding, final FunctionEnv functionEnv ) { + final CDTValue v = CDTFactory.createValue( nv.asNode() ); + list.add(v); + } + + @Override + protected void accumulateError( final Binding binding, final FunctionEnv functionEnv ) { + // By definition of FOLD, evaluation errors result in null values + // for the created list. If FOLD is used with the keyword DISTINCT, + // then all errors collapse to a single null value. + if ( makeDistinct && nullValueAdded ) { + return; + } + + nullValueAdded = true; + + final CDTValue v = CDTFactory.getNullValue(); + list.add(v); + } + + @Override + protected NodeValue getAccValue() { + return CDTLiteralFunctionUtils.createNodeValue(list); + } + + // Overriding this function because the base class would otherwise not + // call getAccValue() in cases in which there was an error during the + // evaluation of the 'expr' for any of the solution mappings. For FOLD, + // however, errors do not cause an aggregation error but just produce + // null values in the created list. + @Override + public NodeValue getValue() { + return getAccValue(); + } + } + + protected class SortingListAccumulator implements Accumulator { + protected final SortedDataBag sbag; + protected FunctionEnv functionEnv = null; + + public SortingListAccumulator() { + final SerializationFactory sf = SerializationFactoryFinder.bindingSerializationFactory(); + sbag = BagFactory.newSortedBag(policy, sf, comparator); + } + + @Override + public void accumulate( final Binding binding, final FunctionEnv functionEnv ) { + sbag.add(binding); + + if ( this.functionEnv == null ) + this.functionEnv = functionEnv; + } + + @Override + public NodeValue getValue() { + final Iterator it = sbag.iterator(); + final Accumulator acc = new BasicListAccumulator( getExprList().get(0), isDistinct ); + + while ( it.hasNext() ) { + acc.accumulate( it.next(), functionEnv ); + } + + sbag.close(); + + return acc.getValue(); + } + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggFoldMap.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggFoldMap.java new file mode 100644 index 00000000000..923e42934bc --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggFoldMap.java @@ -0,0 +1,285 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.expr.aggregate; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Objects; + +import org.apache.jena.atlas.data.BagFactory; +import org.apache.jena.atlas.data.SerializationFactory; +import org.apache.jena.atlas.data.SortedDataBag; +import org.apache.jena.atlas.data.ThresholdPolicy; +import org.apache.jena.atlas.data.ThresholdPolicyFactory; +import org.apache.jena.atlas.io.IndentedLineBuffer; +import org.apache.jena.cdt.CDTFactory; +import org.apache.jena.cdt.CDTKey; +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.graph.Node; +import org.apache.jena.query.ARQ; +import org.apache.jena.query.SortCondition; +import org.apache.jena.sparql.engine.binding.Binding; +import org.apache.jena.sparql.engine.binding.BindingComparator; +import org.apache.jena.sparql.expr.Expr; +import org.apache.jena.sparql.expr.ExprLib; +import org.apache.jena.sparql.expr.ExprList; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionEnv; +import org.apache.jena.sparql.function.library.cdt.CDTLiteralFunctionUtils; +import org.apache.jena.sparql.serializer.SerializationContext; +import org.apache.jena.sparql.sse.writers.WriterExpr; +import org.apache.jena.sparql.system.SerializationFactoryFinder; +import org.apache.jena.sparql.util.ExprUtils; + +public class AggFoldMap extends AggregatorBase +{ + protected final Expr expr1; // While the values of these member variables can also be extracted from the ExprList (see + protected final Expr expr2; // createExprList below), keeping these copies here makes it easier to access these values. + + protected final List orderBy; + protected final ThresholdPolicy policy; + protected final Comparator comparator; + + public AggFoldMap( final Expr expr1, final Expr expr2 ) { + this(expr1, expr2, null); + } + + public AggFoldMap( final Expr expr1, final Expr expr2, final List orderBy ) { + // We need to extract the expressions from the sort conditions + // as well in order for them to be considered by the algebra + // transformer that renames variables from subqueries (see + // {@link TransformScopeRename#RenameByScope}). + super( "FOLD", false, collectExprs(expr1, expr2, orderBy) ); + + this.expr1 = expr1; + this.expr2 = expr2; + + this.orderBy = orderBy; + + if ( orderBy != null && ! orderBy.isEmpty() ) { + policy = ThresholdPolicyFactory.policyFromContext( ARQ.getContext() ); + comparator = new BindingComparator(orderBy); + } + else { + policy = null; + comparator = null; + } + } + + protected static ExprList collectExprs( final Expr expr1, final Expr expr2, final List orderBy ) { + final ExprList l = new ExprList(); + l.add(expr1); + l.add(expr2); + + if ( orderBy != null ) { + for ( final SortCondition c : orderBy ) { + l.add( c.getExpression() ); + } + } + + return l; + } + + @Override + public Aggregator copy( final ExprList exprs ) { + final Expr _expr1; + final Expr _expr2; + final List _orderBy; + if ( orderBy == null ) { + if ( exprs.size() != 2 ) throw new IllegalArgumentException(); + + _expr1 = exprs.get(0); + _expr2 = exprs.get(1); + _orderBy = null; + } + else { + if ( exprs.size() != orderBy.size()+2 ) throw new IllegalArgumentException(); + + + final Iterator cit = orderBy.iterator(); + final Iterator eit = exprs.iterator(); + + _expr1 = eit.next(); + _expr2 = eit.next(); + + _orderBy = new ArrayList<>( orderBy.size() ); + while ( eit.hasNext() ) { + final SortCondition c = new SortCondition( eit.next(), cit.next().getDirection() ); + _orderBy.add(c); + } + } + + return new AggFoldMap(_expr1, _expr2, _orderBy); + } + + @Override + public boolean equals( final Aggregator other, final boolean bySyntax ) { + if ( other == null ) return false; + if ( this == other ) return true; + if ( ! ( other instanceof AggFoldMap ) ) + return false; + final AggFoldMap fold = (AggFoldMap) other; + return exprList.equals(fold.exprList, bySyntax) + && Objects.equals(orderBy, fold.orderBy); + } + + @Override + public Accumulator createAccumulator() { + if ( orderBy != null && ! orderBy.isEmpty() ) + return new SortingMapAccumulator(); + else + return new BasicMapAccumulator(); + } + + @Override + public Node getValueEmpty() { + final Map emptyMap = new HashMap<>(); + return CDTLiteralFunctionUtils.createNode(emptyMap); + } + + @Override + public int hashCode() { + int hc = HC_AggFoldMap; + hc ^= getExprList().get(0).hashCode(); + hc ^= getExprList().get(1).hashCode(); + + return hc; + } + + @Override + public String asSparqlExpr( final SerializationContext sCxt ) { + final IndentedLineBuffer out = new IndentedLineBuffer(); + out.append( getName() ); + out.append( "(" ); + + ExprUtils.fmtSPARQL(out, expr1, sCxt); + out.append(", "); + ExprUtils.fmtSPARQL(out, expr2, sCxt); + + if ( orderBy != null && ! orderBy.isEmpty() ) { + out.append(" ORDER BY "); + final Iterator it = orderBy.iterator(); + while ( it.hasNext() ) { + it.next().output(out, sCxt); + if ( it.hasNext() ) out.append(", "); + } + } + + out.append(")"); + return out.asString(); + } + + @Override + public String toPrefixString() { + final IndentedLineBuffer out = new IndentedLineBuffer(); + out.append("("); + out.append( getName().toLowerCase(Locale.ROOT) ); + out.incIndent(); + + WriterExpr.output(out, expr1, null); + out.append(", "); + WriterExpr.output(out, expr2, null); + + if ( orderBy != null && ! orderBy.isEmpty() ) { + out.append(" order by "); + out.incIndent(); + for ( final SortCondition c : orderBy ) { + c.output(out); + } + out.decIndent(); + } + + out.decIndent(); + out.append(")"); + return out.asString(); + } + + protected class BasicMapAccumulator implements Accumulator { + final protected Map map = new HashMap<>(); + + @Override + public void accumulate( final Binding binding, final FunctionEnv functionEnv ) { + final NodeValue nvKey = ExprLib.evalOrNull(expr1, binding, functionEnv); + if ( nvKey == null ) { + return; // ignore if creating the key using the given binding failed + } + if ( nvKey.isBlank() ) { + return; // ignore if the key would be a blank node + } + + final CDTKey key = CDTFactory.createKey( nvKey.asNode() ); + + // TODO: what do we do if the map already contains an entry with the same key? + + final CDTValue value; + final NodeValue nvValue = ExprLib.evalOrNull(expr2, binding, functionEnv); + if ( nvValue == null ) { + value = CDTFactory.getNullValue(); + } + else { + value = CDTFactory.createValue( nvValue.asNode() ); + } + + map.put(key, value); + } + + @Override + public NodeValue getValue() { + return CDTLiteralFunctionUtils.createNodeValue(map); + } + } + + protected class SortingMapAccumulator implements Accumulator { + protected final SortedDataBag sbag; + protected FunctionEnv functionEnv = null; + + public SortingMapAccumulator() { + final SerializationFactory sf = SerializationFactoryFinder.bindingSerializationFactory(); + sbag = BagFactory.newSortedBag(policy, sf, comparator); + } + + @Override + public void accumulate( final Binding binding, final FunctionEnv functionEnv ) { + sbag.add(binding); + + if ( this.functionEnv == null ) + this.functionEnv = functionEnv; + } + + @Override + public NodeValue getValue() { + final Iterator it = sbag.iterator(); + final Accumulator acc = new BasicMapAccumulator(); + + while ( it.hasNext() ) { + acc.accumulate( it.next(), functionEnv ); + } + + sbag.close(); + + return acc.getValue(); + } + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggregatorBase.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggregatorBase.java index d60edb1116d..4942b842f48 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggregatorBase.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggregatorBase.java @@ -187,4 +187,7 @@ public final boolean equals(Object other) { protected static final int HC_AggMode = 0x184 ; protected static final int HC_AggModeDistinct = 0x185 ; + protected static final int HC_AggFoldList = 0x186 ; + protected static final int HC_AggFoldMap = 0x187 ; + } diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggregatorFactory.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggregatorFactory.java index ee99bf43e8c..4d99bdeb9a2 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggregatorFactory.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggregatorFactory.java @@ -18,8 +18,11 @@ package org.apache.jena.sparql.expr.aggregate ; +import java.util.List; + import org.apache.jena.atlas.lib.NotImplemented ; import org.apache.jena.atlas.logging.Log ; +import org.apache.jena.query.SortCondition; import org.apache.jena.sparql.expr.Expr ; import org.apache.jena.sparql.expr.ExprList ; @@ -71,6 +74,13 @@ public static Aggregator createAggNull() { return new AggNull() ; } + public static Aggregator createFold(boolean distinct, Expr expr1, Expr expr2, List orderBy) { + if ( expr2 == null ) + return new AggFoldList(distinct, expr1, orderBy) ; + else + return new AggFoldMap(expr1, expr2, orderBy) ; + } + public static Aggregator createCustom(String iri, Args a) { return createCustom(iri, a.distinct, ExprList.copy(a)) ; } diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/ARQFunctions.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/ARQFunctions.java index a7452a464ae..9c76c037231 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/function/ARQFunctions.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/ARQFunctions.java @@ -19,6 +19,7 @@ package org.apache.jena.sparql.function; import org.apache.jena.sparql.ARQConstants; +import org.apache.jena.sparql.function.library.cdt.CDTLiteralFunctions; import org.apache.jena.sparql.function.library.triple.TripleTermFunctions; /** Load ARQ functions (). @@ -33,5 +34,6 @@ public class ARQFunctions { public static void load(FunctionRegistry reg) { TripleTermFunctions.register(reg); + CDTLiteralFunctions.register(reg); } } diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/CDTLiteralFunctionUtils.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/CDTLiteralFunctionUtils.java new file mode 100644 index 00000000000..d7d5f146744 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/CDTLiteralFunctionUtils.java @@ -0,0 +1,153 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.List; +import java.util.Map; + +import org.apache.jena.cdt.CDTKey; +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.cdt.CompositeDatatypeList; +import org.apache.jena.cdt.CompositeDatatypeMap; +import org.apache.jena.datatypes.DatatypeFormatException; +import org.apache.jena.graph.Node; +import org.apache.jena.graph.NodeFactory; +import org.apache.jena.graph.impl.LiteralLabel; +import org.apache.jena.sparql.expr.ExprEvalException; +import org.apache.jena.sparql.expr.NodeValue; + +public class CDTLiteralFunctionUtils +{ + /** + * Uses {@link CompositeDatatypeList#isListLiteral(Node)} to check whether + * the given node is a cdt:List literal and throws an exception if not. + */ + public static final void ensureListLiteral( final Node n ) throws ExprEvalException { + if ( ! CompositeDatatypeList.isListLiteral(n) ) + throw new ExprEvalException("Not a cdt:List literal: " + n); + } + + /** + * Uses {@link CompositeDatatypeMap#isMapLiteral(Node)} to check whether + * the given node is a cdt:Map literal and throws an exception if not. + */ + public static final void ensureMapLiteral( final Node n ) throws ExprEvalException { + if ( ! CompositeDatatypeMap.isMapLiteral(n) ) + throw new ExprEvalException("Not a cdt:Map literal: " + n); + } + + /** + * Assumes that the given node is a cdt:List literal and uses + * {@link CompositeDatatypeList#getValue(LiteralLabel)} to get + * the list. + * + * Throws an ExprEvalException if a DatatypeFormatException is + * thrown by {@link CompositeDatatypeList#getValue(LiteralLabel)}. + */ + public static final List getList( final Node n ) throws ExprEvalException { + if ( ! n.getLiteral().isWellFormed() ) + throw new ExprEvalException("Not a well-formed cdt:Map literal: " + n); + + try { + return CompositeDatatypeList.getValue( n.getLiteral() ); + } + catch ( final DatatypeFormatException ex ) { + throw new ExprEvalException("Not a well-formed cdt:List literal: " + n, ex); + } + } + + /** + * Assumes that the given node is a cdt:Map literal and uses + * {@link CompositeDatatypeMap#getValue(LiteralLabel)} to get + * the map. + * + * Throws an ExprEvalException if a DatatypeFormatException is + * thrown by {@link CompositeDatatypeMap#getValue(LiteralLabel)}. + */ + public static final Map getMap( final Node n ) throws ExprEvalException { + if ( ! n.getLiteral().isWellFormed() ) + throw new ExprEvalException("Not a well-formed cdt:Map literal: " + n); + + try { + return CompositeDatatypeMap.getValue( n.getLiteral() ); + } + catch ( final DatatypeFormatException ex ) { + throw new ExprEvalException("Not a well-formed cdt:Map literal: " + n, ex); + } + } + + /** + * Calls {@link #ensureListLiteral(Node)} first, and {@link #getList(Node)} + * afterwards. + */ + public static final List checkAndGetList( final Node n ) throws ExprEvalException { + ensureListLiteral(n); + return getList(n); + } + + /** + * Calls {@link #ensureMapLiteral(Node)} first, and {@link #getMap(Node)} + * afterwards. + */ + public static final Map checkAndGetMap( final Node n ) throws ExprEvalException { + ensureMapLiteral(n); + return getMap(n); + } + + public static final List checkAndGetList( final NodeValue nv ) throws ExprEvalException { + return checkAndGetList( nv.asNode() ); + } + + public static final Map checkAndGetMap( final NodeValue nv ) throws ExprEvalException { + return checkAndGetMap( nv.asNode() ); + } + + /** + * Creates a {@link NodeV} with a cdt:List literal that represents the + * given list. + */ + public static final Node createNode( final List list ) { + return NodeFactory.createLiteralByValue(list, CompositeDatatypeList.type); + } + + /** + * Creates a {@link Node} with a cdt:Map literal that represents the + * given map. + */ + public static final Node createNode( final Map map ) { + return NodeFactory.createLiteralByValue(map, CompositeDatatypeMap.type); + } + + /** + * Creates a {@link NodeValue} with a cdt:List literal that represents the + * given list. + */ + public static final NodeValue createNodeValue( final List list ) { + return NodeValue.makeNode( createNode(list) ); + } + + /** + * Creates a {@link NodeValue} with a cdt:Map literal that represents the + * given map. + */ + public static final NodeValue createNodeValue( final Map map ) { + return NodeValue.makeNode( createNode(map) ); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/CDTLiteralFunctions.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/CDTLiteralFunctions.java new file mode 100644 index 00000000000..35b2e78a78b --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/CDTLiteralFunctions.java @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import org.apache.jena.sparql.ARQConstants; +import org.apache.jena.sparql.function.FunctionRegistry; + +public class CDTLiteralFunctions { + public static void register( final FunctionRegistry functionRegistry ) { + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "concat", ConcatFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "contains", ContainsFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "containsKey", ContainsKeyFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "containsTerm", ContainsTermFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "get", GetFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "head", HeadFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "keys", KeysFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "List", ListFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "Map", MapFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "merge", MergeFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "put", PutFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "remove", RemoveFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "reverse", ReverseFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "size", SizeFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "subseq", SubSeqFct.class ); + functionRegistry.put( ARQConstants.CDTFunctionLibraryURI + "tail", TailFct.class ); + } +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ConcatFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ConcatFct.java new file mode 100644 index 00000000000..6a0dba23500 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ConcatFct.java @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.sparql.expr.ExprList; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionBase; + +public class ConcatFct extends FunctionBase +{ + @Override + public void checkBuild( final String uri, final ExprList args ) { + // nothing to check + } + + @Override + public NodeValue exec( final List args ) { + if ( args.isEmpty() ) { + final List result = Collections.emptyList(); + return CDTLiteralFunctionUtils.createNodeValue(result); + } + + if ( args.size() == 1 ) { + final NodeValue nv = args.get(0); + // make sure that the argument is a well-formed cdt:List literal + CDTLiteralFunctionUtils.checkAndGetList(nv); + + return nv; + } + + final List result = new ArrayList<>(); + for ( final NodeValue nv : args ) { + final List l = CDTLiteralFunctionUtils.checkAndGetList(nv); + result.addAll(l); + } + + return CDTLiteralFunctionUtils.createNodeValue(result); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ContainsFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ContainsFct.java new file mode 100644 index 00000000000..90aa9217a8c --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ContainsFct.java @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.List; + +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionBase2; + +public class ContainsFct extends FunctionBase2 +{ + @Override + public NodeValue exec( final NodeValue nv1, final NodeValue nv2 ) { + final List list = CDTLiteralFunctionUtils.checkAndGetList(nv1); + final boolean result = containsNode( list, nv2 ); + return NodeValue.booleanReturn(result); + } + + /** + * Returns true if the given list contains the given RDF term. + */ + protected boolean containsNode( final List list, final NodeValue nv ) { + for ( final CDTValue v : list ) { + if ( v.isNode() ) { + final NodeValue vv = NodeValue.makeNode( v.asNode() ); + if ( NodeValue.sameValueAs(vv, nv) ) { + return true; + } + } + } + + return false; + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ContainsKeyFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ContainsKeyFct.java new file mode 100644 index 00000000000..88a46fd2d08 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ContainsKeyFct.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.Map; + +import org.apache.jena.cdt.CDTFactory; +import org.apache.jena.cdt.CDTKey; +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.graph.Node; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionBase2; + +public class ContainsKeyFct extends FunctionBase2 +{ + @Override + public NodeValue exec( final NodeValue nv1, final NodeValue nv2 ) { + final Map map = CDTLiteralFunctionUtils.checkAndGetMap(nv1); + + final Node n2 = nv2.asNode(); + + // If the second argument is not an IRI or a literal, then it cannot be + // a map key in the given map and, by definition of cdt:containsKey, we + // have to return false. + if ( ! n2.isURI() && ! n2.isLiteral() ) + return NodeValue.booleanReturn(false); + + if ( map.isEmpty() ) + return NodeValue.booleanReturn(false); + + final CDTKey key = CDTFactory.createKey(n2); + final CDTValue value = map.get(key); + + return NodeValue.booleanReturn( value != null ); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ContainsTermFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ContainsTermFct.java new file mode 100644 index 00000000000..e5fc0421f49 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ContainsTermFct.java @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.List; + +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.expr.nodevalue.NodeFunctions; +import org.apache.jena.sparql.function.FunctionBase2; + +public class ContainsTermFct extends FunctionBase2 +{ + @Override + public NodeValue exec( final NodeValue nv1, final NodeValue nv2 ) { + final List list = CDTLiteralFunctionUtils.checkAndGetList(nv1); + final boolean result = containsTerm( list, nv2 ); + return NodeValue.booleanReturn(result); + } + + /** + * Returns true if the given list contains the given RDF term. + */ + protected boolean containsTerm( final List list, final NodeValue nv ) { + for ( final CDTValue v : list ) { + if ( v.isNode() ) { + if ( NodeFunctions.sameTerm(v.asNode(), nv.asNode()) ) { + return true; + } + } + } + + return false; + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/FunctionBase1List.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/FunctionBase1List.java new file mode 100644 index 00000000000..0b2af548103 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/FunctionBase1List.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.List; + +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionBase1; + +public abstract class FunctionBase1List extends FunctionBase1 +{ + @Override + public NodeValue exec( final NodeValue nv ) { + final List list = CDTLiteralFunctionUtils.checkAndGetList(nv); + return _exec(list, nv); + } + + protected abstract NodeValue _exec( List list, NodeValue nvList ); +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/GetFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/GetFct.java new file mode 100644 index 00000000000..24bcbfcfb50 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/GetFct.java @@ -0,0 +1,102 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.List; +import java.util.Map; + +import org.apache.jena.cdt.CDTFactory; +import org.apache.jena.cdt.CDTKey; +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.cdt.CompositeDatatypeList; +import org.apache.jena.cdt.CompositeDatatypeMap; +import org.apache.jena.graph.Node; +import org.apache.jena.sparql.expr.ExprEvalException; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionBase2; + +public class GetFct extends FunctionBase2 +{ + @Override + public NodeValue exec( final NodeValue nv1, final NodeValue nv2 ) { + final Node n1 = nv1.asNode(); + + if ( CompositeDatatypeList.isListLiteral(n1) ) + return getFromList(n1, nv2); + + if ( CompositeDatatypeMap.isMapLiteral(n1) ) + return getFromMap(n1, nv2); + + throw new ExprEvalException("Neither a list nor a map literal: " + nv1); + } + + protected NodeValue getFromList( final Node n1, final NodeValue nv2 ) { + if ( ! nv2.isInteger() ) + throw new ExprEvalException("Not an integer literal: " + nv2); + + final int index = nv2.getInteger().intValue(); + + if ( index < 1 ) + throw new ExprEvalException("Out of bounds index value: " + nv2); + + final List list = CDTLiteralFunctionUtils.getList(n1); + + if ( index > list.size() ) + throw new ExprEvalException("Out of bounds index value: " + nv2); + + final CDTValue value = list.get( index-1 ); + if ( value.isNull() ) { + throw new ExprEvalException("accessing null value from list" ); + } + else if ( value.isNode() ) { + return NodeValue.makeNode( value.asNode() ); + } + else { + throw new ExprEvalException("Unexpected type of CDTValue: " + value.getClass().getName() ); + } + } + + protected NodeValue getFromMap( final Node n1, final NodeValue nv2 ) { + final Node n2 = nv2.asNode(); + if ( ! n2.isURI() && ! n2.isLiteral() ) + throw new ExprEvalException("Not a valid map key: " + nv2); + + final Map map = CDTLiteralFunctionUtils.getMap(n1); + + if ( map.isEmpty() ) + throw new ExprEvalException("empty map"); + + final CDTKey key = CDTFactory.createKey(n2); + final CDTValue value = map.get(key); + + if ( value == null ) { + throw new ExprEvalException("key is not in the map"); + } + else if ( value.isNull() ) { + throw new ExprEvalException("value for key is in null"); + } + else if ( value.isNode() ) { + return NodeValue.makeNode( value.asNode() ); + } + else { + throw new ExprEvalException("Unexpected type of CDTValue: " + value.getClass().getName() ); + } + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/HeadFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/HeadFct.java new file mode 100644 index 00000000000..0eb1348f986 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/HeadFct.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.List; + +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.sparql.expr.ExprEvalException; +import org.apache.jena.sparql.expr.NodeValue; + +public class HeadFct extends FunctionBase1List +{ + @Override + protected NodeValue _exec( final List list, final NodeValue nvList ) { + if ( list.size() == 0 ) + throw new ExprEvalException("Empty list"); + + final CDTValue value = list.get(0); + if ( value.isNull() ) { + throw new ExprEvalException("accessing null value from list" ); + } + else if ( value.isNode() ) { + return NodeValue.makeNode( value.asNode() ); + } + else { + throw new ExprEvalException("Unexpected type of CDTValue: " + value.getClass().getName() ); + } + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/KeysFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/KeysFct.java new file mode 100644 index 00000000000..2c919eb9347 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/KeysFct.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.apache.jena.cdt.CDTFactory; +import org.apache.jena.cdt.CDTKey; +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionBase1; + +public class KeysFct extends FunctionBase1 +{ + @Override + public NodeValue exec( final NodeValue nv ) { + final Map map = CDTLiteralFunctionUtils.checkAndGetMap(nv); + + final List list = new ArrayList<>( map.size() ); + for ( final CDTKey key : map.keySet() ) { + final CDTValue value = CDTFactory.createValue( key.asNode() ); + list.add(value); + } + + return CDTLiteralFunctionUtils.createNodeValue(list); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ListFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ListFct.java new file mode 100644 index 00000000000..dc50559d9f2 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ListFct.java @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.jena.cdt.CDTFactory; +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.sparql.engine.binding.Binding; +import org.apache.jena.sparql.expr.Expr; +import org.apache.jena.sparql.expr.ExprException; +import org.apache.jena.sparql.expr.ExprList; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionBase; +import org.apache.jena.sparql.function.FunctionEnv; + +public class ListFct extends FunctionBase +{ + @Override + public void checkBuild( final String uri, final ExprList args ) { + // nothing to do here + } + + @Override + public NodeValue exec(Binding binding, ExprList args, String uri, FunctionEnv env) { + final List list = new ArrayList<>( args.size() ); + + for ( final Expr e : args ) { + CDTValue v; + try { + final NodeValue nv = e.eval(binding, env); + v = CDTFactory.createValue( nv.asNode() ); + } catch ( final ExprException ex ) { + v = CDTFactory.getNullValue(); + } + + list.add(v); + } + + return CDTLiteralFunctionUtils.createNodeValue(list); + } + + @Override + public NodeValue exec( final List args ) { + throw new IllegalStateException("should never end up here"); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/MapFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/MapFct.java new file mode 100644 index 00000000000..fec5c220524 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/MapFct.java @@ -0,0 +1,102 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.apache.jena.atlas.lib.Lib; +import org.apache.jena.cdt.CDTFactory; +import org.apache.jena.cdt.CDTKey; +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.graph.Node; +import org.apache.jena.query.QueryBuildException; +import org.apache.jena.sparql.engine.binding.Binding; +import org.apache.jena.sparql.expr.Expr; +import org.apache.jena.sparql.expr.ExprException; +import org.apache.jena.sparql.expr.ExprList; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionBase; +import org.apache.jena.sparql.function.FunctionEnv; + +public class MapFct extends FunctionBase +{ + @Override + public void checkBuild( final String uri, final ExprList args ) { + if ( args.size() % 2 == 1 ) + throw new QueryBuildException("Function '"+Lib.className(this)+"' takes an even number of arguments"); + } + + @Override + public NodeValue exec(Binding binding, ExprList args, String uri, FunctionEnv env) { + if ( args.size() % 2 == 1 ) + throw new ExprException("Function '"+Lib.className(this)+"' takes an even number of arguments"); + + final Map map = new HashMap<>(); + + final Iterator it = args.iterator(); + while ( it.hasNext() ) { + final Expr exprKey = it.next(); + final Expr exprValue = it.next(); + + final CDTKey key = getKey(exprKey, binding, env); + if ( key != null ) { + final CDTValue value = getValue(exprValue, binding, env); + map.put(key, value); + } + } + + return CDTLiteralFunctionUtils.createNodeValue(map); + } + + protected CDTKey getKey( final Expr e, final Binding binding, final FunctionEnv env ) { + final NodeValue nv; + try { + nv = e.eval(binding, env); + } catch ( final ExprException ex ) { + return null; + } + + final Node n = nv.asNode(); + if ( ! n.isURI() && ! n.isLiteral() ) + return null; + + return CDTFactory.createKey(n); + } + + protected CDTValue getValue( final Expr e, final Binding binding, final FunctionEnv env ) { + final NodeValue nv; + try { + nv = e.eval(binding, env); + } catch ( final ExprException ex ) { + return CDTFactory.getNullValue(); + } + + return CDTFactory.createValue( nv.asNode() ); + } + + + @Override + public NodeValue exec( final List args ) { + throw new IllegalStateException("should never end up here"); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/MergeFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/MergeFct.java new file mode 100644 index 00000000000..344f3117fae --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/MergeFct.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.jena.cdt.CDTKey; +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionBase2; + +public class MergeFct extends FunctionBase2 +{ + @Override + public NodeValue exec( final NodeValue nv1, final NodeValue nv2 ) { + final Map map1 = CDTLiteralFunctionUtils.checkAndGetMap(nv1); + final Map map2 = CDTLiteralFunctionUtils.checkAndGetMap(nv2); + + if ( map1.isEmpty() ) + return nv2; + + if ( map2.isEmpty() ) + return nv1; + + final Map newMap = new HashMap<>(map2); + newMap.putAll(map1); + + return CDTLiteralFunctionUtils.createNodeValue(newMap); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/PutFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/PutFct.java new file mode 100644 index 00000000000..428c000d5bb --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/PutFct.java @@ -0,0 +1,112 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.jena.atlas.lib.Lib; +import org.apache.jena.cdt.CDTFactory; +import org.apache.jena.cdt.CDTKey; +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.graph.Node; +import org.apache.jena.query.QueryBuildException; +import org.apache.jena.sparql.engine.binding.Binding; +import org.apache.jena.sparql.expr.ExprEvalException; +import org.apache.jena.sparql.expr.ExprException; +import org.apache.jena.sparql.expr.ExprList; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionBase; +import org.apache.jena.sparql.function.FunctionEnv; + +public class PutFct extends FunctionBase +{ + @Override + public void checkBuild( final String uri, final ExprList args ) { + if ( args.size() < 2 || args.size() > 3 ) + throw new QueryBuildException("Function '"+Lib.className(this)+"' takes two or three arguments"); + } + + @Override + public NodeValue exec(Binding binding, ExprList args, String uri, FunctionEnv env) { + if ( args.size() < 2 || args.size() > 3 ) + throw new ExprException("wrong number of arguments (" + args.size() + "), must be 2 or 3"); + + // check the second argument first because that's less expensive + final NodeValue nv2 = args.get(1).eval(binding, env); + final Node n2 = nv2.asNode(); + if ( ! n2.isURI() && ! n2.isLiteral() ) + throw new ExprEvalException("Not a valid map key: " + nv2); + + // now check the first argument + final NodeValue nv1 = args.get(0).eval(binding, env); + final Map map = CDTLiteralFunctionUtils.checkAndGetMap(nv1); + + final CDTKey key = CDTFactory.createKey(n2); + + // produce a map value from the third argument (if any) + final CDTValue newValue; + if ( args.size() == 2 ) { + newValue = CDTFactory.getNullValue(); + } + else { // in this case, we have that args.size() == 3 + NodeValue nv3 = null; + try { + nv3 = args.get(2).eval(binding, env); + } + catch ( final ExprException ex ) { + // nothing to do here + } + + if ( nv3 != null ) { + newValue = CDTFactory.createValue( nv3.asNode() ); + } + else { + newValue = CDTFactory.getNullValue(); + } + } + + // check if the given map already contains the exact same map entry + // if so, simply return the given cdt:Map literal + final CDTValue oldValue = map.get(key); + if ( oldValue != null ) { + if ( oldValue.isNull() && newValue.isNull() ) + return nv1; + + if ( ! oldValue.isNull() && ! newValue.isNull() ) { + final Node on = oldValue.asNode(); + final Node nn = newValue.asNode(); + if ( on.equals(nn) ) + return nv1; + } + } + + final Map newMap = new HashMap<>(map); + newMap.put(key, newValue); + + return CDTLiteralFunctionUtils.createNodeValue(newMap); + } + + @Override + public NodeValue exec( final List args ) { + throw new IllegalStateException("should never end up here"); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/RemoveFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/RemoveFct.java new file mode 100644 index 00000000000..b5df5a5a292 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/RemoveFct.java @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.jena.cdt.CDTFactory; +import org.apache.jena.cdt.CDTKey; +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.graph.Node; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionBase2; + +public class RemoveFct extends FunctionBase2 +{ + @Override + public NodeValue exec( final NodeValue nv1, final NodeValue nv2 ) { + final Map map = CDTLiteralFunctionUtils.checkAndGetMap(nv1); + + if ( map.isEmpty() ) + return nv1; + + final Node n2 = nv2.asNode(); + + // If the second term is not a map key (and the first term is a well- + // formed cdt:Map literal), the first term needs to be returned as is. + if ( ! n2.isURI() && ! n2.isLiteral() ) + return nv1; + + final CDTKey key = CDTFactory.createKey(n2); + + if ( ! map.containsKey(key) ) + return nv1; + + final Map newMap = new HashMap<>(map); + newMap.remove(key); + + return CDTLiteralFunctionUtils.createNodeValue(newMap); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ReverseFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ReverseFct.java new file mode 100644 index 00000000000..9b918036c72 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/ReverseFct.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.Arrays; +import java.util.List; + +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.sparql.expr.NodeValue; + +public class ReverseFct extends FunctionBase1List +{ + @Override + protected NodeValue _exec( final List list, final NodeValue nvList ) { + if ( list.size() < 2 ) + return nvList; + + final CDTValue[] reverseArray = new CDTValue[ list.size() ]; + int i = list.size() - 1; + for ( final CDTValue v : list ) { + reverseArray[i] = v; + i--; + } + + final List reverseList = Arrays.asList(reverseArray); + return CDTLiteralFunctionUtils.createNodeValue(reverseList); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/SizeFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/SizeFct.java new file mode 100644 index 00000000000..e0bb791c076 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/SizeFct.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import org.apache.jena.cdt.CompositeDatatypeList; +import org.apache.jena.cdt.CompositeDatatypeMap; +import org.apache.jena.graph.Node; +import org.apache.jena.sparql.expr.ExprEvalException; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionBase1; + +public class SizeFct extends FunctionBase1 +{ + @Override + public NodeValue exec( final NodeValue nv ) { + final Node n = nv.asNode(); + + final int size; + if ( CompositeDatatypeList.isListLiteral(n) ) { + size = CDTLiteralFunctionUtils.getList(n).size(); + } + else if ( CompositeDatatypeMap.isMapLiteral(n) ) { + size = CDTLiteralFunctionUtils.getMap(n).size(); + } + else { + throw new ExprEvalException("Neither a list nor a map literal: " + nv); + } + + return NodeValue.makeInteger(size); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/SubSeqFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/SubSeqFct.java new file mode 100644 index 00000000000..e508185c7dc --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/SubSeqFct.java @@ -0,0 +1,101 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.Collections; +import java.util.List; + +import org.apache.jena.atlas.lib.Lib; +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.graph.Node; +import org.apache.jena.query.QueryBuildException; +import org.apache.jena.sparql.expr.ExprEvalException; +import org.apache.jena.sparql.expr.ExprList; +import org.apache.jena.sparql.expr.NodeValue; +import org.apache.jena.sparql.function.FunctionBase; + +public class SubSeqFct extends FunctionBase +{ + @Override + public void checkBuild( final String uri, final ExprList args ) { + if ( args.size() < 2 || args.size() > 3 ) + throw new QueryBuildException("Function '"+Lib.className(this)+"' takes two or three arguments"); + } + + @Override + public NodeValue exec( final List args ) { + final NodeValue nv1 = args.get(0); + final Node n1 = nv1.asNode(); + + CDTLiteralFunctionUtils.ensureListLiteral(n1); + + final NodeValue nv2 = args.get(1); + + if ( ! nv2.isInteger() ) + throw new ExprEvalException("Not an integer literal: " + nv2); + + final int index = nv2.getInteger().intValue(); + + if ( index < 1 ) + throw new ExprEvalException("Out of bounds index value: " + nv2); + + final int length; + final List list; + if ( args.size() == 3 ) { + final NodeValue nv3 = args.get(2); + + if ( ! nv3.isInteger() ) + throw new ExprEvalException("Not an integer literal: " + nv3); + + length = nv3.getInteger().intValue(); + + if ( length < 0 ) + throw new ExprEvalException("Illegal length value: " + nv3); + + list = CDTLiteralFunctionUtils.getList(n1); + } + else { + list = CDTLiteralFunctionUtils.getList(n1); + length = list.size() - index + 1; + } + + if ( index > list.size() + 1 ) + throw new ExprEvalException("Out of bounds index value: " + nv2); + + if ( index + length > list.size() + 1 ) + throw new ExprEvalException("Beyond list length (index: " + index + ", length: " + length + ")"); + + final List sublist; + if ( index == list.size() + 1 ) { + if ( length != 0 ) + throw new ExprEvalException("Illegal arguments (index: " + index + ", length: " + length + ")"); + + if ( list.isEmpty() ) + return nv1; + + sublist = Collections.emptyList(); + } + else { + sublist = list.subList( index - 1, index - 1 + length ); + } + + return CDTLiteralFunctionUtils.createNodeValue(sublist); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/TailFct.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/TailFct.java new file mode 100644 index 00000000000..aee058e6586 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/library/cdt/TailFct.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.function.library.cdt; + +import java.util.List; + +import org.apache.jena.cdt.CDTValue; +import org.apache.jena.sparql.expr.ExprEvalException; +import org.apache.jena.sparql.expr.NodeValue; + +public class TailFct extends FunctionBase1List +{ + @Override + protected NodeValue _exec( final List list, final NodeValue nvList ) { + if ( list.size() == 0 ) + throw new ExprEvalException("Empty list"); + + final List sublist = list.subList( 1, list.size() ); + return CDTLiteralFunctionUtils.createNodeValue(sublist); + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/lang/SyntaxVarScope.java b/jena-arq/src/main/java/org/apache/jena/sparql/lang/SyntaxVarScope.java index 5e0690ad151..dea4f3b3029 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/SyntaxVarScope.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/SyntaxVarScope.java @@ -223,6 +223,7 @@ public static class VarScopeChecker extends ElementVisitorBase { @Override public void visit(ElementGroup el) { // BIND scope rules + // UNFOLD scope rules // (and service warning) for ( int i = 0 ; i < el.size() ; i++ ) { @@ -232,6 +233,10 @@ public void visit(ElementGroup el) { Collection accScope = calcScopeAll(el.getElements(), i); checkBIND(accScope, eltBind); } + if ( e instanceof ElementUnfold ) { + Collection accScope = calcScopeAll(el.getElements(), i); + checkUNFOLD(accScope, (ElementUnfold)e); + } if ( e instanceof ElementService eltSvc ) { Collection accScope = calcScopeAll(el.getElements(), i); checkSERVICE(accScope, eltSvc); @@ -264,6 +269,18 @@ private static void checkBIND(Collection scope, ElementBind el) { checkExpr(scope, el.getExpr(), var); } + private static void checkUNFOLD(Collection scope, ElementUnfold el) { + Var var1 = el.getVar1(); + if ( scope.contains(var1) ) + throw new QueryParseException("UNFOLD: Variable used when already in-scope: " + var1 + " in " + el, -1, -1); + + Var var2 = el.getVar2(); + if ( var2 != null && scope.contains(var2) ) + throw new QueryParseException("UNFOLD: Variable used when already in-scope: " + var2 + " in " + el, -1, -1); + + checkExpr(scope, el.getExpr(), var1); + } + private static void checkSERVICE(Collection scope, ElementService el) { if ( ARQ.isStrictMode() && el.getServiceNode().isVariable() ) { Var var = Var.alloc(el.getServiceNode()); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParser.java b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParser.java index 30e9f835b66..9d1009042ce 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParser.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParser.java @@ -1,4 +1,3 @@ -/* ARQParser.java */ /* Generated By:JavaCC: Do not edit this line. ARQParser.java */ package org.apache.jena.sparql.lang.arq ; import org.apache.jena.graph.* ; @@ -12,122 +11,116 @@ import org.apache.jena.update.* ; import org.apache.jena.sparql.modify.request.* ; import org.apache.jena.sparql.core.Quad ; +import java.util.List; +import java.util.ArrayList; @SuppressWarnings("all") public class ARQParser extends ARQParserBase implements ARQParserConstants { final public void QueryUnit() throws ParseException { ByteOrderMark(); -startQuery() ; + startQuery() ; Query(); jj_consume_token(0); -finishQuery() ; -} + finishQuery() ; + } final public void Query() throws ParseException { Prologue(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SELECT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SELECT: SelectQuery(); break; - } - case CONSTRUCT:{ + case CONSTRUCT: ConstructQuery(); break; - } - case DESCRIBE:{ + case DESCRIBE: DescribeQuery(); break; - } - case ASK:{ + case ASK: AskQuery(); break; - } - case JSON:{ + case JSON: JsonQuery(); break; - } default: jj_la1[0] = jj_gen; jj_consume_token(-1); throw new ParseException(); } ValuesClause(); -} + } final public void UpdateUnit() throws ParseException { ByteOrderMark(); -startUpdateRequest() ; + startUpdateRequest() ; Update(); jj_consume_token(0); -finishUpdateRequest() ; -} + finishUpdateRequest() ; + } final public void ByteOrderMark() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case BOM:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case BOM: jj_consume_token(BOM); break; - } default: jj_la1[1] = jj_gen; ; } -} + } final public void Prologue() throws ParseException { label_1: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case BASE: - case PREFIX:{ + case PREFIX: ; break; - } default: jj_la1[2] = jj_gen; break label_1; } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case BASE:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case BASE: BaseDecl(); break; - } - case PREFIX:{ + case PREFIX: PrefixDecl(); break; - } default: jj_la1[3] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } -} + } - final public void BaseDecl() throws ParseException {Token t ; String iri ; + final public void BaseDecl() throws ParseException { + Token t ; String iri ; t = jj_consume_token(BASE); iri = IRIREF(); -setBase(iri, t.beginLine, t.beginColumn ) ; -} + setBase(iri, t.beginLine, t.beginColumn ) ; + } - final public void PrefixDecl() throws ParseException {Token t ; String iri ; + final public void PrefixDecl() throws ParseException { + Token t ; String iri ; jj_consume_token(PREFIX); t = jj_consume_token(PNAME_NS); iri = IRIREF(); -String s = fixupPrefix(t.image, t.beginLine, t.beginColumn); + String s = fixupPrefix(t.image, t.beginLine, t.beginColumn); setPrefix(s, iri, t.beginLine, t.beginColumn) ; -} + } final public void SelectQuery() throws ParseException { SelectClause(); label_2: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case FROM:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case FROM: ; break; - } default: jj_la1[4] = jj_gen; break label_2; @@ -136,45 +129,43 @@ final public void SelectQuery() throws ParseException { } WhereClause(); SolutionModifier(); -} + } final public void SubSelect() throws ParseException { SelectClause(); WhereClause(); SolutionModifier(); ValuesClause(); -} + } - final public void SelectClause() throws ParseException {Var v ; Expr expr ; Node n ; + final public void SelectClause() throws ParseException { + Var v ; Expr expr ; Node n ; jj_consume_token(SELECT); -getQuery().setQuerySelectType() ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + getQuery().setQuerySelectType() ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DISTINCT: - case REDUCED:{ - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + case REDUCED: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -getQuery().setDistinct(true); + getQuery().setDistinct(true); break; - } - case REDUCED:{ + case REDUCED: jj_consume_token(REDUCED); -getQuery().setReduced(true); + getQuery().setReduced(true); break; - } default: jj_la1[5] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } default: jj_la1[6] = jj_gen; ; } -setAllowAggregatesInExpressions(true) ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + setAllowAggregatesInExpressions(true) ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -201,6 +192,7 @@ final public void SubSelect() throws ParseException { case VARIANCE: case VAR_SAMP: case VAR_POP: + case FOLD: case SAMPLE: case GROUP_CONCAT: case BOUND: @@ -275,16 +267,15 @@ final public void SubSelect() throws ParseException { case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: - case LPAREN:{ + case LPAREN: label_3: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VAR1: - case VAR2:{ + case VAR2: v = Var(); -getQuery().addResultVar(v) ; + getQuery().addResultVar(v) ; break; - } case IRIref: case PNAME_NS: case PNAME_LN: @@ -309,6 +300,7 @@ final public void SubSelect() throws ParseException { case VARIANCE: case VAR_SAMP: case VAR_POP: + case FOLD: case SAMPLE: case GROUP_CONCAT: case BOUND: @@ -382,27 +374,25 @@ final public void SubSelect() throws ParseException { case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: - case STRING_LITERAL_LONG2:{ + case STRING_LITERAL_LONG2: if (jj_2_1(2)) { expr = BuiltInCall(); -getQuery().addResultVar((Var)null, expr) ; + getQuery().addResultVar((Var)null, expr) ; } else { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: expr = FunctionCall(); -getQuery().addResultVar((Var)null, expr) ; + getQuery().addResultVar((Var)null, expr) ; break; - } case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: - case STRING_LITERAL_LONG2:{ + case STRING_LITERAL_LONG2: n = RDFLiteral(); -getQuery().addResultVar((Var)null, NodeValue.makeNode(n)) ; + getQuery().addResultVar((Var)null, NodeValue.makeNode(n)) ; break; - } case INTEGER: case DECIMAL: case DOUBLE: @@ -411,17 +401,15 @@ final public void SubSelect() throws ParseException { case DOUBLE_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL_NEGATIVE: - case DOUBLE_NEGATIVE:{ + case DOUBLE_NEGATIVE: n = NumericLiteral(); -getQuery().addResultVar((Var)null, NodeValue.makeNode(n)) ; + getQuery().addResultVar((Var)null, NodeValue.makeNode(n)) ; break; - } case TRUE: - case FALSE:{ + case FALSE: n = BooleanLiteral(); -getQuery().addResultVar((Var)null, NodeValue.makeNode(n)) ; + getQuery().addResultVar((Var)null, NodeValue.makeNode(n)) ; break; - } default: jj_la1[7] = jj_gen; jj_consume_token(-1); @@ -429,32 +417,29 @@ final public void SubSelect() throws ParseException { } } break; - } - case LPAREN:{ -v = null ; + case LPAREN: + v = null ; jj_consume_token(LPAREN); expr = Expression(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case AS:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case AS: jj_consume_token(AS); v = Var(); break; - } default: jj_la1[8] = jj_gen; ; } jj_consume_token(RPAREN); -getQuery().addResultVar(v, expr) ; -getQuery().setQueryResultStar(false) ; + getQuery().addResultVar(v, expr) ; + getQuery().setQueryResultStar(false) ; break; - } default: jj_la1[9] = jj_gen; jj_consume_token(-1); throw new ParseException(); } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -481,6 +466,7 @@ final public void SubSelect() throws ParseException { case VARIANCE: case VAR_SAMP: case VAR_POP: + case FOLD: case SAMPLE: case GROUP_CONCAT: case BOUND: @@ -555,45 +541,42 @@ final public void SubSelect() throws ParseException { case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: - case LPAREN:{ + case LPAREN: ; break; - } default: jj_la1[10] = jj_gen; break label_3; } } break; - } - case STAR:{ + case STAR: jj_consume_token(STAR); -getQuery().setQueryResultStar(true) ; + getQuery().setQueryResultStar(true) ; break; - } default: jj_la1[11] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -setAllowAggregatesInExpressions(false) ; -} + setAllowAggregatesInExpressions(false) ; + } - final public void ConstructQuery() throws ParseException {Template t ; + final public void ConstructQuery() throws ParseException { + Template t ; QuadAcc acc = new QuadAcc() ; jj_consume_token(CONSTRUCT); -getQuery().setQueryConstructType() ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case LBRACE:{ + getQuery().setQueryConstructType() ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACE: t = ConstructTemplate(); -getQuery().setConstructTemplate(t) ; + getQuery().setConstructTemplate(t) ; label_4: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case FROM:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case FROM: ; break; - } default: jj_la1[12] = jj_gen; break label_4; @@ -603,16 +586,14 @@ final public void SubSelect() throws ParseException { WhereClause(); SolutionModifier(); break; - } case FROM: - case WHERE:{ + case WHERE: label_5: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case FROM:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case FROM: ; break; - } default: jj_la1[13] = jj_gen; break label_5; @@ -624,54 +605,51 @@ final public void SubSelect() throws ParseException { ConstructQuads(acc); jj_consume_token(RBRACE); SolutionModifier(); -t = new Template(acc) ; + t = new Template(acc) ; getQuery().setConstructTemplate(t) ; ElementGroup elg = createQueryPattern(t); getQuery().setQueryPattern(elg) ; break; - } default: jj_la1[14] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -} + } - final public void DescribeQuery() throws ParseException {Node n ; + final public void DescribeQuery() throws ParseException { + Node n ; jj_consume_token(DESCRIBE); -getQuery().setQueryDescribeType() ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + getQuery().setQueryDescribeType() ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: case VAR1: - case VAR2:{ + case VAR2: label_6: while (true) { n = VarOrIri(); -getQuery().addDescribeNode(n) ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + getQuery().addDescribeNode(n) ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: case VAR1: - case VAR2:{ + case VAR2: ; break; - } default: jj_la1[15] = jj_gen; break label_6; } } -getQuery().setQueryResultStar(false) ; + getQuery().setQueryResultStar(false) ; break; - } - case STAR:{ + case STAR: jj_consume_token(STAR); -getQuery().setQueryResultStar(true) ; + getQuery().setQueryResultStar(true) ; break; - } default: jj_la1[16] = jj_gen; jj_consume_token(-1); @@ -679,40 +657,37 @@ final public void SubSelect() throws ParseException { } label_7: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case FROM:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case FROM: ; break; - } default: jj_la1[17] = jj_gen; break label_7; } DatasetClause(); } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WHERE: - case LBRACE:{ + case LBRACE: WhereClause(); break; - } default: jj_la1[18] = jj_gen; ; } SolutionModifier(); -} + } final public void AskQuery() throws ParseException { jj_consume_token(ASK); -getQuery().setQueryAskType() ; + getQuery().setQueryAskType() ; label_8: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case FROM:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case FROM: ; break; - } default: jj_la1[19] = jj_gen; break label_8; @@ -721,17 +696,16 @@ final public void AskQuery() throws ParseException { } WhereClause(); SolutionModifier(); -} + } final public void JsonQuery() throws ParseException { JsonClause(); label_9: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case FROM:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case FROM: ; break; - } default: jj_la1[20] = jj_gen; break label_9; @@ -740,20 +714,19 @@ final public void JsonQuery() throws ParseException { } WhereClause(); SolutionModifier(); -} + } final public void JsonClause() throws ParseException { jj_consume_token(JSON); -getQuery().setQueryJsonType() ; + getQuery().setQueryJsonType() ; jj_consume_token(LBRACE); JsonObjectMember(); label_10: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case COMMA:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: ; break; - } default: jj_la1[21] = jj_gen; break label_10; @@ -762,28 +735,27 @@ final public void JsonClause() throws ParseException { JsonObjectMember(); } jj_consume_token(RBRACE); -} + } - final public void JsonObjectMember() throws ParseException {Node o ; String s ; Token t; + final public void JsonObjectMember() throws ParseException { + Node o ; String s ; Token t; s = String(); t = jj_consume_token(PNAME_NS); -if ( ! t.image.equals(":") ) + if ( ! t.image.equals(":") ) throwParseException("Prefix name expression not legal at this point : "+t.image, t.beginLine, t.beginColumn) ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VAR1: - case VAR2:{ + case VAR2: o = Var(); -getQuery().addResultVar((Var)o) ; getQuery().addJsonMapping(s, o) ; + getQuery().addResultVar((Var)o) ; getQuery().addJsonMapping(s, o) ; break; - } case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: - case STRING_LITERAL_LONG2:{ + case STRING_LITERAL_LONG2: o = RDFLiteral(); -getQuery().addResultVar(s, NodeValue.makeNode(o)) ; getQuery().addJsonMapping(s, o) ; + getQuery().addResultVar(s, NodeValue.makeNode(o)) ; getQuery().addJsonMapping(s, o) ; break; - } case INTEGER: case DECIMAL: case DOUBLE: @@ -792,116 +764,111 @@ final public void JsonClause() throws ParseException { case DOUBLE_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL_NEGATIVE: - case DOUBLE_NEGATIVE:{ + case DOUBLE_NEGATIVE: o = NumericLiteral(); -getQuery().addResultVar(s, NodeValue.makeNode(o)) ; getQuery().addJsonMapping(s, o) ; + getQuery().addResultVar(s, NodeValue.makeNode(o)) ; getQuery().addJsonMapping(s, o) ; break; - } case TRUE: - case FALSE:{ + case FALSE: o = BooleanLiteral(); -getQuery().addResultVar(s, NodeValue.makeNode(o)) ; getQuery().addJsonMapping(s, o) ; + getQuery().addResultVar(s, NodeValue.makeNode(o)) ; getQuery().addJsonMapping(s, o) ; break; - } default: jj_la1[22] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -} + } final public void DatasetClause() throws ParseException { jj_consume_token(FROM); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: DefaultGraphClause(); break; - } - case NAMED:{ + case NAMED: NamedGraphClause(); break; - } default: jj_la1[23] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -} + } - final public void DefaultGraphClause() throws ParseException {String iri ; + final public void DefaultGraphClause() throws ParseException { + String iri ; iri = SourceSelector(); -getQuery().addGraphURI(iri) ; -} + getQuery().addGraphURI(iri) ; + } - final public void NamedGraphClause() throws ParseException {String iri ; + final public void NamedGraphClause() throws ParseException { + String iri ; jj_consume_token(NAMED); iri = SourceSelector(); -getQuery().addNamedGraphURI(iri) ; -} + getQuery().addNamedGraphURI(iri) ; + } - final public String SourceSelector() throws ParseException {String iri ; + final public String SourceSelector() throws ParseException { + String iri ; iri = iri(); -{if ("" != null) return iri ;} + {if (true) return iri ;} throw new Error("Missing return statement in function"); -} + } - final public void WhereClause() throws ParseException {Element el ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case WHERE:{ + final public void WhereClause() throws ParseException { + Element el ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case WHERE: jj_consume_token(WHERE); break; - } default: jj_la1[24] = jj_gen; ; } -startWherePattern() ; + startWherePattern() ; el = GroupGraphPattern(); -getQuery().setQueryPattern(el) ; -finishWherePattern() ; -} + getQuery().setQueryPattern(el) ; + finishWherePattern() ; + } final public void SolutionModifier() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case GROUP:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case GROUP: GroupClause(); break; - } default: jj_la1[25] = jj_gen; ; } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case HAVING:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case HAVING: HavingClause(); break; - } default: jj_la1[26] = jj_gen; ; } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case ORDER:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ORDER: OrderClause(); break; - } default: jj_la1[27] = jj_gen; ; } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LIMIT: - case OFFSET:{ + case OFFSET: LimitOffsetClauses(); break; - } default: jj_la1[28] = jj_gen; ; } -} + } final public void GroupClause() throws ParseException { jj_consume_token(GROUP); @@ -909,7 +876,7 @@ final public void GroupClause() throws ParseException { label_11: while (true) { GroupCondition(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -936,6 +903,7 @@ final public void GroupClause() throws ParseException { case VARIANCE: case VAR_SAMP: case VAR_POP: + case FOLD: case SAMPLE: case GROUP_CONCAT: case BOUND: @@ -995,19 +963,19 @@ final public void GroupClause() throws ParseException { case SHA256: case SHA384: case SHA512: - case LPAREN:{ + case LPAREN: ; break; - } default: jj_la1[29] = jj_gen; break label_11; } } -} + } - final public void GroupCondition() throws ParseException {Var v = null ; Expr expr = null ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public void GroupCondition() throws ParseException { + Var v = null ; Expr expr = null ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TRIPLE: case IS_TRIPLE: case SUBJECT: @@ -1029,6 +997,7 @@ final public void GroupClause() throws ParseException { case VARIANCE: case VAR_SAMP: case VAR_POP: + case FOLD: case SAMPLE: case GROUP_CONCAT: case BOUND: @@ -1087,55 +1056,50 @@ final public void GroupClause() throws ParseException { case SHA1: case SHA256: case SHA384: - case SHA512:{ + case SHA512: expr = BuiltInCall(); -getQuery().addGroupBy((Var)null, expr) ; + getQuery().addGroupBy((Var)null, expr) ; break; - } case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: expr = FunctionCall(); -getQuery().addGroupBy((Var)null, expr) ; + getQuery().addGroupBy((Var)null, expr) ; break; - } - case LPAREN:{ + case LPAREN: jj_consume_token(LPAREN); expr = Expression(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case AS:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case AS: jj_consume_token(AS); v = Var(); break; - } default: jj_la1[30] = jj_gen; ; } jj_consume_token(RPAREN); -getQuery().addGroupBy(v ,expr) ; + getQuery().addGroupBy(v ,expr) ; break; - } case VAR1: - case VAR2:{ + case VAR2: v = Var(); -getQuery().addGroupBy(v) ; + getQuery().addGroupBy(v) ; break; - } default: jj_la1[31] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -} + } final public void HavingClause() throws ParseException { -setAllowAggregatesInExpressions(true) ; + setAllowAggregatesInExpressions(true) ; jj_consume_token(HAVING); label_12: while (true) { HavingCondition(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -1160,6 +1124,7 @@ final public void HavingClause() throws ParseException { case VARIANCE: case VAR_SAMP: case VAR_POP: + case FOLD: case SAMPLE: case GROUP_CONCAT: case BOUND: @@ -1219,31 +1184,31 @@ final public void HavingClause() throws ParseException { case SHA256: case SHA384: case SHA512: - case LPAREN:{ + case LPAREN: ; break; - } default: jj_la1[32] = jj_gen; break label_12; } } -setAllowAggregatesInExpressions(false) ; -} + setAllowAggregatesInExpressions(false) ; + } - final public void HavingCondition() throws ParseException {Expr c ; + final public void HavingCondition() throws ParseException { + Expr c ; c = Constraint(); -getQuery().addHavingCondition(c) ; -} + getQuery().addHavingCondition(c) ; + } final public void OrderClause() throws ParseException { -setAllowAggregatesInExpressions(true) ; + setAllowAggregatesInExpressions(true) ; jj_consume_token(ORDER); jj_consume_token(BY); label_13: while (true) { OrderCondition(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -1272,6 +1237,7 @@ final public void OrderClause() throws ParseException { case VARIANCE: case VAR_SAMP: case VAR_POP: + case FOLD: case SAMPLE: case GROUP_CONCAT: case BOUND: @@ -1331,34 +1297,32 @@ final public void OrderClause() throws ParseException { case SHA256: case SHA384: case SHA512: - case LPAREN:{ + case LPAREN: ; break; - } default: jj_la1[33] = jj_gen; break label_13; } } -setAllowAggregatesInExpressions(false) ; -} + setAllowAggregatesInExpressions(false) ; + } - final public void OrderCondition() throws ParseException {int direction = 0 ; Expr expr = null ; Node v = null ; -direction = Query.ORDER_DEFAULT ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public void OrderCondition() throws ParseException { + int direction = 0 ; Expr expr = null ; Node v = null ; + direction = Query.ORDER_DEFAULT ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case ASC: - case DESC:{ - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case ASC:{ + case DESC: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ASC: jj_consume_token(ASC); -direction = Query.ORDER_ASCENDING ; + direction = Query.ORDER_ASCENDING ; break; - } - case DESC:{ + case DESC: jj_consume_token(DESC); -direction = Query.ORDER_DESCENDING ; + direction = Query.ORDER_DESCENDING ; break; - } default: jj_la1[34] = jj_gen; jj_consume_token(-1); @@ -1366,7 +1330,6 @@ final public void OrderClause() throws ParseException { } expr = BrackettedExpression(); break; - } case IRIref: case PNAME_NS: case PNAME_LN: @@ -1393,6 +1356,7 @@ final public void OrderClause() throws ParseException { case VARIANCE: case VAR_SAMP: case VAR_POP: + case FOLD: case SAMPLE: case GROUP_CONCAT: case BOUND: @@ -1452,8 +1416,8 @@ final public void OrderClause() throws ParseException { case SHA256: case SHA384: case SHA512: - case LPAREN:{ - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -1478,6 +1442,7 @@ final public void OrderClause() throws ParseException { case VARIANCE: case VAR_SAMP: case VAR_POP: + case FOLD: case SAMPLE: case GROUP_CONCAT: case BOUND: @@ -1537,546 +1502,743 @@ final public void OrderClause() throws ParseException { case SHA256: case SHA384: case SHA512: - case LPAREN:{ + case LPAREN: expr = Constraint(); break; - } case VAR1: - case VAR2:{ + case VAR2: v = Var(); break; - } default: jj_la1[35] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } default: jj_la1[36] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -if ( v == null ) + if ( v == null ) getQuery().addOrderBy(expr, direction) ; else getQuery().addOrderBy(v, direction) ; -} + } - final public void LimitOffsetClauses() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case LIMIT:{ - LimitClause(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case OFFSET:{ - OffsetClause(); - break; - } - default: - jj_la1[37] = jj_gen; - ; - } - break; - } - case OFFSET:{ - OffsetClause(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case LIMIT:{ - LimitClause(); + final public SortCondition OrderConditionForAggregationFunction() throws ParseException { + int direction = 0 ; Expr expr = null ; Node v = null ; + direction = Query.ORDER_DEFAULT ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ASC: + case DESC: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ASC: + jj_consume_token(ASC); + direction = Query.ORDER_ASCENDING ; break; - } - default: - jj_la1[38] = jj_gen; - ; - } - break; - } - default: - jj_la1[39] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } -} - - final public void LimitClause() throws ParseException {Token t ; - jj_consume_token(LIMIT); - t = jj_consume_token(INTEGER); -getQuery().setLimit(integerValue(t.image)) ; -} - - final public void OffsetClause() throws ParseException {Token t ; - jj_consume_token(OFFSET); - t = jj_consume_token(INTEGER); -getQuery().setOffset(integerValue(t.image)) ; -} - - final public void ValuesClause() throws ParseException {Token t ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case VALUES:{ - t = jj_consume_token(VALUES); -startValuesClause(t.beginLine, t.beginColumn) ; - DataBlock(); -finishValuesClause(t.beginLine, t.beginColumn) ; - break; - } - default: - jj_la1[40] = jj_gen; - ; - } -} - - final public void Update() throws ParseException { - Prologue(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case INSERT: - case DELETE: - case INSERT_DATA: - case DELETE_DATA: - case DELETE_WHERE: - case LOAD: - case CLEAR: - case CREATE: - case ADD: - case MOVE: - case COPY: - case DROP: - case WITH:{ - Update1(); - label_14: - while (true) { - if (jj_2_2(2147483647)) { - ; - } else { - break label_14; - } - jj_consume_token(SEMICOLON); - Prologue(); - Update1(); - } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SEMICOLON:{ - jj_consume_token(SEMICOLON); - Prologue(); + case DESC: + jj_consume_token(DESC); + direction = Query.ORDER_DESCENDING ; break; - } default: - jj_la1[41] = jj_gen; - ; - } - break; - } - default: - jj_la1[42] = jj_gen; - ; - } -} - - final public void Update1() throws ParseException {Update up = null ; -startUpdateOperation() ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case LOAD:{ - up = Load(); - break; - } - case CLEAR:{ - up = Clear(); - break; - } - case DROP:{ - up = Drop(); - break; - } - case ADD:{ - up = Add(); - break; - } - case MOVE:{ - up = Move(); - break; - } - case COPY:{ - up = Copy(); - break; - } - case CREATE:{ - up = Create(); - break; - } - case DELETE_WHERE:{ - up = DeleteWhere(); - break; - } - case INSERT: - case DELETE: - case WITH:{ - up = Modify(); - break; - } - case INSERT_DATA:{ - InsertData(); - break; - } - case DELETE_DATA:{ - DeleteData(); - break; - } - default: - jj_la1[43] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } -if (null != up) emitUpdate(up) ; - finishUpdateOperation() ; -} - - final public Update Load() throws ParseException {String url ; Node dest = null ; boolean silent = false ; - jj_consume_token(LOAD); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SILENT:{ - jj_consume_token(SILENT); -silent = true ; - break; + jj_la1[37] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); } - default: - jj_la1[44] = jj_gen; - ; - } - url = iri(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case INTO:{ - jj_consume_token(INTO); - dest = GraphRef(); + expr = BrackettedExpression(); break; + case IRIref: + case PNAME_NS: + case PNAME_LN: + case VAR1: + case VAR2: + case TRIPLE: + case IS_TRIPLE: + case SUBJECT: + case PREDICATE: + case OBJECT: + case EXISTS: + case NOT: + case AGG: + case COUNT: + case MIN: + case MAX: + case SUM: + case AVG: + case MEDIAN: + case MODE: + case STDEV: + case STDEV_SAMP: + case STDEV_POP: + case VARIANCE: + case VAR_SAMP: + case VAR_POP: + case FOLD: + case SAMPLE: + case GROUP_CONCAT: + case BOUND: + case COALESCE: + case IF: + case BNODE: + case IRI: + case URI: + case CALL: + case STR: + case STRLANG: + case STRDT: + case DTYPE: + case LANG: + case LANGMATCHES: + case IS_URI: + case IS_IRI: + case IS_BLANK: + case IS_LITERAL: + case IS_NUMERIC: + case REGEX: + case SAME_TERM: + case RAND: + case ABS: + case CEIL: + case FLOOR: + case ROUND: + case MOD: + case IDIV: + case CONCAT: + case SUBSTR: + case STRLEN: + case REPLACE: + case UCASE: + case LCASE: + case ENCODE_FOR_URI: + case CONTAINS: + case STRSTARTS: + case STRENDS: + case STRBEFORE: + case STRAFTER: + case YEAR: + case MONTH: + case DAY: + case HOURS: + case MINUTES: + case SECONDS: + case TIMEZONE: + case TZ: + case ADJUST: + case NOW: + case UUID: + case STRUUID: + case VERSION: + case MD5: + case SHA1: + case SHA256: + case SHA384: + case SHA512: + case LPAREN: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IRIref: + case PNAME_NS: + case PNAME_LN: + case TRIPLE: + case IS_TRIPLE: + case SUBJECT: + case PREDICATE: + case OBJECT: + case EXISTS: + case NOT: + case AGG: + case COUNT: + case MIN: + case MAX: + case SUM: + case AVG: + case MEDIAN: + case MODE: + case STDEV: + case STDEV_SAMP: + case STDEV_POP: + case VARIANCE: + case VAR_SAMP: + case VAR_POP: + case FOLD: + case SAMPLE: + case GROUP_CONCAT: + case BOUND: + case COALESCE: + case IF: + case BNODE: + case IRI: + case URI: + case CALL: + case STR: + case STRLANG: + case STRDT: + case DTYPE: + case LANG: + case LANGMATCHES: + case IS_URI: + case IS_IRI: + case IS_BLANK: + case IS_LITERAL: + case IS_NUMERIC: + case REGEX: + case SAME_TERM: + case RAND: + case ABS: + case CEIL: + case FLOOR: + case ROUND: + case MOD: + case IDIV: + case CONCAT: + case SUBSTR: + case STRLEN: + case REPLACE: + case UCASE: + case LCASE: + case ENCODE_FOR_URI: + case CONTAINS: + case STRSTARTS: + case STRENDS: + case STRBEFORE: + case STRAFTER: + case YEAR: + case MONTH: + case DAY: + case HOURS: + case MINUTES: + case SECONDS: + case TIMEZONE: + case TZ: + case ADJUST: + case NOW: + case UUID: + case STRUUID: + case VERSION: + case MD5: + case SHA1: + case SHA256: + case SHA384: + case SHA512: + case LPAREN: + expr = Constraint(); + break; + case VAR1: + case VAR2: + v = Var(); + break; + default: + jj_la1[38] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + default: + jj_la1[39] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + if ( v == null ) + {if (true) return new SortCondition(expr, direction) ;} + else + {if (true) return new SortCondition(v, direction) ;} + throw new Error("Missing return statement in function"); + } + + final public void LimitOffsetClauses() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LIMIT: + LimitClause(); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case OFFSET: + OffsetClause(); + break; + default: + jj_la1[40] = jj_gen; + ; } + break; + case OFFSET: + OffsetClause(); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LIMIT: + LimitClause(); + break; + default: + jj_la1[41] = jj_gen; + ; + } + break; + default: + jj_la1[42] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void LimitClause() throws ParseException { + Token t ; + jj_consume_token(LIMIT); + t = jj_consume_token(INTEGER); + getQuery().setLimit(integerValue(t.image)) ; + } + + final public void OffsetClause() throws ParseException { + Token t ; + jj_consume_token(OFFSET); + t = jj_consume_token(INTEGER); + getQuery().setOffset(integerValue(t.image)) ; + } + + final public void ValuesClause() throws ParseException { + Token t ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case VALUES: + t = jj_consume_token(VALUES); + startValuesClause(t.beginLine, t.beginColumn) ; + DataBlock(); + finishValuesClause(t.beginLine, t.beginColumn) ; + break; + default: + jj_la1[43] = jj_gen; + ; + } + } + + final public void Update() throws ParseException { + Prologue(); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INSERT: + case DELETE: + case INSERT_DATA: + case DELETE_DATA: + case DELETE_WHERE: + case LOAD: + case CLEAR: + case CREATE: + case ADD: + case MOVE: + case COPY: + case DROP: + case WITH: + Update1(); + label_14: + while (true) { + if (jj_2_2(2147483647)) { + ; + } else { + break label_14; + } + jj_consume_token(SEMICOLON); + Prologue(); + Update1(); + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SEMICOLON: + jj_consume_token(SEMICOLON); + Prologue(); + break; + default: + jj_la1[44] = jj_gen; + ; + } + break; default: jj_la1[45] = jj_gen; ; } -{if ("" != null) return new UpdateLoad(url, dest, silent) ;} + } + + final public void Update1() throws ParseException { + Update up = null ; + startUpdateOperation() ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LOAD: + up = Load(); + break; + case CLEAR: + up = Clear(); + break; + case DROP: + up = Drop(); + break; + case ADD: + up = Add(); + break; + case MOVE: + up = Move(); + break; + case COPY: + up = Copy(); + break; + case CREATE: + up = Create(); + break; + case DELETE_WHERE: + up = DeleteWhere(); + break; + case INSERT: + case DELETE: + case WITH: + up = Modify(); + break; + case INSERT_DATA: + InsertData(); + break; + case DELETE_DATA: + DeleteData(); + break; + default: + jj_la1[46] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + if (null != up) emitUpdate(up) ; + finishUpdateOperation() ; + } + + final public Update Load() throws ParseException { + String url ; Node dest = null ; boolean silent = false ; + jj_consume_token(LOAD); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SILENT: + jj_consume_token(SILENT); + silent = true ; + break; + default: + jj_la1[47] = jj_gen; + ; + } + url = iri(); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INTO: + jj_consume_token(INTO); + dest = GraphRef(); + break; + default: + jj_la1[48] = jj_gen; + ; + } + {if (true) return new UpdateLoad(url, dest, silent) ;} throw new Error("Missing return statement in function"); -} + } - final public Update Clear() throws ParseException {boolean silent = false ; Target target ; + final public Update Clear() throws ParseException { + boolean silent = false ; Target target ; jj_consume_token(CLEAR); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SILENT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SILENT: jj_consume_token(SILENT); -silent = true ; + silent = true ; break; - } default: - jj_la1[46] = jj_gen; + jj_la1[49] = jj_gen; ; } target = GraphRefAll(); -{if ("" != null) return new UpdateClear(target, silent) ;} + {if (true) return new UpdateClear(target, silent) ;} throw new Error("Missing return statement in function"); -} + } - final public Update Drop() throws ParseException {boolean silent = false ; Target target ; + final public Update Drop() throws ParseException { + boolean silent = false ; Target target ; jj_consume_token(DROP); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SILENT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SILENT: jj_consume_token(SILENT); -silent = true ; + silent = true ; break; - } default: - jj_la1[47] = jj_gen; + jj_la1[50] = jj_gen; ; } target = GraphRefAll(); -{if ("" != null) return new UpdateDrop(target, silent) ;} + {if (true) return new UpdateDrop(target, silent) ;} throw new Error("Missing return statement in function"); -} + } - final public Update Create() throws ParseException {Node iri ; boolean silent = false ; + final public Update Create() throws ParseException { + Node iri ; boolean silent = false ; jj_consume_token(CREATE); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SILENT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SILENT: jj_consume_token(SILENT); -silent=true ; + silent=true ; break; - } default: - jj_la1[48] = jj_gen; + jj_la1[51] = jj_gen; ; } iri = GraphRef(); -{if ("" != null) return new UpdateCreate(iri, silent) ;} + {if (true) return new UpdateCreate(iri, silent) ;} throw new Error("Missing return statement in function"); -} + } - final public Update Add() throws ParseException {Target src ; Target dest ; boolean silent = false ; + final public Update Add() throws ParseException { + Target src ; Target dest ; boolean silent = false ; jj_consume_token(ADD); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SILENT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SILENT: jj_consume_token(SILENT); -silent=true ; + silent=true ; break; - } default: - jj_la1[49] = jj_gen; + jj_la1[52] = jj_gen; ; } src = GraphOrDefault(); jj_consume_token(TO); dest = GraphOrDefault(); -{if ("" != null) return new UpdateAdd(src, dest, silent) ;} + {if (true) return new UpdateAdd(src, dest, silent) ;} throw new Error("Missing return statement in function"); -} + } - final public Update Move() throws ParseException {Target src ; Target dest ; boolean silent = false ; + final public Update Move() throws ParseException { + Target src ; Target dest ; boolean silent = false ; jj_consume_token(MOVE); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SILENT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SILENT: jj_consume_token(SILENT); -silent=true ; + silent=true ; break; - } default: - jj_la1[50] = jj_gen; + jj_la1[53] = jj_gen; ; } src = GraphOrDefault(); jj_consume_token(TO); dest = GraphOrDefault(); -{if ("" != null) return new UpdateMove(src, dest, silent) ;} + {if (true) return new UpdateMove(src, dest, silent) ;} throw new Error("Missing return statement in function"); -} + } - final public Update Copy() throws ParseException {Target src ; Target dest ; boolean silent = false ; + final public Update Copy() throws ParseException { + Target src ; Target dest ; boolean silent = false ; jj_consume_token(COPY); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SILENT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SILENT: jj_consume_token(SILENT); -silent=true ; + silent=true ; break; - } default: - jj_la1[51] = jj_gen; + jj_la1[54] = jj_gen; ; } src = GraphOrDefault(); jj_consume_token(TO); dest = GraphOrDefault(); -{if ("" != null) return new UpdateCopy(src, dest, silent) ;} + {if (true) return new UpdateCopy(src, dest, silent) ;} throw new Error("Missing return statement in function"); -} + } - final public void InsertData() throws ParseException {QuadDataAccSink qd = createInsertDataSink() ; Token t ; + final public void InsertData() throws ParseException { + QuadDataAccSink qd = createInsertDataSink() ; Token t ; t = jj_consume_token(INSERT_DATA); -int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; -startDataInsert(qd, beginLine, beginColumn) ; + int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; + startDataInsert(qd, beginLine, beginColumn) ; QuadData(qd); -finishDataInsert(qd, beginLine, beginColumn) ; + finishDataInsert(qd, beginLine, beginColumn) ; qd.close() ; -} + } - final public void DeleteData() throws ParseException {QuadDataAccSink qd = createDeleteDataSink() ; Token t ; + final public void DeleteData() throws ParseException { + QuadDataAccSink qd = createDeleteDataSink() ; Token t ; t = jj_consume_token(DELETE_DATA); -int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; -startDataDelete(qd, beginLine, beginColumn) ; + int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; + startDataDelete(qd, beginLine, beginColumn) ; QuadData(qd); -finishDataDelete(qd, beginLine, beginColumn) ; + finishDataDelete(qd, beginLine, beginColumn) ; qd.close() ; -} + } - final public Update DeleteWhere() throws ParseException {QuadAcc qp = new QuadAcc() ; Token t ; + final public Update DeleteWhere() throws ParseException { + QuadAcc qp = new QuadAcc() ; Token t ; t = jj_consume_token(DELETE_WHERE); -int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; -startDeleteTemplate(qp, beginLine, beginColumn) ; + int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; + startDeleteTemplate(qp, beginLine, beginColumn) ; QuadPattern(qp); -finishDeleteTemplate(qp, beginLine, beginColumn) ; -{if ("" != null) return new UpdateDeleteWhere(qp) ;} + finishDeleteTemplate(qp, beginLine, beginColumn) ; + {if (true) return new UpdateDeleteWhere(qp) ;} throw new Error("Missing return statement in function"); -} + } - final public Update Modify() throws ParseException {Element el ; String iri = null ; + final public Update Modify() throws ParseException { + Element el ; String iri = null ; UpdateModify up = new UpdateModify() ; -startModifyUpdate() ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case WITH:{ + startModifyUpdate() ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case WITH: jj_consume_token(WITH); iri = iri(); -Node n = createNode(iri) ; up.setWithIRI(n) ; + Node n = createNode(iri) ; up.setWithIRI(n) ; break; - } default: - jj_la1[52] = jj_gen; + jj_la1[55] = jj_gen; ; } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DELETE:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DELETE: DeleteClause(up); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case INSERT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INSERT: InsertClause(up); break; - } default: - jj_la1[53] = jj_gen; + jj_la1[56] = jj_gen; ; } break; - } - case INSERT:{ + case INSERT: InsertClause(up); break; - } default: - jj_la1[54] = jj_gen; + jj_la1[57] = jj_gen; jj_consume_token(-1); throw new ParseException(); } label_15: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case USING:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case USING: ; break; - } default: - jj_la1[55] = jj_gen; + jj_la1[58] = jj_gen; break label_15; } UsingClause(up); } jj_consume_token(WHERE); -startWherePattern() ; + startWherePattern() ; el = GroupGraphPattern(); -up.setElement(el) ; -finishWherePattern() ; -finishModifyUpdate() ; -{if ("" != null) return up ;} + up.setElement(el) ; + finishWherePattern() ; + finishModifyUpdate() ; + {if (true) return up ;} throw new Error("Missing return statement in function"); -} + } - final public void DeleteClause(UpdateModify up) throws ParseException {QuadAcc qp = up.getDeleteAcc() ; Token t ; + final public void DeleteClause(UpdateModify up) throws ParseException { + QuadAcc qp = up.getDeleteAcc() ; Token t ; t = jj_consume_token(DELETE); -int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; -startDeleteTemplate(qp, beginLine, beginColumn) ; + int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; + startDeleteTemplate(qp, beginLine, beginColumn) ; QuadPattern(qp); -finishDeleteTemplate(qp, beginLine, beginColumn) ; -up.setHasDeleteClause(true) ; -} + finishDeleteTemplate(qp, beginLine, beginColumn) ; + up.setHasDeleteClause(true) ; + } - final public void InsertClause(UpdateModify up) throws ParseException {QuadAcc qp = up.getInsertAcc() ; Token t ; + final public void InsertClause(UpdateModify up) throws ParseException { + QuadAcc qp = up.getInsertAcc() ; Token t ; t = jj_consume_token(INSERT); -int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; -startInsertTemplate(qp, beginLine, beginColumn) ; + int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; + startInsertTemplate(qp, beginLine, beginColumn) ; QuadPattern(qp); -finishInsertTemplate(qp, beginLine, beginColumn) ; -up.setHasInsertClause(true) ; -} + finishInsertTemplate(qp, beginLine, beginColumn) ; + up.setHasInsertClause(true) ; + } - final public void UsingClause(UpdateWithUsing update) throws ParseException {String iri ; Node n ; + final public void UsingClause(UpdateWithUsing update) throws ParseException { + String iri ; Node n ; jj_consume_token(USING); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: iri = iri(); -n = createNode(iri) ; update.addUsing(n) ; + n = createNode(iri) ; update.addUsing(n) ; break; - } - case NAMED:{ + case NAMED: jj_consume_token(NAMED); iri = iri(); -n = createNode(iri) ; update.addUsingNamed(n) ; + n = createNode(iri) ; update.addUsingNamed(n) ; break; - } default: - jj_la1[56] = jj_gen; + jj_la1[59] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -} + } - final public Target GraphOrDefault() throws ParseException {String iri ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DFT:{ + final public Target GraphOrDefault() throws ParseException { + String iri ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DFT: jj_consume_token(DFT); -{if ("" != null) return Target.DEFAULT ;} + {if (true) return Target.DEFAULT ;} break; - } case IRIref: case PNAME_NS: case PNAME_LN: - case GRAPH:{ - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case GRAPH:{ + case GRAPH: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case GRAPH: jj_consume_token(GRAPH); break; - } default: - jj_la1[57] = jj_gen; + jj_la1[60] = jj_gen; ; } iri = iri(); -{if ("" != null) return Target.create(createNode(iri)) ;} + {if (true) return Target.create(createNode(iri)) ;} break; - } default: - jj_la1[58] = jj_gen; + jj_la1[61] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public Node GraphRef() throws ParseException {String iri ; + final public Node GraphRef() throws ParseException { + String iri ; jj_consume_token(GRAPH); iri = iri(); -{if ("" != null) return createNode(iri) ;} + {if (true) return createNode(iri) ;} throw new Error("Missing return statement in function"); -} + } - final public Target GraphRefAll() throws ParseException {Node iri ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case GRAPH:{ + final public Target GraphRefAll() throws ParseException { + Node iri ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case GRAPH: iri = GraphRef(); -{if ("" != null) return Target.create(iri) ;} + {if (true) return Target.create(iri) ;} break; - } - case DFT:{ + case DFT: jj_consume_token(DFT); -{if ("" != null) return Target.DEFAULT ;} + {if (true) return Target.DEFAULT ;} break; - } - case NAMED:{ + case NAMED: jj_consume_token(NAMED); -{if ("" != null) return Target.NAMED ;} + {if (true) return Target.NAMED ;} break; - } - case ALL:{ + case ALL: jj_consume_token(ALL); -{if ("" != null) return Target.ALL ;} + {if (true) return Target.ALL ;} break; - } default: - jj_la1[59] = jj_gen; + jj_la1[62] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } final public void QuadPattern(QuadAcc acc) throws ParseException { jj_consume_token(LBRACE); Quads(acc); jj_consume_token(RBRACE); -} + } final public void QuadData(QuadDataAccSink acc) throws ParseException { jj_consume_token(LBRACE); Quads(acc); jj_consume_token(RBRACE); -} + } final public void Quads(QuadAccSink acc) throws ParseException { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -2102,36 +2264,33 @@ final public void Quads(QuadAccSink acc) throws ParseException { case NIL: case LBRACKET: case ANON: - case LT2:{ + case LT2: TriplesTemplate(acc); break; - } default: - jj_la1[60] = jj_gen; + jj_la1[63] = jj_gen; ; } label_16: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case GRAPH:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case GRAPH: ; break; - } default: - jj_la1[61] = jj_gen; + jj_la1[64] = jj_gen; break label_16; } QuadsNotTriples(acc); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DOT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DOT: jj_consume_token(DOT); break; - } default: - jj_la1[62] = jj_gen; + jj_la1[65] = jj_gen; ; } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -2157,23 +2316,23 @@ final public void Quads(QuadAccSink acc) throws ParseException { case NIL: case LBRACKET: case ANON: - case LT2:{ + case LT2: TriplesTemplate(acc); break; - } default: - jj_la1[63] = jj_gen; + jj_la1[66] = jj_gen; ; } } -} + } - final public void QuadsNotTriples(QuadAccSink acc) throws ParseException {Node gn ; Node prev = acc.getGraph() ; + final public void QuadsNotTriples(QuadAccSink acc) throws ParseException { + Node gn ; Node prev = acc.getGraph() ; jj_consume_token(GRAPH); gn = VarOrBlankNodeOrIri(); -setAccGraph(acc, gn) ; + setAccGraph(acc, gn) ; jj_consume_token(LBRACE); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -2199,20 +2358,19 @@ final public void Quads(QuadAccSink acc) throws ParseException { case NIL: case LBRACKET: case ANON: - case LT2:{ + case LT2: TriplesTemplate(acc); break; - } default: - jj_la1[64] = jj_gen; + jj_la1[67] = jj_gen; ; } jj_consume_token(RBRACE); -setAccGraph(acc, prev) ; -} + setAccGraph(acc, prev) ; + } final public void ConstructQuads(QuadAcc acc) throws ParseException { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -2238,37 +2396,34 @@ final public void ConstructQuads(QuadAcc acc) throws ParseException { case NIL: case LBRACKET: case ANON: - case LT2:{ + case LT2: TriplesTemplate(acc); break; - } default: - jj_la1[65] = jj_gen; + jj_la1[68] = jj_gen; ; } label_17: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case GRAPH: - case LBRACE:{ + case LBRACE: ; break; - } default: - jj_la1[66] = jj_gen; + jj_la1[69] = jj_gen; break label_17; } ConstructQuadsNotTriples(acc); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DOT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DOT: jj_consume_token(DOT); break; - } default: - jj_la1[67] = jj_gen; + jj_la1[70] = jj_gen; ; } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -2294,32 +2449,31 @@ final public void ConstructQuads(QuadAcc acc) throws ParseException { case NIL: case LBRACKET: case ANON: - case LT2:{ + case LT2: TriplesTemplate(acc); break; - } default: - jj_la1[68] = jj_gen; + jj_la1[71] = jj_gen; ; } } -} + } - final public void ConstructQuadsNotTriples(QuadAccSink acc) throws ParseException {Node gn = Quad.defaultGraphNodeGenerated ; + final public void ConstructQuadsNotTriples(QuadAccSink acc) throws ParseException { + Node gn = Quad.defaultGraphNodeGenerated ; Node prev = acc.getGraph() ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case GRAPH:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case GRAPH: jj_consume_token(GRAPH); gn = VarOrBlankNodeOrIri(); break; - } default: - jj_la1[69] = jj_gen; + jj_la1[72] = jj_gen; ; } -setAccGraph(acc, gn) ; + setAccGraph(acc, gn) ; jj_consume_token(LBRACE); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -2345,17 +2499,16 @@ final public void ConstructQuads(QuadAcc acc) throws ParseException { case NIL: case LBRACKET: case ANON: - case LT2:{ + case LT2: TriplesTemplate(acc); break; - } default: - jj_la1[70] = jj_gen; + jj_la1[73] = jj_gen; ; } jj_consume_token(RBRACE); -setAccGraph(acc, prev) ; -} + setAccGraph(acc, prev) ; + } final public void TriplesTemplate(TripleCollector acc) throws ParseException { TriplesSameSubject(acc); @@ -2369,41 +2522,41 @@ final public void TriplesTemplate(TripleCollector acc) throws ParseException { jj_consume_token(DOT); TriplesSameSubject(acc); } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DOT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DOT: jj_consume_token(DOT); break; - } default: - jj_la1[71] = jj_gen; + jj_la1[74] = jj_gen; ; } -} + } - final public Element GroupGraphPattern() throws ParseException {Element el = null ; Token t ; + final public Element GroupGraphPattern() throws ParseException { + Element el = null ; Token t ; t = jj_consume_token(LBRACE); -int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SELECT:{ -startSubSelect(beginLine, beginColumn) ; + int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SELECT: + startSubSelect(beginLine, beginColumn) ; SubSelect(); -Query q = endSubSelect(beginLine, beginColumn) ; + Query q = endSubSelect(beginLine, beginColumn) ; el = new ElementSubQuery(q) ; break; - } default: - jj_la1[72] = jj_gen; + jj_la1[75] = jj_gen; el = GroupGraphPatternSub(); } jj_consume_token(RBRACE); -{if ("" != null) return el ;} + {if (true) return el ;} throw new Error("Missing return statement in function"); -} + } - final public Element GroupGraphPatternSub() throws ParseException {Element el = null ; -ElementGroup elg = new ElementGroup() ; -startGroup(elg) ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public Element GroupGraphPatternSub() throws ParseException { + Element el = null ; + ElementGroup elg = new ElementGroup() ; + startGroup(elg) ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -2429,20 +2582,19 @@ final public void TriplesTemplate(TripleCollector acc) throws ParseException { case NIL: case LBRACKET: case ANON: - case LT2:{ -startTriplesBlock() ; + case LT2: + startTriplesBlock() ; el = TriplesBlock(null); -endTriplesBlock() ; + endTriplesBlock() ; elg.addElement(el) ; break; - } default: - jj_la1[73] = jj_gen; + jj_la1[76] = jj_gen; ; } label_19: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VALUES: case GRAPH: case OPTIONAL: @@ -2451,29 +2603,28 @@ final public void TriplesTemplate(TripleCollector acc) throws ParseException { case SERVICE: case LET: case LATERAL: + case UNFOLD: case EXISTS: case NOT: case FILTER: - case LBRACE:{ + case LBRACE: ; break; - } default: - jj_la1[74] = jj_gen; + jj_la1[77] = jj_gen; break label_19; } el = GraphPatternNotTriples(); -elg.addElement(el) ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DOT:{ + elg.addElement(el) ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DOT: jj_consume_token(DOT); break; - } default: - jj_la1[75] = jj_gen; + jj_la1[78] = jj_gen; ; } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -2499,31 +2650,30 @@ final public void TriplesTemplate(TripleCollector acc) throws ParseException { case NIL: case LBRACKET: case ANON: - case LT2:{ -startTriplesBlock() ; + case LT2: + startTriplesBlock() ; el = TriplesBlock(null); -endTriplesBlock() ; + endTriplesBlock() ; elg.addElement(el) ; break; - } default: - jj_la1[76] = jj_gen; + jj_la1[79] = jj_gen; ; } } -endGroup(elg) ; -{if ("" != null) return elg ;} + endGroup(elg) ; + {if (true) return elg ;} throw new Error("Missing return statement in function"); -} + } final public Element TriplesBlock(ElementPathBlock acc) throws ParseException { -if ( acc == null ) + if ( acc == null ) acc = new ElementPathBlock() ; TriplesSameSubjectPath(acc); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DOT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DOT: jj_consume_token(DOT); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -2549,172 +2699,166 @@ final public Element TriplesBlock(ElementPathBlock acc) throws ParseException { case NIL: case LBRACKET: case ANON: - case LT2:{ + case LT2: TriplesBlock(acc); break; - } default: - jj_la1[77] = jj_gen; + jj_la1[80] = jj_gen; ; } break; - } default: - jj_la1[78] = jj_gen; + jj_la1[81] = jj_gen; ; } -{if ("" != null) return acc ;} + {if (true) return acc ;} throw new Error("Missing return statement in function"); -} + } - final public Element GraphPatternNotTriples() throws ParseException {Element el = null ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case LBRACE:{ + final public Element GraphPatternNotTriples() throws ParseException { + Element el = null ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LBRACE: el = GroupOrUnionGraphPattern(); break; - } - case OPTIONAL:{ + case OPTIONAL: el = OptionalGraphPattern(); break; - } - case LATERAL:{ + case LATERAL: el = LateralGraphPattern(); break; - } - case MINUS_P:{ + case MINUS_P: el = MinusGraphPattern(); break; - } - case GRAPH:{ + case GRAPH: el = GraphGraphPattern(); break; - } - case SERVICE:{ + case SERVICE: el = ServiceGraphPattern(); break; - } - case FILTER:{ + case FILTER: el = Filter(); break; - } - case BIND:{ + case BIND: el = Bind(); break; - } - case VALUES:{ + case VALUES: el = InlineData(); break; - } - case LET:{ + case LET: el = Assignment(); break; - } - case EXISTS:{ + case UNFOLD: + el = Unfold(); + break; + case EXISTS: el = ExistsElt(); break; - } - case NOT:{ + case NOT: el = NotExistsElt(); break; - } default: - jj_la1[79] = jj_gen; + jj_la1[82] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -{if ("" != null) return el ;} + {if (true) return el ;} throw new Error("Missing return statement in function"); -} + } - final public Element OptionalGraphPattern() throws ParseException {Element el ; + final public Element OptionalGraphPattern() throws ParseException { + Element el ; jj_consume_token(OPTIONAL); el = GroupGraphPattern(); -{if ("" != null) return new ElementOptional(el) ;} + {if (true) return new ElementOptional(el) ;} throw new Error("Missing return statement in function"); -} + } - final public Element LateralGraphPattern() throws ParseException {Element el ; + final public Element LateralGraphPattern() throws ParseException { + Element el ; jj_consume_token(LATERAL); el = GroupGraphPattern(); -{if ("" != null) return new ElementLateral(el) ;} + {if (true) return new ElementLateral(el) ;} throw new Error("Missing return statement in function"); -} + } - final public Element GraphGraphPattern() throws ParseException {Element el ; Node n ; + final public Element GraphGraphPattern() throws ParseException { + Element el ; Node n ; jj_consume_token(GRAPH); n = VarOrIri(); el = GroupGraphPattern(); -{if ("" != null) return new ElementNamedGraph(n, el) ;} + {if (true) return new ElementNamedGraph(n, el) ;} throw new Error("Missing return statement in function"); -} + } - final public Element ServiceGraphPattern() throws ParseException {Element el ; Node n ; boolean silent = false ; + final public Element ServiceGraphPattern() throws ParseException { + Element el ; Node n ; boolean silent = false ; jj_consume_token(SERVICE); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SILENT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SILENT: jj_consume_token(SILENT); -silent=true; + silent=true; break; - } default: - jj_la1[80] = jj_gen; + jj_la1[83] = jj_gen; ; } n = VarOrIri(); el = GroupGraphPattern(); -{if ("" != null) return new ElementService(n, el, silent) ;} + {if (true) return new ElementService(n, el, silent) ;} throw new Error("Missing return statement in function"); -} + } - final public Element Bind() throws ParseException {Var v ; Expr expr ; + final public Element Bind() throws ParseException { + Var v ; Expr expr ; jj_consume_token(BIND); jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(AS); v = Var(); jj_consume_token(RPAREN); -{if ("" != null) return new ElementBind(v, expr) ;} + {if (true) return new ElementBind(v, expr) ;} throw new Error("Missing return statement in function"); -} + } - final public Element InlineData() throws ParseException {ElementData el ; Token t ; + final public Element InlineData() throws ParseException { + ElementData el ; Token t ; t = jj_consume_token(VALUES); -int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; -el = new ElementData() ; + int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; + el = new ElementData() ; startInlineData(el.getVars(), el.getRows(), beginLine, beginColumn) ; DataBlock(); -finishInlineData(beginLine, beginColumn) ; - {if ("" != null) return el ;} + finishInlineData(beginLine, beginColumn) ; + {if (true) return el ;} throw new Error("Missing return statement in function"); -} + } final public void DataBlock() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VAR1: - case VAR2:{ + case VAR2: InlineDataOneVar(); break; - } case LPAREN: - case NIL:{ + case NIL: InlineDataFull(); break; - } default: - jj_la1[81] = jj_gen; + jj_la1[84] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -} + } - final public void InlineDataOneVar() throws ParseException {Var v ; Node n ; Token t ; ; int beginLine; int beginColumn; + final public void InlineDataOneVar() throws ParseException { + Var v ; Node n ; Token t ; ; int beginLine; int beginColumn; v = Var(); -emitDataBlockVariable(v) ; + emitDataBlockVariable(v) ; t = jj_consume_token(LBRACE); -beginLine = t.beginLine; beginColumn = t.beginColumn; t = null; + beginLine = t.beginLine; beginColumn = t.beginColumn; t = null; label_20: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -2734,74 +2878,70 @@ final public void DataBlock() throws ParseException { case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: - case LT2:{ + case LT2: ; break; - } default: - jj_la1[82] = jj_gen; + jj_la1[85] = jj_gen; break label_20; } n = DataBlockValue(); -startDataBlockValueRow(beginLine, beginColumn) ; + startDataBlockValueRow(beginLine, beginColumn) ; emitDataBlockValue(n, beginLine, beginColumn) ; finishDataBlockValueRow(beginLine, beginColumn) ; } t = jj_consume_token(RBRACE); -} + } - final public void InlineDataFull() throws ParseException {Var v ; Node n ; Token t ; int beginLine; int beginColumn; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case NIL:{ + final public void InlineDataFull() throws ParseException { + Var v ; Node n ; Token t ; int beginLine; int beginColumn; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case NIL: jj_consume_token(NIL); break; - } - case LPAREN:{ + case LPAREN: jj_consume_token(LPAREN); label_21: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VAR1: - case VAR2:{ + case VAR2: ; break; - } default: - jj_la1[83] = jj_gen; + jj_la1[86] = jj_gen; break label_21; } v = Var(); -emitDataBlockVariable(v) ; + emitDataBlockVariable(v) ; } jj_consume_token(RPAREN); break; - } default: - jj_la1[84] = jj_gen; + jj_la1[87] = jj_gen; jj_consume_token(-1); throw new ParseException(); } jj_consume_token(LBRACE); label_22: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: - case NIL:{ + case NIL: ; break; - } default: - jj_la1[85] = jj_gen; + jj_la1[88] = jj_gen; break label_22; } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case LPAREN:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LPAREN: t = jj_consume_token(LPAREN); -beginLine = t.beginLine; beginColumn = t.beginColumn; t = null; -startDataBlockValueRow(beginLine, beginColumn) ; + beginLine = t.beginLine; beginColumn = t.beginColumn; t = null; + startDataBlockValueRow(beginLine, beginColumn) ; label_23: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -2821,55 +2961,51 @@ final public void DataBlock() throws ParseException { case STRING_LITERAL2: case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: - case LT2:{ + case LT2: ; break; - } default: - jj_la1[86] = jj_gen; + jj_la1[89] = jj_gen; break label_23; } n = DataBlockValue(); -emitDataBlockValue(n, beginLine, beginColumn) ; + emitDataBlockValue(n, beginLine, beginColumn) ; } t = jj_consume_token(RPAREN); -beginLine = t.beginLine; beginColumn = t.beginColumn; t = null; -finishDataBlockValueRow(beginLine, beginColumn) ; + beginLine = t.beginLine; beginColumn = t.beginColumn; t = null; + finishDataBlockValueRow(beginLine, beginColumn) ; break; - } - case NIL:{ + case NIL: t = jj_consume_token(NIL); -beginLine = t.beginLine; beginColumn = t.beginColumn; t = null; -startDataBlockValueRow(beginLine, beginColumn) ; -finishDataBlockValueRow(beginLine, beginColumn) ; + beginLine = t.beginLine; beginColumn = t.beginColumn; t = null; + startDataBlockValueRow(beginLine, beginColumn) ; + finishDataBlockValueRow(beginLine, beginColumn) ; break; - } default: - jj_la1[87] = jj_gen; + jj_la1[90] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } jj_consume_token(RBRACE); -} + } - final public Node DataBlockValue() throws ParseException {Node n ; String iri ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public Node DataBlockValue() throws ParseException { + Node n ; String iri ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: iri = iri(); -{if ("" != null) return createNode(iri) ;} + {if (true) return createNode(iri) ;} break; - } case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: - case STRING_LITERAL_LONG2:{ + case STRING_LITERAL_LONG2: n = RDFLiteral(); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } case INTEGER: case DECIMAL: case DOUBLE: @@ -2878,107 +3014,130 @@ final public void DataBlock() throws ParseException { case DOUBLE_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL_NEGATIVE: - case DOUBLE_NEGATIVE:{ + case DOUBLE_NEGATIVE: n = NumericLiteral(); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } case TRUE: - case FALSE:{ + case FALSE: n = BooleanLiteral(); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } - case UNDEF:{ + case UNDEF: jj_consume_token(UNDEF); -{if ("" != null) return null ;} + {if (true) return null ;} break; - } - case LT2:{ + case LT2: n = QuotedTripleData(); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } default: - jj_la1[88] = jj_gen; + jj_la1[91] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public Element Assignment() throws ParseException {Var v ; Expr expr ; + final public Element Assignment() throws ParseException { + Var v ; Expr expr ; jj_consume_token(LET); jj_consume_token(LPAREN); v = Var(); jj_consume_token(ASSIGN); expr = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new ElementAssign(v, expr) ;} + {if (true) return new ElementAssign(v, expr) ;} + throw new Error("Missing return statement in function"); + } + + final public Element Unfold() throws ParseException { + Var v1 ; Var v2 = null ; Expr expr ; + jj_consume_token(UNFOLD); + jj_consume_token(LPAREN); + expr = Expression(); + jj_consume_token(AS); + v1 = Var(); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + jj_consume_token(COMMA); + v2 = Var(); + ; + break; + default: + jj_la1[92] = jj_gen; + ; + } + jj_consume_token(RPAREN); + {if (true) return new ElementUnfold(expr, v1, v2) ;} throw new Error("Missing return statement in function"); -} + } - final public Element ExistsElt() throws ParseException {Element el ; + final public Element ExistsElt() throws ParseException { + Element el ; jj_consume_token(EXISTS); el = GroupGraphPattern(); -{if ("" != null) return new ElementExists(el) ;} + {if (true) return new ElementExists(el) ;} throw new Error("Missing return statement in function"); -} + } - final public Element NotExistsElt() throws ParseException {Element el ; + final public Element NotExistsElt() throws ParseException { + Element el ; jj_consume_token(NOT); jj_consume_token(EXISTS); el = GroupGraphPattern(); -{if ("" != null) return new ElementNotExists(el) ;} + {if (true) return new ElementNotExists(el) ;} throw new Error("Missing return statement in function"); -} + } - final public Element MinusGraphPattern() throws ParseException {Element el ; + final public Element MinusGraphPattern() throws ParseException { + Element el ; jj_consume_token(MINUS_P); el = GroupGraphPattern(); -{if ("" != null) return new ElementMinus(el) ;} + {if (true) return new ElementMinus(el) ;} throw new Error("Missing return statement in function"); -} + } - final public Element GroupOrUnionGraphPattern() throws ParseException {Element el = null ; ElementUnion el2 = null ; + final public Element GroupOrUnionGraphPattern() throws ParseException { + Element el = null ; ElementUnion el2 = null ; el = GroupGraphPattern(); label_24: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case UNION:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case UNION: ; break; - } default: - jj_la1[89] = jj_gen; + jj_la1[93] = jj_gen; break label_24; } jj_consume_token(UNION); -if ( el2 == null ) + if ( el2 == null ) { el2 = new ElementUnion() ; el2.addElement(el) ; } el = GroupGraphPattern(); -el2.addElement(el) ; + el2.addElement(el) ; } -{if ("" != null) return (el2==null)? el : el2 ;} + {if (true) return (el2==null)? el : el2 ;} throw new Error("Missing return statement in function"); -} + } - final public Element Filter() throws ParseException {Expr c ; + final public Element Filter() throws ParseException { + Expr c ; jj_consume_token(FILTER); c = Constraint(); -{if ("" != null) return new ElementFilter(c) ;} + {if (true) return new ElementFilter(c) ;} throw new Error("Missing return statement in function"); -} + } - final public Expr Constraint() throws ParseException {Expr c ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case LPAREN:{ + final public Expr Constraint() throws ParseException { + Expr c ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LPAREN: c = BrackettedExpression(); break; - } case TRIPLE: case IS_TRIPLE: case SUBJECT: @@ -3000,6 +3159,7 @@ final public void DataBlock() throws ParseException { case VARIANCE: case VAR_SAMP: case VAR_POP: + case FOLD: case SAMPLE: case GROUP_CONCAT: case BOUND: @@ -3058,137 +3218,132 @@ final public void DataBlock() throws ParseException { case SHA1: case SHA256: case SHA384: - case SHA512:{ + case SHA512: c = BuiltInCall(); break; - } case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: c = FunctionCall(); break; - } default: - jj_la1[90] = jj_gen; + jj_la1[94] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -{if ("" != null) return c ;} + {if (true) return c ;} throw new Error("Missing return statement in function"); -} + } - final public Expr FunctionCall() throws ParseException {String fname ; Args a ; + final public Expr FunctionCall() throws ParseException { + String fname ; Args a ; fname = iri(); a = ArgList(); -if ( AggregateRegistry.isRegistered(fname) ) { + if ( AggregateRegistry.isRegistered(fname) ) { if ( ! getAllowAggregatesInExpressions() ) throwParseException("Aggregate expression not legal at this point : "+fname, -1, -1) ; Aggregator agg = AggregatorFactory.createCustom(fname, a) ; Expr exprAgg = getQuery().allocAggregate(agg) ; - {if ("" != null) return exprAgg ;} + {if (true) return exprAgg ;} } - {if ("" != null) return new E_Function(fname, a) ;} + {if (true) return new E_Function(fname, a) ;} throw new Error("Missing return statement in function"); -} + } - final public Args ArgList() throws ParseException {Expr expr ; Args args = new Args() ; Token t ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case NIL:{ + final public Args ArgList() throws ParseException { + Expr expr ; Args args = new Args() ; Token t ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case NIL: jj_consume_token(NIL); break; - } - case LPAREN:{ + case LPAREN: jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: t = jj_consume_token(DISTINCT); -args.distinct = true ; -int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; -if ( ! getAllowAggregatesInExpressions() ) + args.distinct = true ; + int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; + if ( ! getAllowAggregatesInExpressions() ) throwParseException("Aggregate expression not legal at this point", beginLine, beginColumn) ; break; - } default: - jj_la1[91] = jj_gen; + jj_la1[95] = jj_gen; ; } expr = Expression(); -args.add(expr) ; + args.add(expr) ; label_25: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case COMMA:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: ; break; - } default: - jj_la1[92] = jj_gen; + jj_la1[96] = jj_gen; break label_25; } jj_consume_token(COMMA); expr = Expression(); -args.add(expr) ; + args.add(expr) ; } jj_consume_token(RPAREN); break; - } default: - jj_la1[93] = jj_gen; + jj_la1[97] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -{if ("" != null) return args ;} + {if (true) return args ;} throw new Error("Missing return statement in function"); -} + } - final public ExprList ExpressionList() throws ParseException {Expr expr = null ; ExprList exprList = new ExprList() ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case NIL:{ + final public ExprList ExpressionList() throws ParseException { + Expr expr = null ; ExprList exprList = new ExprList() ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case NIL: jj_consume_token(NIL); break; - } - case LPAREN:{ + case LPAREN: jj_consume_token(LPAREN); expr = Expression(); -exprList.add(expr) ; + exprList.add(expr) ; label_26: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case COMMA:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: ; break; - } default: - jj_la1[94] = jj_gen; + jj_la1[98] = jj_gen; break label_26; } jj_consume_token(COMMA); expr = Expression(); -exprList.add(expr) ; + exprList.add(expr) ; } jj_consume_token(RPAREN); break; - } default: - jj_la1[95] = jj_gen; + jj_la1[99] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -{if ("" != null) return exprList ;} + {if (true) return exprList ;} throw new Error("Missing return statement in function"); -} + } - final public Template ConstructTemplate() throws ParseException {QuadAcc acc = new QuadAcc() ; + final public Template ConstructTemplate() throws ParseException { + QuadAcc acc = new QuadAcc() ; Template t = new Template (acc); -setInConstructTemplate(true) ; + setInConstructTemplate(true) ; jj_consume_token(LBRACE); ConstructQuads(acc); jj_consume_token(RBRACE); -setInConstructTemplate(false) ; - {if ("" != null) return t ;} + setInConstructTemplate(false) ; + {if (true) return t ;} throw new Error("Missing return statement in function"); -} + } final public void ConstructTriples(TripleCollector acc) throws ParseException { TriplesSameSubject(acc); @@ -3202,19 +3357,19 @@ final public void ConstructTriples(TripleCollector acc) throws ParseException { jj_consume_token(DOT); TriplesSameSubject(acc); } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DOT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DOT: jj_consume_token(DOT); break; - } default: - jj_la1[96] = jj_gen; + jj_la1[100] = jj_gen; ; } -} + } - final public void TriplesSameSubject(TripleCollector acc) throws ParseException {Node s ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public void TriplesSameSubject(TripleCollector acc) throws ParseException { + Node s ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -3238,127 +3393,124 @@ final public void ConstructTriples(TripleCollector acc) throws ParseException { case STRING_LITERAL_LONG2: case NIL: case ANON: - case LT2:{ + case LT2: s = VarOrTerm(); PropertyListNotEmpty(s, acc); break; - } case LPAREN: - case LBRACKET:{ -ElementPathBlock tempAcc = new ElementPathBlock() ; + case LBRACKET: + ElementPathBlock tempAcc = new ElementPathBlock() ; s = TriplesNode(tempAcc); PropertyList(s, tempAcc); -insert(acc, tempAcc) ; + insert(acc, tempAcc) ; break; - } default: - jj_la1[97] = jj_gen; + jj_la1[101] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -} + } final public void PropertyList(Node s, TripleCollector acc) throws ParseException { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: case VAR1: case VAR2: - case KW_A:{ + case KW_A: PropertyListNotEmpty(s, acc); break; - } default: - jj_la1[98] = jj_gen; + jj_la1[102] = jj_gen; ; } -} + } - final public void PropertyListNotEmpty(Node s, TripleCollector acc) throws ParseException {Node p = null ; + final public void PropertyListNotEmpty(Node s, TripleCollector acc) throws ParseException { + Node p = null ; p = Verb(); ObjectList(s, p, null, acc); label_28: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SEMICOLON:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SEMICOLON: ; break; - } default: - jj_la1[99] = jj_gen; + jj_la1[103] = jj_gen; break label_28; } jj_consume_token(SEMICOLON); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: case VAR1: case VAR2: - case KW_A:{ + case KW_A: p = Verb(); ObjectList(s, p, null, acc); break; - } default: - jj_la1[100] = jj_gen; + jj_la1[104] = jj_gen; ; } } -} + } - final public Node Verb() throws ParseException {Node p ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public Node Verb() throws ParseException { + Node p ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: case VAR1: - case VAR2:{ + case VAR2: p = VarOrIri(); break; - } - case KW_A:{ + case KW_A: jj_consume_token(KW_A); -p = nRDFtype ; + p = nRDFtype ; break; - } default: - jj_la1[101] = jj_gen; + jj_la1[105] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -{if ("" != null) return p ;} + {if (true) return p ;} throw new Error("Missing return statement in function"); -} + } - final public void ObjectList(Node s, Node p, Path path, TripleCollector acc) throws ParseException {Node o ; + final public void ObjectList(Node s, Node p, Path path, TripleCollector acc) throws ParseException { + Node o ; Object(s, p, path, acc); label_29: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case COMMA:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: ; break; - } default: - jj_la1[102] = jj_gen; + jj_la1[106] = jj_gen; break label_29; } jj_consume_token(COMMA); Object(s, p, path, acc); } -} + } - final public void Object(Node s, Node p, Path path, TripleCollector acc) throws ParseException {Node o ; -ElementPathBlock tempAcc = new ElementPathBlock() ; int mark = tempAcc.mark() ; + final public void Object(Node s, Node p, Path path, TripleCollector acc) throws ParseException { + Node o ; + ElementPathBlock tempAcc = new ElementPathBlock() ; int mark = tempAcc.mark() ; o = GraphNode(tempAcc); -insert(tempAcc, mark, s, p, path, o) ; insert(acc, tempAcc) ; + insert(tempAcc, mark, s, p, path, o) ; insert(acc, tempAcc) ; Annotation(acc, s, p, path, o); -} + } - final public void TriplesSameSubjectPath(TripleCollector acc) throws ParseException {Node s ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public void TriplesSameSubjectPath(TripleCollector acc) throws ParseException { + Node s ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -3382,28 +3534,26 @@ final public void PropertyList(Node s, TripleCollector acc) throws ParseExceptio case STRING_LITERAL_LONG2: case NIL: case ANON: - case LT2:{ + case LT2: s = VarOrTerm(); PropertyListPathNotEmpty(s, acc); break; - } case LPAREN: - case LBRACKET:{ -ElementPathBlock tempAcc = new ElementPathBlock() ; + case LBRACKET: + ElementPathBlock tempAcc = new ElementPathBlock() ; s = TriplesNodePath(tempAcc); PropertyListPath(s, tempAcc); -insert(acc, tempAcc) ; + insert(acc, tempAcc) ; break; - } default: - jj_la1[103] = jj_gen; + jj_la1[107] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -} + } final public void PropertyListPath(Node s, TripleCollector acc) throws ParseException { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -3415,18 +3565,18 @@ final public void PropertyListPath(Node s, TripleCollector acc) throws ParseExce case SHORTEST: case LPAREN: case BANG: - case CARAT:{ + case CARAT: PropertyListPathNotEmpty(s, acc); break; - } default: - jj_la1[104] = jj_gen; + jj_la1[108] = jj_gen; ; } -} + } - final public void PropertyListPathNotEmpty(Node s, TripleCollector acc) throws ParseException {Path path = null ; Node p = null ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public void PropertyListPathNotEmpty(Node s, TripleCollector acc) throws ParseException { + Path path = null ; Node p = null ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -3436,35 +3586,32 @@ final public void PropertyListPath(Node s, TripleCollector acc) throws ParseExce case SHORTEST: case LPAREN: case BANG: - case CARAT:{ + case CARAT: path = VerbPath(); break; - } case VAR1: - case VAR2:{ + case VAR2: p = VerbSimple(); break; - } default: - jj_la1[105] = jj_gen; + jj_la1[109] = jj_gen; jj_consume_token(-1); throw new ParseException(); } ObjectListPath(s, p, path, acc); label_30: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SEMICOLON:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SEMICOLON: ; break; - } default: - jj_la1[106] = jj_gen; + jj_la1[110] = jj_gen; break label_30; } jj_consume_token(SEMICOLON); -path = null ; p = null ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + path = null ; p = null ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -3476,8 +3623,8 @@ final public void PropertyListPath(Node s, TripleCollector acc) throws ParseExce case SHORTEST: case LPAREN: case BANG: - case CARAT:{ - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case CARAT: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -3487,159 +3634,160 @@ final public void PropertyListPath(Node s, TripleCollector acc) throws ParseExce case SHORTEST: case LPAREN: case BANG: - case CARAT:{ + case CARAT: path = VerbPath(); break; - } case VAR1: - case VAR2:{ + case VAR2: p = VerbSimple(); break; - } default: - jj_la1[107] = jj_gen; + jj_la1[111] = jj_gen; jj_consume_token(-1); throw new ParseException(); } ObjectListPath(s, p, path, acc); break; - } default: - jj_la1[108] = jj_gen; + jj_la1[112] = jj_gen; ; } } -} + } - final public Path VerbPath() throws ParseException {Node p ; Path path ; + final public Path VerbPath() throws ParseException { + Node p ; Path path ; path = Path(); -{if ("" != null) return path ;} + {if (true) return path ;} throw new Error("Missing return statement in function"); -} + } - final public Node VerbSimple() throws ParseException {Node p ; + final public Node VerbSimple() throws ParseException { + Node p ; p = Var(); -{if ("" != null) return p ;} + {if (true) return p ;} throw new Error("Missing return statement in function"); -} + } - final public void ObjectListPath(Node s, Node p, Path path, TripleCollector acc) throws ParseException {Node o ; + final public void ObjectListPath(Node s, Node p, Path path, TripleCollector acc) throws ParseException { + Node o ; ObjectPath(s, p, path, acc); label_31: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case COMMA:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: ; break; - } default: - jj_la1[109] = jj_gen; + jj_la1[113] = jj_gen; break label_31; } jj_consume_token(COMMA); ObjectPath(s, p, path, acc); } -} + } - final public void ObjectPath(Node s, Node p, Path path, TripleCollector acc) throws ParseException {Node o ; -ElementPathBlock tempAcc = new ElementPathBlock() ; int mark = tempAcc.mark() ; + final public void ObjectPath(Node s, Node p, Path path, TripleCollector acc) throws ParseException { + Node o ; + ElementPathBlock tempAcc = new ElementPathBlock() ; int mark = tempAcc.mark() ; o = GraphNodePath(tempAcc); -insert(tempAcc, mark, s, p, path, o) ; insert(acc, tempAcc) ; + insert(tempAcc, mark, s, p, path, o) ; insert(acc, tempAcc) ; AnnotationPath(acc, s, p, path, o); -} + } - final public Path PathUnit() throws ParseException {Path p ; + final public Path PathUnit() throws ParseException { + Path p ; ByteOrderMark(); p = Path(); jj_consume_token(0); -{if ("" != null) return p ;} + {if (true) return p ;} throw new Error("Missing return statement in function"); -} + } - final public Path Path() throws ParseException {Path p ; + final public Path Path() throws ParseException { + Path p ; p = PathAlternative(); -{if ("" != null) return p ;} + {if (true) return p ;} throw new Error("Missing return statement in function"); -} + } - final public Path PathAlternative() throws ParseException {Path p1 , p2 ; + final public Path PathAlternative() throws ParseException { + Path p1 , p2 ; p1 = PathSequence(); label_32: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case VBAR:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case VBAR: ; break; - } default: - jj_la1[110] = jj_gen; + jj_la1[114] = jj_gen; break label_32; } jj_consume_token(VBAR); p2 = PathSequence(); -p1 = PathFactory.pathAlt(p1, p2) ; + p1 = PathFactory.pathAlt(p1, p2) ; } -{if ("" != null) return p1 ;} + {if (true) return p1 ;} throw new Error("Missing return statement in function"); -} + } - final public Path PathSequence() throws ParseException {Path p1 , p2 ; + final public Path PathSequence() throws ParseException { + Path p1 , p2 ; p1 = PathEltOrInverse(); label_33: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case SLASH: - case CARAT:{ + case CARAT: ; break; - } default: - jj_la1[111] = jj_gen; + jj_la1[115] = jj_gen; break label_33; } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SLASH:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SLASH: jj_consume_token(SLASH); p2 = PathEltOrInverse(); -p1 = PathFactory.pathSeq(p1, p2) ; + p1 = PathFactory.pathSeq(p1, p2) ; break; - } - case CARAT:{ + case CARAT: jj_consume_token(CARAT); p2 = PathElt(); -p1 = PathFactory.pathSeq(p1, new P_Inverse(p2)) ; + p1 = PathFactory.pathSeq(p1, new P_Inverse(p2)) ; break; - } default: - jj_la1[112] = jj_gen; + jj_la1[116] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } -{if ("" != null) return p1;} + {if (true) return p1;} throw new Error("Missing return statement in function"); -} + } - final public Path PathElt() throws ParseException {String str ; Node n ; Path p ; + final public Path PathElt() throws ParseException { + String str ; Node n ; Path p ; p = PathPrimary(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACE: case PLUS: case STAR: - case QMARK:{ + case QMARK: p = PathMod(p); break; - } default: - jj_la1[113] = jj_gen; + jj_la1[117] = jj_gen; ; } -{if ("" != null) return p ;} + {if (true) return p ;} throw new Error("Missing return statement in function"); -} + } - final public Path PathEltOrInverse() throws ParseException {String str ; Node n ; Path p ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public Path PathEltOrInverse() throws ParseException { + String str ; Node n ; Path p ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -3648,351 +3796,327 @@ final public void PropertyListPath(Node s, TripleCollector acc) throws ParseExce case MULTI: case SHORTEST: case LPAREN: - case BANG:{ + case BANG: p = PathElt(); break; - } - case CARAT:{ + case CARAT: jj_consume_token(CARAT); p = PathElt(); -p = PathFactory.pathInverse(p) ; + p = PathFactory.pathInverse(p) ; break; - } default: - jj_la1[114] = jj_gen; + jj_la1[118] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -{if ("" != null) return p ;} + {if (true) return p ;} throw new Error("Missing return statement in function"); -} + } - final public Path PathMod(Path p) throws ParseException {long i1 ; long i2 ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case QMARK:{ + final public Path PathMod(Path p) throws ParseException { + long i1 ; long i2 ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case QMARK: jj_consume_token(QMARK); -{if ("" != null) return PathFactory.pathZeroOrOne(p) ;} + {if (true) return PathFactory.pathZeroOrOne(p) ;} break; - } - case STAR:{ + case STAR: jj_consume_token(STAR); -{if ("" != null) return PathFactory.pathZeroOrMore1(p) ;} + {if (true) return PathFactory.pathZeroOrMore1(p) ;} break; - } - case PLUS:{ + case PLUS: jj_consume_token(PLUS); -{if ("" != null) return PathFactory.pathOneOrMore1(p) ;} + {if (true) return PathFactory.pathOneOrMore1(p) ;} break; - } - case LBRACE:{ + case LBRACE: jj_consume_token(LBRACE); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case STAR:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case STAR: jj_consume_token(STAR); jj_consume_token(RBRACE); -{if ("" != null) return PathFactory.pathZeroOrMoreN(p) ;} + {if (true) return PathFactory.pathZeroOrMoreN(p) ;} break; - } - case PLUS:{ + case PLUS: jj_consume_token(PLUS); jj_consume_token(RBRACE); -{if ("" != null) return PathFactory.pathOneOrMoreN(p) ;} + {if (true) return PathFactory.pathOneOrMoreN(p) ;} break; - } - case INTEGER:{ + case INTEGER: i1 = Integer(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case COMMA:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: jj_consume_token(COMMA); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case RBRACE:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case RBRACE: jj_consume_token(RBRACE); -{if ("" != null) return PathFactory.pathMod(p, i1, PathFactory.UNSET) ;} + {if (true) return PathFactory.pathMod(p, i1, PathFactory.UNSET) ;} break; - } - case INTEGER:{ + case INTEGER: i2 = Integer(); jj_consume_token(RBRACE); -{if ("" != null) return PathFactory.pathMod(p, i1, i2) ;} + {if (true) return PathFactory.pathMod(p, i1, i2) ;} break; - } default: - jj_la1[115] = jj_gen; + jj_la1[119] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } - case RBRACE:{ + case RBRACE: jj_consume_token(RBRACE); -{if ("" != null) return PathFactory.pathFixedLength(p, i1) ;} + {if (true) return PathFactory.pathFixedLength(p, i1) ;} break; - } default: - jj_la1[116] = jj_gen; + jj_la1[120] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } - case COMMA:{ + case COMMA: jj_consume_token(COMMA); i2 = Integer(); jj_consume_token(RBRACE); -{if ("" != null) return PathFactory.pathMod(p, PathFactory.UNSET, i2) ;} + {if (true) return PathFactory.pathMod(p, PathFactory.UNSET, i2) ;} break; - } default: - jj_la1[117] = jj_gen; + jj_la1[121] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } default: - jj_la1[118] = jj_gen; + jj_la1[122] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public Path PathPrimary() throws ParseException {String str ; Path p ; Node n ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public Path PathPrimary() throws ParseException { + String str ; Path p ; Node n ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: str = iri(); -n = createNode(str) ; p = PathFactory.pathLink(n) ; + n = createNode(str) ; p = PathFactory.pathLink(n) ; break; - } - case KW_A:{ + case KW_A: jj_consume_token(KW_A); -p = PathFactory.pathLink(nRDFtype) ; + p = PathFactory.pathLink(nRDFtype) ; break; - } - case BANG:{ + case BANG: jj_consume_token(BANG); p = PathNegatedPropertySet(); break; - } - case LPAREN:{ + case LPAREN: jj_consume_token(LPAREN); p = Path(); jj_consume_token(RPAREN); break; - } - case DISTINCT:{ + case DISTINCT: jj_consume_token(DISTINCT); jj_consume_token(LPAREN); p = Path(); -p = PathFactory.pathDistinct(p) ; + p = PathFactory.pathDistinct(p) ; jj_consume_token(RPAREN); break; - } - case SHORTEST:{ + case SHORTEST: jj_consume_token(SHORTEST); jj_consume_token(LPAREN); p = Path(); -p = PathFactory.pathShortest(p) ; + p = PathFactory.pathShortest(p) ; jj_consume_token(RPAREN); break; - } - case MULTI:{ + case MULTI: jj_consume_token(MULTI); jj_consume_token(LPAREN); p = Path(); -p = PathFactory.pathMulti(p) ; + p = PathFactory.pathMulti(p) ; jj_consume_token(RPAREN); break; - } default: - jj_la1[119] = jj_gen; + jj_la1[123] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -{if ("" != null) return p ;} + {if (true) return p ;} throw new Error("Missing return statement in function"); -} + } - final public Path PathNegatedPropertySet() throws ParseException {P_Path0 p ; P_NegPropSet pNegSet ; -pNegSet = new P_NegPropSet() ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public Path PathNegatedPropertySet() throws ParseException { + P_Path0 p ; P_NegPropSet pNegSet ; + pNegSet = new P_NegPropSet() ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: case KW_A: - case CARAT:{ + case CARAT: p = PathOneInPropertySet(); -pNegSet.add(p) ; + pNegSet.add(p) ; break; - } - case LPAREN:{ + case LPAREN: jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: case KW_A: - case CARAT:{ + case CARAT: p = PathOneInPropertySet(); -pNegSet.add(p) ; + pNegSet.add(p) ; label_34: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case VBAR:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case VBAR: ; break; - } default: - jj_la1[120] = jj_gen; + jj_la1[124] = jj_gen; break label_34; } jj_consume_token(VBAR); p = PathOneInPropertySet(); -pNegSet.add(p) ; + pNegSet.add(p) ; } break; - } default: - jj_la1[121] = jj_gen; + jj_la1[125] = jj_gen; ; } jj_consume_token(RPAREN); break; - } default: - jj_la1[122] = jj_gen; + jj_la1[126] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -{if ("" != null) return pNegSet ;} + {if (true) return pNegSet ;} throw new Error("Missing return statement in function"); -} + } - final public P_Path0 PathOneInPropertySet() throws ParseException {String str ; Node n ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public P_Path0 PathOneInPropertySet() throws ParseException { + String str ; Node n ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: str = iri(); -n = createNode(str) ; {if ("" != null) return new P_Link(n) ;} + n = createNode(str) ; {if (true) return new P_Link(n) ;} break; - } - case KW_A:{ + case KW_A: jj_consume_token(KW_A); -{if ("" != null) return new P_Link(nRDFtype) ;} + {if (true) return new P_Link(nRDFtype) ;} break; - } - case CARAT:{ + case CARAT: jj_consume_token(CARAT); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: str = iri(); -n = createNode(str) ; {if ("" != null) return new P_ReverseLink(n) ;} + n = createNode(str) ; {if (true) return new P_ReverseLink(n) ;} break; - } - case KW_A:{ + case KW_A: jj_consume_token(KW_A); -{if ("" != null) return new P_ReverseLink(nRDFtype) ;} + {if (true) return new P_ReverseLink(nRDFtype) ;} break; - } default: - jj_la1[123] = jj_gen; + jj_la1[127] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } default: - jj_la1[124] = jj_gen; + jj_la1[128] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public long Integer() throws ParseException {Token t ; + final public long Integer() throws ParseException { + Token t ; t = jj_consume_token(INTEGER); -{if ("" != null) return integerValue(t.image) ;} + {if (true) return integerValue(t.image) ;} throw new Error("Missing return statement in function"); -} + } - final public Node TriplesNode(TripleCollectorMark acc) throws ParseException {Node n ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case LPAREN:{ + final public Node TriplesNode(TripleCollectorMark acc) throws ParseException { + Node n ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LPAREN: n = Collection(acc); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } - case LBRACKET:{ + case LBRACKET: n = BlankNodePropertyList(acc); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } default: - jj_la1[125] = jj_gen; + jj_la1[129] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public Node BlankNodePropertyList(TripleCollector acc) throws ParseException {Token t ; + final public Node BlankNodePropertyList(TripleCollector acc) throws ParseException { + Token t ; t = jj_consume_token(LBRACKET); -Node n = createBNode( t.beginLine, t.beginColumn) ; + Node n = createBNode( t.beginLine, t.beginColumn) ; PropertyListNotEmpty(n, acc); jj_consume_token(RBRACKET); -{if ("" != null) return n ;} + {if (true) return n ;} throw new Error("Missing return statement in function"); -} + } - final public Node TriplesNodePath(TripleCollectorMark acc) throws ParseException {Node n ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case LPAREN:{ + final public Node TriplesNodePath(TripleCollectorMark acc) throws ParseException { + Node n ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LPAREN: n = CollectionPath(acc); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } - case LBRACKET:{ + case LBRACKET: n = BlankNodePropertyListPath(acc); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } default: - jj_la1[126] = jj_gen; + jj_la1[130] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public Node BlankNodePropertyListPath(TripleCollector acc) throws ParseException {Token t ; + final public Node BlankNodePropertyListPath(TripleCollector acc) throws ParseException { + Token t ; t = jj_consume_token(LBRACKET); -Node n = createBNode( t.beginLine, t.beginColumn) ; + Node n = createBNode( t.beginLine, t.beginColumn) ; PropertyListPathNotEmpty(n, acc); jj_consume_token(RBRACKET); -{if ("" != null) return n ;} + {if (true) return n ;} throw new Error("Missing return statement in function"); -} + } - final public Node Collection(TripleCollectorMark acc) throws ParseException {Node listHead = nRDFnil ; Node lastCell = null ; int mark ; Node n ; Token t ; + final public Node Collection(TripleCollectorMark acc) throws ParseException { + Node listHead = nRDFnil ; Node lastCell = null ; int mark ; Node n ; Token t ; t = jj_consume_token(LPAREN); -int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; + int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; label_35: while (true) { -Node cell = createListNode( beginLine, beginColumn) ; + Node cell = createListNode( beginLine, beginColumn) ; if ( listHead == nRDFnil ) listHead = cell ; if ( lastCell != null ) insert(acc, lastCell, nRDFrest, cell) ; mark = acc.mark() ; n = GraphNode(acc); -insert(acc, mark, cell, nRDFfirst, n) ; + insert(acc, mark, cell, nRDFfirst, n) ; lastCell = cell ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -4018,37 +4142,37 @@ final public void PropertyListPath(Node s, TripleCollector acc) throws ParseExce case NIL: case LBRACKET: case ANON: - case LT2:{ + case LT2: ; break; - } default: - jj_la1[127] = jj_gen; + jj_la1[131] = jj_gen; break label_35; } } jj_consume_token(RPAREN); -if ( lastCell != null ) + if ( lastCell != null ) insert(acc, lastCell, nRDFrest, nRDFnil) ; - {if ("" != null) return listHead ;} + {if (true) return listHead ;} throw new Error("Missing return statement in function"); -} + } - final public Node CollectionPath(TripleCollectorMark acc) throws ParseException {Node listHead = nRDFnil ; Node lastCell = null ; int mark ; Node n ; Token t ; + final public Node CollectionPath(TripleCollectorMark acc) throws ParseException { + Node listHead = nRDFnil ; Node lastCell = null ; int mark ; Node n ; Token t ; t = jj_consume_token(LPAREN); -int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; + int beginLine = t.beginLine; int beginColumn = t.beginColumn; t = null; label_36: while (true) { -Node cell = createListNode( beginLine, beginColumn) ; + Node cell = createListNode( beginLine, beginColumn) ; if ( listHead == nRDFnil ) listHead = cell ; if ( lastCell != null ) insert(acc, lastCell, nRDFrest, cell) ; mark = acc.mark() ; n = GraphNodePath(acc); -insert(acc, mark, cell, nRDFfirst, n) ; + insert(acc, mark, cell, nRDFfirst, n) ; lastCell = cell ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -4074,56 +4198,54 @@ final public void PropertyListPath(Node s, TripleCollector acc) throws ParseExce case NIL: case LBRACKET: case ANON: - case LT2:{ + case LT2: ; break; - } default: - jj_la1[128] = jj_gen; + jj_la1[132] = jj_gen; break label_36; } } jj_consume_token(RPAREN); -if ( lastCell != null ) + if ( lastCell != null ) insert(acc, lastCell, nRDFrest, nRDFnil) ; - {if ("" != null) return listHead ;} + {if (true) return listHead ;} throw new Error("Missing return statement in function"); -} + } final public void AnnotationPath(TripleCollector acc, Node s, Node p, Path path, Node o) throws ParseException { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case L_ANN:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case L_ANN: jj_consume_token(L_ANN); -Node pAnn = preConditionAnnotation(s, p, path, o, token.beginLine, token.beginColumn) ; + Node pAnn = preConditionAnnotation(s, p, path, o, token.beginLine, token.beginColumn) ; Node x = createQuotedTriple(s, pAnn, o, token.beginLine, token.beginColumn); PropertyListPathNotEmpty(x, acc); jj_consume_token(R_ANN); break; - } default: - jj_la1[129] = jj_gen; + jj_la1[133] = jj_gen; ; } -} + } final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Node o) throws ParseException { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case L_ANN:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case L_ANN: jj_consume_token(L_ANN); -Node pAnn = preConditionAnnotation(s, p, path, o, token.beginLine, token.beginColumn) ; + Node pAnn = preConditionAnnotation(s, p, path, o, token.beginLine, token.beginColumn) ; Node x = createQuotedTriple(s, p, o, token.beginLine, token.beginColumn); PropertyListNotEmpty(x, acc); jj_consume_token(R_ANN); break; - } default: - jj_la1[130] = jj_gen; + jj_la1[134] = jj_gen; ; } -} + } - final public Node GraphNode(TripleCollectorMark acc) throws ParseException {Node n ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public Node GraphNode(TripleCollectorMark acc) throws ParseException { + Node n ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -4147,27 +4269,26 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case STRING_LITERAL_LONG2: case NIL: case ANON: - case LT2:{ + case LT2: n = VarOrTerm(); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } case LPAREN: - case LBRACKET:{ + case LBRACKET: n = TriplesNode(acc); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } default: - jj_la1[131] = jj_gen; + jj_la1[135] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public Node GraphNodePath(TripleCollectorMark acc) throws ParseException {Node n ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public Node GraphNodePath(TripleCollectorMark acc) throws ParseException { + Node n ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: case PNAME_LN: @@ -4191,47 +4312,43 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case STRING_LITERAL_LONG2: case NIL: case ANON: - case LT2:{ + case LT2: n = VarOrTerm(); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } case LPAREN: - case LBRACKET:{ + case LBRACKET: n = TriplesNodePath(acc); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } default: - jj_la1[132] = jj_gen; + jj_la1[136] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public Node VarOrTerm() throws ParseException {Node n = null ; String iri ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public Node VarOrTerm() throws ParseException { + Node n = null ; String iri ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VAR1: - case VAR2:{ + case VAR2: n = Var(); break; - } case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: iri = iri(); -{if ("" != null) return createNode(iri) ;} + {if (true) return createNode(iri) ;} break; - } case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: - case STRING_LITERAL_LONG2:{ + case STRING_LITERAL_LONG2: n = RDFLiteral(); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } case INTEGER: case DECIMAL: case DOUBLE: @@ -4240,97 +4357,91 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case DOUBLE_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL_NEGATIVE: - case DOUBLE_NEGATIVE:{ + case DOUBLE_NEGATIVE: n = NumericLiteral(); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } case TRUE: - case FALSE:{ + case FALSE: n = BooleanLiteral(); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } case BLANK_NODE_LABEL: - case ANON:{ + case ANON: n = BlankNode(); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } - case NIL:{ + case NIL: jj_consume_token(NIL); -{if ("" != null) return nRDFnil ;} + {if (true) return nRDFnil ;} break; - } - case LT2:{ + case LT2: n = QuotedTriple(); break; - } default: - jj_la1[133] = jj_gen; + jj_la1[137] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -{if ("" != null) return n ;} + {if (true) return n ;} throw new Error("Missing return statement in function"); -} + } - final public Node QuotedTriple() throws ParseException {Node n = null ; Token t ; Node s , p , o ; + final public Node QuotedTriple() throws ParseException { + Node n = null ; Token t ; Node s , p , o ; t = jj_consume_token(LT2); s = VarOrTerm(); p = Verb(); o = VarOrTerm(); -n = createQuotedTriple(s, p, o, t.beginLine, t.beginColumn); + n = createQuotedTriple(s, p, o, t.beginLine, t.beginColumn); jj_consume_token(GT2); -{if ("" != null) return n;} + {if (true) return n;} throw new Error("Missing return statement in function"); -} + } - final public Node QuotedTripleData() throws ParseException {Node n = null ; Token t ; String iri ; Node s , p , o ; + final public Node QuotedTripleData() throws ParseException { + Node n = null ; Token t ; String iri ; Node s , p , o ; t = jj_consume_token(LT2); s = DataValueTerm(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: iri = iri(); -p = createNode(iri) ; + p = createNode(iri) ; break; - } - case KW_A:{ + case KW_A: jj_consume_token(KW_A); -p = nRDFtype ; + p = nRDFtype ; break; - } default: - jj_la1[134] = jj_gen; + jj_la1[138] = jj_gen; jj_consume_token(-1); throw new ParseException(); } o = DataValueTerm(); -n = createQuotedTriple(s, p, o, t.beginLine, t.beginColumn); + n = createQuotedTriple(s, p, o, t.beginLine, t.beginColumn); jj_consume_token(GT2); -{if ("" != null) return n;} + {if (true) return n;} throw new Error("Missing return statement in function"); -} + } - final public Node DataValueTerm() throws ParseException {Node n = null ; String iri ; Node s , p , o ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public Node DataValueTerm() throws ParseException { + Node n = null ; String iri ; Node s , p , o ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: iri = iri(); -{if ("" != null) return createNode(iri) ;} + {if (true) return createNode(iri) ;} break; - } case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: - case STRING_LITERAL_LONG2:{ + case STRING_LITERAL_LONG2: n = RDFLiteral(); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } case INTEGER: case DECIMAL: case DOUBLE: @@ -4339,157 +4450,153 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case DOUBLE_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL_NEGATIVE: - case DOUBLE_NEGATIVE:{ + case DOUBLE_NEGATIVE: n = NumericLiteral(); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } case TRUE: - case FALSE:{ + case FALSE: n = BooleanLiteral(); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } - case LT2:{ + case LT2: n = QuotedTripleData(); -{if ("" != null) return n ;} + {if (true) return n ;} break; - } default: - jj_la1[135] = jj_gen; + jj_la1[139] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public Node VarOrIri() throws ParseException {Node n = null ; String iri ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public Node VarOrIri() throws ParseException { + Node n = null ; String iri ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VAR1: - case VAR2:{ + case VAR2: n = Var(); break; - } case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: iri = iri(); -n = createNode(iri) ; + n = createNode(iri) ; break; - } default: - jj_la1[136] = jj_gen; + jj_la1[140] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -{if ("" != null) return n ;} + {if (true) return n ;} throw new Error("Missing return statement in function"); -} + } - final public Node VarOrBlankNodeOrIri() throws ParseException {Node n = null ; String iri ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public Node VarOrBlankNodeOrIri() throws ParseException { + Node n = null ; String iri ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case VAR1: - case VAR2:{ + case VAR2: n = Var(); break; - } case BLANK_NODE_LABEL: - case ANON:{ + case ANON: n = BlankNode(); break; - } case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: iri = iri(); -n = createNode(iri) ; + n = createNode(iri) ; break; - } default: - jj_la1[137] = jj_gen; + jj_la1[141] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -{if ("" != null) return n ;} + {if (true) return n ;} throw new Error("Missing return statement in function"); -} + } - final public Var Var() throws ParseException {Token t ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case VAR1:{ + final public Var Var() throws ParseException { + Token t ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case VAR1: t = jj_consume_token(VAR1); break; - } - case VAR2:{ + case VAR2: t = jj_consume_token(VAR2); break; - } default: - jj_la1[138] = jj_gen; + jj_la1[142] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -{if ("" != null) return createVariable(t.image, t.beginLine, t.beginColumn) ;} + {if (true) return createVariable(t.image, t.beginLine, t.beginColumn) ;} throw new Error("Missing return statement in function"); -} + } - final public Expr Expression() throws ParseException {Expr expr ; + final public Expr Expression() throws ParseException { + Expr expr ; expr = ConditionalOrExpression(); -{if ("" != null) return expr ;} + {if (true) return expr ;} throw new Error("Missing return statement in function"); -} + } - final public Expr ConditionalOrExpression() throws ParseException {Expr expr1, expr2 ; + final public Expr ConditionalOrExpression() throws ParseException { + Expr expr1, expr2 ; expr1 = ConditionalAndExpression(); label_37: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SC_OR:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SC_OR: ; break; - } default: - jj_la1[139] = jj_gen; + jj_la1[143] = jj_gen; break label_37; } jj_consume_token(SC_OR); expr2 = ConditionalAndExpression(); -expr1 = new E_LogicalOr(expr1, expr2) ; + expr1 = new E_LogicalOr(expr1, expr2) ; } -{if ("" != null) return expr1 ;} + {if (true) return expr1 ;} throw new Error("Missing return statement in function"); -} + } - final public Expr ConditionalAndExpression() throws ParseException {Expr expr1, expr2 ; + final public Expr ConditionalAndExpression() throws ParseException { + Expr expr1, expr2 ; expr1 = ValueLogical(); label_38: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SC_AND:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SC_AND: ; break; - } default: - jj_la1[140] = jj_gen; + jj_la1[144] = jj_gen; break label_38; } jj_consume_token(SC_AND); expr2 = ValueLogical(); -expr1 = new E_LogicalAnd(expr1, expr2) ; + expr1 = new E_LogicalAnd(expr1, expr2) ; } -{if ("" != null) return expr1 ;} + {if (true) return expr1 ;} throw new Error("Missing return statement in function"); -} + } - final public Expr ValueLogical() throws ParseException {Expr expr ; + final public Expr ValueLogical() throws ParseException { + Expr expr ; expr = RelationalExpression(); -{if ("" != null) return expr ;} + {if (true) return expr ;} throw new Error("Missing return statement in function"); -} + } - final public Expr RelationalExpression() throws ParseException {Expr expr1, expr2 ; ExprList a ; + final public Expr RelationalExpression() throws ParseException { + Expr expr1, expr2 ; ExprList a ; expr1 = NumericExpression(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NOT: case IN: case EQ: @@ -4497,83 +4604,76 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case GT: case LT: case LE: - case GE:{ - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case EQ:{ + case GE: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case EQ: jj_consume_token(EQ); expr2 = NumericExpression(); -expr1 = new E_Equals(expr1, expr2) ; + expr1 = new E_Equals(expr1, expr2) ; break; - } - case NE:{ + case NE: jj_consume_token(NE); expr2 = NumericExpression(); -expr1 = new E_NotEquals(expr1, expr2) ; + expr1 = new E_NotEquals(expr1, expr2) ; break; - } - case LT:{ + case LT: jj_consume_token(LT); expr2 = NumericExpression(); -expr1 = new E_LessThan(expr1, expr2) ; + expr1 = new E_LessThan(expr1, expr2) ; break; - } - case GT:{ + case GT: jj_consume_token(GT); expr2 = NumericExpression(); -expr1 = new E_GreaterThan(expr1, expr2) ; + expr1 = new E_GreaterThan(expr1, expr2) ; break; - } - case LE:{ + case LE: jj_consume_token(LE); expr2 = NumericExpression(); -expr1 = new E_LessThanOrEqual(expr1, expr2) ; + expr1 = new E_LessThanOrEqual(expr1, expr2) ; break; - } - case GE:{ + case GE: jj_consume_token(GE); expr2 = NumericExpression(); -expr1 = new E_GreaterThanOrEqual(expr1, expr2) ; + expr1 = new E_GreaterThanOrEqual(expr1, expr2) ; break; - } - case IN:{ + case IN: jj_consume_token(IN); a = ExpressionList(); -expr1 = new E_OneOf(expr1, a) ; + expr1 = new E_OneOf(expr1, a) ; break; - } - case NOT:{ + case NOT: jj_consume_token(NOT); jj_consume_token(IN); a = ExpressionList(); -expr1 = new E_NotOneOf(expr1, a) ; + expr1 = new E_NotOneOf(expr1, a) ; break; - } default: - jj_la1[141] = jj_gen; + jj_la1[145] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } default: - jj_la1[142] = jj_gen; + jj_la1[146] = jj_gen; ; } -{if ("" != null) return expr1 ;} + {if (true) return expr1 ;} throw new Error("Missing return statement in function"); -} + } - final public Expr NumericExpression() throws ParseException {Expr expr ; + final public Expr NumericExpression() throws ParseException { + Expr expr ; expr = AdditiveExpression(); -{if ("" != null) return expr ;} + {if (true) return expr ;} throw new Error("Missing return statement in function"); -} + } - final public Expr AdditiveExpression() throws ParseException {Expr expr1, expr2, expr3 ; boolean addition ; Node n ; + final public Expr AdditiveExpression() throws ParseException { + Expr expr1, expr2, expr3 ; boolean addition ; Node n ; expr1 = MultiplicativeExpression(); label_39: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER_POSITIVE: case DECIMAL_POSITIVE: case DOUBLE_POSITIVE: @@ -4581,175 +4681,160 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case DECIMAL_NEGATIVE: case DOUBLE_NEGATIVE: case PLUS: - case MINUS:{ + case MINUS: ; break; - } default: - jj_la1[143] = jj_gen; + jj_la1[147] = jj_gen; break label_39; } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case PLUS:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case PLUS: jj_consume_token(PLUS); expr2 = MultiplicativeExpression(); -expr1 = new E_Add(expr1, expr2) ; + expr1 = new E_Add(expr1, expr2) ; break; - } - case MINUS:{ + case MINUS: jj_consume_token(MINUS); expr2 = MultiplicativeExpression(); -expr1 = new E_Subtract(expr1, expr2) ; + expr1 = new E_Subtract(expr1, expr2) ; break; - } case INTEGER_POSITIVE: case DECIMAL_POSITIVE: case DOUBLE_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL_NEGATIVE: - case DOUBLE_NEGATIVE:{ - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case DOUBLE_NEGATIVE: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER_POSITIVE: case DECIMAL_POSITIVE: - case DOUBLE_POSITIVE:{ + case DOUBLE_POSITIVE: n = NumericLiteralPositive(); -n = stripSign(n) ; + n = stripSign(n) ; expr2 = asExpr(n) ; addition = true ; break; - } case INTEGER_NEGATIVE: case DECIMAL_NEGATIVE: - case DOUBLE_NEGATIVE:{ + case DOUBLE_NEGATIVE: n = NumericLiteralNegative(); -n = stripSign(n) ; + n = stripSign(n) ; expr2 = asExpr(n) ; addition = false ; break; - } default: - jj_la1[144] = jj_gen; + jj_la1[148] = jj_gen; jj_consume_token(-1); throw new ParseException(); } label_40: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case STAR: - case SLASH:{ + case SLASH: ; break; - } default: - jj_la1[145] = jj_gen; + jj_la1[149] = jj_gen; break label_40; } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case STAR:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case STAR: jj_consume_token(STAR); expr3 = UnaryExpression(); -expr2 = new E_Multiply(expr2, expr3) ; + expr2 = new E_Multiply(expr2, expr3) ; break; - } - case SLASH:{ + case SLASH: jj_consume_token(SLASH); expr3 = UnaryExpression(); -expr2 = new E_Divide(expr2, expr3) ; + expr2 = new E_Divide(expr2, expr3) ; break; - } default: - jj_la1[146] = jj_gen; + jj_la1[150] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } -if ( addition ) + if ( addition ) expr1 = new E_Add(expr1, expr2) ; else expr1 = new E_Subtract(expr1, expr2) ; break; - } default: - jj_la1[147] = jj_gen; + jj_la1[151] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } -{if ("" != null) return expr1 ;} + {if (true) return expr1 ;} throw new Error("Missing return statement in function"); -} + } - final public Expr MultiplicativeExpression() throws ParseException {Expr expr1, expr2 ; + final public Expr MultiplicativeExpression() throws ParseException { + Expr expr1, expr2 ; expr1 = UnaryExpression(); label_41: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case MOD: case IDIV: case STAR: - case SLASH:{ + case SLASH: ; break; - } default: - jj_la1[148] = jj_gen; + jj_la1[152] = jj_gen; break label_41; } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case STAR:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case STAR: jj_consume_token(STAR); expr2 = UnaryExpression(); -expr1 = new E_Multiply(expr1, expr2) ; + expr1 = new E_Multiply(expr1, expr2) ; break; - } - case SLASH:{ + case SLASH: jj_consume_token(SLASH); expr2 = UnaryExpression(); -expr1 = new E_Divide(expr1, expr2) ; + expr1 = new E_Divide(expr1, expr2) ; break; - } - case MOD:{ + case MOD: jj_consume_token(MOD); expr2 = UnaryExpression(); -expr1 = new E_OpNumericMod(expr1, expr2) ; + expr1 = new E_OpNumericMod(expr1, expr2) ; break; - } - case IDIV:{ + case IDIV: jj_consume_token(IDIV); expr2 = UnaryExpression(); -expr1 = new E_OpNumericIntegerDivide(expr1, expr2) ; + expr1 = new E_OpNumericIntegerDivide(expr1, expr2) ; break; - } default: - jj_la1[149] = jj_gen; + jj_la1[153] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } -{if ("" != null) return expr1 ;} + {if (true) return expr1 ;} throw new Error("Missing return statement in function"); -} + } - final public Expr UnaryExpression() throws ParseException {Expr expr ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case BANG:{ + final public Expr UnaryExpression() throws ParseException { + Expr expr ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case BANG: jj_consume_token(BANG); expr = PrimaryExpression(); -{if ("" != null) return new E_LogicalNot(expr) ;} + {if (true) return new E_LogicalNot(expr) ;} break; - } - case PLUS:{ + case PLUS: jj_consume_token(PLUS); expr = PrimaryExpression(); -{if ("" != null) return new E_UnaryPlus(expr) ;} + {if (true) return new E_UnaryPlus(expr) ;} break; - } - case MINUS:{ + case MINUS: jj_consume_token(MINUS); expr = PrimaryExpression(); -{if ("" != null) return new E_UnaryMinus(expr) ;} + {if (true) return new E_UnaryMinus(expr) ;} break; - } case IRIref: case PNAME_NS: case PNAME_LN: @@ -4776,6 +4861,7 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case VARIANCE: case VAR_SAMP: case VAR_POP: + case FOLD: case SAMPLE: case GROUP_CONCAT: case BOUND: @@ -4851,26 +4937,25 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case STRING_LITERAL_LONG1: case STRING_LITERAL_LONG2: case LPAREN: - case LT2:{ + case LT2: expr = PrimaryExpression(); -{if ("" != null) return expr ;} + {if (true) return expr ;} break; - } default: - jj_la1[150] = jj_gen; + jj_la1[154] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public Expr PrimaryExpression() throws ParseException {Expr expr ; Node n ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case LPAREN:{ + final public Expr PrimaryExpression() throws ParseException { + Expr expr ; Node n ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LPAREN: expr = BrackettedExpression(); -{if ("" != null) return expr ;} + {if (true) return expr ;} break; - } case TRIPLE: case IS_TRIPLE: case SUBJECT: @@ -4892,6 +4977,7 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case VARIANCE: case VAR_SAMP: case VAR_POP: + case FOLD: case SAMPLE: case GROUP_CONCAT: case BOUND: @@ -4950,26 +5036,23 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case SHA1: case SHA256: case SHA384: - case SHA512:{ + case SHA512: expr = BuiltInCall(); -{if ("" != null) return expr ;} + {if (true) return expr ;} break; - } case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: expr = iriOrFunction(); -{if ("" != null) return expr ;} + {if (true) return expr ;} break; - } case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: - case STRING_LITERAL_LONG2:{ + case STRING_LITERAL_LONG2: n = RDFLiteral(); -{if ("" != null) return asExpr(n) ;} + {if (true) return asExpr(n) ;} break; - } case INTEGER: case DECIMAL: case DOUBLE: @@ -4978,52 +5061,47 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case DOUBLE_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL_NEGATIVE: - case DOUBLE_NEGATIVE:{ + case DOUBLE_NEGATIVE: n = NumericLiteral(); -{if ("" != null) return asExpr(n) ;} + {if (true) return asExpr(n) ;} break; - } case TRUE: - case FALSE:{ + case FALSE: n = BooleanLiteral(); -{if ("" != null) return asExpr(n) ;} + {if (true) return asExpr(n) ;} break; - } case VAR1: - case VAR2:{ + case VAR2: n = Var(); -{if ("" != null) return asExpr(n) ;} + {if (true) return asExpr(n) ;} break; - } - case LT2:{ + case LT2: n = ExprQuotedTriple(); -{if ("" != null) return asExpr(n) ;} + {if (true) return asExpr(n) ;} break; - } default: - jj_la1[151] = jj_gen; + jj_la1[155] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public Node ExprVarOrTerm() throws ParseException {Node n; String s; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public Node ExprVarOrTerm() throws ParseException { + Node n; String s; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case IRIref: case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: s = iri(); -n = createNode(s); + n = createNode(s); break; - } case STRING_LITERAL1: case STRING_LITERAL2: case STRING_LITERAL_LONG1: - case STRING_LITERAL_LONG2:{ + case STRING_LITERAL_LONG2: n = RDFLiteral(); break; - } case INTEGER: case DECIMAL: case DOUBLE: @@ -5032,56 +5110,55 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case DOUBLE_POSITIVE: case INTEGER_NEGATIVE: case DECIMAL_NEGATIVE: - case DOUBLE_NEGATIVE:{ + case DOUBLE_NEGATIVE: n = NumericLiteral(); break; - } case TRUE: - case FALSE:{ + case FALSE: n = BooleanLiteral(); break; - } case VAR1: - case VAR2:{ + case VAR2: n = Var(); break; - } - case LT2:{ + case LT2: n = ExprQuotedTriple(); break; - } default: - jj_la1[152] = jj_gen; + jj_la1[156] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -{if ("" != null) return n;} + {if (true) return n;} throw new Error("Missing return statement in function"); -} + } - final public Node ExprQuotedTriple() throws ParseException {Token t ; Node s,p,o,n; + final public Node ExprQuotedTriple() throws ParseException { + Token t ; Node s,p,o,n; t = jj_consume_token(LT2); s = ExprVarOrTerm(); p = Verb(); o = ExprVarOrTerm(); -n = createQuotedTriple(s, p, o, t.beginLine, t.beginColumn); + n = createQuotedTriple(s, p, o, t.beginLine, t.beginColumn); jj_consume_token(GT2); -{if ("" != null) return n;} + {if (true) return n;} throw new Error("Missing return statement in function"); -} + } - final public Expr BrackettedExpression() throws ParseException {Expr expr ; + final public Expr BrackettedExpression() throws ParseException { + Expr expr ; jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return expr ;} + {if (true) return expr ;} throw new Error("Missing return statement in function"); -} + } - final public Expr BuiltInCall() throws ParseException {Expr expr ; + final public Expr BuiltInCall() throws ParseException { + Expr expr ; Expr expr1 = null ; Expr expr2 = null ; Expr expr3 = null ; Node gn ; ExprList a ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case AGG: case COUNT: case MIN: @@ -5096,446 +5173,393 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case VARIANCE: case VAR_SAMP: case VAR_POP: + case FOLD: case SAMPLE: - case GROUP_CONCAT:{ + case GROUP_CONCAT: expr = Aggregate(); -{if ("" != null) return expr ;} + {if (true) return expr ;} break; - } - case STR:{ + case STR: jj_consume_token(STR); jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_Str(expr) ;} + {if (true) return new E_Str(expr) ;} break; - } - case LANG:{ + case LANG: jj_consume_token(LANG); jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_Lang(expr) ;} + {if (true) return new E_Lang(expr) ;} break; - } - case LANGMATCHES:{ + case LANGMATCHES: jj_consume_token(LANGMATCHES); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(COMMA); expr2 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_LangMatches(expr1, expr2) ;} + {if (true) return new E_LangMatches(expr1, expr2) ;} break; - } - case DTYPE:{ + case DTYPE: jj_consume_token(DTYPE); jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_Datatype(expr) ;} + {if (true) return new E_Datatype(expr) ;} break; - } - case BOUND:{ + case BOUND: jj_consume_token(BOUND); jj_consume_token(LPAREN); gn = Var(); jj_consume_token(RPAREN); -{if ("" != null) return new E_Bound(new ExprVar(gn)) ;} + {if (true) return new E_Bound(new ExprVar(gn)) ;} break; - } - case IRI:{ + case IRI: jj_consume_token(IRI); jj_consume_token(LPAREN); expr1 = Expression(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case COMMA:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: jj_consume_token(COMMA); expr2 = Expression(); break; - } default: - jj_la1[153] = jj_gen; + jj_la1[157] = jj_gen; ; } jj_consume_token(RPAREN); -{if ("" != null) return makeFunction_IRI(expr1, expr2) ;} + {if (true) return makeFunction_IRI(expr1, expr2) ;} break; - } - case URI:{ + case URI: jj_consume_token(URI); jj_consume_token(LPAREN); expr1 = Expression(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case COMMA:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: jj_consume_token(COMMA); expr2 = Expression(); break; - } default: - jj_la1[154] = jj_gen; + jj_la1[158] = jj_gen; ; } jj_consume_token(RPAREN); -{if ("" != null) return makeFunction_URI(expr1, expr2) ;} + {if (true) return makeFunction_URI(expr1, expr2) ;} break; - } - case BNODE:{ + case BNODE: jj_consume_token(BNODE); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case LPAREN:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LPAREN: jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return makeFunction_BNode(expr1) ;} + {if (true) return makeFunction_BNode(expr1) ;} break; - } - case NIL:{ + case NIL: jj_consume_token(NIL); -{if ("" != null) return makeFunction_BNode() ;} + {if (true) return makeFunction_BNode() ;} break; - } default: - jj_la1[155] = jj_gen; + jj_la1[159] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } - case RAND:{ + case RAND: jj_consume_token(RAND); jj_consume_token(NIL); -{if ("" != null) return new E_Random() ;} + {if (true) return new E_Random() ;} break; - } - case ABS:{ + case ABS: jj_consume_token(ABS); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_NumAbs(expr1) ;} + {if (true) return new E_NumAbs(expr1) ;} break; - } - case CEIL:{ + case CEIL: jj_consume_token(CEIL); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_NumCeiling(expr1) ;} + {if (true) return new E_NumCeiling(expr1) ;} break; - } - case FLOOR:{ + case FLOOR: jj_consume_token(FLOOR); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_NumFloor(expr1) ;} + {if (true) return new E_NumFloor(expr1) ;} break; - } - case ROUND:{ + case ROUND: jj_consume_token(ROUND); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_NumRound(expr1) ;} + {if (true) return new E_NumRound(expr1) ;} break; - } - case MOD:{ + case MOD: jj_consume_token(MOD); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(COMMA); expr2 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_OpNumericMod(expr1, expr2);} + {if (true) return new E_OpNumericMod(expr1, expr2);} break; - } - case IDIV:{ + case IDIV: jj_consume_token(IDIV); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(COMMA); expr2 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_OpNumericIntegerDivide(expr1, expr2);} + {if (true) return new E_OpNumericIntegerDivide(expr1, expr2);} break; - } - case CONCAT:{ + case CONCAT: jj_consume_token(CONCAT); a = ExpressionList(); -{if ("" != null) return new E_StrConcat(a) ;} + {if (true) return new E_StrConcat(a) ;} break; - } - case SUBSTR:{ + case SUBSTR: expr = SubstringExpression(); -{if ("" != null) return expr ;} + {if (true) return expr ;} break; - } - case STRLEN:{ + case STRLEN: jj_consume_token(STRLEN); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_StrLength(expr1) ;} + {if (true) return new E_StrLength(expr1) ;} break; - } - case REPLACE:{ + case REPLACE: expr = StrReplaceExpression(); -{if ("" != null) return expr ;} + {if (true) return expr ;} break; - } - case UCASE:{ + case UCASE: jj_consume_token(UCASE); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_StrUpperCase(expr1) ;} + {if (true) return new E_StrUpperCase(expr1) ;} break; - } - case LCASE:{ + case LCASE: jj_consume_token(LCASE); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_StrLowerCase(expr1) ;} + {if (true) return new E_StrLowerCase(expr1) ;} break; - } - case ENCODE_FOR_URI:{ + case ENCODE_FOR_URI: jj_consume_token(ENCODE_FOR_URI); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_StrEncodeForURI(expr1) ;} + {if (true) return new E_StrEncodeForURI(expr1) ;} break; - } - case CONTAINS:{ + case CONTAINS: jj_consume_token(CONTAINS); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(COMMA); expr2 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_StrContains(expr1, expr2) ;} + {if (true) return new E_StrContains(expr1, expr2) ;} break; - } - case STRSTARTS:{ + case STRSTARTS: jj_consume_token(STRSTARTS); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(COMMA); expr2 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_StrStartsWith(expr1, expr2) ;} + {if (true) return new E_StrStartsWith(expr1, expr2) ;} break; - } - case STRENDS:{ + case STRENDS: jj_consume_token(STRENDS); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(COMMA); expr2 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_StrEndsWith(expr1, expr2) ;} + {if (true) return new E_StrEndsWith(expr1, expr2) ;} break; - } - case STRBEFORE:{ + case STRBEFORE: jj_consume_token(STRBEFORE); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(COMMA); expr2 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_StrBefore(expr1, expr2) ;} + {if (true) return new E_StrBefore(expr1, expr2) ;} break; - } - case STRAFTER:{ + case STRAFTER: jj_consume_token(STRAFTER); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(COMMA); expr2 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_StrAfter(expr1, expr2) ;} + {if (true) return new E_StrAfter(expr1, expr2) ;} break; - } - case YEAR:{ + case YEAR: jj_consume_token(YEAR); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_DateTimeYear(expr1) ;} + {if (true) return new E_DateTimeYear(expr1) ;} break; - } - case MONTH:{ + case MONTH: jj_consume_token(MONTH); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_DateTimeMonth(expr1) ;} + {if (true) return new E_DateTimeMonth(expr1) ;} break; - } - case DAY:{ + case DAY: jj_consume_token(DAY); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_DateTimeDay(expr1) ;} + {if (true) return new E_DateTimeDay(expr1) ;} break; - } - case HOURS:{ + case HOURS: jj_consume_token(HOURS); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_DateTimeHours(expr1) ;} + {if (true) return new E_DateTimeHours(expr1) ;} break; - } - case MINUTES:{ + case MINUTES: jj_consume_token(MINUTES); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_DateTimeMinutes(expr1) ;} + {if (true) return new E_DateTimeMinutes(expr1) ;} break; - } - case SECONDS:{ + case SECONDS: jj_consume_token(SECONDS); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_DateTimeSeconds(expr1) ;} + {if (true) return new E_DateTimeSeconds(expr1) ;} break; - } - case TIMEZONE:{ + case TIMEZONE: jj_consume_token(TIMEZONE); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_DateTimeTimezone(expr1) ;} + {if (true) return new E_DateTimeTimezone(expr1) ;} break; - } - case TZ:{ + case TZ: jj_consume_token(TZ); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_DateTimeTZ(expr1) ;} + {if (true) return new E_DateTimeTZ(expr1) ;} break; - } - case ADJUST:{ + case ADJUST: jj_consume_token(ADJUST); jj_consume_token(LPAREN); expr1 = Expression(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case COMMA:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: jj_consume_token(COMMA); expr2 = Expression(); break; - } default: - jj_la1[156] = jj_gen; + jj_la1[160] = jj_gen; ; } jj_consume_token(RPAREN); -{if ("" != null) return new E_AdjustToTimezone(expr1, expr2) ;} + {if (true) return new E_AdjustToTimezone(expr1, expr2) ;} break; - } - case NOW:{ + case NOW: jj_consume_token(NOW); jj_consume_token(NIL); -{if ("" != null) return new E_Now() ;} + {if (true) return new E_Now() ;} break; - } - case UUID:{ + case UUID: jj_consume_token(UUID); jj_consume_token(NIL); -{if ("" != null) return new E_UUID() ;} + {if (true) return new E_UUID() ;} break; - } - case STRUUID:{ + case STRUUID: jj_consume_token(STRUUID); jj_consume_token(NIL); -{if ("" != null) return new E_StrUUID() ;} + {if (true) return new E_StrUUID() ;} break; - } - case MD5:{ + case MD5: jj_consume_token(MD5); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_MD5(expr1) ;} + {if (true) return new E_MD5(expr1) ;} break; - } - case SHA1:{ + case SHA1: jj_consume_token(SHA1); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_SHA1(expr1) ;} + {if (true) return new E_SHA1(expr1) ;} break; - } - case SHA256:{ + case SHA256: jj_consume_token(SHA256); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_SHA256(expr1) ;} + {if (true) return new E_SHA256(expr1) ;} break; - } - case SHA384:{ + case SHA384: jj_consume_token(SHA384); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_SHA384(expr1) ;} + {if (true) return new E_SHA384(expr1) ;} break; - } - case SHA512:{ + case SHA512: jj_consume_token(SHA512); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_SHA512(expr1) ;} + {if (true) return new E_SHA512(expr1) ;} break; - } - case VERSION:{ + case VERSION: jj_consume_token(VERSION); jj_consume_token(NIL); -{if ("" != null) return new E_Version();} + {if (true) return new E_Version();} break; - } - case COALESCE:{ + case COALESCE: jj_consume_token(COALESCE); a = ExpressionList(); -{if ("" != null) return new E_Coalesce(a) ;} + {if (true) return new E_Coalesce(a) ;} break; - } - case CALL:{ + case CALL: jj_consume_token(CALL); -a = new ExprList() ; + a = new ExprList() ; jj_consume_token(LPAREN); expr = Expression(); -a.add(expr) ; + a.add(expr) ; label_42: while (true) { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case COMMA:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: ; break; - } default: - jj_la1[157] = jj_gen; + jj_la1[161] = jj_gen; break label_42; } jj_consume_token(COMMA); expr = Expression(); -a.add(expr) ; + a.add(expr) ; } jj_consume_token(RPAREN); -{if ("" != null) return new E_Call(a) ;} + {if (true) return new E_Call(a) ;} break; - } - case IF:{ + case IF: jj_consume_token(IF); jj_consume_token(LPAREN); expr = Expression(); @@ -5544,103 +5568,90 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod jj_consume_token(COMMA); expr2 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_Conditional(expr, expr1, expr2) ;} + {if (true) return new E_Conditional(expr, expr1, expr2) ;} break; - } - case STRLANG:{ + case STRLANG: jj_consume_token(STRLANG); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(COMMA); expr2 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_StrLang(expr1, expr2) ;} + {if (true) return new E_StrLang(expr1, expr2) ;} break; - } - case STRDT:{ + case STRDT: jj_consume_token(STRDT); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(COMMA); expr2 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_StrDatatype(expr1, expr2) ;} + {if (true) return new E_StrDatatype(expr1, expr2) ;} break; - } - case SAME_TERM:{ + case SAME_TERM: jj_consume_token(SAME_TERM); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(COMMA); expr2 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_SameTerm(expr1, expr2) ;} + {if (true) return new E_SameTerm(expr1, expr2) ;} break; - } - case IS_IRI:{ + case IS_IRI: jj_consume_token(IS_IRI); jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_IsIRI(expr) ;} + {if (true) return new E_IsIRI(expr) ;} break; - } - case IS_URI:{ + case IS_URI: jj_consume_token(IS_URI); jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_IsURI(expr) ;} + {if (true) return new E_IsURI(expr) ;} break; - } - case IS_BLANK:{ + case IS_BLANK: jj_consume_token(IS_BLANK); jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_IsBlank(expr) ;} + {if (true) return new E_IsBlank(expr) ;} break; - } - case IS_LITERAL:{ + case IS_LITERAL: jj_consume_token(IS_LITERAL); jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_IsLiteral(expr) ;} + {if (true) return new E_IsLiteral(expr) ;} break; - } - case IS_NUMERIC:{ + case IS_NUMERIC: jj_consume_token(IS_NUMERIC); jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_IsNumeric(expr) ;} + {if (true) return new E_IsNumeric(expr) ;} break; - } - case REGEX:{ + case REGEX: expr = RegexExpression(); -{if ("" != null) return expr ;} + {if (true) return expr ;} break; - } - case EXISTS:{ + case EXISTS: expr = ExistsFunc(); -{if ("" != null) return expr ;} + {if (true) return expr ;} break; - } - case NOT:{ + case NOT: expr = NotExistsFunc(); -{if ("" != null) return expr ;} + {if (true) return expr ;} break; - } - case IS_TRIPLE:{ + case IS_TRIPLE: jj_consume_token(IS_TRIPLE); jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_IsTriple(expr) ;} + {if (true) return new E_IsTriple(expr) ;} break; - } - case TRIPLE:{ + case TRIPLE: jj_consume_token(TRIPLE); jj_consume_token(LPAREN); expr1 = Expression(); @@ -5649,84 +5660,81 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod jj_consume_token(COMMA); expr3 = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_TripleFn(expr1, expr2, expr3) ;} + {if (true) return new E_TripleFn(expr1, expr2, expr3) ;} break; - } - case SUBJECT:{ + case SUBJECT: jj_consume_token(SUBJECT); jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_TripleSubject(expr) ;} + {if (true) return new E_TripleSubject(expr) ;} break; - } - case PREDICATE:{ + case PREDICATE: jj_consume_token(PREDICATE); jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_TriplePredicate(expr) ;} + {if (true) return new E_TriplePredicate(expr) ;} break; - } - case OBJECT:{ + case OBJECT: jj_consume_token(OBJECT); jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(RPAREN); -{if ("" != null) return new E_TripleObject(expr) ;} + {if (true) return new E_TripleObject(expr) ;} break; - } default: - jj_la1[158] = jj_gen; + jj_la1[162] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public Expr RegexExpression() throws ParseException {Expr expr ; Expr patExpr = null ; Expr flagsExpr = null ; + final public Expr RegexExpression() throws ParseException { + Expr expr ; Expr patExpr = null ; Expr flagsExpr = null ; jj_consume_token(REGEX); jj_consume_token(LPAREN); expr = Expression(); jj_consume_token(COMMA); patExpr = Expression(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case COMMA:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: jj_consume_token(COMMA); flagsExpr = Expression(); break; - } default: - jj_la1[159] = jj_gen; + jj_la1[163] = jj_gen; ; } jj_consume_token(RPAREN); -{if ("" != null) return new E_Regex(expr, patExpr, flagsExpr) ;} + {if (true) return new E_Regex(expr, patExpr, flagsExpr) ;} throw new Error("Missing return statement in function"); -} + } - final public Expr SubstringExpression() throws ParseException {Expr expr1 ; Expr expr2 = null ; Expr expr3 = null ; + final public Expr SubstringExpression() throws ParseException { + Expr expr1 ; Expr expr2 = null ; Expr expr3 = null ; jj_consume_token(SUBSTR); jj_consume_token(LPAREN); expr1 = Expression(); jj_consume_token(COMMA); expr2 = Expression(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case COMMA:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: jj_consume_token(COMMA); expr3 = Expression(); break; - } default: - jj_la1[160] = jj_gen; + jj_la1[164] = jj_gen; ; } jj_consume_token(RPAREN); -{if ("" != null) return new E_StrSubstring(expr1, expr2, expr3) ;} + {if (true) return new E_StrSubstring(expr1, expr2, expr3) ;} throw new Error("Missing return statement in function"); -} + } - final public Expr StrReplaceExpression() throws ParseException {Expr expr1 ; Expr expr2 = null ; Expr expr3 = null ; Expr expr4 = null ; + final public Expr StrReplaceExpression() throws ParseException { + Expr expr1 ; Expr expr2 = null ; Expr expr3 = null ; Expr expr4 = null ; jj_consume_token(REPLACE); jj_consume_token(LPAREN); expr1 = Expression(); @@ -5734,61 +5742,61 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod expr2 = Expression(); jj_consume_token(COMMA); expr3 = Expression(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case COMMA:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: jj_consume_token(COMMA); expr4 = Expression(); break; - } default: - jj_la1[161] = jj_gen; + jj_la1[165] = jj_gen; ; } jj_consume_token(RPAREN); -{if ("" != null) return new E_StrReplace(expr1,expr2,expr3,expr4) ;} + {if (true) return new E_StrReplace(expr1,expr2,expr3,expr4) ;} throw new Error("Missing return statement in function"); -} + } - final public Expr ExistsFunc() throws ParseException {Element el ; + final public Expr ExistsFunc() throws ParseException { + Element el ; jj_consume_token(EXISTS); el = GroupGraphPattern(); -{if ("" != null) return createExprExists(el) ;} + {if (true) return createExprExists(el) ;} throw new Error("Missing return statement in function"); -} + } - final public Expr NotExistsFunc() throws ParseException {Element el ; + final public Expr NotExistsFunc() throws ParseException { + Element el ; jj_consume_token(NOT); jj_consume_token(EXISTS); el = GroupGraphPattern(); -{if ("" != null) return createExprNotExists(el) ;} + {if (true) return createExprNotExists(el) ;} throw new Error("Missing return statement in function"); -} + } - final public Expr Aggregate() throws ParseException {Aggregator agg = null ; String sep = null ; + final public Expr Aggregate() throws ParseException { + Aggregator agg = null ; String sep = null ; Expr expr = null ; Expr expr2 = null ; boolean distinct = false ; ExprList ordered = new ExprList() ; Token t ; -startAggregate(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case COUNT:{ + startAggregate(); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COUNT: t = jj_consume_token(COUNT); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[162] = jj_gen; + jj_la1[166] = jj_gen; ; } - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case STAR:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case STAR: jj_consume_token(STAR); break; - } case IRIref: case PNAME_NS: case PNAME_LN: @@ -5815,6 +5823,7 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case VARIANCE: case VAR_SAMP: case VAR_POP: + case FOLD: case SAMPLE: case GROUP_CONCAT: case BOUND: @@ -5893,752 +5902,798 @@ final public void Annotation(TripleCollector acc, Node s, Node p, Path path, Nod case LT2: case BANG: case PLUS: - case MINUS:{ + case MINUS: expr = Expression(); break; - } default: - jj_la1[163] = jj_gen; + jj_la1[167] = jj_gen; jj_consume_token(-1); throw new ParseException(); } jj_consume_token(RPAREN); -if ( expr == null ) { agg = AggregatorFactory.createCount(distinct) ; } + if ( expr == null ) { agg = AggregatorFactory.createCount(distinct) ; } if ( expr != null ) { agg = AggregatorFactory.createCountExpr(distinct, expr) ; } break; - } - case SUM:{ + case SUM: t = jj_consume_token(SUM); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[164] = jj_gen; + jj_la1[168] = jj_gen; ; } expr = Expression(); jj_consume_token(RPAREN); -agg = AggregatorFactory.createSum(distinct, expr) ; + agg = AggregatorFactory.createSum(distinct, expr) ; break; - } - case MIN:{ + case MIN: t = jj_consume_token(MIN); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[165] = jj_gen; + jj_la1[169] = jj_gen; ; } expr = Expression(); jj_consume_token(RPAREN); -agg = AggregatorFactory.createMin(distinct, expr) ; + agg = AggregatorFactory.createMin(distinct, expr) ; break; - } - case MAX:{ + case MAX: t = jj_consume_token(MAX); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[166] = jj_gen; + jj_la1[170] = jj_gen; ; } expr = Expression(); jj_consume_token(RPAREN); -agg = AggregatorFactory.createMax(distinct, expr) ; + agg = AggregatorFactory.createMax(distinct, expr) ; break; - } - case AVG:{ + case AVG: t = jj_consume_token(AVG); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[167] = jj_gen; + jj_la1[171] = jj_gen; ; } expr = Expression(); jj_consume_token(RPAREN); -agg = AggregatorFactory.createAvg(distinct, expr) ; + agg = AggregatorFactory.createAvg(distinct, expr) ; break; - } - case MEDIAN:{ + case MEDIAN: t = jj_consume_token(MEDIAN); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[168] = jj_gen; + jj_la1[172] = jj_gen; ; } expr = Expression(); jj_consume_token(RPAREN); -agg = AggregatorFactory.createMedian(distinct, expr) ; + agg = AggregatorFactory.createMedian(distinct, expr) ; break; - } - case MODE:{ + case MODE: t = jj_consume_token(MODE); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[169] = jj_gen; + jj_la1[173] = jj_gen; ; } expr = Expression(); jj_consume_token(RPAREN); -agg = AggregatorFactory.createMode(distinct, expr) ; + agg = AggregatorFactory.createMode(distinct, expr) ; break; - } - case SAMPLE:{ + case SAMPLE: t = jj_consume_token(SAMPLE); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[170] = jj_gen; + jj_la1[174] = jj_gen; ; } expr = Expression(); jj_consume_token(RPAREN); -agg = AggregatorFactory.createSample(distinct, expr) ; + agg = AggregatorFactory.createSample(distinct, expr) ; break; - } - case GROUP_CONCAT:{ + case GROUP_CONCAT: t = jj_consume_token(GROUP_CONCAT); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: t = jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[171] = jj_gen; + jj_la1[175] = jj_gen; ; } expr = Expression(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SEMICOLON:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SEMICOLON: if (jj_2_5(2)) { jj_consume_token(SEMICOLON); jj_consume_token(SEPARATOR); jj_consume_token(EQ); sep = String(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SEMICOLON:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SEMICOLON: jj_consume_token(SEMICOLON); jj_consume_token(ORDER); jj_consume_token(BY); expr2 = Expression(); -ordered.add(expr2) ; + ordered.add(expr2) ; break; - } default: - jj_la1[172] = jj_gen; + jj_la1[176] = jj_gen; ; } } else { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case SEMICOLON:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case SEMICOLON: jj_consume_token(SEMICOLON); jj_consume_token(ORDER); jj_consume_token(BY); expr2 = Expression(); -ordered.add(expr2) ; + ordered.add(expr2) ; break; - } default: - jj_la1[173] = jj_gen; + jj_la1[177] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } break; - } default: - jj_la1[174] = jj_gen; + jj_la1[178] = jj_gen; ; } jj_consume_token(RPAREN); -agg = AggregatorFactory.createGroupConcat(distinct, expr, sep, ordered) ; + agg = AggregatorFactory.createGroupConcat(distinct, expr, sep, ordered) ; break; - } - case STDEV:{ + case STDEV: t = jj_consume_token(STDEV); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[175] = jj_gen; + jj_la1[179] = jj_gen; ; } expr = Expression(); jj_consume_token(RPAREN); -agg = AggregatorFactory.createCustom(AggURI.stdev, distinct, expr) ; + agg = AggregatorFactory.createCustom(AggURI.stdev, distinct, expr) ; break; - } - case STDEV_SAMP:{ + case STDEV_SAMP: t = jj_consume_token(STDEV_SAMP); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[176] = jj_gen; + jj_la1[180] = jj_gen; ; } expr = Expression(); jj_consume_token(RPAREN); -agg = AggregatorFactory.createCustom(AggURI.stdev_samp, distinct, expr) ; + agg = AggregatorFactory.createCustom(AggURI.stdev_samp, distinct, expr) ; break; - } - case STDEV_POP:{ + case STDEV_POP: t = jj_consume_token(STDEV_POP); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[177] = jj_gen; + jj_la1[181] = jj_gen; ; } expr = Expression(); jj_consume_token(RPAREN); -agg = AggregatorFactory.createCustom(AggURI.stdev_pop, distinct, expr) ; + agg = AggregatorFactory.createCustom(AggURI.stdev_pop, distinct, expr) ; break; - } - case VARIANCE:{ + case VARIANCE: t = jj_consume_token(VARIANCE); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[178] = jj_gen; + jj_la1[182] = jj_gen; ; } expr = Expression(); jj_consume_token(RPAREN); -agg = AggregatorFactory.createCustom(AggURI.variance, distinct, expr) ; + agg = AggregatorFactory.createCustom(AggURI.variance, distinct, expr) ; break; - } - case VAR_SAMP:{ + case VAR_SAMP: t = jj_consume_token(VAR_SAMP); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[179] = jj_gen; + jj_la1[183] = jj_gen; ; } expr = Expression(); jj_consume_token(RPAREN); -agg = AggregatorFactory.createCustom(AggURI.var_samp, distinct, expr) ; + agg = AggregatorFactory.createCustom(AggURI.var_samp, distinct, expr) ; break; - } - case VAR_POP:{ + case VAR_POP: t = jj_consume_token(VAR_POP); jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case DISTINCT:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: jj_consume_token(DISTINCT); -distinct = true ; + distinct = true ; break; - } default: - jj_la1[180] = jj_gen; + jj_la1[184] = jj_gen; ; } expr = Expression(); jj_consume_token(RPAREN); -agg = AggregatorFactory.createCustom(AggURI.var_pop, distinct, expr) ; + agg = AggregatorFactory.createCustom(AggURI.var_pop, distinct, expr) ; break; + case FOLD: + t = jj_consume_token(FOLD); + java.util.List scs = null ; + SortCondition sc = null ; + jj_consume_token(LPAREN); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DISTINCT: + jj_consume_token(DISTINCT); + distinct = true ; + break; + default: + jj_la1[185] = jj_gen; + ; + } + expr = Expression(); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + jj_consume_token(COMMA); + expr2 = Expression(); + break; + default: + jj_la1[186] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ORDER: + jj_consume_token(ORDER); + jj_consume_token(BY); + label_43: + while (true) { + sc = OrderConditionForAggregationFunction(); + if ( scs == null ) + scs = new java.util.ArrayList(); + scs.add(sc); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IRIref: + case PNAME_NS: + case PNAME_LN: + case VAR1: + case VAR2: + case ASC: + case DESC: + case TRIPLE: + case IS_TRIPLE: + case SUBJECT: + case PREDICATE: + case OBJECT: + case EXISTS: + case NOT: + case AGG: + case COUNT: + case MIN: + case MAX: + case SUM: + case AVG: + case MEDIAN: + case MODE: + case STDEV: + case STDEV_SAMP: + case STDEV_POP: + case VARIANCE: + case VAR_SAMP: + case VAR_POP: + case FOLD: + case SAMPLE: + case GROUP_CONCAT: + case BOUND: + case COALESCE: + case IF: + case BNODE: + case IRI: + case URI: + case CALL: + case STR: + case STRLANG: + case STRDT: + case DTYPE: + case LANG: + case LANGMATCHES: + case IS_URI: + case IS_IRI: + case IS_BLANK: + case IS_LITERAL: + case IS_NUMERIC: + case REGEX: + case SAME_TERM: + case RAND: + case ABS: + case CEIL: + case FLOOR: + case ROUND: + case MOD: + case IDIV: + case CONCAT: + case SUBSTR: + case STRLEN: + case REPLACE: + case UCASE: + case LCASE: + case ENCODE_FOR_URI: + case CONTAINS: + case STRSTARTS: + case STRENDS: + case STRBEFORE: + case STRAFTER: + case YEAR: + case MONTH: + case DAY: + case HOURS: + case MINUTES: + case SECONDS: + case TIMEZONE: + case TZ: + case ADJUST: + case NOW: + case UUID: + case STRUUID: + case VERSION: + case MD5: + case SHA1: + case SHA256: + case SHA384: + case SHA512: + case LPAREN: + ; + break; + default: + jj_la1[187] = jj_gen; + break label_43; + } + } + break; + default: + jj_la1[188] = jj_gen; + ; } - case AGG:{ + jj_consume_token(RPAREN); + agg = AggregatorFactory.createFold(distinct, expr, expr2, scs) ; + break; + case AGG: t = jj_consume_token(AGG); -String iri ; + String iri ; iri = iri(); -Args a = new Args() ; + Args a = new Args() ; a = ArgList(); -agg = AggregatorFactory.createCustom(iri, a) ; + agg = AggregatorFactory.createCustom(iri, a) ; break; - } default: - jj_la1[181] = jj_gen; + jj_la1[189] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -if ( ! getAllowAggregatesInExpressions() ) + if ( ! getAllowAggregatesInExpressions() ) throwParseException("Aggregate expression not legal at this point", t.beginLine, t.beginColumn) ; if ( getAggregateDepth() > 1 ) throwParseException("Nested aggregate in expression not legal", t.beginLine, t.beginColumn) ; -Expr exprAgg = getQuery().allocAggregate(agg) ; + Expr exprAgg = getQuery().allocAggregate(agg) ; finishAggregate(); - {if ("" != null) return exprAgg ;} + {if (true) return exprAgg ;} throw new Error("Missing return statement in function"); -} + } - final public Expr iriOrFunction() throws ParseException {String iri ; Args a = null ; + final public Expr iriOrFunction() throws ParseException { + String iri ; Args a = null ; iri = iri(); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: - case NIL:{ + case NIL: a = ArgList(); break; - } default: - jj_la1[182] = jj_gen; + jj_la1[190] = jj_gen; ; } -if ( a == null ) - {if ("" != null) return asExpr(createNode(iri)) ;} + if ( a == null ) + {if (true) return asExpr(createNode(iri)) ;} if ( AggregateRegistry.isRegistered(iri) ) { if ( ! getAllowAggregatesInExpressions() ) throwParseException("Aggregate expression not legal at this point : "+iri, -1, -1) ; Aggregator agg = AggregatorFactory.createCustom(iri, a) ; Expr exprAgg = getQuery().allocAggregate(agg) ; - {if ("" != null) return exprAgg ;} + {if (true) return exprAgg ;} } - {if ("" != null) return new E_Function(iri, a) ;} + {if (true) return new E_Function(iri, a) ;} throw new Error("Missing return statement in function"); -} + } - final public Node RDFLiteral() throws ParseException {Token t ; String lex = null ; + final public Node RDFLiteral() throws ParseException { + Token t ; String lex = null ; lex = String(); -String lang = null ; String uri = null ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + String lang = null ; String uri = null ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LANGTAG: - case DATATYPE:{ - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case LANGTAG:{ + case DATATYPE: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LANGTAG: t = jj_consume_token(LANGTAG); -lang = stripChars(t.image, 1) ; + lang = stripChars(t.image, 1) ; break; - } - case DATATYPE:{ + case DATATYPE: jj_consume_token(DATATYPE); uri = iri(); break; - } default: - jj_la1[183] = jj_gen; + jj_la1[191] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } default: - jj_la1[184] = jj_gen; + jj_la1[192] = jj_gen; ; } -{if ("" != null) return createLiteral(lex, lang, uri) ;} + {if (true) return createLiteral(lex, lang, uri) ;} throw new Error("Missing return statement in function"); -} + } - final public Node NumericLiteral() throws ParseException {Node n ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + final public Node NumericLiteral() throws ParseException { + Node n ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case INTEGER: case DECIMAL: - case DOUBLE:{ + case DOUBLE: n = NumericLiteralUnsigned(); break; - } case INTEGER_POSITIVE: case DECIMAL_POSITIVE: - case DOUBLE_POSITIVE:{ + case DOUBLE_POSITIVE: n = NumericLiteralPositive(); break; - } case INTEGER_NEGATIVE: case DECIMAL_NEGATIVE: - case DOUBLE_NEGATIVE:{ + case DOUBLE_NEGATIVE: n = NumericLiteralNegative(); break; - } default: - jj_la1[185] = jj_gen; + jj_la1[193] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -{if ("" != null) return n ;} + {if (true) return n ;} throw new Error("Missing return statement in function"); -} + } - final public Node NumericLiteralUnsigned() throws ParseException {Token t ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case INTEGER:{ + final public Node NumericLiteralUnsigned() throws ParseException { + Token t ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INTEGER: t = jj_consume_token(INTEGER); -{if ("" != null) return createLiteralInteger(t.image) ;} + {if (true) return createLiteralInteger(t.image) ;} break; - } - case DECIMAL:{ + case DECIMAL: t = jj_consume_token(DECIMAL); -{if ("" != null) return createLiteralDecimal(t.image) ;} + {if (true) return createLiteralDecimal(t.image) ;} break; - } - case DOUBLE:{ + case DOUBLE: t = jj_consume_token(DOUBLE); -{if ("" != null) return createLiteralDouble(t.image) ;} + {if (true) return createLiteralDouble(t.image) ;} break; - } default: - jj_la1[186] = jj_gen; + jj_la1[194] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public Node NumericLiteralPositive() throws ParseException {Token t ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case INTEGER_POSITIVE:{ + final public Node NumericLiteralPositive() throws ParseException { + Token t ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INTEGER_POSITIVE: t = jj_consume_token(INTEGER_POSITIVE); -{if ("" != null) return createLiteralInteger(t.image) ;} + {if (true) return createLiteralInteger(t.image) ;} break; - } - case DECIMAL_POSITIVE:{ + case DECIMAL_POSITIVE: t = jj_consume_token(DECIMAL_POSITIVE); -{if ("" != null) return createLiteralDecimal(t.image) ;} + {if (true) return createLiteralDecimal(t.image) ;} break; - } - case DOUBLE_POSITIVE:{ + case DOUBLE_POSITIVE: t = jj_consume_token(DOUBLE_POSITIVE); -{if ("" != null) return createLiteralDouble(t.image) ;} + {if (true) return createLiteralDouble(t.image) ;} break; - } default: - jj_la1[187] = jj_gen; + jj_la1[195] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public Node NumericLiteralNegative() throws ParseException {Token t ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case INTEGER_NEGATIVE:{ + final public Node NumericLiteralNegative() throws ParseException { + Token t ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case INTEGER_NEGATIVE: t = jj_consume_token(INTEGER_NEGATIVE); -{if ("" != null) return createLiteralInteger(t.image) ;} + {if (true) return createLiteralInteger(t.image) ;} break; - } - case DECIMAL_NEGATIVE:{ + case DECIMAL_NEGATIVE: t = jj_consume_token(DECIMAL_NEGATIVE); -{if ("" != null) return createLiteralDecimal(t.image) ;} + {if (true) return createLiteralDecimal(t.image) ;} break; - } - case DOUBLE_NEGATIVE:{ + case DOUBLE_NEGATIVE: t = jj_consume_token(DOUBLE_NEGATIVE); -{if ("" != null) return createLiteralDouble(t.image) ;} + {if (true) return createLiteralDouble(t.image) ;} break; - } default: - jj_la1[188] = jj_gen; + jj_la1[196] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } final public Node BooleanLiteral() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case TRUE:{ + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case TRUE: jj_consume_token(TRUE); -{if ("" != null) return XSD_TRUE ;} + {if (true) return XSD_TRUE ;} break; - } - case FALSE:{ + case FALSE: jj_consume_token(FALSE); -{if ("" != null) return XSD_FALSE ;} + {if (true) return XSD_FALSE ;} break; - } default: - jj_la1[189] = jj_gen; + jj_la1[197] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public String String() throws ParseException {Token t ; String lex ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case STRING_LITERAL1:{ + final public String String() throws ParseException { + Token t ; String lex ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case STRING_LITERAL1: t = jj_consume_token(STRING_LITERAL1); -lex = stripQuotes(t.image) ; + lex = stripQuotes(t.image) ; break; - } - case STRING_LITERAL2:{ + case STRING_LITERAL2: t = jj_consume_token(STRING_LITERAL2); -lex = stripQuotes(t.image) ; + lex = stripQuotes(t.image) ; break; - } - case STRING_LITERAL_LONG1:{ + case STRING_LITERAL_LONG1: t = jj_consume_token(STRING_LITERAL_LONG1); -lex = stripQuotes3(t.image) ; + lex = stripQuotes3(t.image) ; break; - } - case STRING_LITERAL_LONG2:{ + case STRING_LITERAL_LONG2: t = jj_consume_token(STRING_LITERAL_LONG2); -lex = stripQuotes3(t.image) ; + lex = stripQuotes3(t.image) ; break; - } default: - jj_la1[190] = jj_gen; + jj_la1[198] = jj_gen; jj_consume_token(-1); throw new ParseException(); } -checkString(lex, t.beginLine, t.beginColumn) ; + checkString(lex, t.beginLine, t.beginColumn) ; lex = unescapeStr(lex, t.beginLine, t.beginColumn) ; - {if ("" != null) return lex ;} + {if (true) return lex ;} throw new Error("Missing return statement in function"); -} + } - final public String iri() throws ParseException {String iri ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case IRIref:{ + final public String iri() throws ParseException { + String iri ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case IRIref: iri = IRIREF(); -{if ("" != null) return iri ;} + {if (true) return iri ;} break; - } case PNAME_NS: - case PNAME_LN:{ + case PNAME_LN: iri = PrefixedName(); -{if ("" != null) return iri ;} + {if (true) return iri ;} break; - } default: - jj_la1[191] = jj_gen; + jj_la1[199] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public String PrefixedName() throws ParseException {Token t ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case PNAME_LN:{ + final public String PrefixedName() throws ParseException { + Token t ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case PNAME_LN: t = jj_consume_token(PNAME_LN); -{if ("" != null) return resolvePName(t.image, t.beginLine, t.beginColumn) ;} + {if (true) return resolvePName(t.image, t.beginLine, t.beginColumn) ;} break; - } - case PNAME_NS:{ + case PNAME_NS: t = jj_consume_token(PNAME_NS); -{if ("" != null) return resolvePName(t.image, t.beginLine, t.beginColumn) ;} + {if (true) return resolvePName(t.image, t.beginLine, t.beginColumn) ;} break; - } default: - jj_la1[192] = jj_gen; + jj_la1[200] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public Node BlankNode() throws ParseException {Token t = null ; - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case BLANK_NODE_LABEL:{ + final public Node BlankNode() throws ParseException { + Token t = null ; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case BLANK_NODE_LABEL: t = jj_consume_token(BLANK_NODE_LABEL); -{if ("" != null) return createBNode(t.image, t.beginLine, t.beginColumn) ;} + {if (true) return createBNode(t.image, t.beginLine, t.beginColumn) ;} break; - } - case ANON:{ + case ANON: t = jj_consume_token(ANON); -{if ("" != null) return createBNode(t.beginLine, t.beginColumn) ;} + {if (true) return createBNode(t.beginLine, t.beginColumn) ;} break; - } default: - jj_la1[193] = jj_gen; + jj_la1[201] = jj_gen; jj_consume_token(-1); throw new ParseException(); } throw new Error("Missing return statement in function"); -} + } - final public String IRIREF() throws ParseException {Token t ; + final public String IRIREF() throws ParseException { + Token t ; t = jj_consume_token(IRIref); -{if ("" != null) return resolveQuotedIRI(t.image, t.beginLine, t.beginColumn) ;} + {if (true) return resolveQuotedIRI(t.image, t.beginLine, t.beginColumn) ;} throw new Error("Missing return statement in function"); -} + } - private boolean jj_2_1(int xla) - { + private boolean jj_2_1(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return (!jj_3_1()); } + try { return !jj_3_1(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(0, xla); } } - private boolean jj_2_2(int xla) - { + private boolean jj_2_2(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return (!jj_3_2()); } + try { return !jj_3_2(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(1, xla); } } - private boolean jj_2_3(int xla) - { + private boolean jj_2_3(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return (!jj_3_3()); } + try { return !jj_3_3(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(2, xla); } } - private boolean jj_2_4(int xla) - { + private boolean jj_2_4(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return (!jj_3_4()); } + try { return !jj_3_4(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(3, xla); } } - private boolean jj_2_5(int xla) - { + private boolean jj_2_5(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return (!jj_3_5()); } + try { return !jj_3_5(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(4, xla); } } - private boolean jj_3R_RegexExpression_1516_5_120() - { - if (jj_scan_token(REGEX)) return true; - if (jj_scan_token(LPAREN)) return true; - return false; - } - - private boolean jj_3R_BuiltInCall_1510_5_110() - { - if (jj_scan_token(OBJECT)) return true; - if (jj_scan_token(LPAREN)) return true; - return false; - } - - private boolean jj_3R_BuiltInCall_1508_5_109() - { - if (jj_scan_token(PREDICATE)) return true; + private boolean jj_3R_101() { + if (jj_scan_token(IS_BLANK)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1506_5_108() - { - if (jj_scan_token(SUBJECT)) return true; + private boolean jj_3R_100() { + if (jj_scan_token(IS_URI)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1504_5_107() - { - if (jj_scan_token(TRIPLE)) return true; + private boolean jj_3R_99() { + if (jj_scan_token(IS_IRI)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1501_5_105() - { - if (jj_3R_NotExistsFunc_1557_4_122()) return true; - return false; - } - - private boolean jj_3R_BuiltInCall_1502_3_106() - { - if (jj_scan_token(IS_TRIPLE)) return true; + private boolean jj_3R_98() { + if (jj_scan_token(SAME_TERM)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1500_5_104() - { - if (jj_3R_ExistsFunc_1551_4_121()) return true; - return false; - } - - private boolean jj_3R_BuiltInCall_1499_5_103() - { - if (jj_3R_RegexExpression_1516_5_120()) return true; - return false; - } - - private boolean jj_3_2() - { + private boolean jj_3_2() { if (jj_scan_token(SEMICOLON)) return true; - if (jj_3R_Prologue_72_3_44()) return true; + if (jj_3R_45()) return true; Token xsp; xsp = jj_scanpos; - if (jj_scan_token(147)) { - jj_scanpos = xsp; - if (jj_scan_token(148)) { - jj_scanpos = xsp; - if (jj_scan_token(155)) { + if (jj_scan_token(149)) { jj_scanpos = xsp; if (jj_scan_token(150)) { jj_scanpos = xsp; - if (jj_scan_token(151)) { + if (jj_scan_token(157)) { jj_scanpos = xsp; if (jj_scan_token(152)) { jj_scanpos = xsp; - if (jj_scan_token(149)) { + if (jj_scan_token(153)) { jj_scanpos = xsp; - if (jj_scan_token(160)) { + if (jj_scan_token(154)) { jj_scanpos = xsp; - if (jj_scan_token(143)) { + if (jj_scan_token(151)) { jj_scanpos = xsp; - if (jj_scan_token(142)) { + if (jj_scan_token(162)) { jj_scanpos = xsp; - if (jj_scan_token(161)) { + if (jj_scan_token(145)) { jj_scanpos = xsp; if (jj_scan_token(144)) { jj_scanpos = xsp; - if (jj_scan_token(145)) { + if (jj_scan_token(163)) { + jj_scanpos = xsp; + if (jj_scan_token(146)) { + jj_scanpos = xsp; + if (jj_scan_token(147)) { jj_scanpos = xsp; - if (jj_scan_token(146)) return true; + if (jj_scan_token(148)) return true; } } } @@ -6655,587 +6710,481 @@ private boolean jj_3_2() return false; } - private boolean jj_3R_Collection_1115_3_165() - { - if (jj_scan_token(LPAREN)) return true; - return false; - } - - private boolean jj_3R_BuiltInCall_1496_5_102() - { - if (jj_scan_token(IS_NUMERIC)) return true; - if (jj_scan_token(LPAREN)) return true; - return false; - } - - private boolean jj_3R_BuiltInCall_1494_5_101() - { - if (jj_scan_token(IS_LITERAL)) return true; - if (jj_scan_token(LPAREN)) return true; - return false; - } - - private boolean jj_3R_BuiltInCall_1492_5_100() - { - if (jj_scan_token(IS_BLANK)) return true; - if (jj_scan_token(LPAREN)) return true; - return false; - } - - private boolean jj_3R_BuiltInCall_1490_5_99() - { - if (jj_scan_token(IS_URI)) return true; - if (jj_scan_token(LPAREN)) return true; - return false; - } - - private boolean jj_3R_BuiltInCall_1488_5_98() - { - if (jj_scan_token(IS_IRI)) return true; - if (jj_scan_token(LPAREN)) return true; - return false; - } - - private boolean jj_3R_BuiltInCall_1486_5_97() - { - if (jj_scan_token(SAME_TERM)) return true; - if (jj_scan_token(LPAREN)) return true; - return false; - } - - private boolean jj_3R_BuiltInCall_1484_5_96() - { + private boolean jj_3R_97() { if (jj_scan_token(STRDT)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1482_5_95() - { + private boolean jj_3R_96() { if (jj_scan_token(STRLANG)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1478_5_94() - { + private boolean jj_3R_95() { if (jj_scan_token(IF)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BlankNodePropertyList_1092_3_166() - { + private boolean jj_3R_168() { if (jj_scan_token(LBRACKET)) return true; return false; } - private boolean jj_3R_BuiltInCall_1471_5_93() - { + private boolean jj_3R_94() { if (jj_scan_token(CALL)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_TriplesNode_1088_3_156() - { - if (jj_3R_BlankNodePropertyList_1092_3_166()) return true; + private boolean jj_3R_158() { + if (jj_3R_168()) return true; return false; } - private boolean jj_3R_BuiltInCall_1469_5_92() - { + private boolean jj_3R_93() { if (jj_scan_token(COALESCE)) return true; - if (jj_3R_ExpressionList_833_3_117()) return true; + if (jj_3R_118()) return true; return false; } - private boolean jj_3R_BuiltInCall_1468_5_91() - { + private boolean jj_3R_92() { if (jj_scan_token(VERSION)) return true; if (jj_scan_token(NIL)) return true; return false; } - private boolean jj_3R_TriplesNode_1086_3_126() - { + private boolean jj_3R_127() { Token xsp; xsp = jj_scanpos; - if (jj_3R_TriplesNode_1086_3_155()) { + if (jj_3R_157()) { jj_scanpos = xsp; - if (jj_3R_TriplesNode_1088_3_156()) return true; + if (jj_3R_158()) return true; } return false; } - private boolean jj_3R_TriplesNode_1086_3_155() - { - if (jj_3R_Collection_1115_3_165()) return true; + private boolean jj_3R_157() { + if (jj_3R_167()) return true; return false; } - private boolean jj_3R_BuiltInCall_1467_5_90() - { + private boolean jj_3R_91() { if (jj_scan_token(SHA512)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1466_5_89() - { + private boolean jj_3R_90() { if (jj_scan_token(SHA384)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1465_5_88() - { + private boolean jj_3R_89() { if (jj_scan_token(SHA256)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1464_5_87() - { + private boolean jj_3R_88() { if (jj_scan_token(SHA1)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1463_5_86() - { + private boolean jj_3R_87() { if (jj_scan_token(MD5)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1462_5_85() - { + private boolean jj_3R_86() { if (jj_scan_token(STRUUID)) return true; if (jj_scan_token(NIL)) return true; return false; } - private boolean jj_3R_BuiltInCall_1461_5_84() - { + private boolean jj_3R_85() { if (jj_scan_token(UUID)) return true; if (jj_scan_token(NIL)) return true; return false; } - private boolean jj_3R_BuiltInCall_1460_5_83() - { + private boolean jj_3R_84() { if (jj_scan_token(NOW)) return true; if (jj_scan_token(NIL)) return true; return false; } - private boolean jj_3R_BuiltInCall_1457_5_82() - { + private boolean jj_3R_83() { if (jj_scan_token(ADJUST)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1456_5_81() - { + private boolean jj_3R_82() { if (jj_scan_token(TZ)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1455_5_80() - { + private boolean jj_3R_81() { if (jj_scan_token(TIMEZONE)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1454_5_79() - { + private boolean jj_3R_80() { if (jj_scan_token(SECONDS)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1453_5_78() - { + private boolean jj_3R_79() { if (jj_scan_token(MINUTES)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1452_5_77() - { + private boolean jj_3R_78() { if (jj_scan_token(HOURS)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1451_5_76() - { + private boolean jj_3R_77() { if (jj_scan_token(DAY)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1450_5_75() - { + private boolean jj_3R_76() { if (jj_scan_token(MONTH)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1449_5_74() - { + private boolean jj_3R_75() { if (jj_scan_token(YEAR)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1447_5_73() - { + private boolean jj_3R_74() { if (jj_scan_token(STRAFTER)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1445_5_72() - { + private boolean jj_3R_73() { if (jj_scan_token(STRBEFORE)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1443_5_71() - { + private boolean jj_3R_72() { if (jj_scan_token(STRENDS)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1441_5_70() - { + private boolean jj_3R_71() { if (jj_scan_token(STRSTARTS)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1439_5_69() - { + private boolean jj_3R_70() { if (jj_scan_token(CONTAINS)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1438_5_68() - { + private boolean jj_3R_69() { if (jj_scan_token(ENCODE_FOR_URI)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1437_5_67() - { + private boolean jj_3R_68() { if (jj_scan_token(LCASE)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1436_5_66() - { + private boolean jj_3R_67() { if (jj_scan_token(UCASE)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1435_5_65() - { - if (jj_3R_StrReplaceExpression_1540_3_119()) return true; + private boolean jj_3R_66() { + if (jj_3R_120()) return true; return false; } - private boolean jj_3R_BuiltInCall_1434_5_64() - { + private boolean jj_3R_65() { if (jj_scan_token(STRLEN)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1433_5_63() - { - if (jj_3R_SubstringExpression_1528_5_118()) return true; + private boolean jj_3R_64() { + if (jj_3R_119()) return true; return false; } - private boolean jj_3R_BuiltInCall_1432_5_62() - { + private boolean jj_3R_63() { if (jj_scan_token(CONCAT)) return true; - if (jj_3R_ExpressionList_833_3_117()) return true; + if (jj_3R_118()) return true; return false; } - private boolean jj_3R_BuiltInCall_1431_5_61() - { + private boolean jj_3R_62() { if (jj_scan_token(IDIV)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1430_5_60() - { + private boolean jj_3R_61() { if (jj_scan_token(MOD)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1429_5_59() - { + private boolean jj_3R_60() { if (jj_scan_token(ROUND)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1428_5_58() - { + private boolean jj_3R_59() { if (jj_scan_token(FLOOR)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1427_5_57() - { + private boolean jj_3R_58() { if (jj_scan_token(CEIL)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1426_5_56() - { + private boolean jj_3R_57() { if (jj_scan_token(ABS)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1425_5_55() - { + private boolean jj_3R_56() { if (jj_scan_token(RAND)) return true; if (jj_scan_token(NIL)) return true; return false; } - private boolean jj_3R_BuiltInCall_1423_7_116() - { + private boolean jj_3R_117() { if (jj_scan_token(NIL)) return true; return false; } - private boolean jj_3R_BuiltInCall_1420_7_115() - { + private boolean jj_3R_116() { if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1419_5_54() - { + private boolean jj_3R_55() { if (jj_scan_token(BNODE)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_BuiltInCall_1420_7_115()) { + if (jj_3R_116()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1423_7_116()) return true; + if (jj_3R_117()) return true; } return false; } - private boolean jj_3R_BuiltInCall_1417_5_53() - { + private boolean jj_3R_54() { if (jj_scan_token(URI)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1415_5_52() - { + private boolean jj_3R_53() { if (jj_scan_token(IRI)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1413_5_51() - { + private boolean jj_3R_52() { if (jj_scan_token(BOUND)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1411_5_50() - { + private boolean jj_3R_51() { if (jj_scan_token(DTYPE)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1408_5_49() - { + private boolean jj_3R_50() { if (jj_scan_token(LANGMATCHES)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1406_5_48() - { + private boolean jj_3R_49() { if (jj_scan_token(LANG)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1404_5_47() - { + private boolean jj_3R_48() { if (jj_scan_token(STR)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BuiltInCall_1402_5_46() - { - if (jj_3R_Aggregate_1567_3_114()) return true; + private boolean jj_3R_47() { + if (jj_3R_115()) return true; return false; } - private boolean jj_3R_BuiltInCall_1402_5_43() - { + private boolean jj_3R_44() { Token xsp; xsp = jj_scanpos; - if (jj_3R_BuiltInCall_1402_5_46()) { + if (jj_3R_47()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1404_5_47()) { + if (jj_3R_48()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1406_5_48()) { + if (jj_3R_49()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1408_5_49()) { + if (jj_3R_50()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1411_5_50()) { + if (jj_3R_51()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1413_5_51()) { + if (jj_3R_52()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1415_5_52()) { + if (jj_3R_53()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1417_5_53()) { + if (jj_3R_54()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1419_5_54()) { + if (jj_3R_55()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1425_5_55()) { + if (jj_3R_56()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1426_5_56()) { + if (jj_3R_57()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1427_5_57()) { + if (jj_3R_58()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1428_5_58()) { + if (jj_3R_59()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1429_5_59()) { + if (jj_3R_60()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1430_5_60()) { + if (jj_3R_61()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1431_5_61()) { + if (jj_3R_62()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1432_5_62()) { + if (jj_3R_63()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1433_5_63()) { + if (jj_3R_64()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1434_5_64()) { + if (jj_3R_65()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1435_5_65()) { + if (jj_3R_66()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1436_5_66()) { + if (jj_3R_67()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1437_5_67()) { + if (jj_3R_68()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1438_5_68()) { + if (jj_3R_69()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1439_5_69()) { + if (jj_3R_70()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1441_5_70()) { + if (jj_3R_71()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1443_5_71()) { + if (jj_3R_72()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1445_5_72()) { + if (jj_3R_73()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1447_5_73()) { + if (jj_3R_74()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1449_5_74()) { + if (jj_3R_75()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1450_5_75()) { + if (jj_3R_76()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1451_5_76()) { + if (jj_3R_77()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1452_5_77()) { + if (jj_3R_78()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1453_5_78()) { + if (jj_3R_79()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1454_5_79()) { + if (jj_3R_80()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1455_5_80()) { + if (jj_3R_81()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1456_5_81()) { + if (jj_3R_82()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1457_5_82()) { + if (jj_3R_83()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1460_5_83()) { + if (jj_3R_84()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1461_5_84()) { + if (jj_3R_85()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1462_5_85()) { + if (jj_3R_86()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1463_5_86()) { + if (jj_3R_87()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1464_5_87()) { + if (jj_3R_88()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1465_5_88()) { + if (jj_3R_89()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1466_5_89()) { + if (jj_3R_90()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1467_5_90()) { + if (jj_3R_91()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1468_5_91()) { + if (jj_3R_92()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1469_5_92()) { + if (jj_3R_93()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1471_5_93()) { + if (jj_3R_94()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1478_5_94()) { + if (jj_3R_95()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1482_5_95()) { + if (jj_3R_96()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1484_5_96()) { + if (jj_3R_97()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1486_5_97()) { + if (jj_3R_98()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1488_5_98()) { + if (jj_3R_99()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1490_5_99()) { + if (jj_3R_100()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1492_5_100()) { + if (jj_3R_101()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1494_5_101()) { + if (jj_3R_102()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1496_5_102()) { + if (jj_3R_103()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1499_5_103()) { + if (jj_3R_104()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1500_5_104()) { + if (jj_3R_105()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1501_5_105()) { + if (jj_3R_106()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1502_3_106()) { + if (jj_3R_107()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1504_5_107()) { + if (jj_3R_108()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1506_5_108()) { + if (jj_3R_109()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1508_5_109()) { + if (jj_3R_110()) { jj_scanpos = xsp; - if (jj_3R_BuiltInCall_1510_5_110()) return true; + if (jj_3R_111()) return true; } } } @@ -7303,300 +7252,262 @@ private boolean jj_3R_BuiltInCall_1402_5_43() return false; } - private boolean jj_3R_IRIREF_1727_3_158() - { + private boolean jj_3R_160() { if (jj_scan_token(IRIref)) return true; return false; } - private boolean jj_3R_BlankNode_1723_3_176() - { + private boolean jj_3R_178() { if (jj_scan_token(ANON)) return true; return false; } - private boolean jj_3R_BlankNode_1720_3_163() - { + private boolean jj_3R_165() { Token xsp; xsp = jj_scanpos; - if (jj_3R_BlankNode_1720_3_175()) { + if (jj_3R_177()) { jj_scanpos = xsp; - if (jj_3R_BlankNode_1723_3_176()) return true; + if (jj_3R_178()) return true; } return false; } - private boolean jj_3R_BlankNode_1720_3_175() - { + private boolean jj_3R_177() { if (jj_scan_token(BLANK_NODE_LABEL)) return true; return false; } - private boolean jj_3R_PrefixedName_1714_5_186() - { + private boolean jj_3R_188() { if (jj_scan_token(PNAME_NS)) return true; return false; } - private boolean jj_3R_PrefixedName_1711_5_185() - { + private boolean jj_3R_187() { if (jj_scan_token(PNAME_LN)) return true; return false; } - private boolean jj_3R_GroupGraphPattern_564_3_144() - { - if (jj_scan_token(LBRACE)) return true; - return false; - } - - private boolean jj_3_3() - { - if (jj_scan_token(DOT)) return true; - if (jj_3R_TriplesSameSubject_861_3_45()) return true; - return false; - } - - private boolean jj_3R_PrefixedName_1711_3_177() - { + private boolean jj_3R_179() { Token xsp; xsp = jj_scanpos; - if (jj_3R_PrefixedName_1711_5_185()) { + if (jj_3R_187()) { jj_scanpos = xsp; - if (jj_3R_PrefixedName_1714_5_186()) return true; + if (jj_3R_188()) return true; } return false; } - private boolean jj_3R_iri_1707_3_168() - { - if (jj_3R_PrefixedName_1711_3_177()) return true; + private boolean jj_3R_170() { + if (jj_3R_179()) return true; return false; } - private boolean jj_3R_iri_1705_3_157() - { + private boolean jj_3R_159() { Token xsp; xsp = jj_scanpos; - if (jj_3R_iri_1705_3_167()) { + if (jj_3R_169()) { jj_scanpos = xsp; - if (jj_3R_iri_1707_3_168()) return true; + if (jj_3R_170()) return true; } return false; } - private boolean jj_3R_iri_1705_3_167() - { - if (jj_3R_IRIREF_1727_3_158()) return true; + private boolean jj_3R_169() { + if (jj_3R_160()) return true; return false; } - private boolean jj_3R_String_1696_5_181() - { + private boolean jj_3R_183() { if (jj_scan_token(STRING_LITERAL_LONG2)) return true; return false; } - private boolean jj_3R_String_1695_5_180() - { + private boolean jj_3R_182() { if (jj_scan_token(STRING_LITERAL_LONG1)) return true; return false; } - private boolean jj_3R_String_1694_5_179() - { + private boolean jj_3R_181() { if (jj_scan_token(STRING_LITERAL2)) return true; return false; } - private boolean jj_3R_String_1693_5_178() - { + private boolean jj_3R_180() { if (jj_scan_token(STRING_LITERAL1)) return true; return false; } - private boolean jj_3R_String_1693_3_169() - { + private boolean jj_3R_171() { Token xsp; xsp = jj_scanpos; - if (jj_3R_String_1693_5_178()) { + if (jj_3R_180()) { jj_scanpos = xsp; - if (jj_3R_String_1694_5_179()) { + if (jj_3R_181()) { jj_scanpos = xsp; - if (jj_3R_String_1695_5_180()) { + if (jj_3R_182()) { jj_scanpos = xsp; - if (jj_3R_String_1696_5_181()) return true; + if (jj_3R_183()) return true; } } } return false; } - private boolean jj_3R_BooleanLiteral_1689_3_174() - { + private boolean jj_3R_176() { if (jj_scan_token(FALSE)) return true; return false; } - private boolean jj_3R_BooleanLiteral_1687_3_162() - { + private boolean jj_3R_164() { Token xsp; xsp = jj_scanpos; - if (jj_3R_BooleanLiteral_1687_3_173()) { + if (jj_3R_175()) { jj_scanpos = xsp; - if (jj_3R_BooleanLiteral_1689_3_174()) return true; + if (jj_3R_176()) return true; } return false; } - private boolean jj_3R_BooleanLiteral_1687_3_173() - { + private boolean jj_3R_175() { if (jj_scan_token(TRUE)) return true; return false; } - private boolean jj_3R_NumericLiteralNegative_1683_3_195() - { + private boolean jj_3R_197() { if (jj_scan_token(DOUBLE_NEGATIVE)) return true; return false; } - private boolean jj_3R_NumericLiteralNegative_1682_3_194() - { + private boolean jj_3R_196() { if (jj_scan_token(DECIMAL_NEGATIVE)) return true; return false; } - private boolean jj_3R_NumericLiteralNegative_1681_3_193() - { + private boolean jj_3R_195() { if (jj_scan_token(INTEGER_NEGATIVE)) return true; return false; } - private boolean jj_3R_NumericLiteralNegative_1681_3_184() - { + private boolean jj_3R_186() { Token xsp; xsp = jj_scanpos; - if (jj_3R_NumericLiteralNegative_1681_3_193()) { + if (jj_3R_195()) { jj_scanpos = xsp; - if (jj_3R_NumericLiteralNegative_1682_3_194()) { + if (jj_3R_196()) { jj_scanpos = xsp; - if (jj_3R_NumericLiteralNegative_1683_3_195()) return true; + if (jj_3R_197()) return true; } } return false; } - private boolean jj_3R_NumericLiteralPositive_1677_3_192() - { + private boolean jj_3R_146() { + if (jj_scan_token(LBRACE)) return true; + return false; + } + + private boolean jj_3_3() { + if (jj_scan_token(DOT)) return true; + if (jj_3R_46()) return true; + return false; + } + + private boolean jj_3R_194() { if (jj_scan_token(DOUBLE_POSITIVE)) return true; return false; } - private boolean jj_3R_NumericLiteralPositive_1676_3_191() - { + private boolean jj_3R_193() { if (jj_scan_token(DECIMAL_POSITIVE)) return true; return false; } - private boolean jj_3R_NumericLiteralPositive_1675_3_190() - { + private boolean jj_3R_192() { if (jj_scan_token(INTEGER_POSITIVE)) return true; return false; } - private boolean jj_3R_NumericLiteralPositive_1675_3_183() - { + private boolean jj_3R_185() { Token xsp; xsp = jj_scanpos; - if (jj_3R_NumericLiteralPositive_1675_3_190()) { + if (jj_3R_192()) { jj_scanpos = xsp; - if (jj_3R_NumericLiteralPositive_1676_3_191()) { + if (jj_3R_193()) { jj_scanpos = xsp; - if (jj_3R_NumericLiteralPositive_1677_3_192()) return true; + if (jj_3R_194()) return true; } } return false; } - private boolean jj_3R_NumericLiteralUnsigned_1671_3_189() - { + private boolean jj_3R_191() { if (jj_scan_token(DOUBLE)) return true; return false; } - private boolean jj_3R_NumericLiteralUnsigned_1670_3_188() - { + private boolean jj_3R_190() { if (jj_scan_token(DECIMAL)) return true; return false; } - private boolean jj_3R_NumericLiteralUnsigned_1669_3_187() - { + private boolean jj_3R_189() { if (jj_scan_token(INTEGER)) return true; return false; } - private boolean jj_3R_NumericLiteralUnsigned_1669_3_182() - { + private boolean jj_3R_184() { Token xsp; xsp = jj_scanpos; - if (jj_3R_NumericLiteralUnsigned_1669_3_187()) { + if (jj_3R_189()) { jj_scanpos = xsp; - if (jj_3R_NumericLiteralUnsigned_1670_3_188()) { + if (jj_3R_190()) { jj_scanpos = xsp; - if (jj_3R_NumericLiteralUnsigned_1671_3_189()) return true; + if (jj_3R_191()) return true; } } return false; } - private boolean jj_3R_NumericLiteral_1663_5_172() - { - if (jj_3R_NumericLiteralNegative_1681_3_184()) return true; + private boolean jj_3R_174() { + if (jj_3R_186()) return true; return false; } - private boolean jj_3R_NumericLiteral_1662_5_171() - { - if (jj_3R_NumericLiteralPositive_1675_3_183()) return true; + private boolean jj_3R_173() { + if (jj_3R_185()) return true; return false; } - private boolean jj_3R_NumericLiteral_1661_5_170() - { - if (jj_3R_NumericLiteralUnsigned_1669_3_182()) return true; + private boolean jj_3R_172() { + if (jj_3R_184()) return true; return false; } - private boolean jj_3R_NumericLiteral_1660_3_161() - { + private boolean jj_3R_163() { Token xsp; xsp = jj_scanpos; - if (jj_3R_NumericLiteral_1661_5_170()) { + if (jj_3R_172()) { jj_scanpos = xsp; - if (jj_3R_NumericLiteral_1662_5_171()) { + if (jj_3R_173()) { jj_scanpos = xsp; - if (jj_3R_NumericLiteral_1663_5_172()) return true; + if (jj_3R_174()) return true; } } return false; } - private boolean jj_3_1() - { - if (jj_3R_BuiltInCall_1402_5_43()) return true; + private boolean jj_3R_162() { + if (jj_3R_171()) return true; return false; } - private boolean jj_3R_RDFLiteral_1649_3_160() - { - if (jj_3R_String_1693_3_169()) return true; + private boolean jj_3R_144() { + if (jj_scan_token(AGG)) return true; + if (jj_3R_159()) return true; return false; } - private boolean jj_3R_Var_1247_5_159() - { + private boolean jj_3R_161() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(14)) { @@ -7606,272 +7517,211 @@ private boolean jj_3R_Var_1247_5_159() return false; } - private boolean jj_3R_TriplesSameSubject_864_3_113() - { - if (jj_3R_TriplesNode_1086_3_126()) return true; + private boolean jj_3R_114() { + if (jj_3R_127()) return true; return false; } - private boolean jj_3R_TriplesSameSubject_861_3_45() - { + private boolean jj_3R_46() { Token xsp; xsp = jj_scanpos; - if (jj_3R_TriplesSameSubject_861_3_112()) { + if (jj_3R_113()) { jj_scanpos = xsp; - if (jj_3R_TriplesSameSubject_864_3_113()) return true; + if (jj_3R_114()) return true; } return false; } - private boolean jj_3R_TriplesSameSubject_861_3_112() - { - if (jj_3R_VarOrTerm_1196_3_125()) return true; + private boolean jj_3R_113() { + if (jj_3R_126()) return true; return false; } - private boolean jj_3_4() - { + private boolean jj_3_4() { if (jj_scan_token(DOT)) return true; - if (jj_3R_TriplesSameSubject_861_3_45()) return true; - return false; - } - - private boolean jj_3R_Prologue_72_18_124() - { - if (jj_3R_PrefixDecl_81_5_146()) return true; + if (jj_3R_46()) return true; return false; } - private boolean jj_3R_Aggregate_1614_5_142() - { - if (jj_scan_token(AGG)) return true; - if (jj_3R_iri_1705_3_157()) return true; + private boolean jj_3_1() { + if (jj_3R_44()) return true; return false; } - private boolean jj_3R_PrefixDecl_81_5_146() - { - if (jj_scan_token(PREFIX)) return true; - if (jj_scan_token(PNAME_NS)) return true; - if (jj_3R_IRIREF_1727_3_158()) return true; + private boolean jj_3R_143() { + if (jj_scan_token(FOLD)) return true; + if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_Aggregate_1612_5_141() - { + private boolean jj_3R_142() { if (jj_scan_token(VAR_POP)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_Aggregate_1610_5_140() - { + private boolean jj_3R_141() { if (jj_scan_token(VAR_SAMP)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_Aggregate_1608_5_139() - { + private boolean jj_3R_140() { if (jj_scan_token(VARIANCE)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_BaseDecl_76_3_145() - { - if (jj_scan_token(BASE)) return true; - if (jj_3R_IRIREF_1727_3_158()) return true; - return false; - } - - private boolean jj_3R_Aggregate_1606_5_138() - { + private boolean jj_3R_139() { if (jj_scan_token(STDEV_POP)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_Prologue_72_5_111() - { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_Prologue_72_5_123()) { - jj_scanpos = xsp; - if (jj_3R_Prologue_72_18_124()) return true; - } - return false; - } - - private boolean jj_3R_Prologue_72_5_123() - { - if (jj_3R_BaseDecl_76_3_145()) return true; - return false; - } - - private boolean jj_3R_Aggregate_1604_5_137() - { + private boolean jj_3R_138() { if (jj_scan_token(STDEV_SAMP)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_Prologue_72_3_44() - { - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_Prologue_72_5_111()) { jj_scanpos = xsp; break; } - } - return false; - } - - private boolean jj_3R_ExpressionList_836_5_143() - { + private boolean jj_3R_145() { if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_Aggregate_1602_5_136() - { + private boolean jj_3R_137() { if (jj_scan_token(STDEV)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_ExpressionList_833_3_117() - { + private boolean jj_3R_118() { Token xsp; xsp = jj_scanpos; - if (jj_scan_token(185)) { + if (jj_scan_token(187)) { jj_scanpos = xsp; - if (jj_3R_ExpressionList_836_5_143()) return true; + if (jj_3R_145()) return true; } return false; } - private boolean jj_3_5() - { + private boolean jj_3_5() { if (jj_scan_token(SEMICOLON)) return true; if (jj_scan_token(SEPARATOR)) return true; return false; } - private boolean jj_3R_QuotedTriple_1209_3_164() - { + private boolean jj_3R_166() { if (jj_scan_token(LT2)) return true; return false; } - private boolean jj_3R_Aggregate_1589_5_135() - { + private boolean jj_3R_136() { if (jj_scan_token(GROUP_CONCAT)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_Aggregate_1587_5_134() - { + private boolean jj_3R_135() { if (jj_scan_token(SAMPLE)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_VarOrTerm_1203_5_154() - { - if (jj_3R_QuotedTriple_1209_3_164()) return true; + private boolean jj_3R_156() { + if (jj_3R_166()) return true; return false; } - private boolean jj_3R_VarOrTerm_1202_5_153() - { + private boolean jj_3R_155() { if (jj_scan_token(NIL)) return true; return false; } - private boolean jj_3R_Aggregate_1585_5_133() - { + private boolean jj_3R_134() { if (jj_scan_token(MODE)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_VarOrTerm_1201_5_152() - { - if (jj_3R_BlankNode_1720_3_163()) return true; + private boolean jj_3R_125() { + if (jj_3R_148()) return true; + return false; + } + + private boolean jj_3R_154() { + if (jj_3R_165()) return true; return false; } - private boolean jj_3R_VarOrTerm_1200_5_151() - { - if (jj_3R_BooleanLiteral_1687_3_162()) return true; + private boolean jj_3R_153() { + if (jj_3R_164()) return true; return false; } - private boolean jj_3R_Aggregate_1583_5_132() - { + private boolean jj_3R_133() { if (jj_scan_token(MEDIAN)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_VarOrTerm_1199_5_150() - { - if (jj_3R_NumericLiteral_1660_3_161()) return true; + private boolean jj_3R_152() { + if (jj_3R_163()) return true; return false; } - private boolean jj_3R_VarOrTerm_1198_5_149() - { - if (jj_3R_RDFLiteral_1649_3_160()) return true; + private boolean jj_3R_151() { + if (jj_3R_162()) return true; return false; } - private boolean jj_3R_Aggregate_1581_5_131() - { + private boolean jj_3R_132() { if (jj_scan_token(AVG)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_VarOrTerm_1197_5_148() - { - if (jj_3R_iri_1705_3_157()) return true; + private boolean jj_3R_148() { + if (jj_scan_token(PREFIX)) return true; + if (jj_scan_token(PNAME_NS)) return true; + if (jj_3R_160()) return true; + return false; + } + + private boolean jj_3R_150() { + if (jj_3R_159()) return true; return false; } - private boolean jj_3R_VarOrTerm_1196_5_147() - { - if (jj_3R_Var_1247_5_159()) return true; + private boolean jj_3R_149() { + if (jj_3R_161()) return true; return false; } - private boolean jj_3R_Aggregate_1579_5_130() - { + private boolean jj_3R_131() { if (jj_scan_token(MAX)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_VarOrTerm_1196_3_125() - { + private boolean jj_3R_126() { Token xsp; xsp = jj_scanpos; - if (jj_3R_VarOrTerm_1196_5_147()) { + if (jj_3R_149()) { jj_scanpos = xsp; - if (jj_3R_VarOrTerm_1197_5_148()) { + if (jj_3R_150()) { jj_scanpos = xsp; - if (jj_3R_VarOrTerm_1198_5_149()) { + if (jj_3R_151()) { jj_scanpos = xsp; - if (jj_3R_VarOrTerm_1199_5_150()) { + if (jj_3R_152()) { jj_scanpos = xsp; - if (jj_3R_VarOrTerm_1200_5_151()) { + if (jj_3R_153()) { jj_scanpos = xsp; - if (jj_3R_VarOrTerm_1201_5_152()) { + if (jj_3R_154()) { jj_scanpos = xsp; - if (jj_3R_VarOrTerm_1202_5_153()) { + if (jj_3R_155()) { jj_scanpos = xsp; - if (jj_3R_VarOrTerm_1203_5_154()) return true; + if (jj_3R_156()) return true; } } } @@ -7882,62 +7732,91 @@ private boolean jj_3R_VarOrTerm_1196_3_125() return false; } - private boolean jj_3R_Aggregate_1577_5_129() - { + private boolean jj_3R_130() { if (jj_scan_token(MIN)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_Aggregate_1575_5_128() - { + private boolean jj_3R_129() { if (jj_scan_token(SUM)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_Aggregate_1568_5_127() - { + private boolean jj_3R_147() { + if (jj_scan_token(BASE)) return true; + if (jj_3R_160()) return true; + return false; + } + + private boolean jj_3R_112() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_124()) { + jj_scanpos = xsp; + if (jj_3R_125()) return true; + } + return false; + } + + private boolean jj_3R_124() { + if (jj_3R_147()) return true; + return false; + } + + private boolean jj_3R_45() { + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_112()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_128() { if (jj_scan_token(COUNT)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_Aggregate_1567_3_114() - { + private boolean jj_3R_115() { Token xsp; xsp = jj_scanpos; - if (jj_3R_Aggregate_1568_5_127()) { + if (jj_3R_128()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1575_5_128()) { + if (jj_3R_129()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1577_5_129()) { + if (jj_3R_130()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1579_5_130()) { + if (jj_3R_131()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1581_5_131()) { + if (jj_3R_132()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1583_5_132()) { + if (jj_3R_133()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1585_5_133()) { + if (jj_3R_134()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1587_5_134()) { + if (jj_3R_135()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1589_5_135()) { + if (jj_3R_136()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1602_5_136()) { + if (jj_3R_137()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1604_5_137()) { + if (jj_3R_138()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1606_5_138()) { + if (jj_3R_139()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1608_5_139()) { + if (jj_3R_140()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1610_5_140()) { + if (jj_3R_141()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1612_5_141()) { + if (jj_3R_142()) { jj_scanpos = xsp; - if (jj_3R_Aggregate_1614_5_142()) return true; + if (jj_3R_143()) { + jj_scanpos = xsp; + if (jj_3R_144()) return true; + } } } } @@ -7956,34 +7835,98 @@ private boolean jj_3R_Aggregate_1567_3_114() return false; } - private boolean jj_3R_NotExistsFunc_1557_4_122() - { + private boolean jj_3R_123() { if (jj_scan_token(NOT)) return true; if (jj_scan_token(EXISTS)) return true; return false; } - private boolean jj_3R_ExistsFunc_1551_4_121() - { + private boolean jj_3R_122() { if (jj_scan_token(EXISTS)) return true; - if (jj_3R_GroupGraphPattern_564_3_144()) return true; + if (jj_3R_146()) return true; return false; } - private boolean jj_3R_StrReplaceExpression_1540_3_119() - { + private boolean jj_3R_120() { if (jj_scan_token(REPLACE)) return true; if (jj_scan_token(LPAREN)) return true; return false; } - private boolean jj_3R_SubstringExpression_1528_5_118() - { + private boolean jj_3R_119() { if (jj_scan_token(SUBSTR)) return true; if (jj_scan_token(LPAREN)) return true; return false; } + private boolean jj_3R_121() { + if (jj_scan_token(REGEX)) return true; + if (jj_scan_token(LPAREN)) return true; + return false; + } + + private boolean jj_3R_111() { + if (jj_scan_token(OBJECT)) return true; + if (jj_scan_token(LPAREN)) return true; + return false; + } + + private boolean jj_3R_110() { + if (jj_scan_token(PREDICATE)) return true; + if (jj_scan_token(LPAREN)) return true; + return false; + } + + private boolean jj_3R_109() { + if (jj_scan_token(SUBJECT)) return true; + if (jj_scan_token(LPAREN)) return true; + return false; + } + + private boolean jj_3R_108() { + if (jj_scan_token(TRIPLE)) return true; + if (jj_scan_token(LPAREN)) return true; + return false; + } + + private boolean jj_3R_106() { + if (jj_3R_123()) return true; + return false; + } + + private boolean jj_3R_107() { + if (jj_scan_token(IS_TRIPLE)) return true; + if (jj_scan_token(LPAREN)) return true; + return false; + } + + private boolean jj_3R_105() { + if (jj_3R_122()) return true; + return false; + } + + private boolean jj_3R_104() { + if (jj_3R_121()) return true; + return false; + } + + private boolean jj_3R_167() { + if (jj_scan_token(LPAREN)) return true; + return false; + } + + private boolean jj_3R_103() { + if (jj_scan_token(IS_NUMERIC)) return true; + if (jj_scan_token(LPAREN)) return true; + return false; + } + + private boolean jj_3R_102() { + if (jj_scan_token(IS_LITERAL)) return true; + if (jj_scan_token(LPAREN)) return true; + return false; + } + /** Generated Token Manager. */ public ARQParserTokenManager token_source; SimpleCharStream jj_input_stream; @@ -7995,7 +7938,7 @@ private boolean jj_3R_SubstringExpression_1528_5_118() private Token jj_scanpos, jj_lastpos; private int jj_la; private int jj_gen; - final private int[] jj_la1 = new int[194]; + final private int[] jj_la1 = new int[202]; static private int[] jj_la1_0; static private int[] jj_la1_1; static private int[] jj_la1_2; @@ -8005,201 +7948,187 @@ private boolean jj_3R_SubstringExpression_1528_5_118() static private int[] jj_la1_6; static private int[] jj_la1_7; static { - jj_la1_init_0(); - jj_la1_init_1(); - jj_la1_init_2(); - jj_la1_init_3(); - jj_la1_init_4(); - jj_la1_init_5(); - jj_la1_init_6(); - jj_la1_init_7(); - } - private static void jj_la1_init_0() { - jj_la1_0 = new int[] {0x1e400000,0x200,0x300000,0x300000,0x0,0x1800000,0x1800000,0x1c00,0x0,0xdc00,0xdc00,0xdc00,0x0,0x0,0x0,0xdc00,0xdc00,0x0,0x0,0x0,0x0,0x0,0xc000,0x1c00,0x0,0x0,0x0,0x80000000,0x60000000,0xdc00,0x0,0xdc00,0x1c00,0xdc00,0x0,0xdc00,0xdc00,0x40000000,0x20000000,0x60000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00,0x0,0x1c00,0x0,0xfc00,0x0,0x0,0xfc00,0xfc00,0xfc00,0x0,0x0,0xfc00,0x0,0xfc00,0x0,0x400000,0xfc00,0x0,0x0,0xfc00,0xfc00,0x0,0x0,0x0,0xc000,0x1c00,0xc000,0x0,0x0,0x1c00,0x0,0x1c00,0x0,0x1c00,0x800000,0x0,0x0,0x0,0x0,0x0,0xfc00,0x8dc00,0x0,0x8dc00,0x8dc00,0x0,0xfc00,0x88dc00,0x88dc00,0x0,0x88dc00,0x88dc00,0x0,0x0,0x0,0x0,0x0,0x881c00,0x0,0x0,0x0,0x0,0x881c00,0x0,0x81c00,0x81c00,0x81c00,0x81c00,0x0,0x0,0xfc00,0xfc00,0x0,0x0,0xfc00,0xfc00,0xfc00,0x81c00,0x1c00,0xdc00,0xfc00,0xc000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xdc00,0xdc00,0xdc00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0xdc00,0x800000,0x800000,0x800000,0x800000,0x800000,0x800000,0x800000,0x800000,0x0,0x0,0x0,0x800000,0x800000,0x800000,0x800000,0x800000,0x800000,0x0,0x0,0x10000,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00,0x1800,0x2000,}; - } - private static void jj_la1_init_1() { - jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x1000000,0xf0fe0000,0xf0fe0000,0xf0fe0000,0x40,0x40,0xc0,0x0,0x0,0x40,0x80,0x40,0x40,0x0,0x0,0x20,0x80,0x2000000,0x4000000,0x0,0x0,0xf0fe0000,0x1000000,0xf0fe0000,0xf0fe0000,0xf0fe0018,0x18,0xf0fe0000,0xf0fe0018,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x200,0x200,0x220,0x0,0x200,0x0,0x0,0x0,0x0,0x200,0x0,0x0,0x200,0x0,0x0,0x0,0x0,0xc1f602,0x0,0x0,0x0,0x0,0xc1f602,0x0,0x0,0x4,0x0,0x0,0x0,0x4,0x0,0x4,0x800,0xf0fe0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0x800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0fe0000,0xf0fe0000,0x0,0x0,0x0,0x0,0x0,0x0,0xf0fe0000,0x0,0x0,0x0,0x0,0xf0fe0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; - } - private static void jj_la1_init_2() { - jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff2f6fff,0xff2f6fff,0xff2f6fff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff2f6fff,0x0,0xff2f6fff,0xff2f6fff,0xff2f6fff,0x0,0xff2f6fff,0xff2f6fff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff2f6fff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc00000,0xc00000,0x0,0xc00000,0xc00000,0x0,0x0,0x0,0x0,0x0,0xc00000,0x0,0x0,0x0,0x0,0xc00000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff2f6fff,0xff2f6fff,0x0,0x0,0x0,0x0,0x0,0x0,0xff2f6fff,0x0,0x0,0x0,0x0,0xff2f6fff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; - } - private static void jj_la1_init_3() { - jj_la1_3 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffffffff,0xffffffff,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffffffff,0x0,0xffffffff,0xffffffff,0xffffffff,0x0,0xffffffff,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc00,0xc00,0xffffffff,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0xffffffff,0x0,0x0,0x0,0x0,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; - } - private static void jj_la1_init_4() { - jj_la1_4 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1800,0x0,0x1f7f,0x1f7f,0x1f7f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1800,0x0,0x0,0x0,0x0,0x0,0x0,0x77f,0x0,0x77f,0x77f,0x77f,0x0,0x77f,0x77f,0x0,0x0,0x0,0x0,0x0,0x9ffc000,0x9ffc000,0x4000000,0x10000000,0x4000000,0x4000000,0x4000000,0x4000000,0x4000000,0x4000000,0x0,0x4000,0xc000,0x0,0x0,0x0,0x40000000,0xc0000000,0x1800,0x0,0x0,0x1800,0x1800,0x1800,0x0,0x0,0x1800,0x0,0x1800,0x0,0x0,0x1800,0x0,0x0,0x1800,0x1800,0x0,0x0,0x4000000,0x0,0x1800,0x0,0x0,0x0,0x1800,0x0,0x1800,0x0,0x77f,0x0,0x0,0x0,0x0,0x0,0x0,0x1800,0x0,0x0,0x0,0x0,0x0,0x1800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1800,0x1800,0x0,0x0,0x1800,0x1800,0x1800,0x0,0x1800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1f7f,0x1f7f,0x1800,0x0,0x0,0x0,0x0,0x0,0x77f,0x0,0x0,0x0,0x0,0x1f7f,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1800,0x0,0x0,0x0,0x0,}; - } - private static void jj_la1_init_5() { - jj_la1_5 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x780ff8,0x0,0xf80ff8,0xf80ff8,0xf80ff8,0x0,0x0,0x4000000,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0x780ff8,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0x0,0x800000,0x800000,0x800000,0x0,0x800000,0x800000,0x0,0x0,0x0,0x0,0x80000000,0x1,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x52f80ff8,0x0,0x0,0x52f80ff8,0x52f80ff8,0x52f80ff8,0x4000000,0x0,0x52f80ff8,0x0,0x52f80ff8,0x0,0x0,0x52f80ff8,0x4000000,0x0,0x52f80ff8,0x52f80ff8,0x0,0x4000000,0x0,0x2800000,0x780ff8,0x0,0x2800000,0x2800000,0x780ff8,0x2800000,0x780ff8,0x0,0x800000,0x0,0x0,0x2800000,0x0,0x2800000,0x0,0x52f80ff8,0x0,0x80000000,0x0,0x0,0x0,0x52f80ff8,0x800000,0x800000,0x80000000,0x800000,0x800000,0x0,0x0,0x0,0x0,0x4000000,0x800000,0x8000008,0x8000000,0x8,0x4000000,0x800000,0x0,0x0,0x800000,0x0,0x0,0x10800000,0x10800000,0x52f80ff8,0x52f80ff8,0x0,0x0,0x52f80ff8,0x52f80ff8,0x42780ff8,0x0,0x780ff8,0x0,0x40000000,0x0,0x0,0x0,0x0,0x0,0xfc0,0xfc0,0x0,0x0,0xfc0,0x0,0x0,0xf80ff8,0xf80ff8,0x780ff8,0x0,0x0,0x2800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf80ff8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x80000000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2800000,0x0,0x0,0xff8,0x38,0x1c0,0xe00,0x0,0x780000,0x0,0x0,0x40000000,}; - } - private static void jj_la1_init_6() { - jj_la1_6 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200,0x0,0x2,0x200,0x200,0x200,0x0,0x2,0x200,0x0,0x200,0x2,0x0,0x200,0x0,0x2,0x200,0x200,0x2,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x200,0x0,0x200,0x0,0x0,0x0,0x1,0x0,0x1,0x0,0x2,0x200,0x0,0x0,0x0,0x0,0x1,0x200,0x2001000,0x2001000,0x0,0x2001000,0x2001000,0x1,0x1000000,0x2100000,0x2100000,0x100a0000,0x2001000,0x0,0x1,0xa0001,0x100a0000,0x1000,0x1000000,0x2000000,0x2000000,0x0,0x2000000,0x0,0x0,0x200,0x200,0x400,0x400,0x200,0x200,0x200,0x0,0x200,0x0,0x0,0x0,0x8000,0x10000,0xfc,0xfc,0x60000,0x0,0x180000,0x180000,0x60000,0x180000,0x180000,0x61200,0x200,0x200,0x1,0x1,0x0,0x1,0x1,0x0,0x1,0x1,0x1,0x0,0xe1200,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200000,0x200000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; - } - private static void jj_la1_init_7() { - jj_la1_7 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; - } + jj_la1_init_0(); + jj_la1_init_1(); + jj_la1_init_2(); + jj_la1_init_3(); + jj_la1_init_4(); + jj_la1_init_5(); + jj_la1_init_6(); + jj_la1_init_7(); + } + private static void jj_la1_init_0() { + jj_la1_0 = new int[] {0x1e400000,0x200,0x300000,0x300000,0x0,0x1800000,0x1800000,0x1c00,0x0,0xdc00,0xdc00,0xdc00,0x0,0x0,0x0,0xdc00,0xdc00,0x0,0x0,0x0,0x0,0x0,0xc000,0x1c00,0x0,0x0,0x0,0x80000000,0x60000000,0xdc00,0x0,0xdc00,0x1c00,0xdc00,0x0,0xdc00,0xdc00,0x0,0xdc00,0xdc00,0x40000000,0x20000000,0x60000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00,0x0,0x1c00,0x0,0xfc00,0x0,0x0,0xfc00,0xfc00,0xfc00,0x0,0x0,0xfc00,0x0,0xfc00,0x0,0x400000,0xfc00,0x0,0x0,0xfc00,0xfc00,0x0,0x0,0x0,0xc000,0x1c00,0xc000,0x0,0x0,0x1c00,0x0,0x1c00,0x0,0x0,0x1c00,0x800000,0x0,0x0,0x0,0x0,0x0,0xfc00,0x8dc00,0x0,0x8dc00,0x8dc00,0x0,0xfc00,0x88dc00,0x88dc00,0x0,0x88dc00,0x88dc00,0x0,0x0,0x0,0x0,0x0,0x881c00,0x0,0x0,0x0,0x0,0x881c00,0x0,0x81c00,0x81c00,0x81c00,0x81c00,0x0,0x0,0xfc00,0xfc00,0x0,0x0,0xfc00,0xfc00,0xfc00,0x81c00,0x1c00,0xdc00,0xfc00,0xc000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xdc00,0xdc00,0xdc00,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0xdc00,0x800000,0x800000,0x800000,0x800000,0x800000,0x800000,0x800000,0x800000,0x0,0x0,0x0,0x800000,0x800000,0x800000,0x800000,0x800000,0x800000,0x800000,0x0,0xdc00,0x80000000,0x0,0x0,0x10000,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x1c00,0x1800,0x2000,}; + } + private static void jj_la1_init_1() { + jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x2000000,0xe1fc0000,0xe1fc0000,0xe1fc0000,0x40,0x40,0xc0,0x0,0x0,0x40,0x80,0x40,0x40,0x0,0x0,0x20,0x80,0x4000000,0x8000000,0x0,0x0,0xe1fc0000,0x2000000,0xe1fc0000,0xe1fc0000,0xe1fc0018,0x18,0xe1fc0000,0xe1fc0018,0x18,0xe1fc0000,0xe1fc0018,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20,0x200,0x200,0x220,0x0,0x200,0x0,0x0,0x0,0x0,0x200,0x0,0x0,0x200,0x0,0x0,0x0,0x0,0x183f602,0x0,0x0,0x0,0x0,0x183f602,0x0,0x0,0x4,0x0,0x0,0x0,0x4,0x0,0x4,0x0,0x800,0xe1fc0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe1fc0000,0xe1fc0000,0x0,0x0,0x0,0x0,0x0,0x0,0xe1fc0000,0x0,0x0,0x0,0x0,0xe1fc0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe1fc0018,0x0,0xe0000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + } + private static void jj_la1_init_2() { + jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfcbdbfff,0xfcbdbfff,0xfcbdbfff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfcbdbfff,0x0,0xfcbdbfff,0xfcbdbfff,0xfcbdbfff,0x0,0xfcbdbfff,0xfcbdbfff,0x0,0xfcbdbfff,0xfcbdbfff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfcbdbfff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3000000,0x3000000,0x0,0x3000000,0x3000000,0x0,0x0,0x0,0x0,0x0,0x3000000,0x0,0x0,0x0,0x0,0x3000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfcbdbfff,0xfcbdbfff,0x0,0x0,0x0,0x0,0x0,0x0,0xfcbdbfff,0x0,0x0,0x0,0x0,0xfcbdbfff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfcbdbfff,0x0,0x3fff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + } + private static void jj_la1_init_3() { + jj_la1_3 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffffffff,0xffffffff,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffffffff,0x0,0xffffffff,0xffffffff,0xffffffff,0x0,0xffffffff,0xffffffff,0x0,0xffffffff,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3000,0x3000,0xffffffff,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0xffffffff,0x0,0x0,0x0,0x0,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + } + private static void jj_la1_init_4() { + jj_la1_4 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x0,0x7dff,0x7dff,0x7dff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x0,0x0,0x0,0x0,0x0,0x0,0x1dff,0x0,0x1dff,0x1dff,0x1dff,0x0,0x1dff,0x1dff,0x0,0x1dff,0x1dff,0x0,0x0,0x0,0x0,0x0,0x27ff0000,0x27ff0000,0x10000000,0x40000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x0,0x10000,0x30000,0x0,0x0,0x0,0x0,0x0,0x6000,0x0,0x0,0x6000,0x6000,0x6000,0x0,0x0,0x6000,0x0,0x6000,0x0,0x0,0x6000,0x0,0x0,0x6000,0x6000,0x0,0x0,0x10000000,0x0,0x6000,0x0,0x0,0x0,0x6000,0x0,0x6000,0x0,0x0,0x1dff,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x0,0x0,0x0,0x0,0x0,0x6000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x6000,0x0,0x0,0x6000,0x6000,0x6000,0x0,0x6000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7dff,0x7dff,0x6000,0x0,0x0,0x0,0x0,0x0,0x1dff,0x0,0x0,0x0,0x0,0x7dff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1dff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x6000,0x0,0x0,0x0,0x0,}; + } + private static void jj_la1_init_5() { + jj_la1_5 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1e03fe0,0x0,0x3e03fe0,0x3e03fe0,0x3e03fe0,0x0,0x0,0x10000000,0x0,0x0,0x0,0x10000000,0x0,0x0,0x0,0x1e03fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x2000000,0x0,0x2000000,0x2000000,0x2000000,0x0,0x2000000,0x2000000,0x0,0x2000000,0x2000000,0x0,0x0,0x0,0x0,0x0,0x4,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x0,0x8,0x0,0x0,0x1,0x3,0x4be03fe0,0x0,0x0,0x4be03fe0,0x4be03fe0,0x4be03fe0,0x10000000,0x0,0x4be03fe0,0x0,0x4be03fe0,0x0,0x0,0x4be03fe0,0x10000000,0x0,0x4be03fe0,0x4be03fe0,0x0,0x10000000,0x0,0xa000000,0x1e03fe0,0x0,0xa000000,0xa000000,0x1e03fe0,0xa000000,0x1e03fe0,0x0,0x0,0x2000000,0x0,0x0,0xa000000,0x0,0xa000000,0x0,0x4be03fe0,0x0,0x0,0x0,0x0,0x0,0x4be03fe0,0x2000000,0x2000000,0x0,0x2000000,0x2000000,0x0,0x0,0x0,0x0,0x10000000,0x2000000,0x20000020,0x20000000,0x20,0x10000000,0x2000000,0x0,0x0,0x2000000,0x0,0x0,0x42000000,0x42000000,0x4be03fe0,0x4be03fe0,0x0,0x0,0x4be03fe0,0x4be03fe0,0x9e03fe0,0x0,0x1e03fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f00,0x3f00,0x0,0x0,0x3f00,0x0,0x0,0x3e03fe0,0x3e03fe0,0x1e03fe0,0x0,0x0,0xa000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e03fe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2000000,0x0,0x0,0xa000000,0x0,0x0,0x3fe0,0xe0,0x700,0x3800,0x0,0x1e00000,0x0,0x0,0x0,}; + } + private static void jj_la1_init_6() { + jj_la1_6 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x200000,0x0,0x0,0x0,0x0,0x200000,0x0,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x801,0x0,0x8,0x801,0x801,0x801,0x0,0x8,0x801,0x0,0x801,0x8,0x0,0x801,0x0,0x8,0x801,0x801,0x8,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x800,0x0,0x800,0x4,0x0,0x0,0x0,0x4,0x0,0x4,0x0,0x8,0x801,0x0,0x2,0x0,0x0,0x4,0x801,0x8004000,0x8004000,0x2,0x8004000,0x8004000,0x4,0x4000000,0x8400000,0x8400000,0x40280000,0x8004000,0x0,0x4,0x280004,0x40280000,0x4000,0x4000000,0x8000000,0x8000000,0x0,0x8000000,0x0,0x0,0x801,0x801,0x1000,0x1000,0x801,0x801,0x801,0x0,0x800,0x0,0x1,0x0,0x20000,0x40000,0x3f0,0x3f0,0x180000,0x0,0x600000,0x600000,0x180000,0x600000,0x600000,0x184800,0x800,0x800,0x4,0x4,0x0,0x4,0x4,0x0,0x4,0x4,0x4,0x0,0x384800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x2,0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0x0,0x800000,0x800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,}; + } + private static void jj_la1_init_7() { + jj_la1_7 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + } final private JJCalls[] jj_2_rtns = new JJCalls[5]; private boolean jj_rescan = false; private int jj_gc = 0; /** Constructor with InputStream. */ public ARQParser(java.io.InputStream stream) { - this(stream, null); + this(stream, null); } /** Constructor with InputStream and supplied encoding */ public ARQParser(java.io.InputStream stream, String encoding) { - try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source = new ARQParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 194; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } + token_source = new ARQParserTokenManager(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 202; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Reinitialise. */ public void ReInit(java.io.InputStream stream) { - ReInit(stream, null); + ReInit(stream, null); } /** Reinitialise. */ public void ReInit(java.io.InputStream stream, String encoding) { - try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 194; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } + token_source.ReInit(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 202; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Constructor. */ public ARQParser(java.io.Reader stream) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - token_source = new ARQParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 194; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + jj_input_stream = new SimpleCharStream(stream, 1, 1); + token_source = new ARQParserTokenManager(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 202; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Reinitialise. */ public void ReInit(java.io.Reader stream) { - if (jj_input_stream == null) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - } else { - jj_input_stream.ReInit(stream, 1, 1); - } - if (token_source == null) { - token_source = new ARQParserTokenManager(jj_input_stream); - } - - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 194; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + jj_input_stream.ReInit(stream, 1, 1); + token_source.ReInit(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 202; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Constructor with generated Token Manager. */ public ARQParser(ARQParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 194; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + token_source = tm; + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 202; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } /** Reinitialise. */ public void ReInit(ARQParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 194; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + token_source = tm; + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 202; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } private Token jj_consume_token(int kind) throws ParseException { - Token oldToken; - if ((oldToken = token).next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - if (token.kind == kind) { - jj_gen++; - if (++jj_gc > 100) { - jj_gc = 0; - for (int i = 0; i < jj_2_rtns.length; i++) { - JJCalls c = jj_2_rtns[i]; - while (c != null) { - if (c.gen < jj_gen) c.first = null; - c = c.next; - } - } - } - return token; - } - token = oldToken; - jj_kind = kind; - throw generateParseException(); - } - - @SuppressWarnings("serial") - static private final class LookaheadSuccess extends java.lang.Error { - @Override - public Throwable fillInStackTrace() { - return this; - } - } - static private final LookaheadSuccess jj_ls = new LookaheadSuccess(); + Token oldToken; + if ((oldToken = token).next != null) token = token.next; + else token = token.next = token_source.getNextToken(); + jj_ntk = -1; + if (token.kind == kind) { + jj_gen++; + if (++jj_gc > 100) { + jj_gc = 0; + for (int i = 0; i < jj_2_rtns.length; i++) { + JJCalls c = jj_2_rtns[i]; + while (c != null) { + if (c.gen < jj_gen) c.first = null; + c = c.next; + } + } + } + return token; + } + token = oldToken; + jj_kind = kind; + throw generateParseException(); + } + + static private final class LookaheadSuccess extends java.lang.Error { } + final private LookaheadSuccess jj_ls = new LookaheadSuccess(); private boolean jj_scan_token(int kind) { - if (jj_scanpos == jj_lastpos) { - jj_la--; - if (jj_scanpos.next == null) { - jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); - } else { - jj_lastpos = jj_scanpos = jj_scanpos.next; - } - } else { - jj_scanpos = jj_scanpos.next; - } - if (jj_rescan) { - int i = 0; Token tok = token; - while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } - if (tok != null) jj_add_error_token(kind, i); - } - if (jj_scanpos.kind != kind) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; - return false; + if (jj_scanpos == jj_lastpos) { + jj_la--; + if (jj_scanpos.next == null) { + jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); + } else { + jj_lastpos = jj_scanpos = jj_scanpos.next; + } + } else { + jj_scanpos = jj_scanpos.next; + } + if (jj_rescan) { + int i = 0; Token tok = token; + while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } + if (tok != null) jj_add_error_token(kind, i); + } + if (jj_scanpos.kind != kind) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; + return false; } /** Get the next Token. */ final public Token getNextToken() { - if (token.next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - jj_gen++; - return token; + if (token.next != null) token = token.next; + else token = token.next = token_source.getNextToken(); + jj_ntk = -1; + jj_gen++; + return token; } /** Get the specific Token. */ final public Token getToken(int index) { - Token t = token; - for (int i = 0; i < index; i++) { - if (t.next != null) t = t.next; - else t = t.next = token_source.getNextToken(); - } - return t; + Token t = token; + for (int i = 0; i < index; i++) { + if (t.next != null) t = t.next; + else t = t.next = token_source.getNextToken(); + } + return t; } - private int jj_ntk_f() { - if ((jj_nt=token.next) == null) - return (jj_ntk = (token.next=token_source.getNextToken()).kind); - else - return (jj_ntk = jj_nt.kind); + private int jj_ntk() { + if ((jj_nt=token.next) == null) + return (jj_ntk = (token.next=token_source.getNextToken()).kind); + else + return (jj_ntk = jj_nt.kind); } private java.util.List jj_expentries = new java.util.ArrayList(); @@ -8209,103 +8138,86 @@ private int jj_ntk_f() { private int jj_endpos; private void jj_add_error_token(int kind, int pos) { - if (pos >= 100) { - return; - } - - if (pos == jj_endpos + 1) { - jj_lasttokens[jj_endpos++] = kind; - } else if (jj_endpos != 0) { - jj_expentry = new int[jj_endpos]; - - for (int i = 0; i < jj_endpos; i++) { - jj_expentry[i] = jj_lasttokens[i]; - } - - for (int[] oldentry : jj_expentries) { - if (oldentry.length == jj_expentry.length) { - boolean isMatched = true; - - for (int i = 0; i < jj_expentry.length; i++) { - if (oldentry[i] != jj_expentry[i]) { - isMatched = false; - break; - } - - } - if (isMatched) { - jj_expentries.add(jj_expentry); - break; - } - } - } - - if (pos != 0) { - jj_lasttokens[(jj_endpos = pos) - 1] = kind; - } - } + if (pos >= 100) return; + if (pos == jj_endpos + 1) { + jj_lasttokens[jj_endpos++] = kind; + } else if (jj_endpos != 0) { + jj_expentry = new int[jj_endpos]; + for (int i = 0; i < jj_endpos; i++) { + jj_expentry[i] = jj_lasttokens[i]; + } + boolean exists = false; + for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { + exists = true; + int[] oldentry = (int[])(it.next()); + if (oldentry.length == jj_expentry.length) { + for (int i = 0; i < jj_expentry.length; i++) { + if (oldentry[i] != jj_expentry[i]) { + exists = false; + break; + } + } + if (exists) break; + } + } + if (!exists) jj_expentries.add(jj_expentry); + if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; + } } /** Generate ParseException. */ public ParseException generateParseException() { - jj_expentries.clear(); - boolean[] la1tokens = new boolean[233]; - if (jj_kind >= 0) { - la1tokens[jj_kind] = true; - jj_kind = -1; - } - for (int i = 0; i < 194; i++) { - if (jj_la1[i] == jj_gen) { - for (int j = 0; j < 32; j++) { - if ((jj_la1_0[i] & (1<= 0) { + la1tokens[jj_kind] = true; + jj_kind = -1; + } + for (int i = 0; i < 202; i++) { + if (jj_la1[i] == jj_gen) { + for (int j = 0; j < 32; j++) { + if ((jj_la1_0[i] & (1< jj_gen) { - jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; - switch (i) { - case 0: jj_3_1(); break; - case 1: jj_3_2(); break; - case 2: jj_3_3(); break; - case 3: jj_3_4(); break; - case 4: jj_3_5(); break; - } - } - p = p.next; - } while (p != null); - - } catch(LookaheadSuccess ls) { } - } - jj_rescan = false; + jj_rescan = true; + for (int i = 0; i < 5; i++) { + try { + JJCalls p = jj_2_rtns[i]; + do { + if (p.gen > jj_gen) { + jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; + switch (i) { + case 0: jj_3_1(); break; + case 1: jj_3_2(); break; + case 2: jj_3_3(); break; + case 3: jj_3_4(); break; + case 4: jj_3_5(); break; + } + } + p = p.next; + } while (p != null); + } catch(LookaheadSuccess ls) { } + } + jj_rescan = false; } private void jj_save(int index, int xla) { - JJCalls p = jj_2_rtns[index]; - while (p.gen > jj_gen) { - if (p.next == null) { p = p.next = new JJCalls(); break; } - p = p.next; - } - - p.gen = jj_gen + xla - jj_la; - p.first = token; - p.arg = xla; + JJCalls p = jj_2_rtns[index]; + while (p.gen > jj_gen) { + if (p.next == null) { p = p.next = new JJCalls(); break; } + p = p.next; + } + p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; } static final class JJCalls { - int gen; - Token first; - int arg; - JJCalls next; + int gen; + Token first; + int arg; + JJCalls next; } } diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserBase.java b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserBase.java index 9ee67142138..c25e12a4f7e 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserBase.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserBase.java @@ -22,7 +22,14 @@ import org.apache.jena.atlas.json.io.JSONHandler ; import org.apache.jena.atlas.json.io.JSONHandlerBase ; import org.apache.jena.atlas.lib.NotImplemented ; +import org.apache.jena.cdt.CompositeDatatypeList; +import org.apache.jena.cdt.CompositeDatatypeMap; +import org.apache.jena.datatypes.DatatypeFormatException; +import org.apache.jena.datatypes.RDFDatatype; import org.apache.jena.graph.Node; +import org.apache.jena.graph.NodeFactory; +import org.apache.jena.riot.system.ParserProfile; +import org.apache.jena.riot.system.RiotLib; import org.apache.jena.sparql.core.BasicPattern; import org.apache.jena.sparql.core.Quad; import org.apache.jena.sparql.lang.SPARQLParserBase ; @@ -89,4 +96,49 @@ protected ElementGroup createQueryPattern(Template t){ } return elg; } + + // CDT literals + protected ParserProfile parserProfileForCDTs = null; + + @Override + protected Node createLiteral(String lexicalForm, String langTag, String datatypeURI) { + // CDT literals need to be handled in a special way because their + // lexical forms may contain blank node identifiers, and the same + // blank node identifier in different CDT literals within the same + // query must be mapped to the same blank node. To this end, we are + // reusing the same ParserProfile for parsing all the CDT literals. + final RDFDatatype cdtDatatype; + if ( CompositeDatatypeList.uri.equals(datatypeURI) ) + cdtDatatype = CompositeDatatypeList.type; + else if ( CompositeDatatypeMap.uri.equals(datatypeURI) ) + cdtDatatype = CompositeDatatypeMap.type; + else + cdtDatatype = null; + + if ( cdtDatatype != null ) { + ensureParserProfileForCDTs(); + try { + return parserProfileForCDTs.createTypedLiteral(lexicalForm, cdtDatatype, 0L, 0L); + } + catch ( DatatypeFormatException ex ) { + return createIllformedLiteral(lexicalForm, cdtDatatype); + } + } + + return super.createLiteral(lexicalForm, langTag, datatypeURI); + } + + protected void ensureParserProfileForCDTs() { + if ( parserProfileForCDTs == null ) { + parserProfileForCDTs = RiotLib.dftProfile(); + } + } + + protected Node createIllformedLiteral(String lexicalForm, RDFDatatype cdtDatatype) { + // Attention: This implementation is inefficient because, internally, + // the following function checks whether the given lexical form is + // well formed but, in the current case, we already know that it is + // not well formed. + return NodeFactory.createLiteral(lexicalForm, cdtDatatype); + } } diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserConstants.java b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserConstants.java index 047bd0d0a0d..d5ef5ce7333 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserConstants.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserConstants.java @@ -97,373 +97,377 @@ public interface ARQParserConstants { /** RegularExpression Id. */ int LATERAL = 48; /** RegularExpression Id. */ - int TRIPLE = 49; + int UNFOLD = 49; /** RegularExpression Id. */ - int IS_TRIPLE = 50; + int TRIPLE = 50; /** RegularExpression Id. */ - int SUBJECT = 51; + int IS_TRIPLE = 51; /** RegularExpression Id. */ - int PREDICATE = 52; + int SUBJECT = 52; /** RegularExpression Id. */ - int OBJECT = 53; + int PREDICATE = 53; /** RegularExpression Id. */ - int EXISTS = 54; + int OBJECT = 54; /** RegularExpression Id. */ - int NOT = 55; + int EXISTS = 55; /** RegularExpression Id. */ - int AS = 56; + int NOT = 56; /** RegularExpression Id. */ - int GROUP = 57; + int AS = 57; /** RegularExpression Id. */ - int HAVING = 58; + int GROUP = 58; /** RegularExpression Id. */ - int SEPARATOR = 59; + int HAVING = 59; /** RegularExpression Id. */ - int AGG = 60; + int SEPARATOR = 60; /** RegularExpression Id. */ - int COUNT = 61; + int AGG = 61; /** RegularExpression Id. */ - int MIN = 62; + int COUNT = 62; /** RegularExpression Id. */ - int MAX = 63; + int MIN = 63; /** RegularExpression Id. */ - int SUM = 64; + int MAX = 64; /** RegularExpression Id. */ - int AVG = 65; + int SUM = 65; /** RegularExpression Id. */ - int MEDIAN = 66; + int AVG = 66; /** RegularExpression Id. */ - int MODE = 67; + int MEDIAN = 67; /** RegularExpression Id. */ - int STDEV = 68; + int MODE = 68; /** RegularExpression Id. */ - int STDEV_SAMP = 69; + int STDEV = 69; /** RegularExpression Id. */ - int STDEV_POP = 70; + int STDEV_SAMP = 70; /** RegularExpression Id. */ - int VARIANCE = 71; + int STDEV_POP = 71; /** RegularExpression Id. */ - int VAR_SAMP = 72; + int VARIANCE = 72; /** RegularExpression Id. */ - int VAR_POP = 73; + int VAR_SAMP = 73; /** RegularExpression Id. */ - int SAMPLE = 74; + int VAR_POP = 74; /** RegularExpression Id. */ - int GROUP_CONCAT = 75; + int FOLD = 75; /** RegularExpression Id. */ - int FILTER = 76; + int SAMPLE = 76; /** RegularExpression Id. */ - int BOUND = 77; + int GROUP_CONCAT = 77; /** RegularExpression Id. */ - int COALESCE = 78; + int FILTER = 78; /** RegularExpression Id. */ - int IN = 79; + int BOUND = 79; /** RegularExpression Id. */ - int IF = 80; + int COALESCE = 80; /** RegularExpression Id. */ - int BNODE = 81; + int IN = 81; /** RegularExpression Id. */ - int IRI = 82; + int IF = 82; /** RegularExpression Id. */ - int URI = 83; + int BNODE = 83; /** RegularExpression Id. */ - int CAST = 84; + int IRI = 84; /** RegularExpression Id. */ - int CALL = 85; + int URI = 85; /** RegularExpression Id. */ - int MULTI = 86; + int CAST = 86; /** RegularExpression Id. */ - int SHORTEST = 87; + int CALL = 87; /** RegularExpression Id. */ - int STR = 88; + int MULTI = 88; /** RegularExpression Id. */ - int STRLANG = 89; + int SHORTEST = 89; /** RegularExpression Id. */ - int STRDT = 90; + int STR = 90; /** RegularExpression Id. */ - int DTYPE = 91; + int STRLANG = 91; /** RegularExpression Id. */ - int LANG = 92; + int STRDT = 92; /** RegularExpression Id. */ - int LANGMATCHES = 93; + int DTYPE = 93; /** RegularExpression Id. */ - int IS_URI = 94; + int LANG = 94; /** RegularExpression Id. */ - int IS_IRI = 95; + int LANGMATCHES = 95; /** RegularExpression Id. */ - int IS_BLANK = 96; + int IS_URI = 96; /** RegularExpression Id. */ - int IS_LITERAL = 97; + int IS_IRI = 97; /** RegularExpression Id. */ - int IS_NUMERIC = 98; + int IS_BLANK = 98; /** RegularExpression Id. */ - int REGEX = 99; + int IS_LITERAL = 99; /** RegularExpression Id. */ - int SAME_TERM = 100; + int IS_NUMERIC = 100; /** RegularExpression Id. */ - int RAND = 101; + int REGEX = 101; /** RegularExpression Id. */ - int ABS = 102; + int SAME_TERM = 102; /** RegularExpression Id. */ - int CEIL = 103; + int RAND = 103; /** RegularExpression Id. */ - int FLOOR = 104; + int ABS = 104; /** RegularExpression Id. */ - int ROUND = 105; + int CEIL = 105; /** RegularExpression Id. */ - int MOD = 106; + int FLOOR = 106; /** RegularExpression Id. */ - int IDIV = 107; + int ROUND = 107; /** RegularExpression Id. */ - int CONCAT = 108; + int MOD = 108; /** RegularExpression Id. */ - int SUBSTR = 109; + int IDIV = 109; /** RegularExpression Id. */ - int STRLEN = 110; + int CONCAT = 110; /** RegularExpression Id. */ - int REPLACE = 111; + int SUBSTR = 111; /** RegularExpression Id. */ - int UCASE = 112; + int STRLEN = 112; /** RegularExpression Id. */ - int LCASE = 113; + int REPLACE = 113; /** RegularExpression Id. */ - int ENCODE_FOR_URI = 114; + int UCASE = 114; /** RegularExpression Id. */ - int CONTAINS = 115; + int LCASE = 115; /** RegularExpression Id. */ - int STRSTARTS = 116; + int ENCODE_FOR_URI = 116; /** RegularExpression Id. */ - int STRENDS = 117; + int CONTAINS = 117; /** RegularExpression Id. */ - int STRBEFORE = 118; + int STRSTARTS = 118; /** RegularExpression Id. */ - int STRAFTER = 119; + int STRENDS = 119; /** RegularExpression Id. */ - int YEAR = 120; + int STRBEFORE = 120; /** RegularExpression Id. */ - int MONTH = 121; + int STRAFTER = 121; /** RegularExpression Id. */ - int DAY = 122; + int YEAR = 122; /** RegularExpression Id. */ - int HOURS = 123; + int MONTH = 123; /** RegularExpression Id. */ - int MINUTES = 124; + int DAY = 124; /** RegularExpression Id. */ - int SECONDS = 125; + int HOURS = 125; /** RegularExpression Id. */ - int TIMEZONE = 126; + int MINUTES = 126; /** RegularExpression Id. */ - int TZ = 127; + int SECONDS = 127; /** RegularExpression Id. */ - int ADJUST = 128; + int TIMEZONE = 128; /** RegularExpression Id. */ - int NOW = 129; + int TZ = 129; /** RegularExpression Id. */ - int UUID = 130; + int ADJUST = 130; /** RegularExpression Id. */ - int STRUUID = 131; + int NOW = 131; /** RegularExpression Id. */ - int VERSION = 132; + int UUID = 132; /** RegularExpression Id. */ - int MD5 = 133; + int STRUUID = 133; /** RegularExpression Id. */ - int SHA1 = 134; + int VERSION = 134; /** RegularExpression Id. */ - int SHA224 = 135; + int MD5 = 135; /** RegularExpression Id. */ - int SHA256 = 136; + int SHA1 = 136; /** RegularExpression Id. */ - int SHA384 = 137; + int SHA224 = 137; /** RegularExpression Id. */ - int SHA512 = 138; + int SHA256 = 138; /** RegularExpression Id. */ - int TRUE = 139; + int SHA384 = 139; /** RegularExpression Id. */ - int FALSE = 140; + int SHA512 = 140; /** RegularExpression Id. */ - int DATA = 141; + int TRUE = 141; /** RegularExpression Id. */ - int INSERT = 142; + int FALSE = 142; /** RegularExpression Id. */ - int DELETE = 143; + int DATA = 143; /** RegularExpression Id. */ - int INSERT_DATA = 144; + int INSERT = 144; /** RegularExpression Id. */ - int DELETE_DATA = 145; + int DELETE = 145; /** RegularExpression Id. */ - int DELETE_WHERE = 146; + int INSERT_DATA = 146; /** RegularExpression Id. */ - int LOAD = 147; + int DELETE_DATA = 147; /** RegularExpression Id. */ - int CLEAR = 148; + int DELETE_WHERE = 148; /** RegularExpression Id. */ - int CREATE = 149; + int LOAD = 149; /** RegularExpression Id. */ - int ADD = 150; + int CLEAR = 150; /** RegularExpression Id. */ - int MOVE = 151; + int CREATE = 151; /** RegularExpression Id. */ - int COPY = 152; + int ADD = 152; /** RegularExpression Id. */ - int META = 153; + int MOVE = 153; /** RegularExpression Id. */ - int SILENT = 154; + int COPY = 154; /** RegularExpression Id. */ - int DROP = 155; + int META = 155; /** RegularExpression Id. */ - int INTO = 156; + int SILENT = 156; /** RegularExpression Id. */ - int TO = 157; + int DROP = 157; /** RegularExpression Id. */ - int DFT = 158; + int INTO = 158; /** RegularExpression Id. */ - int ALL = 159; + int TO = 159; /** RegularExpression Id. */ - int WITH = 160; + int DFT = 160; /** RegularExpression Id. */ - int USING = 161; + int ALL = 161; /** RegularExpression Id. */ - int DIGITS = 162; + int WITH = 162; /** RegularExpression Id. */ - int INTEGER = 163; + int USING = 163; /** RegularExpression Id. */ - int DECIMAL = 164; + int DIGITS = 164; /** RegularExpression Id. */ - int DOUBLE = 165; + int INTEGER = 165; /** RegularExpression Id. */ - int INTEGER_POSITIVE = 166; + int DECIMAL = 166; /** RegularExpression Id. */ - int DECIMAL_POSITIVE = 167; + int DOUBLE = 167; /** RegularExpression Id. */ - int DOUBLE_POSITIVE = 168; + int INTEGER_POSITIVE = 168; /** RegularExpression Id. */ - int INTEGER_NEGATIVE = 169; + int DECIMAL_POSITIVE = 169; /** RegularExpression Id. */ - int DECIMAL_NEGATIVE = 170; + int DOUBLE_POSITIVE = 170; /** RegularExpression Id. */ - int DOUBLE_NEGATIVE = 171; + int INTEGER_NEGATIVE = 171; /** RegularExpression Id. */ - int EXPONENT = 172; + int DECIMAL_NEGATIVE = 172; /** RegularExpression Id. */ - int QUOTE_3D = 173; + int DOUBLE_NEGATIVE = 173; /** RegularExpression Id. */ - int QUOTE_3S = 174; + int EXPONENT = 174; /** RegularExpression Id. */ - int ECHAR = 175; + int QUOTE_3D = 175; /** RegularExpression Id. */ - int UCHAR = 176; + int QUOTE_3S = 176; /** RegularExpression Id. */ - int UCHAR4 = 177; + int ECHAR = 177; /** RegularExpression Id. */ - int UCHAR8 = 178; + int UCHAR = 178; /** RegularExpression Id. */ - int STRING_LITERAL1 = 179; + int UCHAR4 = 179; /** RegularExpression Id. */ - int STRING_LITERAL2 = 180; + int UCHAR8 = 180; /** RegularExpression Id. */ - int STRING_LITERAL_LONG1 = 181; + int STRING_LITERAL1 = 181; /** RegularExpression Id. */ - int STRING_LITERAL_LONG2 = 182; + int STRING_LITERAL2 = 182; /** RegularExpression Id. */ - int LPAREN = 183; + int STRING_LITERAL_LONG1 = 183; /** RegularExpression Id. */ - int RPAREN = 184; + int STRING_LITERAL_LONG2 = 184; /** RegularExpression Id. */ - int NIL = 185; + int LPAREN = 185; /** RegularExpression Id. */ - int LBRACE = 186; + int RPAREN = 186; /** RegularExpression Id. */ - int RBRACE = 187; + int NIL = 187; /** RegularExpression Id. */ - int LBRACKET = 188; + int LBRACE = 188; /** RegularExpression Id. */ - int RBRACKET = 189; + int RBRACE = 189; /** RegularExpression Id. */ - int ANON = 190; + int LBRACKET = 190; /** RegularExpression Id. */ - int SEMICOLON = 191; + int RBRACKET = 191; /** RegularExpression Id. */ - int COMMA = 192; + int ANON = 192; /** RegularExpression Id. */ - int DOT = 193; + int SEMICOLON = 193; /** RegularExpression Id. */ - int EQ = 194; + int COMMA = 194; /** RegularExpression Id. */ - int NE = 195; + int DOT = 195; /** RegularExpression Id. */ - int GT = 196; + int EQ = 196; /** RegularExpression Id. */ - int LT = 197; + int NE = 197; /** RegularExpression Id. */ - int LE = 198; + int GT = 198; /** RegularExpression Id. */ - int GE = 199; + int LT = 199; /** RegularExpression Id. */ - int GT2 = 200; + int LE = 200; /** RegularExpression Id. */ - int LT2 = 201; + int GE = 201; /** RegularExpression Id. */ - int L_ANN = 202; + int GT2 = 202; /** RegularExpression Id. */ - int R_ANN = 203; + int LT2 = 203; /** RegularExpression Id. */ - int BANG = 204; + int L_ANN = 204; /** RegularExpression Id. */ - int TILDE = 205; + int R_ANN = 205; /** RegularExpression Id. */ - int COLON = 206; + int BANG = 206; /** RegularExpression Id. */ - int SC_OR = 207; + int TILDE = 207; /** RegularExpression Id. */ - int SC_AND = 208; + int COLON = 208; /** RegularExpression Id. */ - int PLUS = 209; + int SC_OR = 209; /** RegularExpression Id. */ - int MINUS = 210; + int SC_AND = 210; /** RegularExpression Id. */ - int STAR = 211; + int PLUS = 211; /** RegularExpression Id. */ - int SLASH = 212; + int MINUS = 212; /** RegularExpression Id. */ - int DATATYPE = 213; + int STAR = 213; /** RegularExpression Id. */ - int AT = 214; + int SLASH = 214; /** RegularExpression Id. */ - int ASSIGN = 215; + int DATATYPE = 215; /** RegularExpression Id. */ - int VBAR = 216; + int AT = 216; /** RegularExpression Id. */ - int CARAT = 217; + int ASSIGN = 217; /** RegularExpression Id. */ - int FPATH = 218; + int VBAR = 218; /** RegularExpression Id. */ - int RPATH = 219; + int CARAT = 219; /** RegularExpression Id. */ - int QMARK = 220; + int FPATH = 220; /** RegularExpression Id. */ - int SURROGATE_PAIR = 221; + int RPATH = 221; /** RegularExpression Id. */ - int PN_CHARS_BASE = 222; + int QMARK = 222; /** RegularExpression Id. */ - int PN_CHARS_U = 223; + int SURROGATE_PAIR = 223; /** RegularExpression Id. */ - int PN_CHARS = 224; + int PN_CHARS_BASE = 224; /** RegularExpression Id. */ - int PN_PREFIX = 225; + int PN_CHARS_U = 225; /** RegularExpression Id. */ - int PN_LOCAL = 226; + int PN_CHARS = 226; /** RegularExpression Id. */ - int VARNAME = 227; + int PN_PREFIX = 227; /** RegularExpression Id. */ - int PN_LOCAL_ESC = 228; + int PN_LOCAL = 228; /** RegularExpression Id. */ - int PLX = 229; + int VARNAME = 229; /** RegularExpression Id. */ - int HEX = 230; + int PN_LOCAL_ESC = 230; /** RegularExpression Id. */ - int PERCENT = 231; + int PLX = 231; /** RegularExpression Id. */ - int UNKNOWN = 232; + int HEX = 232; + /** RegularExpression Id. */ + int PERCENT = 233; + /** RegularExpression Id. */ + int UNKNOWN = 234; /** Lexical state. */ int DEFAULT = 0; @@ -519,6 +523,7 @@ public interface ARQParserConstants { "\"service\"", "\"LET\"", "\"LATERAL\"", + "\"unfold\"", "\"TRIPLE\"", "\"isTRIPLE\"", "\"SUBJECT\"", @@ -544,6 +549,7 @@ public interface ARQParserConstants { "\"variance\"", "\"var_samp\"", "\"var_pop\"", + "\"fold\"", "\"sample\"", "\"group_concat\"", "\"filter\"", diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserTokenManager.java b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserTokenManager.java index cc1b92ce948..099b959a206 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserTokenManager.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserTokenManager.java @@ -1,9 +1,22 @@ -/* ARQParserTokenManager.java */ /* Generated By:JavaCC: Do not edit this line. ARQParserTokenManager.java */ package org.apache.jena.sparql.lang.arq ; +import org.apache.jena.graph.* ; +import org.apache.jena.query.* ; +import org.apache.jena.sparql.core.Var ; +import org.apache.jena.sparql.syntax.* ; +import org.apache.jena.sparql.expr.* ; +import org.apache.jena.sparql.path.* ; +import org.apache.jena.sparql.expr.aggregate.* ; +import org.apache.jena.sparql.expr.aggregate.lib.* ; +import org.apache.jena.update.* ; +import org.apache.jena.sparql.modify.request.* ; +import org.apache.jena.sparql.core.Quad ; +import java.util.List; +import java.util.ArrayList; /** Token Manager. */ -public class ARQParserTokenManager implements ARQParserConstants { +public class ARQParserTokenManager implements ARQParserConstants +{ /** Debug output. */ public java.io.PrintStream debugStream = System.out; @@ -15,7 +28,8 @@ private int jjStopAtPos(int pos, int kind) jjmatchedPos = pos; return pos + 1; } -private int jjMoveStringLiteralDfa0_0(){ +private int jjMoveStringLiteralDfa0_0() +{ switch(curChar) { case 9: @@ -34,164 +48,164 @@ private int jjMoveStringLiteralDfa0_0(){ jjmatchedKind = 1; return jjMoveNfa_0(0, 0); case 33: - jjmatchedKind = 204; - return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x8L); + jjmatchedKind = 206; + return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x20L); case 38: - return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x10000L); + return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x40000L); case 40: - jjmatchedKind = 183; + jjmatchedKind = 185; return jjMoveNfa_0(0, 0); case 41: - jjmatchedKind = 184; + jjmatchedKind = 186; return jjMoveNfa_0(0, 0); case 42: - jjmatchedKind = 211; + jjmatchedKind = 213; return jjMoveNfa_0(0, 0); case 43: - jjmatchedKind = 209; + jjmatchedKind = 211; return jjMoveNfa_0(0, 0); case 44: - jjmatchedKind = 192; + jjmatchedKind = 194; return jjMoveNfa_0(0, 0); case 45: - jjmatchedKind = 210; - return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x4000000L); + jjmatchedKind = 212; + return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x10000000L); case 46: - jjmatchedKind = 193; + jjmatchedKind = 195; return jjMoveNfa_0(0, 0); case 47: - jjmatchedKind = 212; + jjmatchedKind = 214; return jjMoveNfa_0(0, 0); case 58: - jjmatchedKind = 206; - return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x800000L); + jjmatchedKind = 208; + return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x2000000L); case 59: - jjmatchedKind = 191; + jjmatchedKind = 193; return jjMoveNfa_0(0, 0); case 60: - jjmatchedKind = 197; - return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x8000240L); + jjmatchedKind = 199; + return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x20000900L); case 61: - jjmatchedKind = 194; + jjmatchedKind = 196; return jjMoveNfa_0(0, 0); case 62: - jjmatchedKind = 196; - return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x180L); + jjmatchedKind = 198; + return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x600L); case 63: - jjmatchedKind = 220; + jjmatchedKind = 222; return jjMoveNfa_0(0, 0); case 64: - jjmatchedKind = 214; + jjmatchedKind = 216; return jjMoveNfa_0(0, 0); case 65: - return jjMoveStringLiteralDfa1_0(0x1100010810000000L, 0x4000000002L, 0x80400001L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x2200010810000000L, 0x10000000004L, 0x201000004L, 0x0L); case 66: - return jjMoveStringLiteralDfa1_0(0x200100100000L, 0x22000L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x200100100000L, 0x88000L, 0x0L, 0x0L); case 67: - return jjMoveStringLiteralDfa1_0(0x2000000008000000L, 0x8108000304000L, 0x1300000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x4000000008000000L, 0x20420000c10000L, 0x4c00000L, 0x0L); case 68: - return jjMoveStringLiteralDfa1_0(0x1004800000L, 0x400000008000000L, 0x4800a000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x1004800000L, 0x1000000020000000L, 0x120028000L, 0x0L); case 69: - return jjMoveStringLiteralDfa1_0(0x40000000000000L, 0x4000000000000L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x80000000000000L, 0x10000000000000L, 0x0L, 0x0L); case 70: - return jjMoveStringLiteralDfa1_0(0x4000000000L, 0x10000001000L, 0x1000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x4000000000L, 0x40000004800L, 0x4000L, 0x0L); case 71: - return jjMoveStringLiteralDfa1_0(0x200020000000000L, 0x800L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x400020000000000L, 0x2000L, 0x0L, 0x0L); case 72: - return jjMoveStringLiteralDfa1_0(0x400000000000000L, 0x800000000000000L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x800000000000000L, 0x2000000000000000L, 0x0L, 0x0L); case 73: - return jjMoveStringLiteralDfa1_0(0x4000000000000L, 0x807c0058000L, 0x10004000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x8000000000000L, 0x201f00160000L, 0x40010000L, 0x0L); case 74: return jjMoveStringLiteralDfa1_0(0x2000000L, 0x0L, 0x0L, 0x0L); case 76: - return jjMoveStringLiteralDfa1_0(0x1800020000000L, 0x2000030000000L, 0x80000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x1800020000000L, 0x80000c0000000L, 0x200000L, 0x0L); case 77: - return jjMoveStringLiteralDfa1_0(0xc000100000000000L, 0x120004000040000cL, 0x2800020L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x8000100000000000L, 0x4800100001000019L, 0xa000080L, 0x0L); case 78: - return jjMoveStringLiteralDfa1_0(0x80002000000000L, 0x0L, 0x2L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x100002000000000L, 0x0L, 0x8L, 0x0L); case 79: - return jjMoveStringLiteralDfa1_0(0x200400c0000000L, 0x0L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x400400c0000000L, 0x0L, 0x0L, 0x0L); case 80: - return jjMoveStringLiteralDfa1_0(0x10000000200000L, 0x0L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x20000000200000L, 0x0L, 0x0L, 0x0L); case 82: - return jjMoveStringLiteralDfa1_0(0x1000000L, 0x822800000000L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x1000000L, 0x208a000000000L, 0x0L, 0x0L); case 83: - return jjMoveStringLiteralDfa1_0(0x808400000400000L, 0x20f0601007800471L, 0x40007c8L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x1010400000400000L, 0x83c180401e0010e2L, 0x10001f20L, 0x0L); case 84: - return jjMoveStringLiteralDfa1_0(0x2000000000000L, 0xc000000000000000L, 0x20000800L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x4000000000000L, 0x0L, 0x80002003L, 0x0L); case 85: - return jjMoveStringLiteralDfa1_0(0x80400000000L, 0x1000000080000L, 0x200000004L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x2080400000000L, 0x4000000200000L, 0x800000010L, 0x0L); case 86: - return jjMoveStringLiteralDfa1_0(0x200000000L, 0x380L, 0x10L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x200000000L, 0x700L, 0x40L, 0x0L); case 87: - return jjMoveStringLiteralDfa1_0(0x8000000000L, 0x0L, 0x100000000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x8000000000L, 0x0L, 0x400000000L, 0x0L); case 89: - return jjMoveStringLiteralDfa1_0(0x0L, 0x100000000000000L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x0L, 0x400000000000000L, 0x0L, 0x0L); case 91: - jjmatchedKind = 188; + jjmatchedKind = 190; return jjMoveNfa_0(0, 0); case 93: - jjmatchedKind = 189; + jjmatchedKind = 191; return jjMoveNfa_0(0, 0); case 94: - jjmatchedKind = 217; - return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x200000L); + jjmatchedKind = 219; + return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x800000L); case 97: jjmatchedKind = 19; - return jjMoveStringLiteralDfa1_0(0x1100010810000000L, 0x4000000002L, 0x80400001L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x2200010810000000L, 0x10000000004L, 0x201000004L, 0x0L); case 98: - return jjMoveStringLiteralDfa1_0(0x200100100000L, 0x22000L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x200100100000L, 0x88000L, 0x0L, 0x0L); case 99: - return jjMoveStringLiteralDfa1_0(0x2000000008000000L, 0x8108000304000L, 0x1300000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x4000000008000000L, 0x20420000c10000L, 0x4c00000L, 0x0L); case 100: - return jjMoveStringLiteralDfa1_0(0x1004800000L, 0x400000008000000L, 0x4800a000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x1004800000L, 0x1000000020000000L, 0x120028000L, 0x0L); case 101: - return jjMoveStringLiteralDfa1_0(0x40000000000000L, 0x4000000000000L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x80000000000000L, 0x10000000000000L, 0x0L, 0x0L); case 102: - return jjMoveStringLiteralDfa1_0(0x4000000000L, 0x10000001000L, 0x1000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x4000000000L, 0x40000004800L, 0x4000L, 0x0L); case 103: - return jjMoveStringLiteralDfa1_0(0x200020000000000L, 0x800L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x400020000000000L, 0x2000L, 0x0L, 0x0L); case 104: - return jjMoveStringLiteralDfa1_0(0x400000000000000L, 0x800000000000000L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x800000000000000L, 0x2000000000000000L, 0x0L, 0x0L); case 105: - return jjMoveStringLiteralDfa1_0(0x4000000000000L, 0x807c0058000L, 0x10004000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x8000000000000L, 0x201f00160000L, 0x40010000L, 0x0L); case 106: return jjMoveStringLiteralDfa1_0(0x2000000L, 0x0L, 0x0L, 0x0L); case 108: - return jjMoveStringLiteralDfa1_0(0x1800020000000L, 0x2000030000000L, 0x80000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x1800020000000L, 0x80000c0000000L, 0x200000L, 0x0L); case 109: - return jjMoveStringLiteralDfa1_0(0xc000100000000000L, 0x120004000040000cL, 0x2800020L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x8000100000000000L, 0x4800100001000019L, 0xa000080L, 0x0L); case 110: - return jjMoveStringLiteralDfa1_0(0x80002000000000L, 0x0L, 0x2L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x100002000000000L, 0x0L, 0x8L, 0x0L); case 111: - return jjMoveStringLiteralDfa1_0(0x200400c0000000L, 0x0L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x400400c0000000L, 0x0L, 0x0L, 0x0L); case 112: - return jjMoveStringLiteralDfa1_0(0x10000000200000L, 0x0L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x20000000200000L, 0x0L, 0x0L, 0x0L); case 114: - return jjMoveStringLiteralDfa1_0(0x1000000L, 0x822800000000L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x1000000L, 0x208a000000000L, 0x0L, 0x0L); case 115: - return jjMoveStringLiteralDfa1_0(0x808400000400000L, 0x20f0601007800471L, 0x40007c8L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x1010400000400000L, 0x83c180401e0010e2L, 0x10001f20L, 0x0L); case 116: - return jjMoveStringLiteralDfa1_0(0x2000000000000L, 0xc000000000000000L, 0x20000800L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x4000000000000L, 0x0L, 0x80002003L, 0x0L); case 117: - return jjMoveStringLiteralDfa1_0(0x80400000000L, 0x1000000080000L, 0x200000004L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x2080400000000L, 0x4000000200000L, 0x800000010L, 0x0L); case 118: - return jjMoveStringLiteralDfa1_0(0x200000000L, 0x380L, 0x10L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x200000000L, 0x700L, 0x40L, 0x0L); case 119: - return jjMoveStringLiteralDfa1_0(0x8000000000L, 0x0L, 0x100000000L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x8000000000L, 0x0L, 0x400000000L, 0x0L); case 121: - return jjMoveStringLiteralDfa1_0(0x0L, 0x100000000000000L, 0x0L, 0x0L); + return jjMoveStringLiteralDfa1_0(0x0L, 0x400000000000000L, 0x0L, 0x0L); case 123: - jjmatchedKind = 186; - return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x400L); + jjmatchedKind = 188; + return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x1000L); case 124: - jjmatchedKind = 216; - return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x8800L); + jjmatchedKind = 218; + return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x0L, 0x22000L); case 125: - jjmatchedKind = 187; + jjmatchedKind = 189; return jjMoveNfa_0(0, 0); case 126: - jjmatchedKind = 205; + jjmatchedKind = 207; return jjMoveNfa_0(0, 0); case 65279: jjmatchedKind = 9; @@ -200,7 +214,8 @@ private int jjMoveStringLiteralDfa0_0(){ return jjMoveNfa_0(0, 0); } } -private int jjMoveStringLiteralDfa1_0(long active0, long active1, long active2, long active3){ +private int jjMoveStringLiteralDfa1_0(long active0, long active1, long active2, long active3) +{ try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return jjMoveNfa_0(0, 0); @@ -208,118 +223,118 @@ private int jjMoveStringLiteralDfa1_0(long active0, long active1, long active2, switch(curChar) { case 38: - if ((active3 & 0x10000L) != 0L) + if ((active3 & 0x40000L) != 0L) { - jjmatchedKind = 208; + jjmatchedKind = 210; jjmatchedPos = 1; } break; case 45: - if ((active3 & 0x8000000L) != 0L) + if ((active3 & 0x20000000L) != 0L) { - jjmatchedKind = 219; + jjmatchedKind = 221; jjmatchedPos = 1; } break; case 60: - if ((active3 & 0x200L) != 0L) + if ((active3 & 0x800L) != 0L) { - jjmatchedKind = 201; + jjmatchedKind = 203; jjmatchedPos = 1; } break; case 61: - if ((active3 & 0x8L) != 0L) + if ((active3 & 0x20L) != 0L) { - jjmatchedKind = 195; + jjmatchedKind = 197; jjmatchedPos = 1; } - else if ((active3 & 0x40L) != 0L) + else if ((active3 & 0x100L) != 0L) { - jjmatchedKind = 198; + jjmatchedKind = 200; jjmatchedPos = 1; } - else if ((active3 & 0x80L) != 0L) + else if ((active3 & 0x200L) != 0L) { - jjmatchedKind = 199; + jjmatchedKind = 201; jjmatchedPos = 1; } - else if ((active3 & 0x800000L) != 0L) + else if ((active3 & 0x2000000L) != 0L) { - jjmatchedKind = 215; + jjmatchedKind = 217; jjmatchedPos = 1; } break; case 62: - if ((active3 & 0x100L) != 0L) + if ((active3 & 0x400L) != 0L) { - jjmatchedKind = 200; + jjmatchedKind = 202; jjmatchedPos = 1; } - else if ((active3 & 0x4000000L) != 0L) + else if ((active3 & 0x10000000L) != 0L) { - jjmatchedKind = 218; + jjmatchedKind = 220; jjmatchedPos = 1; } break; case 65: - return jjMoveStringLiteralDfa2_0(active0, 0x8401002200100000L, active1, 0x400003038300780L, active2, 0x3000L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x801002200100000L, active1, 0x100000c0e0c01701L, active2, 0xc000L, active3, 0L); case 66: - return jjMoveStringLiteralDfa2_0(active0, 0x20000000000000L, active1, 0x4000000000L, active2, 0L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x40000000000000L, active1, 0x10000000000L, active2, 0L, active3, 0L); case 67: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x3000000000000L, active2, 0L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0xc000000000000L, active2, 0L, active3, 0L); case 68: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x80000000000L, active2, 0x400021L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x200000000000L, active2, 0x1000084L, active3, 0L); case 69: - return jjMoveStringLiteralDfa2_0(active0, 0x800c01005400000L, active1, 0x2100808800000004L, active2, 0x42008010L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x1000c01005400000L, active1, 0x8402022000000008L, active2, 0x108020040L, active3, 0L); case 70: - if ((active1 & 0x10000L) != 0L) + if ((active1 & 0x40000L) != 0L) { - jjmatchedKind = 80; + jjmatchedKind = 82; jjmatchedPos = 1; } return jjMoveStringLiteralDfa2_0(active0, 0x40000000L, active1, 0L, active2, 0L, active3, 0L); case 71: - return jjMoveStringLiteralDfa2_0(active0, 0x1000000000000000L, active1, 0L, active2, 0L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x2000000000000000L, active1, 0L, active2, 0L, active3, 0L); case 72: - return jjMoveStringLiteralDfa2_0(active0, 0x8000000000L, active1, 0x800000L, active2, 0x7c0L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x8000000000L, active1, 0x2000000L, active2, 0x1f00L, active3, 0L); case 73: - return jjMoveStringLiteralDfa2_0(active0, 0x4000300020800000L, active1, 0x5000000000001000L, active2, 0x104000000L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x8000300020800000L, active1, 0x4000000000004000L, active2, 0x410000001L, active3, 0L); case 76: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x10000000000L, active2, 0x80100000L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x40000000000L, active2, 0x200400000L, active3, 0L); case 78: - if ((active1 & 0x8000L) != 0L) + if ((active1 & 0x20000L) != 0L) { - jjmatchedKind = 79; + jjmatchedKind = 81; jjmatchedPos = 1; } - return jjMoveStringLiteralDfa2_0(active0, 0x90400000000L, active1, 0x4000000020000L, active2, 0x10004000L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x2090400000000L, active1, 0x10000000080000L, active2, 0x40010000L, active3, 0L); case 79: - if ((active2 & 0x20000000L) != 0L) + if ((active2 & 0x80000000L) != 0L) { - jjmatchedKind = 157; + jjmatchedKind = 159; jjmatchedPos = 1; } - return jjMoveStringLiteralDfa2_0(active0, 0x2080000008000000L, active1, 0xa08160000006008L, active2, 0x1880002L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x4100000008000000L, active1, 0x2820580000018810L, active2, 0x6200008L, active3, 0L); case 80: return jjMoveStringLiteralDfa2_0(active0, 0x40000000000L, active1, 0L, active2, 0L, active3, 0L); case 82: - return jjMoveStringLiteralDfa2_0(active0, 0x212024080200000L, active1, 0xc0800L, active2, 0x8200800L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x424024080200000L, active1, 0x302000L, active2, 0x20802000L, active3, 0L); case 83: - if ((active0 & 0x100000000000000L) != 0L) + if ((active0 & 0x200000000000000L) != 0L) { - jjmatchedKind = 56; + jjmatchedKind = 57; jjmatchedPos = 1; } - return jjMoveStringLiteralDfa2_0(active0, 0x4000812000000L, active1, 0x7c0000000L, active2, 0x200000000L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x8000812000000L, active1, 0x1f00000000L, active2, 0x800000000L, active3, 0L); case 84: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0xf0400007000070L, active2, 0x8L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x3c100001c0000e0L, active2, 0x20L, active3, 0L); case 85: - return jjMoveStringLiteralDfa2_0(active0, 0x8000000000000L, active1, 0x200000400001L, active2, 0x4L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x10000000000000L, active1, 0x800001000002L, active2, 0x10L, active3, 0L); case 86: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x2L, active2, 0L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x4L, active2, 0L, active3, 0L); case 88: - return jjMoveStringLiteralDfa2_0(active0, 0x40000000000000L, active1, 0L, active2, 0L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x80000000000000L, active1, 0L, active2, 0L, active3, 0L); case 89: if ((active0 & 0x100000000L) != 0L) { @@ -328,77 +343,77 @@ else if ((active3 & 0x4000000L) != 0L) } break; case 90: - if ((active1 & 0x8000000000000000L) != 0L) + if ((active2 & 0x2L) != 0L) { - jjmatchedKind = 127; + jjmatchedKind = 129; jjmatchedPos = 1; } break; case 94: - if ((active3 & 0x200000L) != 0L) + if ((active3 & 0x800000L) != 0L) { - jjmatchedKind = 213; + jjmatchedKind = 215; jjmatchedPos = 1; } break; case 97: - return jjMoveStringLiteralDfa2_0(active0, 0x8401002200100000L, active1, 0x400003038300780L, active2, 0x3000L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x801002200100000L, active1, 0x100000c0e0c01701L, active2, 0xc000L, active3, 0L); case 98: - return jjMoveStringLiteralDfa2_0(active0, 0x20000000000000L, active1, 0x4000000000L, active2, 0L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x40000000000000L, active1, 0x10000000000L, active2, 0L, active3, 0L); case 99: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x3000000000000L, active2, 0L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0xc000000000000L, active2, 0L, active3, 0L); case 100: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x80000000000L, active2, 0x400021L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x200000000000L, active2, 0x1000084L, active3, 0L); case 101: - return jjMoveStringLiteralDfa2_0(active0, 0x800c01005400000L, active1, 0x2100808800000004L, active2, 0x42008010L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x1000c01005400000L, active1, 0x8402022000000008L, active2, 0x108020040L, active3, 0L); case 102: - if ((active1 & 0x10000L) != 0L) + if ((active1 & 0x40000L) != 0L) { - jjmatchedKind = 80; + jjmatchedKind = 82; jjmatchedPos = 1; } return jjMoveStringLiteralDfa2_0(active0, 0x40000000L, active1, 0L, active2, 0L, active3, 0L); case 103: - return jjMoveStringLiteralDfa2_0(active0, 0x1000000000000000L, active1, 0L, active2, 0L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x2000000000000000L, active1, 0L, active2, 0L, active3, 0L); case 104: - return jjMoveStringLiteralDfa2_0(active0, 0x8000000000L, active1, 0x800000L, active2, 0x7c0L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x8000000000L, active1, 0x2000000L, active2, 0x1f00L, active3, 0L); case 105: - return jjMoveStringLiteralDfa2_0(active0, 0x4000300020800000L, active1, 0x5000000000001000L, active2, 0x104000000L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x8000300020800000L, active1, 0x4000000000004000L, active2, 0x410000001L, active3, 0L); case 108: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x10000000000L, active2, 0x80100000L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x40000000000L, active2, 0x200400000L, active3, 0L); case 110: - if ((active1 & 0x8000L) != 0L) + if ((active1 & 0x20000L) != 0L) { - jjmatchedKind = 79; + jjmatchedKind = 81; jjmatchedPos = 1; } - return jjMoveStringLiteralDfa2_0(active0, 0x90400000000L, active1, 0x4000000020000L, active2, 0x10004000L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x2090400000000L, active1, 0x10000000080000L, active2, 0x40010000L, active3, 0L); case 111: - if ((active2 & 0x20000000L) != 0L) + if ((active2 & 0x80000000L) != 0L) { - jjmatchedKind = 157; + jjmatchedKind = 159; jjmatchedPos = 1; } - return jjMoveStringLiteralDfa2_0(active0, 0x2080000008000000L, active1, 0xa08160000006008L, active2, 0x1880002L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x4100000008000000L, active1, 0x2820580000018810L, active2, 0x6200008L, active3, 0L); case 112: return jjMoveStringLiteralDfa2_0(active0, 0x40000000000L, active1, 0L, active2, 0L, active3, 0L); case 114: - return jjMoveStringLiteralDfa2_0(active0, 0x212024080200000L, active1, 0xc0800L, active2, 0x8200800L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x424024080200000L, active1, 0x302000L, active2, 0x20802000L, active3, 0L); case 115: - if ((active0 & 0x100000000000000L) != 0L) + if ((active0 & 0x200000000000000L) != 0L) { - jjmatchedKind = 56; + jjmatchedKind = 57; jjmatchedPos = 1; } - return jjMoveStringLiteralDfa2_0(active0, 0x4000812000000L, active1, 0x7c0000000L, active2, 0x200000000L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x8000812000000L, active1, 0x1f00000000L, active2, 0x800000000L, active3, 0L); case 116: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0xf0400007000070L, active2, 0x8L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x3c100001c0000e0L, active2, 0x20L, active3, 0L); case 117: - return jjMoveStringLiteralDfa2_0(active0, 0x8000000000000L, active1, 0x200000400001L, active2, 0x4L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x10000000000000L, active1, 0x800001000002L, active2, 0x10L, active3, 0L); case 118: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x2L, active2, 0L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x4L, active2, 0L, active3, 0L); case 120: - return jjMoveStringLiteralDfa2_0(active0, 0x40000000000000L, active1, 0L, active2, 0L, active3, 0L); + return jjMoveStringLiteralDfa2_0(active0, 0x80000000000000L, active1, 0L, active2, 0L, active3, 0L); case 121: if ((active0 & 0x100000000L) != 0L) { @@ -407,28 +422,28 @@ else if ((active3 & 0x4000000L) != 0L) } break; case 122: - if ((active1 & 0x8000000000000000L) != 0L) + if ((active2 & 0x2L) != 0L) { - jjmatchedKind = 127; + jjmatchedKind = 129; jjmatchedPos = 1; } break; case 124: - if ((active3 & 0x400L) != 0L) + if ((active3 & 0x1000L) != 0L) { - jjmatchedKind = 202; + jjmatchedKind = 204; jjmatchedPos = 1; } - else if ((active3 & 0x8000L) != 0L) + else if ((active3 & 0x20000L) != 0L) { - jjmatchedKind = 207; + jjmatchedKind = 209; jjmatchedPos = 1; } break; case 125: - if ((active3 & 0x800L) != 0L) + if ((active3 & 0x2000L) != 0L) { - jjmatchedKind = 203; + jjmatchedKind = 205; jjmatchedPos = 1; } break; @@ -437,7 +452,8 @@ else if ((active3 & 0x8000L) != 0L) } return jjMoveNfa_0(0, 1); } -private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1, long old2, long active2, long old3, long active3){ +private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1, long old2, long active2, long old3, long active3) +{ if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2) | (active3 &= old3)) == 0L) return jjMoveNfa_0(0, 1); try { curChar = input_stream.readChar(); } @@ -447,70 +463,70 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long a switch(curChar) { case 53: - if ((active2 & 0x20L) != 0L) + if ((active2 & 0x80L) != 0L) { - jjmatchedKind = 133; + jjmatchedKind = 135; jjmatchedPos = 2; } break; case 65: - return jjMoveStringLiteralDfa3_0(active0, 0x20000000000L, active1, 0x103000000004000L, active2, 0x807c0L); + return jjMoveStringLiteralDfa3_0(active0, 0x20000000000L, active1, 0x40c000000010000L, active2, 0x201f00L); case 66: - return jjMoveStringLiteralDfa3_0(active0, 0x8000000000000L, active1, 0x200100000000L, active2, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0x10000000000000L, active1, 0x800400000000L, active2, 0L); case 67: if ((active0 & 0x800000000L) != 0L) { jjmatchedKind = 35; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x2004000000000000L, active2, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x8010000000000000L, active2, 0L); case 68: if ((active0 & 0x10000000000L) != 0L) { jjmatchedKind = 40; jjmatchedPos = 2; } - else if ((active1 & 0x40000000000L) != 0L) + else if ((active1 & 0x100000000000L) != 0L) { - jjmatchedKind = 106; + jjmatchedKind = 108; jjmatchedPos = 2; } - else if ((active2 & 0x400000L) != 0L) + else if ((active2 & 0x1000000L) != 0L) { - jjmatchedKind = 150; + jjmatchedKind = 152; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x481000000L, active1, 0x7cL, active2, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0x481000000L, active1, 0xf8L, active2, 0L); case 69: - return jjMoveStringLiteralDfa3_0(active0, 0x10008000200000L, active1, 0L, active2, 0x300000L); + return jjMoveStringLiteralDfa3_0(active0, 0x20008000200000L, active1, 0L, active2, 0xc00000L); case 70: - return jjMoveStringLiteralDfa3_0(active0, 0x40000000L, active1, 0L, active2, 0x40000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x2000040000000L, active1, 0L, active2, 0x100000000L); case 71: - if ((active0 & 0x1000000000000000L) != 0L) + if ((active0 & 0x2000000000000000L) != 0L) { - jjmatchedKind = 60; + jjmatchedKind = 61; jjmatchedPos = 2; } - else if ((active1 & 0x2L) != 0L) + else if ((active1 & 0x4L) != 0L) { - jjmatchedKind = 65; + jjmatchedKind = 66; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x800000000L, active2, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x2000000000L, active2, 0L); case 73: - if ((active1 & 0x40000L) != 0L) + if ((active1 & 0x100000L) != 0L) { - jjmatchedKind = 82; + jjmatchedKind = 84; jjmatchedPos = 2; } - else if ((active1 & 0x80000L) != 0L) + else if ((active1 & 0x200000L) != 0L) { - jjmatchedKind = 83; + jjmatchedKind = 85; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x42080000000000L, active1, 0x88080000000L, active2, 0x200000004L); + return jjMoveStringLiteralDfa3_0(active0, 0x84080000000000L, active1, 0x220200000000L, active2, 0x800000010L); case 74: - return jjMoveStringLiteralDfa3_0(active0, 0x20000000000000L, active1, 0L, active2, 0x1L); + return jjMoveStringLiteralDfa3_0(active0, 0x40000000000000L, active1, 0L, active2, 0x4L); case 75: if ((active0 & 0x10000000L) != 0L) { @@ -519,139 +535,139 @@ else if ((active1 & 0x80000L) != 0L) } break; case 76: - if ((active2 & 0x80000000L) != 0L) + if ((active2 & 0x200000000L) != 0L) { - jjmatchedKind = 159; + jjmatchedKind = 161; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x200400000L, active1, 0x200601000L, active2, 0x4009000L); + return jjMoveStringLiteralDfa3_0(active0, 0x200400000L, active1, 0x801804800L, active2, 0x10024000L); case 77: - if ((active1 & 0x1L) != 0L) + if ((active1 & 0x2L) != 0L) { - jjmatchedKind = 64; + jjmatchedKind = 65; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x2020000000L, active1, 0x4000001000000400L, active2, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0x2020000000L, active1, 0x4000001000L, active2, 0x1L); case 78: - if ((active0 & 0x4000000000000000L) != 0L) + if ((active0 & 0x8000000000000000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x300008000000L, active1, 0x1208102430000000L, active2, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0x300008000000L, active1, 0x48204090c0000000L, active2, 0L); case 79: - return jjMoveStringLiteralDfa3_0(active0, 0x200004002000000L, active1, 0x10000820800L, active2, 0x8000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x400004002000000L, active1, 0x40002082000L, active2, 0x20000000L); case 80: - return jjMoveStringLiteralDfa3_0(active0, 0x800000000000000L, active1, 0x800000000000L, active2, 0x1000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x1000000000000000L, active1, 0x2000000000000L, active2, 0x4000000L); case 82: - if ((active1 & 0x1000000L) != 0L) + if ((active1 & 0x4000000L) != 0L) { - jjmatchedKind = 88; + jjmatchedKind = 90; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x400000000000L, active1, 0xf0400006000380L, active2, 0x18L); + return jjMoveStringLiteralDfa3_0(active0, 0x400000000000L, active1, 0x3c1000018000700L, active2, 0x60L); case 83: - if ((active1 & 0x4000000000L) != 0L) + if ((active1 & 0x10000000000L) != 0L) { - jjmatchedKind = 102; + jjmatchedKind = 104; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x1004900000L, active1, 0x100000L, active2, 0x4000L); + return jjMoveStringLiteralDfa3_0(active0, 0x1004900000L, active1, 0x400000L, active2, 0x10000L); case 84: if ((active0 & 0x800000000000L) != 0L) { jjmatchedKind = 47; jjmatchedPos = 2; } - else if ((active0 & 0x80000000000000L) != 0L) + else if ((active0 & 0x100000000000000L) != 0L) { - jjmatchedKind = 55; + jjmatchedKind = 56; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x5040000000000L, active1, 0x8000000L, active2, 0x112002000L); + return jjMoveStringLiteralDfa3_0(active0, 0x9040000000000L, active1, 0x20000000L, active2, 0x448008000L); case 85: - return jjMoveStringLiteralDfa3_0(active0, 0x2000000000000000L, active1, 0x800020040002000L, active2, 0x800L); + return jjMoveStringLiteralDfa3_0(active0, 0x4000000000000000L, active1, 0x2000080100008000L, active2, 0x2000L); case 86: - return jjMoveStringLiteralDfa3_0(active0, 0x400000000000000L, active1, 0L, active2, 0x800000L); + return jjMoveStringLiteralDfa3_0(active0, 0x800000000000000L, active1, 0L, active2, 0x2000000L); case 87: - if ((active2 & 0x2L) != 0L) + if ((active2 & 0x8L) != 0L) { - jjmatchedKind = 129; + jjmatchedKind = 131; jjmatchedPos = 2; } break; case 88: - if ((active0 & 0x8000000000000000L) != 0L) + if ((active1 & 0x1L) != 0L) { - jjmatchedKind = 63; + jjmatchedKind = 64; jjmatchedPos = 2; } break; case 89: - if ((active1 & 0x400000000000000L) != 0L) + if ((active1 & 0x1000000000000000L) != 0L) { - jjmatchedKind = 122; + jjmatchedKind = 124; jjmatchedPos = 2; } break; case 97: - return jjMoveStringLiteralDfa3_0(active0, 0x20000000000L, active1, 0x103000000004000L, active2, 0x807c0L); + return jjMoveStringLiteralDfa3_0(active0, 0x20000000000L, active1, 0x40c000000010000L, active2, 0x201f00L); case 98: - return jjMoveStringLiteralDfa3_0(active0, 0x8000000000000L, active1, 0x200100000000L, active2, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0x10000000000000L, active1, 0x800400000000L, active2, 0L); case 99: if ((active0 & 0x800000000L) != 0L) { jjmatchedKind = 35; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x2004000000000000L, active2, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x8010000000000000L, active2, 0L); case 100: if ((active0 & 0x10000000000L) != 0L) { jjmatchedKind = 40; jjmatchedPos = 2; } - else if ((active1 & 0x40000000000L) != 0L) + else if ((active1 & 0x100000000000L) != 0L) { - jjmatchedKind = 106; + jjmatchedKind = 108; jjmatchedPos = 2; } - else if ((active2 & 0x400000L) != 0L) + else if ((active2 & 0x1000000L) != 0L) { - jjmatchedKind = 150; + jjmatchedKind = 152; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x481000000L, active1, 0x7cL, active2, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0x481000000L, active1, 0xf8L, active2, 0L); case 101: - return jjMoveStringLiteralDfa3_0(active0, 0x10008000200000L, active1, 0L, active2, 0x300000L); + return jjMoveStringLiteralDfa3_0(active0, 0x20008000200000L, active1, 0L, active2, 0xc00000L); case 102: - return jjMoveStringLiteralDfa3_0(active0, 0x40000000L, active1, 0L, active2, 0x40000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x2000040000000L, active1, 0L, active2, 0x100000000L); case 103: - if ((active0 & 0x1000000000000000L) != 0L) + if ((active0 & 0x2000000000000000L) != 0L) { - jjmatchedKind = 60; + jjmatchedKind = 61; jjmatchedPos = 2; } - else if ((active1 & 0x2L) != 0L) + else if ((active1 & 0x4L) != 0L) { - jjmatchedKind = 65; + jjmatchedKind = 66; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x800000000L, active2, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x2000000000L, active2, 0L); case 105: - if ((active1 & 0x40000L) != 0L) + if ((active1 & 0x100000L) != 0L) { - jjmatchedKind = 82; + jjmatchedKind = 84; jjmatchedPos = 2; } - else if ((active1 & 0x80000L) != 0L) + else if ((active1 & 0x200000L) != 0L) { - jjmatchedKind = 83; + jjmatchedKind = 85; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x42080000000000L, active1, 0x88080000000L, active2, 0x200000004L); + return jjMoveStringLiteralDfa3_0(active0, 0x84080000000000L, active1, 0x220200000000L, active2, 0x800000010L); case 106: - return jjMoveStringLiteralDfa3_0(active0, 0x20000000000000L, active1, 0L, active2, 0x1L); + return jjMoveStringLiteralDfa3_0(active0, 0x40000000000000L, active1, 0L, active2, 0x4L); case 107: if ((active0 & 0x10000000L) != 0L) { @@ -660,78 +676,78 @@ else if ((active1 & 0x80000L) != 0L) } break; case 108: - if ((active2 & 0x80000000L) != 0L) + if ((active2 & 0x200000000L) != 0L) { - jjmatchedKind = 159; + jjmatchedKind = 161; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x200400000L, active1, 0x200601000L, active2, 0x4009000L); + return jjMoveStringLiteralDfa3_0(active0, 0x200400000L, active1, 0x801804800L, active2, 0x10024000L); case 109: - if ((active1 & 0x1L) != 0L) + if ((active1 & 0x2L) != 0L) { - jjmatchedKind = 64; + jjmatchedKind = 65; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x2020000000L, active1, 0x4000001000000400L, active2, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0x2020000000L, active1, 0x4000001000L, active2, 0x1L); case 110: - if ((active0 & 0x4000000000000000L) != 0L) + if ((active0 & 0x8000000000000000L) != 0L) { - jjmatchedKind = 62; + jjmatchedKind = 63; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x300008000000L, active1, 0x1208102430000000L, active2, 0L); + return jjMoveStringLiteralDfa3_0(active0, 0x300008000000L, active1, 0x48204090c0000000L, active2, 0L); case 111: - return jjMoveStringLiteralDfa3_0(active0, 0x200004002000000L, active1, 0x10000820800L, active2, 0x8000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x400004002000000L, active1, 0x40002082000L, active2, 0x20000000L); case 112: - return jjMoveStringLiteralDfa3_0(active0, 0x800000000000000L, active1, 0x800000000000L, active2, 0x1000000L); + return jjMoveStringLiteralDfa3_0(active0, 0x1000000000000000L, active1, 0x2000000000000L, active2, 0x4000000L); case 114: - if ((active1 & 0x1000000L) != 0L) + if ((active1 & 0x4000000L) != 0L) { - jjmatchedKind = 88; + jjmatchedKind = 90; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x400000000000L, active1, 0xf0400006000380L, active2, 0x18L); + return jjMoveStringLiteralDfa3_0(active0, 0x400000000000L, active1, 0x3c1000018000700L, active2, 0x60L); case 115: - if ((active1 & 0x4000000000L) != 0L) + if ((active1 & 0x10000000000L) != 0L) { - jjmatchedKind = 102; + jjmatchedKind = 104; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x1004900000L, active1, 0x100000L, active2, 0x4000L); + return jjMoveStringLiteralDfa3_0(active0, 0x1004900000L, active1, 0x400000L, active2, 0x10000L); case 116: if ((active0 & 0x800000000000L) != 0L) { jjmatchedKind = 47; jjmatchedPos = 2; } - else if ((active0 & 0x80000000000000L) != 0L) + else if ((active0 & 0x100000000000000L) != 0L) { - jjmatchedKind = 55; + jjmatchedKind = 56; jjmatchedPos = 2; } - return jjMoveStringLiteralDfa3_0(active0, 0x5040000000000L, active1, 0x8000000L, active2, 0x112002000L); + return jjMoveStringLiteralDfa3_0(active0, 0x9040000000000L, active1, 0x20000000L, active2, 0x448008000L); case 117: - return jjMoveStringLiteralDfa3_0(active0, 0x2000000000000000L, active1, 0x800020040002000L, active2, 0x800L); + return jjMoveStringLiteralDfa3_0(active0, 0x4000000000000000L, active1, 0x2000080100008000L, active2, 0x2000L); case 118: - return jjMoveStringLiteralDfa3_0(active0, 0x400000000000000L, active1, 0L, active2, 0x800000L); + return jjMoveStringLiteralDfa3_0(active0, 0x800000000000000L, active1, 0L, active2, 0x2000000L); case 119: - if ((active2 & 0x2L) != 0L) + if ((active2 & 0x8L) != 0L) { - jjmatchedKind = 129; + jjmatchedKind = 131; jjmatchedPos = 2; } break; case 120: - if ((active0 & 0x8000000000000000L) != 0L) + if ((active1 & 0x1L) != 0L) { - jjmatchedKind = 63; + jjmatchedKind = 64; jjmatchedPos = 2; } break; case 121: - if ((active1 & 0x400000000000000L) != 0L) + if ((active1 & 0x1000000000000000L) != 0L) { - jjmatchedKind = 122; + jjmatchedKind = 124; jjmatchedPos = 2; } break; @@ -740,7 +756,8 @@ else if ((active0 & 0x80000000000000L) != 0L) } return jjMoveNfa_0(0, 2); } -private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1, long old2, long active2){ +private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1, long old2, long active2) +{ if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L) return jjMoveNfa_0(0, 2); try { curChar = input_stream.readChar(); } @@ -750,115 +767,120 @@ private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long a switch(curChar) { case 49: - if ((active2 & 0x40L) != 0L) + if ((active2 & 0x100L) != 0L) { - jjmatchedKind = 134; + jjmatchedKind = 136; jjmatchedPos = 3; } break; case 50: - return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0L, active2, 0x180L); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0L, active2, 0x600L); case 51: - return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0L, active2, 0x200L); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0L, active2, 0x800L); case 53: - return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0L, active2, 0x400L); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0L, active2, 0x1000L); case 65: - if ((active2 & 0x2000L) != 0L) + if ((active2 & 0x8000L) != 0L) { - jjmatchedKind = 141; + jjmatchedKind = 143; jjmatchedPos = 3; } - else if ((active2 & 0x2000000L) != 0L) + else if ((active2 & 0x8000000L) != 0L) { - jjmatchedKind = 153; + jjmatchedKind = 155; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x800000000000000L, active1, 0x80000008000000L, active2, 0x40300000L); + return jjMoveStringLiteralDfa4_0(active0, 0x1000000000000000L, active1, 0x200000020000000L, active2, 0x100c00000L); case 66: - return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x40000000000000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x100000000000000L, active2, 0L); case 67: if ((active0 & 0x1000000000L) != 0L) { jjmatchedKind = 36; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x4000000L, active1, 0x100000000000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x4000000L, active1, 0x400000000000L, active2, 0L); case 68: if ((active0 & 0x200000000000L) != 0L) { jjmatchedKind = 45; jjmatchedPos = 3; } - else if ((active1 & 0x2000000000L) != 0L) + else if ((active1 & 0x800L) != 0L) { - jjmatchedKind = 101; + jjmatchedKind = 75; jjmatchedPos = 3; } - else if ((active2 & 0x4L) != 0L) + else if ((active1 & 0x8000000000L) != 0L) { - jjmatchedKind = 130; + jjmatchedKind = 103; + jjmatchedPos = 3; + } + else if ((active2 & 0x10L) != 0L) + { + jjmatchedKind = 132; jjmatchedPos = 3; } - else if ((active2 & 0x80000L) != 0L) + else if ((active2 & 0x200000L) != 0L) { - jjmatchedKind = 147; + jjmatchedKind = 149; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x10000000000000L, active1, 0x4020000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x20000000000000L, active1, 0x10080000L, active2, 0L); case 69: if ((active0 & 0x100000L) != 0L) { jjmatchedKind = 20; jjmatchedPos = 3; } - else if ((active1 & 0x8L) != 0L) + else if ((active1 & 0x10L) != 0L) { - jjmatchedKind = 67; + jjmatchedKind = 68; jjmatchedPos = 3; } - else if ((active2 & 0x800L) != 0L) + else if ((active2 & 0x2000L) != 0L) { - jjmatchedKind = 139; + jjmatchedKind = 141; jjmatchedPos = 3; } - else if ((active2 & 0x800000L) != 0L) + else if ((active2 & 0x2000000L) != 0L) { - jjmatchedKind = 151; + jjmatchedKind = 153; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x21002480400000L, active1, 0x4020001800000070L, active2, 0x400c000L); + return jjMoveStringLiteralDfa4_0(active0, 0x41002480400000L, active1, 0x800060000000e0L, active2, 0x10030001L); case 70: return jjMoveStringLiteralDfa4_0(active0, 0x200000L, active1, 0L, active2, 0L); case 71: - if ((active1 & 0x10000000L) != 0L) + if ((active1 & 0x40000000L) != 0L) { - jjmatchedKind = 92; + jjmatchedKind = 94; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x20000000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x80000000L, active2, 0L); case 72: - if ((active2 & 0x100000000L) != 0L) + if ((active2 & 0x400000000L) != 0L) { - jjmatchedKind = 160; + jjmatchedKind = 162; jjmatchedPos = 3; } break; case 73: - return jjMoveStringLiteralDfa4_0(active0, 0x400040020000000L, active1, 0x200000084L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x800040020000000L, active1, 0x800000108L, active2, 0L); case 74: - return jjMoveStringLiteralDfa4_0(active0, 0x8000000000000L, active1, 0L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x10000000000000L, active1, 0L, active2, 0L); case 76: - if ((active1 & 0x200000L) != 0L) + if ((active1 & 0x800000L) != 0L) { - jjmatchedKind = 85; + jjmatchedKind = 87; jjmatchedPos = 3; } - else if ((active1 & 0x8000000000L) != 0L) + else if ((active1 & 0x20000000000L) != 0L) { - jjmatchedKind = 103; + jjmatchedKind = 105; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0xc00102004000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x3000408010000L, active2, 0L); case 77: if ((active0 & 0x4000000000L) != 0L) { @@ -872,152 +894,157 @@ else if ((active1 & 0x8000000000L) != 0L) jjmatchedKind = 25; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x2000000000000000L, active1, 0x20000002000L, active2, 0x200000000L); + return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000000L, active1, 0x80000008000L, active2, 0x800000000L); case 79: - if ((active2 & 0x10000000L) != 0L) + if ((active2 & 0x40000000L) != 0L) { - jjmatchedKind = 156; + jjmatchedKind = 158; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x80000000000L, active1, 0x2004010000000000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x2080000000000L, active1, 0x8010040000000000L, active2, 0L); case 80: - if ((active2 & 0x8000000L) != 0L) + if ((active2 & 0x20000000L) != 0L) { - jjmatchedKind = 155; + jjmatchedKind = 157; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x2020000000000L, active1, 0x400L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x4020000000000L, active1, 0x1000L, active2, 0L); case 82: - if ((active1 & 0x100000000000000L) != 0L) + if ((active1 & 0x400000000000000L) != 0L) { - jjmatchedKind = 120; + jjmatchedKind = 122; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x4008000000000L, active1, 0x8000000c0800000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x8008000000000L, active1, 0x2000000302000000L, active2, 0L); case 83: - return jjMoveStringLiteralDfa4_0(active0, 0x40000048000000L, active1, 0x13200000000000L, active2, 0x1010L); + return jjMoveStringLiteralDfa4_0(active0, 0x80000048000000L, active1, 0x4c800000000000L, active2, 0x4040L); case 84: - if ((active1 & 0x100000L) != 0L) + if ((active1 & 0x400000L) != 0L) { - jjmatchedKind = 84; + jjmatchedKind = 86; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x800000L, active1, 0x208000000401000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x800000L, active1, 0x820000001004000L, active2, 0L); case 85: - return jjMoveStringLiteralDfa4_0(active0, 0x200100201000000L, active1, 0x1000000400000800L, active2, 0x9L); + return jjMoveStringLiteralDfa4_0(active0, 0x400100201000000L, active1, 0x4000001000002000L, active2, 0x24L); case 86: - if ((active1 & 0x80000000000L) != 0L) + if ((active1 & 0x200000000000L) != 0L) { - jjmatchedKind = 107; + jjmatchedKind = 109; jjmatchedPos = 3; } return jjMoveStringLiteralDfa4_0(active0, 0x400000000000L, active1, 0L, active2, 0L); case 89: - if ((active2 & 0x1000000L) != 0L) + if ((active2 & 0x4000000L) != 0L) { - jjmatchedKind = 152; + jjmatchedKind = 154; jjmatchedPos = 3; } break; case 95: - return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x300L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x600L, active2, 0L); case 97: - if ((active2 & 0x2000L) != 0L) + if ((active2 & 0x8000L) != 0L) { - jjmatchedKind = 141; + jjmatchedKind = 143; jjmatchedPos = 3; } - else if ((active2 & 0x2000000L) != 0L) + else if ((active2 & 0x8000000L) != 0L) { - jjmatchedKind = 153; + jjmatchedKind = 155; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x800000000000000L, active1, 0x80000008000000L, active2, 0x40300000L); + return jjMoveStringLiteralDfa4_0(active0, 0x1000000000000000L, active1, 0x200000020000000L, active2, 0x100c00000L); case 98: - return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x40000000000000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x100000000000000L, active2, 0L); case 99: if ((active0 & 0x1000000000L) != 0L) { jjmatchedKind = 36; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x4000000L, active1, 0x100000000000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x4000000L, active1, 0x400000000000L, active2, 0L); case 100: if ((active0 & 0x200000000000L) != 0L) { jjmatchedKind = 45; jjmatchedPos = 3; } - else if ((active1 & 0x2000000000L) != 0L) + else if ((active1 & 0x800L) != 0L) { - jjmatchedKind = 101; + jjmatchedKind = 75; jjmatchedPos = 3; } - else if ((active2 & 0x4L) != 0L) + else if ((active1 & 0x8000000000L) != 0L) { - jjmatchedKind = 130; + jjmatchedKind = 103; jjmatchedPos = 3; } - else if ((active2 & 0x80000L) != 0L) + else if ((active2 & 0x10L) != 0L) { - jjmatchedKind = 147; + jjmatchedKind = 132; + jjmatchedPos = 3; + } + else if ((active2 & 0x200000L) != 0L) + { + jjmatchedKind = 149; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x10000000000000L, active1, 0x4020000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x20000000000000L, active1, 0x10080000L, active2, 0L); case 101: if ((active0 & 0x100000L) != 0L) { jjmatchedKind = 20; jjmatchedPos = 3; } - else if ((active1 & 0x8L) != 0L) + else if ((active1 & 0x10L) != 0L) { - jjmatchedKind = 67; + jjmatchedKind = 68; jjmatchedPos = 3; } - else if ((active2 & 0x800L) != 0L) + else if ((active2 & 0x2000L) != 0L) { - jjmatchedKind = 139; + jjmatchedKind = 141; jjmatchedPos = 3; } - else if ((active2 & 0x800000L) != 0L) + else if ((active2 & 0x2000000L) != 0L) { - jjmatchedKind = 151; + jjmatchedKind = 153; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x21002480400000L, active1, 0x4020001800000070L, active2, 0x400c000L); + return jjMoveStringLiteralDfa4_0(active0, 0x41002480400000L, active1, 0x800060000000e0L, active2, 0x10030001L); case 102: return jjMoveStringLiteralDfa4_0(active0, 0x200000L, active1, 0L, active2, 0L); case 103: - if ((active1 & 0x10000000L) != 0L) + if ((active1 & 0x40000000L) != 0L) { - jjmatchedKind = 92; + jjmatchedKind = 94; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x20000000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x80000000L, active2, 0L); case 104: - if ((active2 & 0x100000000L) != 0L) + if ((active2 & 0x400000000L) != 0L) { - jjmatchedKind = 160; + jjmatchedKind = 162; jjmatchedPos = 3; } break; case 105: - return jjMoveStringLiteralDfa4_0(active0, 0x400040020000000L, active1, 0x200000084L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x800040020000000L, active1, 0x800000108L, active2, 0L); case 106: - return jjMoveStringLiteralDfa4_0(active0, 0x8000000000000L, active1, 0L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x10000000000000L, active1, 0L, active2, 0L); case 108: - if ((active1 & 0x200000L) != 0L) + if ((active1 & 0x800000L) != 0L) { - jjmatchedKind = 85; + jjmatchedKind = 87; jjmatchedPos = 3; } - else if ((active1 & 0x8000000000L) != 0L) + else if ((active1 & 0x20000000000L) != 0L) { - jjmatchedKind = 103; + jjmatchedKind = 105; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0xc00102004000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x3000408010000L, active2, 0L); case 109: if ((active0 & 0x4000000000L) != 0L) { @@ -1031,50 +1058,50 @@ else if ((active1 & 0x8000000000L) != 0L) jjmatchedKind = 25; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x2000000000000000L, active1, 0x20000002000L, active2, 0x200000000L); + return jjMoveStringLiteralDfa4_0(active0, 0x4000000000000000L, active1, 0x80000008000L, active2, 0x800000000L); case 111: - if ((active2 & 0x10000000L) != 0L) + if ((active2 & 0x40000000L) != 0L) { - jjmatchedKind = 156; + jjmatchedKind = 158; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x80000000000L, active1, 0x2004010000000000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x2080000000000L, active1, 0x8010040000000000L, active2, 0L); case 112: - if ((active2 & 0x8000000L) != 0L) + if ((active2 & 0x20000000L) != 0L) { - jjmatchedKind = 155; + jjmatchedKind = 157; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x2020000000000L, active1, 0x400L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x4020000000000L, active1, 0x1000L, active2, 0L); case 114: - if ((active1 & 0x100000000000000L) != 0L) + if ((active1 & 0x400000000000000L) != 0L) { - jjmatchedKind = 120; + jjmatchedKind = 122; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x4008000000000L, active1, 0x8000000c0800000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x8008000000000L, active1, 0x2000000302000000L, active2, 0L); case 115: - return jjMoveStringLiteralDfa4_0(active0, 0x40000048000000L, active1, 0x13200000000000L, active2, 0x1010L); + return jjMoveStringLiteralDfa4_0(active0, 0x80000048000000L, active1, 0x4c800000000000L, active2, 0x4040L); case 116: - if ((active1 & 0x100000L) != 0L) + if ((active1 & 0x400000L) != 0L) { - jjmatchedKind = 84; + jjmatchedKind = 86; jjmatchedPos = 3; } - return jjMoveStringLiteralDfa4_0(active0, 0x800000L, active1, 0x208000000401000L, active2, 0L); + return jjMoveStringLiteralDfa4_0(active0, 0x800000L, active1, 0x820000001004000L, active2, 0L); case 117: - return jjMoveStringLiteralDfa4_0(active0, 0x200100201000000L, active1, 0x1000000400000800L, active2, 0x9L); + return jjMoveStringLiteralDfa4_0(active0, 0x400100201000000L, active1, 0x4000001000002000L, active2, 0x24L); case 118: - if ((active1 & 0x80000000000L) != 0L) + if ((active1 & 0x200000000000L) != 0L) { - jjmatchedKind = 107; + jjmatchedKind = 109; jjmatchedPos = 3; } return jjMoveStringLiteralDfa4_0(active0, 0x400000000000L, active1, 0L, active2, 0L); case 121: - if ((active2 & 0x1000000L) != 0L) + if ((active2 & 0x4000000L) != 0L) { - jjmatchedKind = 152; + jjmatchedKind = 154; jjmatchedPos = 3; } break; @@ -1083,7 +1110,8 @@ else if ((active1 & 0x8000000000L) != 0L) } return jjMoveNfa_0(0, 3); } -private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1, long old2, long active2){ +private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1, long old2, long active2) +{ if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L) return jjMoveNfa_0(0, 3); try { curChar = input_stream.readChar(); } @@ -1093,72 +1121,72 @@ private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long a switch(curChar) { case 49: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0L, active2, 0x400L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0L, active2, 0x1000L); case 50: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0L, active2, 0x80L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0L, active2, 0x200L); case 53: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0L, active2, 0x100L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0L, active2, 0x400L); case 56: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0L, active2, 0x200L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0L, active2, 0x800L); case 65: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x8900102000084L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x22400408000108L, active2, 0L); case 67: - return jjMoveStringLiteralDfa5_0(active0, 0x20000001400000L, active1, 0L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0x40000001400000L, active1, 0L, active2, 0L); case 68: if ((active0 & 0x2000000000L) != 0L) { jjmatchedKind = 37; jjmatchedPos = 4; } - else if ((active1 & 0x2000L) != 0L) + else if ((active1 & 0x8000L) != 0L) { - jjmatchedKind = 77; + jjmatchedKind = 79; jjmatchedPos = 4; } - else if ((active1 & 0x20000000000L) != 0L) + else if ((active1 & 0x80000000000L) != 0L) { - jjmatchedKind = 105; + jjmatchedKind = 107; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x4000000000000L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x10000000000000L, active2, 0L); case 69: if ((active0 & 0x8000000000L) != 0L) { jjmatchedKind = 39; jjmatchedPos = 4; } - else if ((active1 & 0x20000L) != 0L) + else if ((active1 & 0x80000L) != 0L) { - jjmatchedKind = 81; + jjmatchedKind = 83; jjmatchedPos = 4; } - else if ((active1 & 0x1000000000000L) != 0L) + else if ((active1 & 0x4000000000000L) != 0L) { - jjmatchedKind = 112; + jjmatchedKind = 114; jjmatchedPos = 4; } - else if ((active1 & 0x2000000000000L) != 0L) + else if ((active1 & 0x8000000000000L) != 0L) { - jjmatchedKind = 113; + jjmatchedKind = 115; jjmatchedPos = 4; } - else if ((active2 & 0x1000L) != 0L) + else if ((active2 & 0x4000L) != 0L) { - jjmatchedKind = 140; + jjmatchedKind = 142; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0x8000240000000L, active1, 0x40400000005000L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0x10000240000000L, active1, 0x101000000014000L, active2, 0L); case 70: if ((active0 & 0x400000000L) != 0L) { jjmatchedKind = 34; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x80000000000000L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x200000000000000L, active2, 0L); case 71: - if ((active2 & 0x200000000L) != 0L) + if ((active2 & 0x800000000L) != 0L) { - jjmatchedKind = 161; + jjmatchedKind = 163; jjmatchedPos = 4; } break; @@ -1168,172 +1196,172 @@ else if ((active2 & 0x1000L) != 0L) jjmatchedKind = 41; jjmatchedPos = 4; } - else if ((active1 & 0x200000000000000L) != 0L) + else if ((active1 & 0x800000000000000L) != 0L) { - jjmatchedKind = 121; + jjmatchedKind = 123; jjmatchedPos = 4; } break; case 73: - if ((active1 & 0x400000L) != 0L) + if ((active1 & 0x1000000L) != 0L) { - jjmatchedKind = 86; + jjmatchedKind = 88; jjmatchedPos = 4; } - else if ((active1 & 0x40000000L) != 0L) + else if ((active1 & 0x100000000L) != 0L) { - jjmatchedKind = 94; + jjmatchedKind = 96; jjmatchedPos = 4; } - else if ((active1 & 0x80000000L) != 0L) + else if ((active1 & 0x200000000L) != 0L) { - jjmatchedKind = 95; + jjmatchedKind = 97; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0x14400000a00000L, active1, 0L, active2, 0x10L); + return jjMoveStringLiteralDfa5_0(active0, 0x28400000a00000L, active1, 0L, active2, 0x40L); case 76: - return jjMoveStringLiteralDfa5_0(active0, 0x2000000000000L, active1, 0x400L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0x6000000000000L, active1, 0x1000L, active2, 0L); case 77: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x420000000L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x1080000000L, active2, 0L); case 78: if ((active0 & 0x80000000000L) != 0L) { jjmatchedKind = 43; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0x400000000000000L, active1, 0x2020000000000000L, active2, 0x4000000L); + return jjMoveStringLiteralDfa5_0(active0, 0x800000000000000L, active1, 0x8080000000000000L, active2, 0x10000000L); case 79: return jjMoveStringLiteralDfa5_0(active0, 0x40000000000L, active1, 0L, active2, 0L); case 80: - if ((active0 & 0x200000000000000L) != 0L) + if ((active0 & 0x400000000000000L) != 0L) { - jjmatchedKind = 57; + jjmatchedKind = 58; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0xa00L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x2400L, active2, 0L); case 82: if ((active0 & 0x80000000L) != 0L) { jjmatchedKind = 31; jjmatchedPos = 4; } - else if ((active1 & 0x10000000000L) != 0L) + else if ((active1 & 0x40000000000L) != 0L) { - jjmatchedKind = 104; + jjmatchedKind = 106; jjmatchedPos = 4; } - else if ((active2 & 0x100000L) != 0L) + else if ((active2 & 0x400000L) != 0L) { - jjmatchedKind = 148; + jjmatchedKind = 150; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0x801000004000000L, active1, 0L, active2, 0x4000L); + return jjMoveStringLiteralDfa5_0(active0, 0x1001000004000000L, active1, 0L, active2, 0x10000L); case 83: if ((active0 & 0x100000000000L) != 0L) { jjmatchedKind = 44; jjmatchedPos = 4; } - else if ((active1 & 0x800000000000000L) != 0L) + else if ((active1 & 0x2000000000000000L) != 0L) { - jjmatchedKind = 123; + jjmatchedKind = 125; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x100L, active2, 0x1L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x200L, active2, 0x4L); case 84: if ((active0 & 0x20000000L) != 0L) { jjmatchedKind = 29; jjmatchedPos = 4; } - else if ((active0 & 0x2000000000000000L) != 0L) + else if ((active0 & 0x4000000000000000L) != 0L) { - jjmatchedKind = 61; + jjmatchedKind = 62; jjmatchedPos = 4; } - else if ((active1 & 0x4000000L) != 0L) + else if ((active1 & 0x10000000L) != 0L) { - jjmatchedKind = 90; + jjmatchedKind = 92; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0x40000008000000L, active1, 0x1010201208800000L, active2, 0x208000L); + return jjMoveStringLiteralDfa5_0(active0, 0x80000008000000L, active1, 0x4040804822000000L, active2, 0x820000L); case 85: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0L, active2, 0x40000008L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0L, active2, 0x100000020L); case 86: - if ((active1 & 0x10L) != 0L) + if ((active1 & 0x20L) != 0L) { - jjmatchedKind = 68; + jjmatchedKind = 69; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x60L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0xc0L, active2, 0L); case 88: - if ((active1 & 0x800000000L) != 0L) + if ((active1 & 0x2000000000L) != 0L) { - jjmatchedKind = 99; + jjmatchedKind = 101; jjmatchedPos = 4; } break; case 90: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x4000000000000000L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0L, active2, 0x1L); case 97: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x8900102000084L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x22400408000108L, active2, 0L); case 99: - return jjMoveStringLiteralDfa5_0(active0, 0x20000001400000L, active1, 0L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0x40000001400000L, active1, 0L, active2, 0L); case 100: if ((active0 & 0x2000000000L) != 0L) { jjmatchedKind = 37; jjmatchedPos = 4; } - else if ((active1 & 0x2000L) != 0L) + else if ((active1 & 0x8000L) != 0L) { - jjmatchedKind = 77; + jjmatchedKind = 79; jjmatchedPos = 4; } - else if ((active1 & 0x20000000000L) != 0L) + else if ((active1 & 0x80000000000L) != 0L) { - jjmatchedKind = 105; + jjmatchedKind = 107; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x4000000000000L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x10000000000000L, active2, 0L); case 101: if ((active0 & 0x8000000000L) != 0L) { jjmatchedKind = 39; jjmatchedPos = 4; } - else if ((active1 & 0x20000L) != 0L) + else if ((active1 & 0x80000L) != 0L) { - jjmatchedKind = 81; + jjmatchedKind = 83; jjmatchedPos = 4; } - else if ((active1 & 0x1000000000000L) != 0L) + else if ((active1 & 0x4000000000000L) != 0L) { - jjmatchedKind = 112; + jjmatchedKind = 114; jjmatchedPos = 4; } - else if ((active1 & 0x2000000000000L) != 0L) + else if ((active1 & 0x8000000000000L) != 0L) { - jjmatchedKind = 113; + jjmatchedKind = 115; jjmatchedPos = 4; } - else if ((active2 & 0x1000L) != 0L) + else if ((active2 & 0x4000L) != 0L) { - jjmatchedKind = 140; + jjmatchedKind = 142; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0x8000240000000L, active1, 0x40400000005000L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0x10000240000000L, active1, 0x101000000014000L, active2, 0L); case 102: if ((active0 & 0x400000000L) != 0L) { jjmatchedKind = 34; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x80000000000000L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x200000000000000L, active2, 0L); case 103: - if ((active2 & 0x200000000L) != 0L) + if ((active2 & 0x800000000L) != 0L) { - jjmatchedKind = 161; + jjmatchedKind = 163; jjmatchedPos = 4; } break; @@ -1343,119 +1371,120 @@ else if ((active2 & 0x1000L) != 0L) jjmatchedKind = 41; jjmatchedPos = 4; } - else if ((active1 & 0x200000000000000L) != 0L) + else if ((active1 & 0x800000000000000L) != 0L) { - jjmatchedKind = 121; + jjmatchedKind = 123; jjmatchedPos = 4; } break; case 105: - if ((active1 & 0x400000L) != 0L) + if ((active1 & 0x1000000L) != 0L) { - jjmatchedKind = 86; + jjmatchedKind = 88; jjmatchedPos = 4; } - else if ((active1 & 0x40000000L) != 0L) + else if ((active1 & 0x100000000L) != 0L) { - jjmatchedKind = 94; + jjmatchedKind = 96; jjmatchedPos = 4; } - else if ((active1 & 0x80000000L) != 0L) + else if ((active1 & 0x200000000L) != 0L) { - jjmatchedKind = 95; + jjmatchedKind = 97; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0x14400000a00000L, active1, 0L, active2, 0x10L); + return jjMoveStringLiteralDfa5_0(active0, 0x28400000a00000L, active1, 0L, active2, 0x40L); case 108: - return jjMoveStringLiteralDfa5_0(active0, 0x2000000000000L, active1, 0x400L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0x6000000000000L, active1, 0x1000L, active2, 0L); case 109: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x420000000L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x1080000000L, active2, 0L); case 110: if ((active0 & 0x80000000000L) != 0L) { jjmatchedKind = 43; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0x400000000000000L, active1, 0x2020000000000000L, active2, 0x4000000L); + return jjMoveStringLiteralDfa5_0(active0, 0x800000000000000L, active1, 0x8080000000000000L, active2, 0x10000000L); case 111: return jjMoveStringLiteralDfa5_0(active0, 0x40000000000L, active1, 0L, active2, 0L); case 112: - if ((active0 & 0x200000000000000L) != 0L) + if ((active0 & 0x400000000000000L) != 0L) { - jjmatchedKind = 57; + jjmatchedKind = 58; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0xa00L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x2400L, active2, 0L); case 114: if ((active0 & 0x80000000L) != 0L) { jjmatchedKind = 31; jjmatchedPos = 4; } - else if ((active1 & 0x10000000000L) != 0L) + else if ((active1 & 0x40000000000L) != 0L) { - jjmatchedKind = 104; + jjmatchedKind = 106; jjmatchedPos = 4; } - else if ((active2 & 0x100000L) != 0L) + else if ((active2 & 0x400000L) != 0L) { - jjmatchedKind = 148; + jjmatchedKind = 150; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0x801000004000000L, active1, 0L, active2, 0x4000L); + return jjMoveStringLiteralDfa5_0(active0, 0x1001000004000000L, active1, 0L, active2, 0x10000L); case 115: if ((active0 & 0x100000000000L) != 0L) { jjmatchedKind = 44; jjmatchedPos = 4; } - else if ((active1 & 0x800000000000000L) != 0L) + else if ((active1 & 0x2000000000000000L) != 0L) { - jjmatchedKind = 123; + jjmatchedKind = 125; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x100L, active2, 0x1L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x200L, active2, 0x4L); case 116: if ((active0 & 0x20000000L) != 0L) { jjmatchedKind = 29; jjmatchedPos = 4; } - else if ((active0 & 0x2000000000000000L) != 0L) + else if ((active0 & 0x4000000000000000L) != 0L) { - jjmatchedKind = 61; + jjmatchedKind = 62; jjmatchedPos = 4; } - else if ((active1 & 0x4000000L) != 0L) + else if ((active1 & 0x10000000L) != 0L) { - jjmatchedKind = 90; + jjmatchedKind = 92; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0x40000008000000L, active1, 0x1010201208800000L, active2, 0x208000L); + return jjMoveStringLiteralDfa5_0(active0, 0x80000008000000L, active1, 0x4040804822000000L, active2, 0x820000L); case 117: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0L, active2, 0x40000008L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0L, active2, 0x100000020L); case 118: - if ((active1 & 0x10L) != 0L) + if ((active1 & 0x20L) != 0L) { - jjmatchedKind = 68; + jjmatchedKind = 69; jjmatchedPos = 4; } - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x60L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0xc0L, active2, 0L); case 120: - if ((active1 & 0x800000000L) != 0L) + if ((active1 & 0x2000000000L) != 0L) { - jjmatchedKind = 99; + jjmatchedKind = 101; jjmatchedPos = 4; } break; case 122: - return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x4000000000000000L, active2, 0L); + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0L, active2, 0x1L); default : break; } return jjMoveNfa_0(0, 4); } -private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1, long old2, long active2){ +private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1, long old2, long active2) +{ if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L) return jjMoveNfa_0(0, 4); try { curChar = input_stream.readChar(); } @@ -1465,97 +1494,102 @@ private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long a switch(curChar) { case 50: - if ((active2 & 0x400L) != 0L) + if ((active2 & 0x1000L) != 0L) { - jjmatchedKind = 138; + jjmatchedKind = 140; jjmatchedPos = 5; } break; case 52: - if ((active2 & 0x80L) != 0L) + if ((active2 & 0x200L) != 0L) { - jjmatchedKind = 135; + jjmatchedKind = 137; jjmatchedPos = 5; } - else if ((active2 & 0x200L) != 0L) + else if ((active2 & 0x800L) != 0L) { - jjmatchedKind = 137; + jjmatchedKind = 139; jjmatchedPos = 5; } break; case 54: - if ((active2 & 0x100L) != 0L) + if ((active2 & 0x400L) != 0L) { - jjmatchedKind = 136; + jjmatchedKind = 138; jjmatchedPos = 5; } break; case 65: - return jjMoveStringLiteralDfa6_0(active0, 0x801000000000000L, active1, 0x10000020000100L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0x1001000000000000L, active1, 0x40000080000200L, active2, 0L); case 67: - return jjMoveStringLiteralDfa6_0(active0, 0x18400000000000L, active1, 0x800000000000L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0x30400000000000L, active1, 0x2000000000000L, active2, 0L); case 68: - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x2020000000000000L, active2, 0L); - case 69: if ((active0 & 0x2000000000000L) != 0L) { jjmatchedKind = 49; jjmatchedPos = 5; } - else if ((active1 & 0x400L) != 0L) + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x8080000000000000L, active2, 0L); + case 69: + if ((active0 & 0x4000000000000L) != 0L) { - jjmatchedKind = 74; + jjmatchedKind = 50; jjmatchedPos = 5; } - else if ((active2 & 0x8000L) != 0L) + else if ((active1 & 0x1000L) != 0L) { - jjmatchedKind = 143; + jjmatchedKind = 76; jjmatchedPos = 5; } - else if ((active2 & 0x200000L) != 0L) + else if ((active2 & 0x20000L) != 0L) { - jjmatchedKind = 149; + jjmatchedKind = 145; + jjmatchedPos = 5; + } + else if ((active2 & 0x800000L) != 0L) + { + jjmatchedKind = 151; jjmatchedPos = 5; } - return jjMoveStringLiteralDfa6_0(active0, 0x1000000L, active1, 0x1004001600800000L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0x1000000L, active1, 0x4010005802000000L, active2, 0L); case 70: - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x40000000000000L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x100000000000000L, active2, 0L); case 71: - if ((active0 & 0x400000000000000L) != 0L) + if ((active0 & 0x800000000000000L) != 0L) { - jjmatchedKind = 58; + jjmatchedKind = 59; jjmatchedPos = 5; } break; case 73: - return jjMoveStringLiteralDfa6_0(active0, 0x4000000L, active1, 0x8000000000000L, active2, 0x8L); + return jjMoveStringLiteralDfa6_0(active0, 0x4000000L, active1, 0x20000000000000L, active2, 0x20L); case 76: - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0L, active2, 0x40000000L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0L, active2, 0x100000000L); case 78: - if ((active1 & 0x4L) != 0L) + if ((active1 & 0x8L) != 0L) { - jjmatchedKind = 66; + jjmatchedKind = 67; jjmatchedPos = 5; } - else if ((active1 & 0x400000000000L) != 0L) + else if ((active1 & 0x1000000000000L) != 0L) { - jjmatchedKind = 110; + jjmatchedKind = 112; jjmatchedPos = 5; } - return jjMoveStringLiteralDfa6_0(active0, 0x40000800000L, active1, 0x102000080L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0x40000800000L, active1, 0x408000100L, active2, 0L); case 79: - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x4000000000000200L, active2, 0x10L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x400L, active2, 0x41L); case 80: - return jjMoveStringLiteralDfa6_0(active0, 0x4000000000000L, active1, 0L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0x8000000000000L, active1, 0L, active2, 0L); case 82: - if ((active1 & 0x1000L) != 0L) + if ((active1 & 0x4000L) != 0L) { - jjmatchedKind = 76; + jjmatchedKind = 78; jjmatchedPos = 5; } - else if ((active1 & 0x200000000000L) != 0L) + else if ((active1 & 0x800000000000L) != 0L) { - jjmatchedKind = 109; + jjmatchedKind = 111; jjmatchedPos = 5; } return jjMoveStringLiteralDfa6_0(active0, 0x8000000L, active1, 0L, active2, 0L); @@ -1565,12 +1599,12 @@ else if ((active1 & 0x200000000000L) != 0L) jjmatchedKind = 33; jjmatchedPos = 5; } - else if ((active0 & 0x40000000000000L) != 0L) + else if ((active0 & 0x80000000000000L) != 0L) { - jjmatchedKind = 54; + jjmatchedKind = 55; jjmatchedPos = 5; } - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x4000L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x10000L, active2, 0L); case 84: if ((active0 & 0x400000L) != 0L) { @@ -1582,32 +1616,32 @@ else if ((active0 & 0x40000000L) != 0L) jjmatchedKind = 30; jjmatchedPos = 5; } - else if ((active0 & 0x20000000000000L) != 0L) + else if ((active0 & 0x40000000000000L) != 0L) { - jjmatchedKind = 53; + jjmatchedKind = 54; jjmatchedPos = 5; } - else if ((active1 & 0x100000000000L) != 0L) + else if ((active1 & 0x400000000000L) != 0L) { - jjmatchedKind = 108; + jjmatchedKind = 110; jjmatchedPos = 5; } - else if ((active2 & 0x1L) != 0L) + else if ((active2 & 0x4L) != 0L) { - jjmatchedKind = 128; + jjmatchedKind = 130; jjmatchedPos = 5; } - else if ((active2 & 0x4000L) != 0L) + else if ((active2 & 0x10000L) != 0L) { - jjmatchedKind = 142; + jjmatchedKind = 144; jjmatchedPos = 5; } - else if ((active2 & 0x4000000L) != 0L) + else if ((active2 & 0x10000000L) != 0L) { - jjmatchedKind = 154; + jjmatchedKind = 156; jjmatchedPos = 5; } - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x80000000000000L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x200000000000000L, active2, 0L); case 88: if ((active0 & 0x200000L) != 0L) { @@ -1616,75 +1650,80 @@ else if ((active2 & 0x4000000L) != 0L) } break; case 89: - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x8000000L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x20000000L, active2, 0L); case 95: - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x860L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x20c0L, active2, 0L); case 97: - return jjMoveStringLiteralDfa6_0(active0, 0x801000000000000L, active1, 0x10000020000100L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0x1001000000000000L, active1, 0x40000080000200L, active2, 0L); case 99: - return jjMoveStringLiteralDfa6_0(active0, 0x18400000000000L, active1, 0x800000000000L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0x30400000000000L, active1, 0x2000000000000L, active2, 0L); case 100: - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x2020000000000000L, active2, 0L); - case 101: if ((active0 & 0x2000000000000L) != 0L) { jjmatchedKind = 49; jjmatchedPos = 5; } - else if ((active1 & 0x400L) != 0L) + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x8080000000000000L, active2, 0L); + case 101: + if ((active0 & 0x4000000000000L) != 0L) { - jjmatchedKind = 74; + jjmatchedKind = 50; jjmatchedPos = 5; } - else if ((active2 & 0x8000L) != 0L) + else if ((active1 & 0x1000L) != 0L) { - jjmatchedKind = 143; + jjmatchedKind = 76; jjmatchedPos = 5; } - else if ((active2 & 0x200000L) != 0L) + else if ((active2 & 0x20000L) != 0L) { - jjmatchedKind = 149; + jjmatchedKind = 145; + jjmatchedPos = 5; + } + else if ((active2 & 0x800000L) != 0L) + { + jjmatchedKind = 151; jjmatchedPos = 5; } - return jjMoveStringLiteralDfa6_0(active0, 0x1000000L, active1, 0x1004001600800000L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0x1000000L, active1, 0x4010005802000000L, active2, 0L); case 102: - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x40000000000000L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x100000000000000L, active2, 0L); case 103: - if ((active0 & 0x400000000000000L) != 0L) + if ((active0 & 0x800000000000000L) != 0L) { - jjmatchedKind = 58; + jjmatchedKind = 59; jjmatchedPos = 5; } break; case 105: - return jjMoveStringLiteralDfa6_0(active0, 0x4000000L, active1, 0x8000000000000L, active2, 0x8L); + return jjMoveStringLiteralDfa6_0(active0, 0x4000000L, active1, 0x20000000000000L, active2, 0x20L); case 108: - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0L, active2, 0x40000000L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0L, active2, 0x100000000L); case 110: - if ((active1 & 0x4L) != 0L) + if ((active1 & 0x8L) != 0L) { - jjmatchedKind = 66; + jjmatchedKind = 67; jjmatchedPos = 5; } - else if ((active1 & 0x400000000000L) != 0L) + else if ((active1 & 0x1000000000000L) != 0L) { - jjmatchedKind = 110; + jjmatchedKind = 112; jjmatchedPos = 5; } - return jjMoveStringLiteralDfa6_0(active0, 0x40000800000L, active1, 0x102000080L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0x40000800000L, active1, 0x408000100L, active2, 0L); case 111: - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x4000000000000200L, active2, 0x10L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x400L, active2, 0x41L); case 112: - return jjMoveStringLiteralDfa6_0(active0, 0x4000000000000L, active1, 0L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0x8000000000000L, active1, 0L, active2, 0L); case 114: - if ((active1 & 0x1000L) != 0L) + if ((active1 & 0x4000L) != 0L) { - jjmatchedKind = 76; + jjmatchedKind = 78; jjmatchedPos = 5; } - else if ((active1 & 0x200000000000L) != 0L) + else if ((active1 & 0x800000000000L) != 0L) { - jjmatchedKind = 109; + jjmatchedKind = 111; jjmatchedPos = 5; } return jjMoveStringLiteralDfa6_0(active0, 0x8000000L, active1, 0L, active2, 0L); @@ -1694,12 +1733,12 @@ else if ((active1 & 0x200000000000L) != 0L) jjmatchedKind = 33; jjmatchedPos = 5; } - else if ((active0 & 0x40000000000000L) != 0L) + else if ((active0 & 0x80000000000000L) != 0L) { - jjmatchedKind = 54; + jjmatchedKind = 55; jjmatchedPos = 5; } - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x4000L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x10000L, active2, 0L); case 116: if ((active0 & 0x400000L) != 0L) { @@ -1711,32 +1750,32 @@ else if ((active0 & 0x40000000L) != 0L) jjmatchedKind = 30; jjmatchedPos = 5; } - else if ((active0 & 0x20000000000000L) != 0L) + else if ((active0 & 0x40000000000000L) != 0L) { - jjmatchedKind = 53; + jjmatchedKind = 54; jjmatchedPos = 5; } - else if ((active1 & 0x100000000000L) != 0L) + else if ((active1 & 0x400000000000L) != 0L) { - jjmatchedKind = 108; + jjmatchedKind = 110; jjmatchedPos = 5; } - else if ((active2 & 0x1L) != 0L) + else if ((active2 & 0x4L) != 0L) { - jjmatchedKind = 128; + jjmatchedKind = 130; jjmatchedPos = 5; } - else if ((active2 & 0x4000L) != 0L) + else if ((active2 & 0x10000L) != 0L) { - jjmatchedKind = 142; + jjmatchedKind = 144; jjmatchedPos = 5; } - else if ((active2 & 0x4000000L) != 0L) + else if ((active2 & 0x10000000L) != 0L) { - jjmatchedKind = 154; + jjmatchedKind = 156; jjmatchedPos = 5; } - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x80000000000000L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x200000000000000L, active2, 0L); case 120: if ((active0 & 0x200000L) != 0L) { @@ -1745,13 +1784,14 @@ else if ((active2 & 0x4000000L) != 0L) } break; case 121: - return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x8000000L, active2, 0L); + return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x20000000L, active2, 0L); default : break; } return jjMoveNfa_0(0, 5); } -private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1, long old2, long active2){ +private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1, long old2, long active2) +{ if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L) return jjMoveNfa_0(0, 5); try { curChar = input_stream.readChar(); } @@ -1761,20 +1801,20 @@ private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long a switch(curChar) { case 65: - return jjMoveStringLiteralDfa7_0(active0, 0x10040000000000L, active1, 0L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0x20040000000000L, active1, 0L, active2, 0L); case 66: return jjMoveStringLiteralDfa7_0(active0, 0x4000000L, active1, 0L, active2, 0L); case 67: - return jjMoveStringLiteralDfa7_0(active0, 0x800000L, active1, 0x4880L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0x800000L, active1, 0x12100L, active2, 0L); case 68: if ((active0 & 0x1000000L) != 0L) { jjmatchedKind = 24; jjmatchedPos = 6; } - else if ((active2 & 0x8L) != 0L) + else if ((active2 & 0x20L) != 0L) { - jjmatchedKind = 131; + jjmatchedKind = 133; jjmatchedPos = 6; } break; @@ -1784,23 +1824,23 @@ else if ((active2 & 0x8L) != 0L) jjmatchedKind = 46; jjmatchedPos = 6; } - else if ((active1 & 0x800000000000L) != 0L) + else if ((active1 & 0x2000000000000L) != 0L) { - jjmatchedKind = 111; + jjmatchedKind = 113; jjmatchedPos = 6; } - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x80000000000000L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x200000000000000L, active2, 0L); case 71: - if ((active1 & 0x2000000L) != 0L) + if ((active1 & 0x8000000L) != 0L) { - jjmatchedKind = 89; + jjmatchedKind = 91; jjmatchedPos = 6; } break; case 75: - if ((active1 & 0x100000000L) != 0L) + if ((active1 & 0x400000000L) != 0L) { - jjmatchedKind = 96; + jjmatchedKind = 98; jjmatchedPos = 6; } break; @@ -1810,75 +1850,75 @@ else if ((active1 & 0x800000000000L) != 0L) jjmatchedKind = 48; jjmatchedPos = 6; } - return jjMoveStringLiteralDfa7_0(active0, 0x4000000000000L, active1, 0L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0x8000000000000L, active1, 0L, active2, 0L); case 77: - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x100L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x200L, active2, 0L); case 78: - if ((active2 & 0x10L) != 0L) + if ((active2 & 0x40L) != 0L) { - jjmatchedKind = 132; + jjmatchedKind = 134; jjmatchedPos = 6; } - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x4008000000000000L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x20000000000000L, active2, 0x1L); case 79: - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x40000000000000L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x100000000000000L, active2, 0L); case 80: - if ((active1 & 0x200L) != 0L) + if ((active1 & 0x400L) != 0L) { - jjmatchedKind = 73; + jjmatchedKind = 74; jjmatchedPos = 6; } - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x8000040L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x20000080L, active2, 0L); case 82: - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x10001600000000L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x40005800000000L, active2, 0L); case 83: - if ((active1 & 0x20000000000000L) != 0L) + if ((active1 & 0x80000000000000L) != 0L) { - jjmatchedKind = 117; + jjmatchedKind = 119; jjmatchedPos = 6; } - else if ((active1 & 0x1000000000000000L) != 0L) + else if ((active1 & 0x4000000000000000L) != 0L) { - jjmatchedKind = 124; + jjmatchedKind = 126; jjmatchedPos = 6; } - else if ((active1 & 0x2000000000000000L) != 0L) + else if ((active1 & 0x8000000000000000L) != 0L) { - jjmatchedKind = 125; + jjmatchedKind = 127; jjmatchedPos = 6; } - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x800020L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x2000040L, active2, 0L); case 84: - if ((active0 & 0x8000000000000L) != 0L) + if ((active0 & 0x10000000000000L) != 0L) { - jjmatchedKind = 51; + jjmatchedKind = 52; jjmatchedPos = 6; } - else if ((active2 & 0x40000000L) != 0L) + else if ((active2 & 0x100000000L) != 0L) { - jjmatchedKind = 158; + jjmatchedKind = 160; jjmatchedPos = 6; } - return jjMoveStringLiteralDfa7_0(active0, 0x800000000000000L, active1, 0x20000000L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0x1000000000000000L, active1, 0x80000000L, active2, 0L); case 85: return jjMoveStringLiteralDfa7_0(active0, 0x8000000L, active1, 0L, active2, 0L); case 95: - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x4000000000000L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x10000000000000L, active2, 0L); case 97: - return jjMoveStringLiteralDfa7_0(active0, 0x10040000000000L, active1, 0L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0x20040000000000L, active1, 0L, active2, 0L); case 98: return jjMoveStringLiteralDfa7_0(active0, 0x4000000L, active1, 0L, active2, 0L); case 99: - return jjMoveStringLiteralDfa7_0(active0, 0x800000L, active1, 0x4880L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0x800000L, active1, 0x12100L, active2, 0L); case 100: if ((active0 & 0x1000000L) != 0L) { jjmatchedKind = 24; jjmatchedPos = 6; } - else if ((active2 & 0x8L) != 0L) + else if ((active2 & 0x20L) != 0L) { - jjmatchedKind = 131; + jjmatchedKind = 133; jjmatchedPos = 6; } break; @@ -1888,23 +1928,23 @@ else if ((active2 & 0x8L) != 0L) jjmatchedKind = 46; jjmatchedPos = 6; } - else if ((active1 & 0x800000000000L) != 0L) + else if ((active1 & 0x2000000000000L) != 0L) { - jjmatchedKind = 111; + jjmatchedKind = 113; jjmatchedPos = 6; } - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x80000000000000L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x200000000000000L, active2, 0L); case 103: - if ((active1 & 0x2000000L) != 0L) + if ((active1 & 0x8000000L) != 0L) { - jjmatchedKind = 89; + jjmatchedKind = 91; jjmatchedPos = 6; } break; case 107: - if ((active1 & 0x100000000L) != 0L) + if ((active1 & 0x400000000L) != 0L) { - jjmatchedKind = 96; + jjmatchedKind = 98; jjmatchedPos = 6; } break; @@ -1914,56 +1954,56 @@ else if ((active1 & 0x800000000000L) != 0L) jjmatchedKind = 48; jjmatchedPos = 6; } - return jjMoveStringLiteralDfa7_0(active0, 0x4000000000000L, active1, 0L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0x8000000000000L, active1, 0L, active2, 0L); case 109: - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x100L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x200L, active2, 0L); case 110: - if ((active2 & 0x10L) != 0L) + if ((active2 & 0x40L) != 0L) { - jjmatchedKind = 132; + jjmatchedKind = 134; jjmatchedPos = 6; } - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x4008000000000000L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x20000000000000L, active2, 0x1L); case 111: - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x40000000000000L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x100000000000000L, active2, 0L); case 112: - if ((active1 & 0x200L) != 0L) + if ((active1 & 0x400L) != 0L) { - jjmatchedKind = 73; + jjmatchedKind = 74; jjmatchedPos = 6; } - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x8000040L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x20000080L, active2, 0L); case 114: - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x10001600000000L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x40005800000000L, active2, 0L); case 115: - if ((active1 & 0x20000000000000L) != 0L) + if ((active1 & 0x80000000000000L) != 0L) { - jjmatchedKind = 117; + jjmatchedKind = 119; jjmatchedPos = 6; } - else if ((active1 & 0x1000000000000000L) != 0L) + else if ((active1 & 0x4000000000000000L) != 0L) { - jjmatchedKind = 124; + jjmatchedKind = 126; jjmatchedPos = 6; } - else if ((active1 & 0x2000000000000000L) != 0L) + else if ((active1 & 0x8000000000000000L) != 0L) { - jjmatchedKind = 125; + jjmatchedKind = 127; jjmatchedPos = 6; } - return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x800020L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0L, active1, 0x2000040L, active2, 0L); case 116: - if ((active0 & 0x8000000000000L) != 0L) + if ((active0 & 0x10000000000000L) != 0L) { - jjmatchedKind = 51; + jjmatchedKind = 52; jjmatchedPos = 6; } - else if ((active2 & 0x40000000L) != 0L) + else if ((active2 & 0x100000000L) != 0L) { - jjmatchedKind = 158; + jjmatchedKind = 160; jjmatchedPos = 6; } - return jjMoveStringLiteralDfa7_0(active0, 0x800000000000000L, active1, 0x20000000L, active2, 0L); + return jjMoveStringLiteralDfa7_0(active0, 0x1000000000000000L, active1, 0x80000000L, active2, 0L); case 117: return jjMoveStringLiteralDfa7_0(active0, 0x8000000L, active1, 0L, active2, 0L); default : @@ -1971,7 +2011,8 @@ else if ((active2 & 0x40000000L) != 0L) } return jjMoveNfa_0(0, 6); } -private int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long active1, long old2, long active2){ +private int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long active1, long old2, long active2) +{ if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L) return jjMoveNfa_0(0, 6); try { curChar = input_stream.readChar(); } @@ -1981,45 +2022,45 @@ private int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long a switch(curChar) { case 65: - return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x200000020L); + return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x800000040L, active2, 0L); case 67: - return jjMoveStringLiteralDfa8_0(active0, 0x8000000L, active1, 0x20000000L); + return jjMoveStringLiteralDfa8_0(active0, 0x8000000L, active1, 0x80000000L, active2, 0L); case 69: if ((active0 & 0x4000000L) != 0L) { jjmatchedKind = 26; jjmatchedPos = 7; } - else if ((active0 & 0x4000000000000L) != 0L) + else if ((active0 & 0x8000000000000L) != 0L) { - jjmatchedKind = 50; + jjmatchedKind = 51; jjmatchedPos = 7; } - else if ((active1 & 0x80L) != 0L) + else if ((active1 & 0x100L) != 0L) { - jjmatchedKind = 71; + jjmatchedKind = 72; jjmatchedPos = 7; } - else if ((active1 & 0x4000L) != 0L) + else if ((active1 & 0x10000L) != 0L) { - jjmatchedKind = 78; + jjmatchedKind = 80; jjmatchedPos = 7; } - else if ((active1 & 0x8000000L) != 0L) + else if ((active1 & 0x20000000L) != 0L) { - jjmatchedKind = 91; + jjmatchedKind = 93; jjmatchedPos = 7; } - else if ((active1 & 0x4000000000000000L) != 0L) + else if ((active2 & 0x1L) != 0L) { - jjmatchedKind = 126; + jjmatchedKind = 128; jjmatchedPos = 7; } break; case 70: - return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x4000000000000L); + return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x10000000000000L, active2, 0L); case 73: - return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x400000000L); + return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x1000000000L, active2, 0L); case 76: if ((active0 & 0x40000000000L) != 0L) { @@ -2028,32 +2069,32 @@ else if ((active1 & 0x4000000000000000L) != 0L) } break; case 77: - if ((active1 & 0x1000000000L) != 0L) + if ((active1 & 0x4000000000L) != 0L) { - jjmatchedKind = 100; + jjmatchedKind = 102; jjmatchedPos = 7; } break; case 79: - return jjMoveStringLiteralDfa8_0(active0, 0x800000000000000L, active1, 0x840L); + return jjMoveStringLiteralDfa8_0(active0, 0x1000000000000000L, active1, 0x2080L, active2, 0L); case 80: - if ((active1 & 0x100L) != 0L) + if ((active1 & 0x200L) != 0L) { - jjmatchedKind = 72; + jjmatchedKind = 73; jjmatchedPos = 7; } break; case 82: - if ((active1 & 0x80000000000000L) != 0L) + if ((active1 & 0x200000000000000L) != 0L) { - jjmatchedKind = 119; + jjmatchedKind = 121; jjmatchedPos = 7; } - return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x40000000000000L); + return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x100000000000000L, active2, 0L); case 83: - if ((active1 & 0x8000000000000L) != 0L) + if ((active1 & 0x20000000000000L) != 0L) { - jjmatchedKind = 115; + jjmatchedKind = 117; jjmatchedPos = 7; } break; @@ -2063,52 +2104,52 @@ else if ((active1 & 0x4000000000000000L) != 0L) jjmatchedKind = 23; jjmatchedPos = 7; } - else if ((active1 & 0x800000L) != 0L) + else if ((active1 & 0x2000000L) != 0L) { - jjmatchedKind = 87; + jjmatchedKind = 89; jjmatchedPos = 7; } - return jjMoveStringLiteralDfa8_0(active0, 0x10000000000000L, active1, 0x10000000000000L); + return jjMoveStringLiteralDfa8_0(active0, 0x20000000000000L, active1, 0x40000000000000L, active2, 0L); case 97: - return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x200000020L); + return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x800000040L, active2, 0L); case 99: - return jjMoveStringLiteralDfa8_0(active0, 0x8000000L, active1, 0x20000000L); + return jjMoveStringLiteralDfa8_0(active0, 0x8000000L, active1, 0x80000000L, active2, 0L); case 101: if ((active0 & 0x4000000L) != 0L) { jjmatchedKind = 26; jjmatchedPos = 7; } - else if ((active0 & 0x4000000000000L) != 0L) + else if ((active0 & 0x8000000000000L) != 0L) { - jjmatchedKind = 50; + jjmatchedKind = 51; jjmatchedPos = 7; } - else if ((active1 & 0x80L) != 0L) + else if ((active1 & 0x100L) != 0L) { - jjmatchedKind = 71; + jjmatchedKind = 72; jjmatchedPos = 7; } - else if ((active1 & 0x4000L) != 0L) + else if ((active1 & 0x10000L) != 0L) { - jjmatchedKind = 78; + jjmatchedKind = 80; jjmatchedPos = 7; } - else if ((active1 & 0x8000000L) != 0L) + else if ((active1 & 0x20000000L) != 0L) { - jjmatchedKind = 91; + jjmatchedKind = 93; jjmatchedPos = 7; } - else if ((active1 & 0x4000000000000000L) != 0L) + else if ((active2 & 0x1L) != 0L) { - jjmatchedKind = 126; + jjmatchedKind = 128; jjmatchedPos = 7; } break; case 102: - return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x4000000000000L); + return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x10000000000000L, active2, 0L); case 105: - return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x400000000L); + return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x1000000000L, active2, 0L); case 108: if ((active0 & 0x40000000000L) != 0L) { @@ -2117,32 +2158,32 @@ else if ((active1 & 0x4000000000000000L) != 0L) } break; case 109: - if ((active1 & 0x1000000000L) != 0L) + if ((active1 & 0x4000000000L) != 0L) { - jjmatchedKind = 100; + jjmatchedKind = 102; jjmatchedPos = 7; } break; case 111: - return jjMoveStringLiteralDfa8_0(active0, 0x800000000000000L, active1, 0x840L); + return jjMoveStringLiteralDfa8_0(active0, 0x1000000000000000L, active1, 0x2080L, active2, 0L); case 112: - if ((active1 & 0x100L) != 0L) + if ((active1 & 0x200L) != 0L) { - jjmatchedKind = 72; + jjmatchedKind = 73; jjmatchedPos = 7; } break; case 114: - if ((active1 & 0x80000000000000L) != 0L) + if ((active1 & 0x200000000000000L) != 0L) { - jjmatchedKind = 119; + jjmatchedKind = 121; jjmatchedPos = 7; } - return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x40000000000000L); + return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x100000000000000L, active2, 0L); case 115: - if ((active1 & 0x8000000000000L) != 0L) + if ((active1 & 0x20000000000000L) != 0L) { - jjmatchedKind = 115; + jjmatchedKind = 117; jjmatchedPos = 7; } break; @@ -2152,19 +2193,20 @@ else if ((active1 & 0x4000000000000000L) != 0L) jjmatchedKind = 23; jjmatchedPos = 7; } - else if ((active1 & 0x800000L) != 0L) + else if ((active1 & 0x2000000L) != 0L) { - jjmatchedKind = 87; + jjmatchedKind = 89; jjmatchedPos = 7; } - return jjMoveStringLiteralDfa8_0(active0, 0x10000000000000L, active1, 0x10000000000000L); + return jjMoveStringLiteralDfa8_0(active0, 0x20000000000000L, active1, 0x40000000000000L, active2, 0L); default : break; } return jjMoveNfa_0(0, 7); } -private int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long active1){ - if (((active0 &= old0) | (active1 &= old1)) == 0L) +private int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long active1, long old2, long active2) +{ + if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L) return jjMoveNfa_0(0, 7); try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { @@ -2173,57 +2215,57 @@ private int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long a switch(curChar) { case 67: - if ((active1 & 0x400000000L) != 0L) + if ((active1 & 0x1000000000L) != 0L) { - jjmatchedKind = 98; + jjmatchedKind = 100; jjmatchedPos = 8; } break; case 69: - if ((active0 & 0x10000000000000L) != 0L) + if ((active0 & 0x20000000000000L) != 0L) { - jjmatchedKind = 52; + jjmatchedKind = 53; jjmatchedPos = 8; } - else if ((active1 & 0x40000000000000L) != 0L) + else if ((active1 & 0x100000000000000L) != 0L) { - jjmatchedKind = 118; + jjmatchedKind = 120; jjmatchedPos = 8; } break; case 72: - return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x20000000L); + return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x80000000L); case 76: - if ((active1 & 0x200000000L) != 0L) + if ((active1 & 0x800000000L) != 0L) { - jjmatchedKind = 97; + jjmatchedKind = 99; jjmatchedPos = 8; } break; case 77: - return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x20L); + return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x40L); case 78: - return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x800L); + return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x2000L); case 79: - return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x4000000000000L); + return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x10000000000000L); case 80: - if ((active1 & 0x40L) != 0L) + if ((active1 & 0x80L) != 0L) { - jjmatchedKind = 70; + jjmatchedKind = 71; jjmatchedPos = 8; } break; case 82: - if ((active0 & 0x800000000000000L) != 0L) + if ((active0 & 0x1000000000000000L) != 0L) { - jjmatchedKind = 59; + jjmatchedKind = 60; jjmatchedPos = 8; } break; case 83: - if ((active1 & 0x10000000000000L) != 0L) + if ((active1 & 0x40000000000000L) != 0L) { - jjmatchedKind = 116; + jjmatchedKind = 118; jjmatchedPos = 8; } break; @@ -2235,57 +2277,57 @@ else if ((active1 & 0x40000000000000L) != 0L) } break; case 99: - if ((active1 & 0x400000000L) != 0L) + if ((active1 & 0x1000000000L) != 0L) { - jjmatchedKind = 98; + jjmatchedKind = 100; jjmatchedPos = 8; } break; case 101: - if ((active0 & 0x10000000000000L) != 0L) + if ((active0 & 0x20000000000000L) != 0L) { - jjmatchedKind = 52; + jjmatchedKind = 53; jjmatchedPos = 8; } - else if ((active1 & 0x40000000000000L) != 0L) + else if ((active1 & 0x100000000000000L) != 0L) { - jjmatchedKind = 118; + jjmatchedKind = 120; jjmatchedPos = 8; } break; case 104: - return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x20000000L); + return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x80000000L); case 108: - if ((active1 & 0x200000000L) != 0L) + if ((active1 & 0x800000000L) != 0L) { - jjmatchedKind = 97; + jjmatchedKind = 99; jjmatchedPos = 8; } break; case 109: - return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x20L); + return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x40L); case 110: - return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x800L); + return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x2000L); case 111: - return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x4000000000000L); + return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x10000000000000L); case 112: - if ((active1 & 0x40L) != 0L) + if ((active1 & 0x80L) != 0L) { - jjmatchedKind = 70; + jjmatchedKind = 71; jjmatchedPos = 8; } break; case 114: - if ((active0 & 0x800000000000000L) != 0L) + if ((active0 & 0x1000000000000000L) != 0L) { - jjmatchedKind = 59; + jjmatchedKind = 60; jjmatchedPos = 8; } break; case 115: - if ((active1 & 0x10000000000000L) != 0L) + if ((active1 & 0x40000000000000L) != 0L) { - jjmatchedKind = 116; + jjmatchedKind = 118; jjmatchedPos = 8; } break; @@ -2301,7 +2343,8 @@ else if ((active1 & 0x40000000000000L) != 0L) } return jjMoveNfa_0(0, 8); } -private int jjMoveStringLiteralDfa9_0(long old0, long active0, long old1, long active1){ +private int jjMoveStringLiteralDfa9_0(long old0, long active0, long old1, long active1) +{ if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjMoveNfa_0(0, 8); try { curChar = input_stream.readChar(); } @@ -2311,37 +2354,38 @@ private int jjMoveStringLiteralDfa9_0(long old0, long active0, long old1, long a switch(curChar) { case 67: - return jjMoveStringLiteralDfa10_0(active1, 0x800L); + return jjMoveStringLiteralDfa10_0(active1, 0x2000L); case 69: - return jjMoveStringLiteralDfa10_0(active1, 0x20000000L); + return jjMoveStringLiteralDfa10_0(active1, 0x80000000L); case 80: - if ((active1 & 0x20L) != 0L) + if ((active1 & 0x40L) != 0L) { - jjmatchedKind = 69; + jjmatchedKind = 70; jjmatchedPos = 9; } break; case 82: - return jjMoveStringLiteralDfa10_0(active1, 0x4000000000000L); + return jjMoveStringLiteralDfa10_0(active1, 0x10000000000000L); case 99: - return jjMoveStringLiteralDfa10_0(active1, 0x800L); + return jjMoveStringLiteralDfa10_0(active1, 0x2000L); case 101: - return jjMoveStringLiteralDfa10_0(active1, 0x20000000L); + return jjMoveStringLiteralDfa10_0(active1, 0x80000000L); case 112: - if ((active1 & 0x20L) != 0L) + if ((active1 & 0x40L) != 0L) { - jjmatchedKind = 69; + jjmatchedKind = 70; jjmatchedPos = 9; } break; case 114: - return jjMoveStringLiteralDfa10_0(active1, 0x4000000000000L); + return jjMoveStringLiteralDfa10_0(active1, 0x10000000000000L); default : break; } return jjMoveNfa_0(0, 9); } -private int jjMoveStringLiteralDfa10_0(long old1, long active1){ +private int jjMoveStringLiteralDfa10_0(long old1, long active1) +{ if (((active1 &= old1)) == 0L) return jjMoveNfa_0(0, 9); try { curChar = input_stream.readChar(); } @@ -2351,22 +2395,22 @@ private int jjMoveStringLiteralDfa10_0(long old1, long active1){ switch(curChar) { case 65: - return jjMoveStringLiteralDfa11_0(active1, 0x800L); + return jjMoveStringLiteralDfa11_0(active1, 0x2000L); case 83: - if ((active1 & 0x20000000L) != 0L) + if ((active1 & 0x80000000L) != 0L) { - jjmatchedKind = 93; + jjmatchedKind = 95; jjmatchedPos = 10; } break; case 95: - return jjMoveStringLiteralDfa11_0(active1, 0x4000000000000L); + return jjMoveStringLiteralDfa11_0(active1, 0x10000000000000L); case 97: - return jjMoveStringLiteralDfa11_0(active1, 0x800L); + return jjMoveStringLiteralDfa11_0(active1, 0x2000L); case 115: - if ((active1 & 0x20000000L) != 0L) + if ((active1 & 0x80000000L) != 0L) { - jjmatchedKind = 93; + jjmatchedKind = 95; jjmatchedPos = 10; } break; @@ -2375,7 +2419,8 @@ private int jjMoveStringLiteralDfa10_0(long old1, long active1){ } return jjMoveNfa_0(0, 10); } -private int jjMoveStringLiteralDfa11_0(long old1, long active1){ +private int jjMoveStringLiteralDfa11_0(long old1, long active1) +{ if (((active1 &= old1)) == 0L) return jjMoveNfa_0(0, 10); try { curChar = input_stream.readChar(); } @@ -2385,29 +2430,30 @@ private int jjMoveStringLiteralDfa11_0(long old1, long active1){ switch(curChar) { case 84: - if ((active1 & 0x800L) != 0L) + if ((active1 & 0x2000L) != 0L) { - jjmatchedKind = 75; + jjmatchedKind = 77; jjmatchedPos = 11; } break; case 85: - return jjMoveStringLiteralDfa12_0(active1, 0x4000000000000L); + return jjMoveStringLiteralDfa12_0(active1, 0x10000000000000L); case 116: - if ((active1 & 0x800L) != 0L) + if ((active1 & 0x2000L) != 0L) { - jjmatchedKind = 75; + jjmatchedKind = 77; jjmatchedPos = 11; } break; case 117: - return jjMoveStringLiteralDfa12_0(active1, 0x4000000000000L); + return jjMoveStringLiteralDfa12_0(active1, 0x10000000000000L); default : break; } return jjMoveNfa_0(0, 11); } -private int jjMoveStringLiteralDfa12_0(long old1, long active1){ +private int jjMoveStringLiteralDfa12_0(long old1, long active1) +{ if (((active1 &= old1)) == 0L) return jjMoveNfa_0(0, 11); try { curChar = input_stream.readChar(); } @@ -2417,15 +2463,16 @@ private int jjMoveStringLiteralDfa12_0(long old1, long active1){ switch(curChar) { case 82: - return jjMoveStringLiteralDfa13_0(active1, 0x4000000000000L); + return jjMoveStringLiteralDfa13_0(active1, 0x10000000000000L); case 114: - return jjMoveStringLiteralDfa13_0(active1, 0x4000000000000L); + return jjMoveStringLiteralDfa13_0(active1, 0x10000000000000L); default : break; } return jjMoveNfa_0(0, 12); } -private int jjMoveStringLiteralDfa13_0(long old1, long active1){ +private int jjMoveStringLiteralDfa13_0(long old1, long active1) +{ if (((active1 &= old1)) == 0L) return jjMoveNfa_0(0, 12); try { curChar = input_stream.readChar(); } @@ -2435,16 +2482,16 @@ private int jjMoveStringLiteralDfa13_0(long old1, long active1){ switch(curChar) { case 73: - if ((active1 & 0x4000000000000L) != 0L) + if ((active1 & 0x10000000000000L) != 0L) { - jjmatchedKind = 114; + jjmatchedKind = 116; jjmatchedPos = 13; } break; case 105: - if ((active1 & 0x4000000000000L) != 0L) + if ((active1 & 0x10000000000000L) != 0L) { - jjmatchedKind = 114; + jjmatchedKind = 116; jjmatchedPos = 13; } break; @@ -2523,51 +2570,51 @@ private int jjMoveNfa_0(int startState, int curPos) case 0: if ((0x3ff000000000000L & l) != 0L) { - if (kind > 163) - kind = 163; - { jjCheckNAddStates(0, 6); } + if (kind > 165) + kind = 165; + jjCheckNAddStates(0, 6); } else if (curChar == 45) - { jjCheckNAddStates(7, 11); } + jjCheckNAddStates(7, 11); else if (curChar == 43) - { jjCheckNAddStates(12, 16); } + jjCheckNAddStates(12, 16); else if (curChar == 46) - { jjCheckNAddTwoStates(240, 252); } + jjCheckNAddTwoStates(240, 252); else if (curChar == 58) { if (kind > 11) kind = 11; - { jjCheckNAddStates(17, 20); } + jjCheckNAddStates(17, 20); } else if (curChar == 40) - { jjCheckNAddStates(21, 23); } + jjCheckNAddStates(21, 23); else if (curChar == 34) jjstateSet[jjnewStateCnt++] = 148; else if (curChar == 39) jjstateSet[jjnewStateCnt++] = 124; else if (curChar == 36) - { jjAddStates(24, 25); } + jjAddStates(24, 25); else if (curChar == 60) - { jjCheckNAddStates(26, 28); } + jjCheckNAddStates(26, 28); else if (curChar == 35) { if (kind > 6) kind = 6; - { jjCheckNAddStates(29, 31); } + jjCheckNAddStates(29, 31); } else if (curChar == 63) - { jjAddStates(32, 33); } + jjAddStates(32, 33); if (curChar == 34) - { jjCheckNAddStates(34, 36); } + jjCheckNAddStates(34, 36); else if (curChar == 39) - { jjCheckNAddStates(37, 39); } + jjCheckNAddStates(37, 39); break; case 1: if ((0xffffffffffffdbffL & l) == 0L) break; if (kind > 6) kind = 6; - { jjCheckNAddStates(29, 31); } + jjCheckNAddStates(29, 31); break; case 2: if ((0x2400L & l) != 0L && kind > 6) @@ -2583,11 +2630,11 @@ else if (curChar == 39) break; case 5: if (curChar == 60) - { jjCheckNAddStates(26, 28); } + jjCheckNAddStates(26, 28); break; case 6: if ((0xaffffffa00000000L & l) != 0L) - { jjCheckNAddStates(26, 28); } + jjCheckNAddStates(26, 28); break; case 7: if (curChar == 62 && kind > 10) @@ -2620,11 +2667,11 @@ else if (curChar == 39) case 16: case 21: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAdd(17); } + jjCheckNAdd(17); break; case 17: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddStates(26, 28); } + jjCheckNAddStates(26, 28); break; case 19: if ((0x3ff000000000000L & l) != 0L) @@ -2636,18 +2683,18 @@ else if (curChar == 39) break; case 22: if (curChar == 58) - { jjAddStates(40, 41); } + jjAddStates(40, 41); break; case 23: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 13) kind = 13; - { jjCheckNAddStates(42, 44); } + jjCheckNAddStates(42, 44); break; case 24: if ((0x3ff600000000000L & l) != 0L) - { jjCheckNAddStates(42, 44); } + jjCheckNAddStates(42, 44); break; case 25: if ((0x3ff200000000000L & l) != 0L && kind > 13) @@ -2655,7 +2702,7 @@ else if (curChar == 39) break; case 32: if (curChar == 63) - { jjAddStates(32, 33); } + jjAddStates(32, 33); break; case 33: case 34: @@ -2663,11 +2710,11 @@ else if (curChar == 39) break; if (kind > 14) kind = 14; - { jjCheckNAddTwoStates(34, 35); } + jjCheckNAddTwoStates(34, 35); break; case 38: if (curChar == 36) - { jjAddStates(24, 25); } + jjAddStates(24, 25); break; case 39: case 40: @@ -2675,62 +2722,62 @@ else if (curChar == 39) break; if (kind > 15) kind = 15; - { jjCheckNAddTwoStates(40, 41); } + jjCheckNAddTwoStates(40, 41); break; case 46: if (curChar == 45) - { jjCheckNAdd(47); } + jjCheckNAdd(47); break; case 47: if ((0x3ff000000000000L & l) == 0L) break; if (kind > 16) kind = 16; - { jjCheckNAddTwoStates(46, 47); } + jjCheckNAddTwoStates(46, 47); break; case 49: if (curChar == 35) - { jjCheckNAddStates(45, 50); } + jjCheckNAddStates(45, 50); break; case 50: if ((0xffffffffffffdbffL & l) != 0L) - { jjCheckNAddStates(45, 50); } + jjCheckNAddStates(45, 50); break; case 51: if ((0x2400L & l) != 0L) - { jjCheckNAddStates(51, 53); } + jjCheckNAddStates(51, 53); break; case 52: if ((0x100003600L & l) != 0L) - { jjCheckNAddStates(51, 53); } + jjCheckNAddStates(51, 53); break; case 57: if (curChar == 10) - { jjCheckNAddStates(51, 53); } + jjCheckNAddStates(51, 53); break; case 58: if (curChar == 13) jjstateSet[jjnewStateCnt++] = 57; break; case 65: - if ((0x8400000000L & l) != 0L && kind > 175) - kind = 175; + if ((0x8400000000L & l) != 0L && kind > 177) + kind = 177; break; case 66: if (curChar == 39) - { jjCheckNAddStates(37, 39); } + jjCheckNAddStates(37, 39); break; case 67: if ((0xffffff7fffffdbffL & l) != 0L) - { jjCheckNAddStates(37, 39); } + jjCheckNAddStates(37, 39); break; case 68: - if (curChar == 39 && kind > 179) - kind = 179; + if (curChar == 39 && kind > 181) + kind = 181; break; case 70: if ((0x8400000000L & l) != 0L) - { jjCheckNAddStates(37, 39); } + jjCheckNAddStates(37, 39); break; case 72: if ((0x3ff000000000000L & l) != 0L) @@ -2759,11 +2806,11 @@ else if (curChar == 39) case 78: case 83: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAdd(79); } + jjCheckNAdd(79); break; case 79: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddStates(37, 39); } + jjCheckNAddStates(37, 39); break; case 81: if ((0x3ff000000000000L & l) != 0L) @@ -2775,19 +2822,19 @@ else if (curChar == 39) break; case 84: if (curChar == 34) - { jjCheckNAddStates(34, 36); } + jjCheckNAddStates(34, 36); break; case 85: if ((0xfffffffbffffdbffL & l) != 0L) - { jjCheckNAddStates(34, 36); } + jjCheckNAddStates(34, 36); break; case 86: - if (curChar == 34 && kind > 180) - kind = 180; + if (curChar == 34 && kind > 182) + kind = 182; break; case 88: if ((0x8400000000L & l) != 0L) - { jjCheckNAddStates(34, 36); } + jjCheckNAddStates(34, 36); break; case 90: if ((0x3ff000000000000L & l) != 0L) @@ -2816,11 +2863,11 @@ else if (curChar == 39) case 96: case 101: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAdd(97); } + jjCheckNAdd(97); break; case 97: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddStates(34, 36); } + jjCheckNAddStates(34, 36); break; case 99: if ((0x3ff000000000000L & l) != 0L) @@ -2832,24 +2879,24 @@ else if (curChar == 39) break; case 102: if (curChar == 39) - { jjCheckNAddStates(54, 57); } + jjCheckNAddStates(54, 57); break; case 103: case 106: if (curChar == 39) - { jjCheckNAddTwoStates(104, 107); } + jjCheckNAddTwoStates(104, 107); break; case 104: if ((0xffffff7fffffffffL & l) != 0L) - { jjCheckNAddStates(54, 57); } + jjCheckNAddStates(54, 57); break; case 105: if (curChar == 39) - { jjAddStates(58, 59); } + jjAddStates(58, 59); break; case 108: if ((0x8400000000L & l) != 0L) - { jjCheckNAddStates(54, 57); } + jjCheckNAddStates(54, 57); break; case 110: if ((0x3ff000000000000L & l) != 0L) @@ -2878,11 +2925,11 @@ else if (curChar == 39) case 116: case 121: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAdd(117); } + jjCheckNAdd(117); break; case 117: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddStates(54, 57); } + jjCheckNAddStates(54, 57); break; case 119: if ((0x3ff000000000000L & l) != 0L) @@ -2893,8 +2940,8 @@ else if (curChar == 39) jjstateSet[jjnewStateCnt++] = 121; break; case 122: - if (curChar == 39 && kind > 181) - kind = 181; + if (curChar == 39 && kind > 183) + kind = 183; break; case 123: if (curChar == 39) @@ -2910,24 +2957,24 @@ else if (curChar == 39) break; case 126: if (curChar == 34) - { jjCheckNAddStates(60, 63); } + jjCheckNAddStates(60, 63); break; case 127: case 130: if (curChar == 34) - { jjCheckNAddTwoStates(128, 131); } + jjCheckNAddTwoStates(128, 131); break; case 128: if ((0xfffffffbffffffffL & l) != 0L) - { jjCheckNAddStates(60, 63); } + jjCheckNAddStates(60, 63); break; case 129: if (curChar == 34) - { jjAddStates(64, 65); } + jjAddStates(64, 65); break; case 132: if ((0x8400000000L & l) != 0L) - { jjCheckNAddStates(60, 63); } + jjCheckNAddStates(60, 63); break; case 134: if ((0x3ff000000000000L & l) != 0L) @@ -2956,11 +3003,11 @@ else if (curChar == 39) case 140: case 145: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAdd(141); } + jjCheckNAdd(141); break; case 141: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddStates(60, 63); } + jjCheckNAddStates(60, 63); break; case 143: if ((0x3ff000000000000L & l) != 0L) @@ -2971,8 +3018,8 @@ else if (curChar == 39) jjstateSet[jjnewStateCnt++] = 145; break; case 146: - if (curChar == 34 && kind > 182) - kind = 182; + if (curChar == 34 && kind > 184) + kind = 184; break; case 147: if (curChar == 34) @@ -2988,31 +3035,31 @@ else if (curChar == 39) break; case 150: if (curChar == 40) - { jjCheckNAddStates(21, 23); } + jjCheckNAddStates(21, 23); break; case 151: if (curChar == 35) - { jjCheckNAddStates(66, 71); } + jjCheckNAddStates(66, 71); break; case 152: if ((0xffffffffffffdbffL & l) != 0L) - { jjCheckNAddStates(66, 71); } + jjCheckNAddStates(66, 71); break; case 153: if ((0x2400L & l) != 0L) - { jjCheckNAddStates(21, 23); } + jjCheckNAddStates(21, 23); break; case 154: if ((0x100003600L & l) != 0L) - { jjCheckNAddStates(21, 23); } + jjCheckNAddStates(21, 23); break; case 155: - if (curChar == 41 && kind > 185) - kind = 185; + if (curChar == 41 && kind > 187) + kind = 187; break; case 156: if (curChar == 10) - { jjCheckNAddStates(21, 23); } + jjCheckNAddStates(21, 23); break; case 157: if (curChar == 13) @@ -3020,23 +3067,23 @@ else if (curChar == 39) break; case 159: if (curChar == 35) - { jjCheckNAddStates(72, 77); } + jjCheckNAddStates(72, 77); break; case 160: if ((0xffffffffffffdbffL & l) != 0L) - { jjCheckNAddStates(72, 77); } + jjCheckNAddStates(72, 77); break; case 161: if ((0x2400L & l) != 0L) - { jjCheckNAddStates(78, 80); } + jjCheckNAddStates(78, 80); break; case 162: if ((0x100003600L & l) != 0L) - { jjCheckNAddStates(78, 80); } + jjCheckNAddStates(78, 80); break; case 164: if (curChar == 10) - { jjCheckNAddStates(78, 80); } + jjCheckNAddStates(78, 80); break; case 165: if (curChar == 13) @@ -3044,7 +3091,7 @@ else if (curChar == 39) break; case 167: if ((0x3ff600000000000L & l) != 0L) - { jjAddStates(81, 83); } + jjAddStates(81, 83); break; case 168: if ((0x3ff200000000000L & l) != 0L) @@ -3056,7 +3103,7 @@ else if (curChar == 39) break; case 173: if ((0x3ff600000000000L & l) != 0L) - { jjAddStates(84, 86); } + jjAddStates(84, 86); break; case 174: if ((0x3ff200000000000L & l) != 0L) @@ -3064,18 +3111,18 @@ else if (curChar == 39) break; case 175: if (curChar == 58) - { jjCheckNAddStates(17, 20); } + jjCheckNAddStates(17, 20); break; case 176: if ((0x7ff000000000000L & l) == 0L) break; if (kind > 12) kind = 12; - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 177: if ((0x7ff600000000000L & l) != 0L) - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 178: if ((0x7ff200000000000L & l) != 0L && kind > 12) @@ -3083,11 +3130,11 @@ else if (curChar == 39) break; case 182: if ((0xa800fffa00000000L & l) != 0L) - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 183: if (curChar == 37) - { jjAddStates(92, 93); } + jjAddStates(92, 93); break; case 184: if ((0x3ff000000000000L & l) != 0L) @@ -3095,7 +3142,7 @@ else if (curChar == 39) break; case 185: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 186: if ((0x3ff000000000000L & l) != 0L) @@ -3114,7 +3161,7 @@ else if (curChar == 39) break; if (kind > 12) kind = 12; - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 192: if (curChar == 37) @@ -3129,34 +3176,34 @@ else if (curChar == 39) break; if (kind > 12) kind = 12; - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 203: if (curChar != 58) break; if (kind > 11) kind = 11; - { jjCheckNAddStates(17, 20); } + jjCheckNAddStates(17, 20); break; case 206: if (curChar == 35) - { jjCheckNAddStates(94, 99); } + jjCheckNAddStates(94, 99); break; case 207: if ((0xffffffffffffdbffL & l) != 0L) - { jjCheckNAddStates(94, 99); } + jjCheckNAddStates(94, 99); break; case 208: if ((0x2400L & l) != 0L) - { jjCheckNAddStates(100, 102); } + jjCheckNAddStates(100, 102); break; case 209: if ((0x100003600L & l) != 0L) - { jjCheckNAddStates(100, 102); } + jjCheckNAddStates(100, 102); break; case 214: if (curChar == 10) - { jjCheckNAddStates(100, 102); } + jjCheckNAddStates(100, 102); break; case 215: if (curChar == 13) @@ -3164,23 +3211,23 @@ else if (curChar == 39) break; case 221: if (curChar == 35) - { jjCheckNAddStates(103, 108); } + jjCheckNAddStates(103, 108); break; case 222: if ((0xffffffffffffdbffL & l) != 0L) - { jjCheckNAddStates(103, 108); } + jjCheckNAddStates(103, 108); break; case 223: if ((0x2400L & l) != 0L) - { jjCheckNAddStates(109, 111); } + jjCheckNAddStates(109, 111); break; case 224: if ((0x100003600L & l) != 0L) - { jjCheckNAddStates(109, 111); } + jjCheckNAddStates(109, 111); break; case 230: if (curChar == 10) - { jjCheckNAddStates(109, 111); } + jjCheckNAddStates(109, 111); break; case 231: if (curChar == 13) @@ -3189,262 +3236,262 @@ else if (curChar == 39) case 236: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 163) - kind = 163; - { jjCheckNAddStates(0, 6); } + if (kind > 165) + kind = 165; + jjCheckNAddStates(0, 6); break; case 237: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 163) - kind = 163; - { jjCheckNAdd(237); } + if (kind > 165) + kind = 165; + jjCheckNAdd(237); break; case 238: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(238, 239); } + jjCheckNAddTwoStates(238, 239); break; case 239: if (curChar == 46) - { jjCheckNAdd(240); } + jjCheckNAdd(240); break; case 240: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 164) - kind = 164; - { jjCheckNAdd(240); } + if (kind > 166) + kind = 166; + jjCheckNAdd(240); break; case 241: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(241, 242); } + jjCheckNAddTwoStates(241, 242); break; case 242: if (curChar == 46) - { jjCheckNAddTwoStates(243, 244); } + jjCheckNAddTwoStates(243, 244); break; case 243: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(243, 244); } + jjCheckNAddTwoStates(243, 244); break; case 245: if ((0x280000000000L & l) != 0L) - { jjCheckNAdd(246); } + jjCheckNAdd(246); break; case 246: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 165) - kind = 165; - { jjCheckNAdd(246); } + if (kind > 167) + kind = 167; + jjCheckNAdd(246); break; case 247: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(247, 248); } + jjCheckNAddTwoStates(247, 248); break; case 249: if ((0x280000000000L & l) != 0L) - { jjCheckNAdd(250); } + jjCheckNAdd(250); break; case 250: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 165) - kind = 165; - { jjCheckNAdd(250); } + if (kind > 167) + kind = 167; + jjCheckNAdd(250); break; case 251: if (curChar == 46) - { jjCheckNAddTwoStates(240, 252); } + jjCheckNAddTwoStates(240, 252); break; case 252: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(252, 253); } + jjCheckNAddTwoStates(252, 253); break; case 254: if ((0x280000000000L & l) != 0L) - { jjCheckNAdd(255); } + jjCheckNAdd(255); break; case 255: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 165) - kind = 165; - { jjCheckNAdd(255); } + if (kind > 167) + kind = 167; + jjCheckNAdd(255); break; case 256: if (curChar == 43) - { jjCheckNAddStates(12, 16); } + jjCheckNAddStates(12, 16); break; case 257: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 166) - kind = 166; - { jjCheckNAdd(257); } + if (kind > 168) + kind = 168; + jjCheckNAdd(257); break; case 258: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(258, 259); } + jjCheckNAddTwoStates(258, 259); break; case 259: if (curChar == 46) - { jjCheckNAdd(260); } + jjCheckNAdd(260); break; case 260: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 167) - kind = 167; - { jjCheckNAdd(260); } + if (kind > 169) + kind = 169; + jjCheckNAdd(260); break; case 261: if (curChar == 46) - { jjCheckNAdd(262); } + jjCheckNAdd(262); break; case 262: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(262, 263); } + jjCheckNAddTwoStates(262, 263); break; case 264: if ((0x280000000000L & l) != 0L) - { jjCheckNAdd(265); } + jjCheckNAdd(265); break; case 265: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 168) - kind = 168; - { jjCheckNAdd(265); } + if (kind > 170) + kind = 170; + jjCheckNAdd(265); break; case 266: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddStates(112, 115); } + jjCheckNAddStates(112, 115); break; case 267: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(267, 268); } + jjCheckNAddTwoStates(267, 268); break; case 268: if (curChar == 46) - { jjCheckNAddTwoStates(269, 270); } + jjCheckNAddTwoStates(269, 270); break; case 269: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(269, 270); } + jjCheckNAddTwoStates(269, 270); break; case 271: if ((0x280000000000L & l) != 0L) - { jjCheckNAdd(272); } + jjCheckNAdd(272); break; case 272: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 168) - kind = 168; - { jjCheckNAdd(272); } + if (kind > 170) + kind = 170; + jjCheckNAdd(272); break; case 273: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(273, 274); } + jjCheckNAddTwoStates(273, 274); break; case 275: if ((0x280000000000L & l) != 0L) - { jjCheckNAdd(276); } + jjCheckNAdd(276); break; case 276: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 168) - kind = 168; - { jjCheckNAdd(276); } + if (kind > 170) + kind = 170; + jjCheckNAdd(276); break; case 277: if (curChar == 45) - { jjCheckNAddStates(7, 11); } + jjCheckNAddStates(7, 11); break; case 278: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 169) - kind = 169; - { jjCheckNAdd(278); } + if (kind > 171) + kind = 171; + jjCheckNAdd(278); break; case 279: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(279, 280); } + jjCheckNAddTwoStates(279, 280); break; case 280: if (curChar == 46) - { jjCheckNAdd(281); } + jjCheckNAdd(281); break; case 281: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 170) - kind = 170; - { jjCheckNAdd(281); } + if (kind > 172) + kind = 172; + jjCheckNAdd(281); break; case 282: if (curChar == 46) - { jjCheckNAdd(283); } + jjCheckNAdd(283); break; case 283: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(283, 284); } + jjCheckNAddTwoStates(283, 284); break; case 285: if ((0x280000000000L & l) != 0L) - { jjCheckNAdd(286); } + jjCheckNAdd(286); break; case 286: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 171) - kind = 171; - { jjCheckNAdd(286); } + if (kind > 173) + kind = 173; + jjCheckNAdd(286); break; case 287: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddStates(116, 119); } + jjCheckNAddStates(116, 119); break; case 288: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(288, 289); } + jjCheckNAddTwoStates(288, 289); break; case 289: if (curChar == 46) - { jjCheckNAddTwoStates(290, 291); } + jjCheckNAddTwoStates(290, 291); break; case 290: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(290, 291); } + jjCheckNAddTwoStates(290, 291); break; case 292: if ((0x280000000000L & l) != 0L) - { jjCheckNAdd(293); } + jjCheckNAdd(293); break; case 293: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 171) - kind = 171; - { jjCheckNAdd(293); } + if (kind > 173) + kind = 173; + jjCheckNAdd(293); break; case 294: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(294, 295); } + jjCheckNAddTwoStates(294, 295); break; case 296: if ((0x280000000000L & l) != 0L) - { jjCheckNAdd(297); } + jjCheckNAdd(297); break; case 297: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 171) - kind = 171; - { jjCheckNAdd(297); } + if (kind > 173) + kind = 173; + jjCheckNAdd(297); break; default : break; } @@ -3459,32 +3506,32 @@ else if (curChar < 128) { case 0: if ((0x7fffffe07fffffeL & l) != 0L) - { jjCheckNAddStates(120, 127); } + jjCheckNAddStates(120, 127); else if (curChar == 91) - { jjCheckNAddStates(78, 80); } + jjCheckNAddStates(78, 80); else if (curChar == 92) jjstateSet[jjnewStateCnt++] = 65; else if (curChar == 64) - { jjCheckNAdd(45); } + jjCheckNAdd(45); else if (curChar == 95) jjstateSet[jjnewStateCnt++] = 22; if ((0x1000000010L & l) != 0L) - { jjAddStates(128, 129); } + jjAddStates(128, 129); else if ((0x20000000200L & l) != 0L) jjstateSet[jjnewStateCnt++] = 62; break; case 1: if (kind > 6) kind = 6; - { jjAddStates(29, 31); } + jjAddStates(29, 31); break; case 6: if ((0xc7fffffeafffffffL & l) != 0L) - { jjCheckNAddStates(26, 28); } + jjCheckNAddStates(26, 28); break; case 8: if (curChar == 92) - { jjAddStates(130, 131); } + jjAddStates(130, 131); break; case 9: if (curChar == 85) @@ -3517,11 +3564,11 @@ else if ((0x20000000200L & l) != 0L) case 16: case 21: if ((0x7e0000007eL & l) != 0L) - { jjCheckNAdd(17); } + jjCheckNAdd(17); break; case 17: if ((0x7e0000007eL & l) != 0L) - { jjCheckNAddStates(26, 28); } + jjCheckNAddStates(26, 28); break; case 18: if (curChar == 117) @@ -3540,11 +3587,11 @@ else if ((0x20000000200L & l) != 0L) break; if (kind > 13) kind = 13; - { jjCheckNAddStates(42, 44); } + jjCheckNAddStates(42, 44); break; case 24: if ((0x7fffffe87fffffeL & l) != 0L) - { jjCheckNAddStates(42, 44); } + jjCheckNAddStates(42, 44); break; case 25: if ((0x7fffffe87fffffeL & l) != 0L && kind > 13) @@ -3560,7 +3607,7 @@ else if ((0x20000000200L & l) != 0L) break; if (kind > 14) kind = 14; - { jjCheckNAddTwoStates(34, 35); } + jjCheckNAddTwoStates(34, 35); break; case 39: case 40: @@ -3568,36 +3615,36 @@ else if ((0x20000000200L & l) != 0L) break; if (kind > 15) kind = 15; - { jjCheckNAddTwoStates(40, 41); } + jjCheckNAddTwoStates(40, 41); break; case 44: if (curChar == 64) - { jjCheckNAdd(45); } + jjCheckNAdd(45); break; case 45: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 16) kind = 16; - { jjCheckNAddTwoStates(45, 46); } + jjCheckNAddTwoStates(45, 46); break; case 47: if ((0x7fffffe07fffffeL & l) == 0L) break; if (kind > 16) kind = 16; - { jjCheckNAddTwoStates(46, 47); } + jjCheckNAddTwoStates(46, 47); break; case 48: if ((0x10000000100000L & l) != 0L) - { jjCheckNAddStates(51, 53); } + jjCheckNAddStates(51, 53); break; case 50: - { jjCheckNAddStates(45, 50); } + jjCheckNAddStates(45, 50); break; case 53: - if ((0x200000002L & l) != 0L && kind > 144) - kind = 144; + if ((0x200000002L & l) != 0L && kind > 146) + kind = 146; break; case 54: if ((0x10000000100000L & l) != 0L) @@ -3636,20 +3683,20 @@ else if ((0x20000000200L & l) != 0L) jjstateSet[jjnewStateCnt++] = 65; break; case 65: - if ((0x14404410000000L & l) != 0L && kind > 175) - kind = 175; + if ((0x14404410000000L & l) != 0L && kind > 177) + kind = 177; break; case 67: if ((0xffffffffefffffffL & l) != 0L) - { jjCheckNAddStates(37, 39); } + jjCheckNAddStates(37, 39); break; case 69: if (curChar == 92) - { jjAddStates(132, 134); } + jjAddStates(132, 134); break; case 70: if ((0x14404410000000L & l) != 0L) - { jjCheckNAddStates(37, 39); } + jjCheckNAddStates(37, 39); break; case 71: if (curChar == 85) @@ -3682,11 +3729,11 @@ else if ((0x20000000200L & l) != 0L) case 78: case 83: if ((0x7e0000007eL & l) != 0L) - { jjCheckNAdd(79); } + jjCheckNAdd(79); break; case 79: if ((0x7e0000007eL & l) != 0L) - { jjCheckNAddStates(37, 39); } + jjCheckNAddStates(37, 39); break; case 80: if (curChar == 117) @@ -3702,15 +3749,15 @@ else if ((0x20000000200L & l) != 0L) break; case 85: if ((0xffffffffefffffffL & l) != 0L) - { jjCheckNAddStates(34, 36); } + jjCheckNAddStates(34, 36); break; case 87: if (curChar == 92) - { jjAddStates(135, 137); } + jjAddStates(135, 137); break; case 88: if ((0x14404410000000L & l) != 0L) - { jjCheckNAddStates(34, 36); } + jjCheckNAddStates(34, 36); break; case 89: if (curChar == 85) @@ -3743,11 +3790,11 @@ else if ((0x20000000200L & l) != 0L) case 96: case 101: if ((0x7e0000007eL & l) != 0L) - { jjCheckNAdd(97); } + jjCheckNAdd(97); break; case 97: if ((0x7e0000007eL & l) != 0L) - { jjCheckNAddStates(34, 36); } + jjCheckNAddStates(34, 36); break; case 98: if (curChar == 117) @@ -3763,15 +3810,15 @@ else if ((0x20000000200L & l) != 0L) break; case 104: if ((0xffffffffefffffffL & l) != 0L) - { jjCheckNAddStates(54, 57); } + jjCheckNAddStates(54, 57); break; case 107: if (curChar == 92) - { jjAddStates(138, 140); } + jjAddStates(138, 140); break; case 108: if ((0x14404410000000L & l) != 0L) - { jjCheckNAddStates(54, 57); } + jjCheckNAddStates(54, 57); break; case 109: if (curChar == 85) @@ -3804,11 +3851,11 @@ else if ((0x20000000200L & l) != 0L) case 116: case 121: if ((0x7e0000007eL & l) != 0L) - { jjCheckNAdd(117); } + jjCheckNAdd(117); break; case 117: if ((0x7e0000007eL & l) != 0L) - { jjCheckNAddStates(54, 57); } + jjCheckNAddStates(54, 57); break; case 118: if (curChar == 117) @@ -3824,15 +3871,15 @@ else if ((0x20000000200L & l) != 0L) break; case 128: if ((0xffffffffefffffffL & l) != 0L) - { jjCheckNAddStates(60, 63); } + jjCheckNAddStates(60, 63); break; case 131: if (curChar == 92) - { jjAddStates(141, 143); } + jjAddStates(141, 143); break; case 132: if ((0x14404410000000L & l) != 0L) - { jjCheckNAddStates(60, 63); } + jjCheckNAddStates(60, 63); break; case 133: if (curChar == 85) @@ -3865,11 +3912,11 @@ else if ((0x20000000200L & l) != 0L) case 140: case 145: if ((0x7e0000007eL & l) != 0L) - { jjCheckNAdd(141); } + jjCheckNAdd(141); break; case 141: if ((0x7e0000007eL & l) != 0L) - { jjCheckNAddStates(60, 63); } + jjCheckNAddStates(60, 63); break; case 142: if (curChar == 117) @@ -3884,49 +3931,49 @@ else if ((0x20000000200L & l) != 0L) jjstateSet[jjnewStateCnt++] = 145; break; case 152: - { jjAddStates(66, 71); } + jjAddStates(66, 71); break; case 158: if (curChar == 91) - { jjCheckNAddStates(78, 80); } + jjCheckNAddStates(78, 80); break; case 160: - { jjCheckNAddStates(72, 77); } + jjCheckNAddStates(72, 77); break; case 163: - if (curChar == 93 && kind > 190) - kind = 190; + if (curChar == 93 && kind > 192) + kind = 192; break; case 166: if ((0x7fffffe07fffffeL & l) != 0L) - { jjCheckNAddStates(120, 127); } + jjCheckNAddStates(120, 127); break; case 167: if ((0x7fffffe87fffffeL & l) != 0L) - { jjCheckNAddStates(81, 83); } + jjCheckNAddStates(81, 83); break; case 168: if ((0x7fffffe87fffffeL & l) != 0L) - { jjCheckNAdd(169); } + jjCheckNAdd(169); break; case 173: if ((0x7fffffe87fffffeL & l) != 0L) - { jjCheckNAddStates(84, 86); } + jjCheckNAddStates(84, 86); break; case 174: if ((0x7fffffe87fffffeL & l) != 0L) - { jjCheckNAdd(175); } + jjCheckNAdd(175); break; case 176: if ((0x7fffffe87fffffeL & l) == 0L) break; if (kind > 12) kind = 12; - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 177: if ((0x7fffffe87fffffeL & l) != 0L) - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 178: if ((0x7fffffe87fffffeL & l) != 0L && kind > 12) @@ -3934,11 +3981,11 @@ else if ((0x20000000200L & l) != 0L) break; case 181: if (curChar == 92) - { jjAddStates(144, 145); } + jjAddStates(144, 145); break; case 182: if ((0x4000000080000001L & l) != 0L) - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 184: if ((0x7e0000007eL & l) != 0L) @@ -3946,7 +3993,7 @@ else if ((0x20000000200L & l) != 0L) break; case 185: if ((0x7e0000007eL & l) != 0L) - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 186: if ((0x7e0000007eL & l) != 0L) @@ -3969,7 +4016,7 @@ else if ((0x20000000200L & l) != 0L) break; if (kind > 12) kind = 12; - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 193: if ((0x7e0000007eL & l) != 0L) @@ -3980,22 +4027,22 @@ else if ((0x20000000200L & l) != 0L) break; if (kind > 12) kind = 12; - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 204: if ((0x1000000010L & l) != 0L) - { jjAddStates(128, 129); } + jjAddStates(128, 129); break; case 205: if ((0x2000000020L & l) != 0L) - { jjCheckNAddStates(100, 102); } + jjCheckNAddStates(100, 102); break; case 207: - { jjCheckNAddStates(94, 99); } + jjCheckNAddStates(94, 99); break; case 210: - if ((0x200000002L & l) != 0L && kind > 145) - kind = 145; + if ((0x200000002L & l) != 0L && kind > 147) + kind = 147; break; case 211: if ((0x10000000100000L & l) != 0L) @@ -4027,14 +4074,14 @@ else if ((0x20000000200L & l) != 0L) break; case 220: if ((0x2000000020L & l) != 0L) - { jjCheckNAddStates(109, 111); } + jjCheckNAddStates(109, 111); break; case 222: - { jjCheckNAddStates(103, 108); } + jjCheckNAddStates(103, 108); break; case 225: - if ((0x2000000020L & l) != 0L && kind > 146) - kind = 146; + if ((0x2000000020L & l) != 0L && kind > 148) + kind = 148; break; case 226: if ((0x4000000040000L & l) != 0L) @@ -4070,39 +4117,39 @@ else if ((0x20000000200L & l) != 0L) break; case 244: if ((0x2000000020L & l) != 0L) - { jjAddStates(146, 147); } + jjAddStates(146, 147); break; case 248: if ((0x2000000020L & l) != 0L) - { jjAddStates(148, 149); } + jjAddStates(148, 149); break; case 253: if ((0x2000000020L & l) != 0L) - { jjAddStates(150, 151); } + jjAddStates(150, 151); break; case 263: if ((0x2000000020L & l) != 0L) - { jjAddStates(152, 153); } + jjAddStates(152, 153); break; case 270: if ((0x2000000020L & l) != 0L) - { jjAddStates(154, 155); } + jjAddStates(154, 155); break; case 274: if ((0x2000000020L & l) != 0L) - { jjAddStates(156, 157); } + jjAddStates(156, 157); break; case 284: if ((0x2000000020L & l) != 0L) - { jjAddStates(158, 159); } + jjAddStates(158, 159); break; case 291: if ((0x2000000020L & l) != 0L) - { jjAddStates(160, 161); } + jjAddStates(160, 161); break; case 295: if ((0x2000000020L & l) != 0L) - { jjAddStates(162, 163); } + jjAddStates(162, 163); break; default : break; } @@ -4110,7 +4157,7 @@ else if ((0x20000000200L & l) != 0L) } else { - int hiByte = (curChar >> 8); + int hiByte = (int)(curChar >> 8); int i1 = hiByte >> 6; long l1 = 1L << (hiByte & 077); int i2 = (curChar & 0xff) >> 6; @@ -4121,31 +4168,31 @@ else if ((0x20000000200L & l) != 0L) { case 0: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) - { jjCheckNAddStates(120, 127); } + jjCheckNAddStates(120, 127); if (jjCanMove_25(hiByte, i1, i2, l1, l2)) - { jjAddStates(164, 165); } + jjAddStates(164, 165); break; case 1: if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) break; if (kind > 6) kind = 6; - { jjAddStates(29, 31); } + jjAddStates(29, 31); break; case 6: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) - { jjAddStates(26, 28); } + jjAddStates(26, 28); break; case 23: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 13) kind = 13; - { jjCheckNAddStates(42, 44); } + jjCheckNAddStates(42, 44); break; case 24: if (jjCanMove_2(hiByte, i1, i2, l1, l2)) - { jjCheckNAddStates(42, 44); } + jjCheckNAddStates(42, 44); break; case 25: if (jjCanMove_2(hiByte, i1, i2, l1, l2) && kind > 13) @@ -4153,11 +4200,11 @@ else if ((0x20000000200L & l) != 0L) break; case 26: if (jjCanMove_3(hiByte, i1, i2, l1, l2)) - { jjAddStates(166, 167); } + jjAddStates(166, 167); break; case 27: if (jjCanMove_4(hiByte, i1, i2, l1, l2)) - { jjCheckNAddStates(42, 44); } + jjCheckNAddStates(42, 44); break; case 28: if (jjCanMove_5(hiByte, i1, i2, l1, l2) && kind > 13) @@ -4172,136 +4219,136 @@ else if ((0x20000000200L & l) != 0L) break; if (kind > 13) kind = 13; - { jjCheckNAddStates(42, 44); } + jjCheckNAddStates(42, 44); break; case 33: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 14) kind = 14; - { jjCheckNAddTwoStates(34, 35); } + jjCheckNAddTwoStates(34, 35); break; case 34: if (!jjCanMove_2(hiByte, i1, i2, l1, l2)) break; if (kind > 14) kind = 14; - { jjCheckNAddTwoStates(34, 35); } + jjCheckNAddTwoStates(34, 35); break; case 35: if (jjCanMove_8(hiByte, i1, i2, l1, l2)) - { jjCheckNAdd(36); } + jjCheckNAdd(36); break; case 36: if (!jjCanMove_9(hiByte, i1, i2, l1, l2)) break; if (kind > 14) kind = 14; - { jjCheckNAddTwoStates(34, 35); } + jjCheckNAddTwoStates(34, 35); break; case 37: if (jjCanMove_10(hiByte, i1, i2, l1, l2)) - { jjCheckNAdd(36); } + jjCheckNAdd(36); break; case 39: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 15) kind = 15; - { jjCheckNAddTwoStates(40, 41); } + jjCheckNAddTwoStates(40, 41); break; case 40: if (!jjCanMove_2(hiByte, i1, i2, l1, l2)) break; if (kind > 15) kind = 15; - { jjCheckNAddTwoStates(40, 41); } + jjCheckNAddTwoStates(40, 41); break; case 41: if (jjCanMove_11(hiByte, i1, i2, l1, l2)) - { jjCheckNAdd(42); } + jjCheckNAdd(42); break; case 42: if (!jjCanMove_12(hiByte, i1, i2, l1, l2)) break; if (kind > 15) kind = 15; - { jjCheckNAddTwoStates(40, 41); } + jjCheckNAddTwoStates(40, 41); break; case 43: if (jjCanMove_13(hiByte, i1, i2, l1, l2)) - { jjCheckNAdd(42); } + jjCheckNAdd(42); break; case 50: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) - { jjAddStates(45, 50); } + jjAddStates(45, 50); break; case 67: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) - { jjAddStates(37, 39); } + jjAddStates(37, 39); break; case 85: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) - { jjAddStates(34, 36); } + jjAddStates(34, 36); break; case 104: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) - { jjAddStates(54, 57); } + jjAddStates(54, 57); break; case 128: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) - { jjAddStates(60, 63); } + jjAddStates(60, 63); break; case 152: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) - { jjAddStates(66, 71); } + jjAddStates(66, 71); break; case 160: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) - { jjAddStates(72, 77); } + jjAddStates(72, 77); break; case 166: if (jjCanMove_1(hiByte, i1, i2, l1, l2)) - { jjCheckNAddStates(120, 127); } + jjCheckNAddStates(120, 127); break; case 167: if (jjCanMove_2(hiByte, i1, i2, l1, l2)) - { jjCheckNAddStates(81, 83); } + jjCheckNAddStates(81, 83); break; case 168: if (jjCanMove_2(hiByte, i1, i2, l1, l2)) - { jjCheckNAdd(169); } + jjCheckNAdd(169); break; case 170: if (jjCanMove_14(hiByte, i1, i2, l1, l2)) - { jjAddStates(168, 169); } + jjAddStates(168, 169); break; case 171: if (jjCanMove_15(hiByte, i1, i2, l1, l2)) - { jjCheckNAddStates(81, 83); } + jjCheckNAddStates(81, 83); break; case 172: if (jjCanMove_16(hiByte, i1, i2, l1, l2)) - { jjCheckNAdd(169); } + jjCheckNAdd(169); break; case 173: if (jjCanMove_2(hiByte, i1, i2, l1, l2)) - { jjCheckNAddStates(84, 86); } + jjCheckNAddStates(84, 86); break; case 174: if (jjCanMove_2(hiByte, i1, i2, l1, l2)) - { jjCheckNAdd(175); } + jjCheckNAdd(175); break; case 176: if (!jjCanMove_1(hiByte, i1, i2, l1, l2)) break; if (kind > 12) kind = 12; - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 177: if (jjCanMove_2(hiByte, i1, i2, l1, l2)) - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 178: if (jjCanMove_2(hiByte, i1, i2, l1, l2) && kind > 12) @@ -4309,11 +4356,11 @@ else if ((0x20000000200L & l) != 0L) break; case 179: if (jjCanMove_17(hiByte, i1, i2, l1, l2)) - { jjAddStates(170, 171); } + jjAddStates(170, 171); break; case 180: if (jjCanMove_18(hiByte, i1, i2, l1, l2)) - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 189: if (jjCanMove_19(hiByte, i1, i2, l1, l2) && kind > 12) @@ -4328,41 +4375,41 @@ else if ((0x20000000200L & l) != 0L) break; if (kind > 12) kind = 12; - { jjCheckNAddStates(87, 91); } + jjCheckNAddStates(87, 91); break; case 197: if (jjCanMove_22(hiByte, i1, i2, l1, l2)) - { jjAddStates(172, 173); } + jjAddStates(172, 173); break; case 198: if (jjCanMove_23(hiByte, i1, i2, l1, l2)) - { jjCheckNAddStates(84, 86); } + jjCheckNAddStates(84, 86); break; case 199: if (jjCanMove_24(hiByte, i1, i2, l1, l2)) - { jjCheckNAdd(175); } + jjCheckNAdd(175); break; case 200: if (jjCanMove_25(hiByte, i1, i2, l1, l2)) - { jjAddStates(164, 165); } + jjAddStates(164, 165); break; case 201: if (jjCanMove_26(hiByte, i1, i2, l1, l2)) - { jjCheckNAddStates(174, 177); } + jjCheckNAddStates(174, 177); break; case 202: if (jjCanMove_27(hiByte, i1, i2, l1, l2)) - { jjCheckNAddStates(178, 181); } + jjCheckNAddStates(178, 181); break; case 207: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) - { jjAddStates(94, 99); } + jjAddStates(94, 99); break; case 222: if (jjCanMove_0(hiByte, i1, i2, l1, l2)) - { jjAddStates(103, 108); } + jjAddStates(103, 108); break; - default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break; + default : break; } } while(i != startsAt); } @@ -4398,63 +4445,19 @@ else if (jjmatchedPos == strPos && jjmatchedKind > strKind) return toRet; } - -/** Token literal values. */ -public static final String[] jjstrLiteralImages = { -"", null, null, null, null, null, null, null, null, "\ufeff", null, null, null, -null, null, null, null, null, null, "\141", null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, null, "\50", "\51", null, "\173", "\175", "\133", "\135", null, "\73", "\54", -"\56", "\75", "\41\75", "\76", "\74", "\74\75", "\76\75", "\76\76", "\74\74", -"\173\174", "\174\175", "\41", "\176", "\72", "\174\174", "\46\46", "\53", "\55", "\52", -"\57", "\136\136", "\100", "\72\75", "\174", "\136", "\55\76", "\74\55", "\77", null, -null, null, null, null, null, null, null, null, null, null, null, }; -protected Token jjFillToken() -{ - final Token t; - final String curTokenImage; - final int beginLine; - final int endLine; - final int beginColumn; - final int endColumn; - String im = jjstrLiteralImages[jjmatchedKind]; - curTokenImage = (im == null) ? input_stream.GetImage() : im; - beginLine = input_stream.getBeginLine(); - beginColumn = input_stream.getBeginColumn(); - endLine = input_stream.getEndLine(); - endColumn = input_stream.getEndColumn(); - t = Token.newToken(jjmatchedKind, curTokenImage); - - t.beginLine = beginLine; - t.endLine = endLine; - t.beginColumn = beginColumn; - t.endColumn = endColumn; - - return t; -} static final int[] jjnextStates = { - 237, 238, 239, 241, 242, 247, 248, 278, 279, 280, 282, 287, 257, 258, 259, 261, - 266, 176, 190, 192, 195, 151, 154, 155, 39, 43, 6, 7, 8, 1, 2, 4, - 33, 37, 85, 86, 87, 67, 68, 69, 23, 29, 24, 25, 26, 49, 50, 51, - 58, 52, 56, 49, 52, 56, 103, 104, 105, 107, 106, 123, 127, 128, 129, 131, - 130, 147, 151, 152, 153, 157, 154, 155, 159, 160, 161, 165, 162, 163, 159, 162, - 163, 167, 168, 170, 173, 174, 197, 177, 178, 179, 181, 183, 184, 186, 206, 207, - 208, 215, 209, 213, 206, 209, 213, 221, 222, 223, 231, 224, 229, 221, 224, 229, - 267, 268, 273, 274, 288, 289, 294, 295, 167, 168, 169, 173, 174, 175, 197, 170, - 219, 235, 9, 18, 70, 71, 80, 88, 89, 98, 108, 109, 118, 132, 133, 142, - 182, 188, 245, 246, 249, 250, 254, 255, 264, 265, 271, 272, 275, 276, 285, 286, - 292, 293, 296, 297, 201, 202, 27, 28, 171, 172, 180, 189, 198, 199, 167, 168, - 169, 170, 173, 174, 175, 197, + 237, 238, 239, 241, 242, 247, 248, 278, 279, 280, 282, 287, 257, 258, 259, 261, + 266, 176, 190, 192, 195, 151, 154, 155, 39, 43, 6, 7, 8, 1, 2, 4, + 33, 37, 85, 86, 87, 67, 68, 69, 23, 29, 24, 25, 26, 49, 50, 51, + 58, 52, 56, 49, 52, 56, 103, 104, 105, 107, 106, 123, 127, 128, 129, 131, + 130, 147, 151, 152, 153, 157, 154, 155, 159, 160, 161, 165, 162, 163, 159, 162, + 163, 167, 168, 170, 173, 174, 197, 177, 178, 179, 181, 183, 184, 186, 206, 207, + 208, 215, 209, 213, 206, 209, 213, 221, 222, 223, 231, 224, 229, 221, 224, 229, + 267, 268, 273, 274, 288, 289, 294, 295, 167, 168, 169, 173, 174, 175, 197, 170, + 219, 235, 9, 18, 70, 71, 80, 88, 89, 98, 108, 109, 118, 132, 133, 142, + 182, 188, 245, 246, 249, 250, 254, 255, 264, 265, 271, 272, 275, 276, 285, 286, + 292, 293, 296, 297, 201, 202, 27, 28, 171, 172, 180, 189, 198, 199, 167, 168, + 169, 170, 173, 174, 175, 197, }; private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) { @@ -4767,6 +4770,113 @@ private static final boolean jjCanMove_27(int hiByte, int i1, int i2, long l1, l } } +/** Token literal values. */ +public static final String[] jjstrLiteralImages = { +"", null, null, null, null, null, null, null, null, "\ufeff", null, null, null, +null, null, null, null, null, null, "\141", null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, null, null, "\50", "\51", null, "\173", "\175", "\133", "\135", null, +"\73", "\54", "\56", "\75", "\41\75", "\76", "\74", "\74\75", "\76\75", "\76\76", +"\74\74", "\173\174", "\174\175", "\41", "\176", "\72", "\174\174", "\46\46", "\53", +"\55", "\52", "\57", "\136\136", "\100", "\72\75", "\174", "\136", "\55\76", +"\74\55", "\77", null, null, null, null, null, null, null, null, null, null, null, null, }; + +/** Lexer state names. */ +public static final String[] lexStateNames = { + "DEFAULT", +}; +static final long[] jjtoToken = { + 0xfffffffffff9fe01L, 0xffffffffffffffffL, 0xffe23fefffffffffL, 0x7fffffffL, +}; +static final long[] jjtoSkip = { + 0x7eL, 0x0L, 0x0L, 0x0L, +}; +static final long[] jjtoSpecial = { + 0x40L, 0x0L, 0x0L, 0x0L, +}; +protected SimpleCharStream input_stream; +private final int[] jjrounds = new int[298]; +private final int[] jjstateSet = new int[596]; +protected char curChar; +/** Constructor. */ +public ARQParserTokenManager(SimpleCharStream stream){ + if (SimpleCharStream.staticFlag) + throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); + input_stream = stream; +} + +/** Constructor. */ +public ARQParserTokenManager(SimpleCharStream stream, int lexState){ + this(stream); + SwitchTo(lexState); +} + +/** Reinitialise parser. */ +public void ReInit(SimpleCharStream stream) +{ + jjmatchedPos = jjnewStateCnt = 0; + curLexState = defaultLexState; + input_stream = stream; + ReInitRounds(); +} +private void ReInitRounds() +{ + int i; + jjround = 0x80000001; + for (i = 298; i-- > 0;) + jjrounds[i] = 0x80000000; +} + +/** Reinitialise parser. */ +public void ReInit(SimpleCharStream stream, int lexState) +{ + ReInit(stream); + SwitchTo(lexState); +} + +/** Switch to specified lex state. */ +public void SwitchTo(int lexState) +{ + if (lexState >= 1 || lexState < 0) + throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); + else + curLexState = lexState; +} + +protected Token jjFillToken() +{ + final Token t; + final String curTokenImage; + final int beginLine; + final int endLine; + final int beginColumn; + final int endColumn; + String im = jjstrLiteralImages[jjmatchedKind]; + curTokenImage = (im == null) ? input_stream.GetImage() : im; + beginLine = input_stream.getBeginLine(); + beginColumn = input_stream.getBeginColumn(); + endLine = input_stream.getEndLine(); + endColumn = input_stream.getEndColumn(); + t = Token.newToken(jjmatchedKind, curTokenImage); + + t.beginLine = beginLine; + t.endLine = endLine; + t.beginColumn = beginColumn; + t.endColumn = endColumn; + + return t; +} + int curLexState = 0; int defaultLexState = 0; int jjnewStateCnt; @@ -4775,7 +4885,7 @@ private static final boolean jjCanMove_27(int hiByte, int i1, int i2, long l1, l int jjmatchedKind; /** Get the next Token. */ -public Token getNextToken() +public Token getNextToken() { Token specialToken = null; Token matchedToken; @@ -4788,10 +4898,9 @@ public Token getNextToken() { curChar = input_stream.BeginToken(); } - catch(Exception e) + catch(java.io.IOException e) { jjmatchedKind = 0; - jjmatchedPos = -1; matchedToken = jjFillToken(); matchedToken.specialToken = specialToken; return matchedToken; @@ -4849,31 +4958,6 @@ public Token getNextToken() } } -void SkipLexicalActions(Token matchedToken) -{ - switch(jjmatchedKind) - { - default : - break; - } -} -void MoreLexicalActions() -{ - jjimageLen += (lengthOfMatch = jjmatchedPos + 1); - switch(jjmatchedKind) - { - default : - break; - } -} -void TokenLexicalActions(Token matchedToken) -{ - switch(jjmatchedKind) - { - default : - break; - } -} private void jjCheckNAdd(int state) { if (jjrounds[state] != jjround) @@ -4901,98 +4985,4 @@ private void jjCheckNAddStates(int start, int end) } while (start++ != end); } - /** Constructor. */ - public ARQParserTokenManager(SimpleCharStream stream){ - - if (SimpleCharStream.staticFlag) - throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); - - input_stream = stream; - } - - /** Constructor. */ - public ARQParserTokenManager (SimpleCharStream stream, int lexState){ - ReInit(stream); - SwitchTo(lexState); - } - - /** Reinitialise parser. */ - - public void ReInit(SimpleCharStream stream) - { - - - jjmatchedPos = - jjnewStateCnt = - 0; - curLexState = defaultLexState; - input_stream = stream; - ReInitRounds(); - } - - private void ReInitRounds() - { - int i; - jjround = 0x80000001; - for (i = 298; i-- > 0;) - jjrounds[i] = 0x80000000; - } - - /** Reinitialise parser. */ - public void ReInit(SimpleCharStream stream, int lexState) - - { - ReInit(stream); - SwitchTo(lexState); - } - - /** Switch to specified lex state. */ - public void SwitchTo(int lexState) - { - if (lexState >= 1 || lexState < 0) - throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); - else - curLexState = lexState; - } - - -/** Lexer state names. */ -public static final String[] lexStateNames = { - "DEFAULT", -}; - -/** Lex State array. */ -public static final int[] jjnewLexState = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -}; -static final long[] jjtoToken = { - 0xfffffffffff9fe01L, 0xffffffffffffffffL, 0xfff88ffbffffffffL, 0x1fffffffL, -}; -static final long[] jjtoSkip = { - 0x7eL, 0x0L, 0x0L, 0x0L, -}; -static final long[] jjtoSpecial = { - 0x40L, 0x0L, 0x0L, 0x0L, -}; -static final long[] jjtoMore = { - 0x0L, 0x0L, 0x0L, 0x0L, -}; - protected SimpleCharStream input_stream; - - private final int[] jjrounds = new int[298]; - private final int[] jjstateSet = new int[2 * 298]; - private final StringBuilder jjimage = new StringBuilder(); - private StringBuilder image = jjimage; - private int jjimageLen; - private int lengthOfMatch; - protected int curChar; } diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ParseException.java b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ParseException.java index cb1919325b9..b41e002b02e 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ParseException.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ParseException.java @@ -1,5 +1,5 @@ -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 7.0 */ -/* JavaCCOptions:KEEP_LINE_COLUMN=true */ +/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */ +/* JavaCCOptions:KEEP_LINE_COL=null */ package org.apache.jena.sparql.lang.arq ; /** @@ -20,11 +20,6 @@ public class ParseException extends Exception { */ private static final long serialVersionUID = 1L; - /** - * The end of line string for this machine. - */ - protected static String EOL = System.getProperty("line.separator", "\n"); - /** * This constructor is used by the method "generateParseException" * in the generated parser. Calling this constructor generates @@ -65,7 +60,7 @@ public ParseException(String message) { /** * This is the last token that has been consumed successfully. If * this object has been created due to a parse error, the token - * following this token will (therefore) be the first error token. + * followng this token will (therefore) be the first error token. */ public Token currentToken; @@ -93,8 +88,8 @@ public ParseException(String message) { private static String initialise(Token currentToken, int[][] expectedTokenSequences, String[] tokenImage) { - - StringBuilder expected = new StringBuilder(); + String eol = System.getProperty("line.separator", "\n"); + StringBuffer expected = new StringBuffer(); int maxSize = 0; for (int i = 0; i < expectedTokenSequences.length; i++) { if (maxSize < expectedTokenSequences[i].length) { @@ -106,7 +101,7 @@ private static String initialise(Token currentToken, if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { expected.append("..."); } - expected.append(EOL).append(" "); + expected.append(eol).append(" "); } String retval = "Encountered \""; Token tok = currentToken.next; @@ -122,26 +117,21 @@ private static String initialise(Token currentToken, retval += " \""; tok = tok.next; } - if (currentToken.next != null) { - retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; - } - retval += "." + EOL; - - - if (expectedTokenSequences.length == 0) { - // Nothing to add here + retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; + retval += "." + eol; + if (expectedTokenSequences.length == 1) { + retval += "Was expecting:" + eol + " "; } else { - if (expectedTokenSequences.length == 1) { - retval += "Was expecting:" + EOL + " "; - } else { - retval += "Was expecting one of:" + EOL + " "; - } - retval += expected.toString(); + retval += "Was expecting one of:" + eol + " "; } - + retval += expected.toString(); return retval; } + /** + * The end of line string for this machine. + */ + protected String eol = System.getProperty("line.separator", "\n"); /** * Used to convert raw characters to their escaped version @@ -149,11 +139,13 @@ private static String initialise(Token currentToken, * string literal. */ static String add_escapes(String str) { - StringBuilder retval = new StringBuilder(); + StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { switch (str.charAt(i)) { + case 0 : + continue; case '\b': retval.append("\\b"); continue; @@ -192,4 +184,4 @@ static String add_escapes(String str) { } } -/* JavaCC - OriginalChecksum=7f03520468cc43d4f83f09bbb6a97299 (do not edit this line) */ +/* JavaCC - OriginalChecksum=48a48010f2f271416e60bbfb8cf25e4b (do not edit this line) */ diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/SimpleCharStream.java b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/SimpleCharStream.java index d6ffb88916a..37e4f47459a 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/SimpleCharStream.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/SimpleCharStream.java @@ -1,4 +1,4 @@ -/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 7.0 */ +/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 5.0 */ /* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ package org.apache.jena.sparql.lang.arq ; @@ -30,12 +30,10 @@ public class SimpleCharStream protected char[] buffer; protected int maxNextCharInd = 0; protected int inBuf = 0; - protected int tabSize = 1; - protected boolean trackLineColumn = true; - - public void setTabSize(int i) { tabSize = i; } - public int getTabSize() { return tabSize; } + protected int tabSize = 8; + protected void setTabSize(int i) { tabSize = i; } + protected int getTabSize(int i) { return tabSize; } protected void ExpandBuff(boolean wrapAround) @@ -203,20 +201,22 @@ public char readChar() throws java.io.IOException return c; } + @Deprecated /** * @deprecated * @see #getEndColumn */ - @Deprecated + public int getColumn() { return bufcolumn[bufpos]; } + @Deprecated /** * @deprecated * @see #getEndLine */ - @Deprecated + public int getLine() { return bufline[bufpos]; } @@ -466,7 +466,6 @@ public void adjustBeginLineColumn(int newLine, int newCol) line = bufline[j]; column = bufcolumn[j]; } - boolean getTrackLineColumn() { return trackLineColumn; } - void setTrackLineColumn(boolean tlc) { trackLineColumn = tlc; } + } -/* JavaCC - OriginalChecksum=5f495744c87e77321fd570f94f38cd5d (do not edit this line) */ +/* JavaCC - OriginalChecksum=68955e9beb09d3242a6c5c1ee95dd485 (do not edit this line) */ diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/Token.java b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/Token.java index b4da352e69a..892cc587bd7 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/Token.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/Token.java @@ -1,5 +1,5 @@ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 7.0 */ -/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COLUMN=true,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +/* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */ +/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ package org.apache.jena.sparql.lang.arq ; /** @@ -97,7 +97,6 @@ public Token(int kind, String image) /** * Returns the image. */ - @Override public String toString() { return image; @@ -129,4 +128,4 @@ public static Token newToken(int ofKind) } } -/* JavaCC - OriginalChecksum=0ea2e0bf17ab3b36b824cbe5bb2a103c (do not edit this line) */ +/* JavaCC - OriginalChecksum=d9b4c8c9332fa3054a004615fdb22b89 (do not edit this line) */ diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/TokenMgrError.java b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/TokenMgrError.java index 7260bb1d483..9731cd9bb79 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/TokenMgrError.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/TokenMgrError.java @@ -1,4 +1,4 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 7.0 */ +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */ /* JavaCCOptions: */ package org.apache.jena.sparql.lang.arq ; @@ -22,22 +22,22 @@ public class TokenMgrError extends Error /** * Lexical error occurred. */ - public static final int LEXICAL_ERROR = 0; + static final int LEXICAL_ERROR = 0; /** * An attempt was made to create a second instance of a static token manager. */ - public static final int STATIC_LEXER_ERROR = 1; + static final int STATIC_LEXER_ERROR = 1; /** * Tried to change to an invalid lexical state. */ - public static final int INVALID_LEXICAL_STATE = 2; + static final int INVALID_LEXICAL_STATE = 2; /** * Detected (and bailed out of) an infinite loop in the token manager. */ - public static final int LOOP_DETECTED = 3; + static final int LOOP_DETECTED = 3; /** * Indicates the reason why the exception is thrown. It will have @@ -50,11 +50,13 @@ public class TokenMgrError extends Error * equivalents in the given string */ protected static final String addEscapes(String str) { - StringBuilder retval = new StringBuilder(); + StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { switch (str.charAt(i)) { + case 0 : + continue; case '\b': retval.append("\\b"); continue; @@ -97,20 +99,19 @@ protected static final String addEscapes(String str) { * token manager to indicate a lexical error. * Parameters : * EOFSeen : indicates if EOF caused the lexical error - * lexState : lexical state in which this error occurred + * curLexState : lexical state in which this error occurred * errorLine : line number when the error occurred * errorColumn : column number when the error occurred * errorAfter : prefix that was seen before this error occurred * curchar : the offending character * Note: You can customize the lexical error message by modifying this method. */ - protected static String LexicalErr(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, int curChar) { - return("Lexical error at line " + // - errorLine + ", column " + // - errorColumn + ". Encountered: " + // - (EOFSeen ? "" : ("'" + addEscapes(String.valueOf(curChar)) + "' (" + curChar + "),")) + // - (errorAfter == null || errorAfter.length() == 0 ? "" : " after prefix \"" + addEscapes(errorAfter) + "\"")) + // - (lexState == 0 ? "" : " (in lexical state " + lexState + ")"); + protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { + return("Lexical error at line " + + errorLine + ", column " + + errorColumn + ". Encountered: " + + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + + "after : \"" + addEscapes(errorAfter) + "\""); } /** @@ -122,7 +123,6 @@ protected static String LexicalErr(boolean EOFSeen, int lexState, int errorLine, * * from this method for such cases in the release version of your parser. */ - @Override public String getMessage() { return super.getMessage(); } @@ -142,8 +142,8 @@ public TokenMgrError(String message, int reason) { } /** Full Constructor. */ - public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, int curChar, int reason) { - this(LexicalErr(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); + public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { + this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); } } -/* JavaCC - OriginalChecksum=26900e63a554da1bde0d1d6ebd69f6c3 (do not edit this line) */ +/* JavaCC - OriginalChecksum=8f945f6081b6c05a3722e27c60c90cda (do not edit this line) */ diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/lang/sparql_11/JavaCharStream.java b/jena-arq/src/main/java/org/apache/jena/sparql/lang/sparql_11/JavaCharStream.java index 073cf097d1e..57b1eb0b3b1 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/sparql_11/JavaCharStream.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/sparql_11/JavaCharStream.java @@ -760,4 +760,4 @@ public void adjustBeginLineColumn(int newLine, int newCol) void setTrackLineColumn(boolean tlc) { trackLineColumn = tlc; } } -/* JavaCC - OriginalChecksum=9698f3eb5988f4ff314d1b8207763eb1 (do not edit this line) */ +/* JavaCC - OriginalChecksum=9698f3eb5988f4ff314d1b8207763eb1 (do not edit this line) */ \ No newline at end of file diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/serializer/FormatterElement.java b/jena-arq/src/main/java/org/apache/jena/sparql/serializer/FormatterElement.java index f018e91175e..30fd057b21b 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/serializer/FormatterElement.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/serializer/FormatterElement.java @@ -236,6 +236,18 @@ public void visit(ElementBind el) { out.print(")"); } + @Override + public void visit(ElementUnfold el) { + out.print("UNFOLD("); + FmtExprSPARQL v = new FmtExprSPARQL(out, context); + v.format(el.getExpr()); + out.print(" AS "); + out.print("?" + el.getVar1().getVarName()); + if ( el.getVar2() != null ) + out.print(", ?" + el.getVar2().getVarName()); + out.print(")"); + } + @Override public void visit(ElementData el) { QuerySerializer.outputDataBlock(out, el.getVars(), el.getRows(), context); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/sse/Tags.java b/jena-arq/src/main/java/org/apache/jena/sparql/sse/Tags.java index 29c22ef1e10..9a2539fd2fe 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/sse/Tags.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/sse/Tags.java @@ -94,6 +94,7 @@ public class Tags public static final String symAssign = ":="; public static final String tagSlice = "slice"; public static final String tagRename = "rename"; + public static final String tagUnfold = "unfold"; public static final String tagOpTriple = Tags.tagTriple; public static final String tagOpQuad = Tags.tagQuad; diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterOp.java b/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterOp.java index d058f331ad5..bc3d84b1628 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterOp.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterOp.java @@ -555,6 +555,25 @@ public void visit(OpExtend opExtend) { finish(opExtend); } + @Override + public void visit(OpUnfold opUnfold) { + start(opUnfold, NoNL); + + start(); + WriterExpr.output(out, opUnfold.getExpr(), sContext); + out.print(" "); + out.print( opUnfold.getVar1().toString() ); + if ( opUnfold.getVar2() != null ) { + out.print(" "); + out.print( opUnfold.getVar2().toString() ); + } + finish(); + + out.println(); + printOp(opUnfold.getSubOp()); + finish(opUnfold); + } + @Override public void visit(OpSlice opSlice) { start(opSlice, NoNL); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementUnfold.java b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementUnfold.java new file mode 100644 index 00000000000..0ad02807627 --- /dev/null +++ b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementUnfold.java @@ -0,0 +1,85 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.sparql.syntax; + +import org.apache.jena.sparql.core.Var; +import org.apache.jena.sparql.expr.Expr; +import org.apache.jena.sparql.util.NodeIsomorphismMap; + +public class ElementUnfold extends Element +{ + private Expr expr ; + private Var var1 ; + private Var var2 ; + + public ElementUnfold(Expr expr, Var v1, Var v2) + { + this.expr = expr ; + this.var1 = v1 ; + this.var2 = v2 ; + } + + public Expr getExpr() + { + return expr ; + } + + public Var getVar1() + { + return var1 ; + } + + public Var getVar2() + { + return var2 ; + } + + @Override + public boolean equalTo(Element el2, NodeIsomorphismMap isoMap) + { + if ( ! ( el2 instanceof ElementUnfold ) ) + return false ; + ElementUnfold f2 = (ElementUnfold)el2 ; + if ( ! this.getVar1().equals(f2.getVar1()) ) + return false ; + if ( this.getVar2() == null && f2.getVar2() != null ) + return false ; + if ( this.getVar2() != null && this.getVar2().equals(f2.getVar2()) ) + return false ; + if ( ! this.getExpr().equals(f2.getExpr()) ) + return false ; + return true ; + } + + @Override + public int hashCode() + { + if ( var2 == null ) + return var1.hashCode()^expr.hashCode(); + else + return var1.hashCode()^var2.hashCode()^expr.hashCode(); + } + + @Override + public void visit(ElementVisitor v) + { + v.visit(this) ; + } + +} diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementVisitor.java b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementVisitor.java index 97ffe1c8d19..516f5ac693f 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementVisitor.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementVisitor.java @@ -25,6 +25,7 @@ public interface ElementVisitor public void visit(ElementFilter el) ; public void visit(ElementAssign el) ; public void visit(ElementBind el) ; + public void visit(ElementUnfold el) ; public void visit(ElementData el) ; public void visit(ElementUnion el) ; public void visit(ElementOptional el) ; diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementVisitorBase.java b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementVisitorBase.java index f460529d0c4..83fa6e85d55 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementVisitorBase.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementVisitorBase.java @@ -36,6 +36,9 @@ public void visit(ElementAssign el) { } @Override public void visit(ElementBind el) { } + @Override + public void visit(ElementUnfold el) { } + @Override public void visit(ElementData el) { } diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementWalker.java b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementWalker.java index 92fcce4e3a7..b94b3df5ac9 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementWalker.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementWalker.java @@ -90,6 +90,14 @@ public void visit(ElementBind el) { after(el); } + @Override + public void visit(ElementUnfold el) + { + before(el) ; + proc.visit(el) ; + after(el) ; + } + @Override public void visit(ElementData el) { before(el); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/PatternVarsVisitor.java b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/PatternVarsVisitor.java index 50818105873..362077bbbcb 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/PatternVarsVisitor.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/PatternVarsVisitor.java @@ -82,6 +82,13 @@ public void visit(ElementBind el) { acc.add(el.getVar()); } + @Override + public void visit(ElementUnfold el) { + acc.add(el.getVar1()); + if ( el.getVar2() != null ) + acc.add(el.getVar2()); + } + @Override public void visit(ElementData el) { acc.addAll(el.getVars()); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ApplyElementTransformVisitor.java b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ApplyElementTransformVisitor.java index 43a93006347..cb22c525455 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ApplyElementTransformVisitor.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ApplyElementTransformVisitor.java @@ -99,6 +99,18 @@ public void visit(ElementBind el) { push(el2) ; } + @Override + public void visit(ElementUnfold el) { + Var v1 = el.getVar1() ; + Var v1T = TransformElementLib.applyVar(v1, exprTransform) ; + Var v2 = el.getVar2() ; + Var v2T = (v2 == null) ? null : TransformElementLib.applyVar(v2, exprTransform) ; + Expr expr = el.getExpr() ; + Expr exprT = ExprTransformer.transform(exprTransform, expr) ; + Element el2 = transform.transform(el, exprT, v1T, v2T) ; + push(el2) ; + } + @Override public void visit(ElementData el) { Element el2 = transform.transform(el) ; diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransform.java b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransform.java index 954ced762f1..effab2e5f46 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransform.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransform.java @@ -38,6 +38,7 @@ public interface ElementTransform public Element transform(ElementFilter el, Expr expr2); public Element transform(ElementAssign el, Var v, Expr expr2); public Element transform(ElementBind el, Var v, Expr expr2); + public Element transform(ElementUnfold el, Expr expr, Var v1, Var v2); public Triple transform(Triple triple); public Quad transform(Quad quad); public Element transform(ElementData el); diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransformCleanGroupsOfOne.java b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransformCleanGroupsOfOne.java index d6818301c6b..f8bb6251b14 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransformCleanGroupsOfOne.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransformCleanGroupsOfOne.java @@ -47,6 +47,7 @@ public Element transform(ElementGroup eltGroup, List elts) { ( elt instanceof ElementFilter ) || ( elt instanceof ElementBind ) || ( elt instanceof ElementAssign ) || + ( elt instanceof ElementUnfold ) || ( elt instanceof ElementMinus ) || ( elt instanceof ElementOptional ) ) diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransformCopyBase.java b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransformCopyBase.java index 360011eed3d..5592001f0c8 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransformCopyBase.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransformCopyBase.java @@ -101,6 +101,13 @@ public Element transform(ElementBind el, Var v, Expr expr2) { return new ElementBind(v, expr2) ; } + @Override + public Element transform(ElementUnfold el, Expr expr, Var v1, Var v2) { + if ( !alwaysCopy && el.getVar1() == v1 && el.getVar2() == v2 && el.getExpr() == expr ) + return el ; + return new ElementUnfold(expr, v1, v2) ; + } + @Override public Element transform(ElementData el) { if( alwaysCopy ) { diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransformIdentity.java b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransformIdentity.java index 7809f1bef5a..827ae98d382 100644 --- a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransformIdentity.java +++ b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ElementTransformIdentity.java @@ -51,6 +51,8 @@ private ElementTransformIdentity() {} @Override public Element transform(ElementBind el, Var v, Expr expr2) { return el ; } @Override + public Element transform(ElementUnfold el, Expr expr, Var v1, Var v2) { return el ; } + @Override public Triple transform(Triple triple) { return triple; } @Override public Quad transform(Quad quad) { return quad; } diff --git a/jena-arq/src/test/java/org/apache/jena/external/Scripts_SPARQLCDTs.java b/jena-arq/src/test/java/org/apache/jena/external/Scripts_SPARQLCDTs.java new file mode 100644 index 00000000000..906bc276d12 --- /dev/null +++ b/jena-arq/src/test/java/org/apache/jena/external/Scripts_SPARQLCDTs.java @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jena.external; + +import org.apache.jena.arq.junit.manifest.Manifests; +import org.apache.jena.arq.junit.runners.Label; +import org.apache.jena.arq.junit.runners.RunnerSPARQL; +import org.junit.runner.RunWith; + +@RunWith(RunnerSPARQL.class) +@Label("SPARQL CDTs") +@Manifests({ + "testing/SPARQL-CDTs/manifest-all.ttl" +}) + +public class Scripts_SPARQLCDTs {} diff --git a/jena-arq/testing/README.txt b/jena-arq/testing/README.txt index 63cb39390d6..18de84cd2fb 100644 --- a/jena-arq/testing/README.txt +++ b/jena-arq/testing/README.txt @@ -23,3 +23,6 @@ extensions. * supports expression without AS in SELECT clause +SPARQL-CDTs/ Test copied (on July 4, 2024) from + https://github.com/awslabs/SPARQL-CDTs/tree/main/tests + diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-01.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-01.rq new file mode 100644 index 00000000000..e4d9c2bd37b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-01.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[_:b, 42, _:b]"^^cdt:List AS ?list ) + + BIND( cdt:get(?list,1) AS ?e1 ) + BIND( cdt:get(?list,3) AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 = ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-02.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-02.rq new file mode 100644 index 00000000000..8e8be35e895 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-02.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "{ '1': _:b, '2': 42, '3': _:b }"^^cdt:Map AS ?map ) + + BIND( cdt:get(?map,'1') AS ?e1 ) + BIND( cdt:get(?map,'3') AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 = ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-03.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-03.rq new file mode 100644 index 00000000000..93ebd5664d1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-03.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[_:b1, 42, _:b2]"^^cdt:List AS ?list ) + + BIND( cdt:get(?list,1) AS ?e1 ) + BIND( cdt:get(?list,3) AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 != ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-04.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-04.rq new file mode 100644 index 00000000000..f2ce31b6b78 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-04.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "{ '1': _:b1, '2': 42, '3': _:b2 }"^^cdt:Map AS ?map ) + + BIND( cdt:get(?map,'1') AS ?e1 ) + BIND( cdt:get(?map,'3') AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 != ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-05.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-05.rq new file mode 100644 index 00000000000..d2b344dac5a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-05.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[_:b, 42]"^^cdt:List AS ?list1 ) + BIND( "[_:b, 43]"^^cdt:List AS ?list2 ) + + BIND( cdt:get(?list1,1) AS ?e1 ) + BIND( cdt:get(?list2,1) AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 = ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-06.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-06.rq new file mode 100644 index 00000000000..c850d8e4e98 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-06.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "{ '1': _:b, '2': 42 }"^^cdt:Map AS ?map1 ) + BIND( "{ '1': _:b, '2': 43 }"^^cdt:Map AS ?map2 ) + + BIND( cdt:get(?map1,'1') AS ?e1 ) + BIND( cdt:get(?map2,'1') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 = ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-07.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-07.rq new file mode 100644 index 00000000000..61386dbba5b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-07.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[_:b1, 42]"^^cdt:List AS ?list1 ) + BIND( "[_:b2, 43]"^^cdt:List AS ?list2 ) + + BIND( cdt:get(?list1,1) AS ?e1 ) + BIND( cdt:get(?list2,1) AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-08.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-08.rq new file mode 100644 index 00000000000..918c642959e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-08.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "{ '1': _:b1, '2': 42 }"^^cdt:Map AS ?map1 ) + BIND( "{ '1': _:b2, '2': 43 }"^^cdt:Map AS ?map2 ) + + BIND( cdt:get(?map1,'1') AS ?e1 ) + BIND( cdt:get(?map2,'1') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-09.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-09.rq new file mode 100644 index 00000000000..5b95fe6da62 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-09.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[ _:b, 42 ]"^^cdt:List AS ?list ) + BIND( "{ '1': _:b, '2': 43 }"^^cdt:Map AS ?map ) + + BIND( cdt:get(?list,1) AS ?e1 ) + BIND( cdt:get(?map,'1') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 = ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-11.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-11.rq new file mode 100644 index 00000000000..422c6aaac23 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-11.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[_:b, 42, [_:b] ]"^^cdt:List AS ?list ) + + BIND( cdt:get(?list,1) AS ?e1 ) + BIND( cdt:get(?list,3) AS ?innerlist ) + BIND( cdt:get(?innerlist,1) AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 = ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-12.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-12.rq new file mode 100644 index 00000000000..a4f54282ec5 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-12.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "{ '1': _:b, '2': 42, '3': {'4': _:b} }"^^cdt:Map AS ?map ) + + BIND( cdt:get(?map,'1') AS ?e1 ) + BIND( cdt:get(?map,'3') AS ?innermap ) + BIND( cdt:get(?innermap,'4') AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 = ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-13.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-13.rq new file mode 100644 index 00000000000..4d15b0baa02 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-13.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[_:b1, 42, [_:b2] ]"^^cdt:List AS ?list ) + + BIND( cdt:get(?list,1) AS ?e1 ) + BIND( cdt:get(?list,3) AS ?innerlist ) + BIND( cdt:get(?innerlist,1) AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 != ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-14.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-14.rq new file mode 100644 index 00000000000..dd785407ec8 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-14.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "{ '1': _:b1, '2': 42, '3': {'4': _:b2} }"^^cdt:Map AS ?map ) + + BIND( cdt:get(?map,'1') AS ?e1 ) + BIND( cdt:get(?map,'3') AS ?innermap ) + BIND( cdt:get(?innermap,'4') AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 != ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-15.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-15.rq new file mode 100644 index 00000000000..b9eb123855c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-15.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[_:b, 42]"^^cdt:List AS ?list1 ) + BIND( "[ [_:b], 43]"^^cdt:List AS ?list2 ) + + BIND( cdt:get(?list1,1) AS ?e1 ) + BIND( cdt:get(?list2,1) AS ?innerlist ) + BIND( cdt:get(?innerlist,1) AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 = ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-16.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-16.rq new file mode 100644 index 00000000000..945ee890a79 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-16.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "{ '1': _:b, '2': 42 }"^^cdt:Map AS ?map1 ) + BIND( "{ '1': {'3': _:b}, '2': 43 }"^^cdt:Map AS ?map2 ) + + BIND( cdt:get(?map1,'1') AS ?e1 ) + BIND( cdt:get(?map2,'1') AS ?innermap ) + BIND( cdt:get(?innermap,'3') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 = ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-17.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-17.rq new file mode 100644 index 00000000000..cdfef2ed011 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-17.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[_:b1, 42]"^^cdt:List AS ?list1 ) + BIND( "[ [_:b2], 43]"^^cdt:List AS ?list2 ) + + BIND( cdt:get(?list1,1) AS ?e1 ) + BIND( cdt:get(?list2,1) AS ?innerlist ) + BIND( cdt:get(?innerlist,1) AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-18.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-18.rq new file mode 100644 index 00000000000..307e031346d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-18.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "{ '1': _:b1, '2': 42 }"^^cdt:Map AS ?map1 ) + BIND( "{ '1': {'3': _:b2}, '2': 43 }"^^cdt:Map AS ?map2 ) + + BIND( cdt:get(?map1,'1') AS ?e1 ) + BIND( cdt:get(?map2,'1') AS ?innermap ) + BIND( cdt:get(?innermap,'3') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-21.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-21.rq new file mode 100644 index 00000000000..c53b1c7065a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-21.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[_:b, 42, '[_:b]'^^ ]"^^cdt:List AS ?list ) + + BIND( cdt:get(?list,1) AS ?e1 ) + BIND( cdt:get(?list,3) AS ?innerlist ) + BIND( cdt:get(?innerlist,1) AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 = ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-22.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-22.rq new file mode 100644 index 00000000000..cc2e538dd3a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-22.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( """{ '1': _:b, '2': 42, '3': "{'4': _:b}"^^ }"""^^cdt:Map AS ?map ) + + BIND( cdt:get(?map,'1') AS ?e1 ) + BIND( cdt:get(?map,'3') AS ?innermap ) + BIND( cdt:get(?innermap,'4') AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 = ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-23.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-23.rq new file mode 100644 index 00000000000..6aec1c7ef92 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-23.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[_:b1, 42, '[_:b2]'^^ ]"^^cdt:List AS ?list ) + + BIND( cdt:get(?list,1) AS ?e1 ) + BIND( cdt:get(?list,3) AS ?innerlist ) + BIND( cdt:get(?innerlist,1) AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 != ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-24.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-24.rq new file mode 100644 index 00000000000..c1ed49d4029 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-24.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( """{ '1': _:b1, '2': 42, '3': "{'4': _:b2}"^^ }"""^^cdt:Map AS ?map ) + + BIND( cdt:get(?map,'1') AS ?e1 ) + BIND( cdt:get(?map,'3') AS ?innermap ) + BIND( cdt:get(?innermap,'4') AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 != ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-25.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-25.rq new file mode 100644 index 00000000000..4a92c370f47 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-25.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[_:b, 42]"^^cdt:List AS ?list1 ) + BIND( "[ '[_:b]'^^, 43]"^^cdt:List AS ?list2 ) + + BIND( cdt:get(?list1,1) AS ?e1 ) + BIND( cdt:get(?list2,1) AS ?innerlist ) + BIND( cdt:get(?innerlist,1) AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 = ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-26.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-26.rq new file mode 100644 index 00000000000..9b72d62fb0d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-26.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "{ '1': _:b, '2': 42 }"^^cdt:Map AS ?map1 ) + BIND( """{ '1': "{'3': _:b}"^^, '2': 43 }"""^^cdt:Map AS ?map2 ) + + BIND( cdt:get(?map1,'1') AS ?e1 ) + BIND( cdt:get(?map2,'1') AS ?innermap ) + BIND( cdt:get(?innermap,'3') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 = ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-27.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-27.rq new file mode 100644 index 00000000000..cd1b9ab2076 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-27.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[_:b1, 42]"^^cdt:List AS ?list1 ) + BIND( "[ '[_:b2]'^^, 43]"^^cdt:List AS ?list2 ) + + BIND( cdt:get(?list1,1) AS ?e1 ) + BIND( cdt:get(?list2,1) AS ?innerlist ) + BIND( cdt:get(?innerlist,1) AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-28.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-28.rq new file mode 100644 index 00000000000..84308d2ac01 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-sparql-28.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "{ '1': _:b1, '2': 42 }"^^cdt:Map AS ?map1 ) + BIND( """{ '1': "{'3': _:b2}"^^, '2': 43 }"""^^cdt:Map AS ?map2 ) + + BIND( cdt:get(?map1,'1') AS ?e1 ) + BIND( cdt:get(?map2,'1') AS ?innermap ) + BIND( cdt:get(?innermap,'3') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-01.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-01.rq new file mode 100644 index 00000000000..0ee93c7bf1d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-01.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p ?list . + + BIND( cdt:get(?list,1) AS ?e1 ) + BIND( cdt:get(?list,3) AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 = ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-01.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-01.ttl new file mode 100644 index 00000000000..eb2752733eb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-01.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p "[_:b, 42, _:b]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-02.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-02.rq new file mode 100644 index 00000000000..7258c34b428 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-02.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p ?map . + + BIND( cdt:get(?map,'1') AS ?e1 ) + BIND( cdt:get(?map,'3') AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 = ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-02.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-02.ttl new file mode 100644 index 00000000000..90ffb7f25c2 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-02.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p "{ '1': _:b, '2': 42, '3': _:b }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-03.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-03.rq new file mode 100644 index 00000000000..88d7a34d556 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-03.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p ?list . + + BIND( cdt:get(?list,1) AS ?e1 ) + BIND( cdt:get(?list,3) AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 != ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-03.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-03.ttl new file mode 100644 index 00000000000..5502a19e922 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-03.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p "[_:b1, 42, _:b2]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-04.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-04.rq new file mode 100644 index 00000000000..b04cf7208b2 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-04.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p ?map . + + BIND( cdt:get(?map,'1') AS ?e1 ) + BIND( cdt:get(?map,'3') AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 != ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-04.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-04.ttl new file mode 100644 index 00000000000..8d7f8d07dbf --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-04.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p "{ '1': _:b1, '2': 42, '3': _:b2 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-05.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-05.rq new file mode 100644 index 00000000000..36a894ac01d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-05.rq @@ -0,0 +1,12 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ?s ex:p ?list . + + BIND( cdt:get(?list,1) AS ?e1 ) + + FILTER( isBLANK(?s) ) + FILTER( isBLANK(?e1) ) + FILTER( ?s = ?e1 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-05.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-05.ttl new file mode 100644 index 00000000000..6194f8e35cb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-05.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +_:b ex:p "[_:b, 42]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-06.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-06.rq new file mode 100644 index 00000000000..b2fa647e518 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-06.rq @@ -0,0 +1,12 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ?s ex:p ?map . + + BIND( cdt:get(?map,'1') AS ?e1 ) + + FILTER( isBLANK(?s) ) + FILTER( isBLANK(?e1) ) + FILTER( ?s = ?e1 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-06.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-06.ttl new file mode 100644 index 00000000000..05fc3eaef24 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-06.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +_:b ex:p "{ '1': _:b, '2': 42 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-07.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-07.rq new file mode 100644 index 00000000000..04ed6a8bf56 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-07.rq @@ -0,0 +1,12 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ?s ex:p ?list . + + BIND( cdt:get(?list,1) AS ?e1 ) + + FILTER( isBLANK(?s) ) + FILTER( isBLANK(?e1) ) + FILTER( ?s != ?e1 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-07.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-07.ttl new file mode 100644 index 00000000000..211ee3dfb48 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-07.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +_:b1 ex:p "[_:b2, 42]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-08.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-08.rq new file mode 100644 index 00000000000..e7bb213f05a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-08.rq @@ -0,0 +1,12 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ?s ex:p ?map . + + BIND( cdt:get(?map,'1') AS ?e1 ) + + FILTER( isBLANK(?s) ) + FILTER( isBLANK(?e1) ) + FILTER( ?s != ?e1 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-08.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-08.ttl new file mode 100644 index 00000000000..ff9c4133215 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-08.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +_:b1 ex:p "{ '1': _:b2, '2': 42 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-09.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-09.rq new file mode 100644 index 00000000000..458d01bbe3f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-09.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?list1 . + ex:s ex:p2 ?list2 . + + BIND( cdt:get(?list1,1) AS ?e1 ) + BIND( cdt:get(?list2,1) AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 = ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-09.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-09.ttl new file mode 100644 index 00000000000..4cbb085bed0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-09.ttl @@ -0,0 +1,8 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "[_:b, 42]"^^cdt:List . +ex:s ex:p2 "[_:b, 43]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-10.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-10.rq new file mode 100644 index 00000000000..523312c8de0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-10.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?map1 . + ex:s ex:p2 ?map2 . + + BIND( cdt:get(?map1,'1') AS ?e1 ) + BIND( cdt:get(?map2,'1') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 = ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-10.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-10.ttl new file mode 100644 index 00000000000..ac3b7836b41 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-10.ttl @@ -0,0 +1,8 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "{ '1': _:b, '2': 42 }"^^cdt:Map . +ex:s ex:p2 "{ '1': _:b, '2': 43 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-11.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-11.rq new file mode 100644 index 00000000000..ef9a8a0577a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-11.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?list1 . + ex:s ex:p2 ?list2 . + + BIND( cdt:get(?list1,1) AS ?e1 ) + BIND( cdt:get(?list2,1) AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-11.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-11.ttl new file mode 100644 index 00000000000..3372e37b3cc --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-11.ttl @@ -0,0 +1,8 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "[_:b1, 42]"^^cdt:List . +ex:s ex:p2 "[_:b2, 43]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-12.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-12.rq new file mode 100644 index 00000000000..eda5afd3987 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-12.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?map1 . + ex:s ex:p2 ?map2 . + + BIND( cdt:get(?map1,'1') AS ?e1 ) + BIND( cdt:get(?map2,'1') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-12.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-12.ttl new file mode 100644 index 00000000000..1cbb9944518 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-12.ttl @@ -0,0 +1,8 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "{ '1': _:b1, '2': 42 }"^^cdt:Map . +ex:s ex:p2 "{ '1': _:b2, '2': 43 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-13.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-13.rq new file mode 100644 index 00000000000..02ff4313287 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-13.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?list . + ex:s ex:p2 ?map . + + BIND( cdt:get(?list,1) AS ?e1 ) + BIND( cdt:get(?map,'1') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 = ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-13.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-13.ttl new file mode 100644 index 00000000000..55d61641873 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-13.ttl @@ -0,0 +1,8 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "[ _:b, 42 ]"^^cdt:List . +ex:s ex:p2 "{ '1': _:b, '2': 43 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-14.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-14.rq new file mode 100644 index 00000000000..1ae250c6e1a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-14.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?list . + ex:s ex:p2 ?map . + + BIND( cdt:get(?list,1) AS ?e1 ) + BIND( cdt:get(?map,'1') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-14.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-14.ttl new file mode 100644 index 00000000000..1541932ad91 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-14.ttl @@ -0,0 +1,8 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "[ _:b1, 42 ]"^^cdt:List . +ex:s ex:p2 "{ '1': _:b2, '2': 43 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-15.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-15.rq new file mode 100644 index 00000000000..ef9a8a0577a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-15.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?list1 . + ex:s ex:p2 ?list2 . + + BIND( cdt:get(?list1,1) AS ?e1 ) + BIND( cdt:get(?list2,1) AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-15a.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-15a.ttl new file mode 100644 index 00000000000..9d414841c38 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-15a.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "[_:b, 42]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-15b.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-15b.ttl new file mode 100644 index 00000000000..c4b0e9de469 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-15b.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p2 "[_:b, 43]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-16.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-16.rq new file mode 100644 index 00000000000..eda5afd3987 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-16.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?map1 . + ex:s ex:p2 ?map2 . + + BIND( cdt:get(?map1,'1') AS ?e1 ) + BIND( cdt:get(?map2,'1') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-16a.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-16a.ttl new file mode 100644 index 00000000000..9667eb0bf47 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-16a.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "{ '1': _:b, '2': 42 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-16b.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-16b.ttl new file mode 100644 index 00000000000..3a858d3d899 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-16b.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p2 "{ '1': _:b, '2': 43 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-17.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-17.rq new file mode 100644 index 00000000000..3e89da7cd83 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-17.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?list . + ex:s ex:p2 ?bn . + + BIND( cdt:get(?list,1) AS ?e1 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?bn) ) + FILTER( ?e1 != ?bn ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-17a.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-17a.ttl new file mode 100644 index 00000000000..9d414841c38 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-17a.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "[_:b, 42]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-17b.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-17b.ttl new file mode 100644 index 00000000000..fa65368fd78 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-17b.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p2 _:b . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-18.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-18.rq new file mode 100644 index 00000000000..87f7b29f398 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-18.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?map . + ex:s ex:p2 ?bn . + + BIND( cdt:get(?map,'1') AS ?e1 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?bn) ) + FILTER( ?e1 != ?bn ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-18a.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-18a.ttl new file mode 100644 index 00000000000..9667eb0bf47 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-18a.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "{ '1': _:b, '2': 42 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-18b.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-18b.ttl new file mode 100644 index 00000000000..fa65368fd78 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-18b.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p2 _:b . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-19.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-19.rq new file mode 100644 index 00000000000..1ae250c6e1a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-19.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?list . + ex:s ex:p2 ?map . + + BIND( cdt:get(?list,1) AS ?e1 ) + BIND( cdt:get(?map,'1') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-19a.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-19a.ttl new file mode 100644 index 00000000000..9d414841c38 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-19a.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "[_:b, 42]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-19b.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-19b.ttl new file mode 100644 index 00000000000..3a858d3d899 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-19b.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p2 "{ '1': _:b, '2': 43 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-21.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-21.rq new file mode 100644 index 00000000000..9d8ce958922 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-21.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p ?list . + + BIND( cdt:get(?list,1) AS ?e1 ) + BIND( cdt:get(?list,3) AS ?innerlist ) + BIND( cdt:get(?innerlist,1) AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 = ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-21.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-21.ttl new file mode 100644 index 00000000000..081108e9bfe --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-21.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p "[_:b, 42, [_:b] ]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-22.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-22.rq new file mode 100644 index 00000000000..475e111f0a3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-22.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p ?map . + + BIND( cdt:get(?map,'1') AS ?e1 ) + BIND( cdt:get(?map,'3') AS ?innermap ) + BIND( cdt:get(?innermap,'4') AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 = ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-22.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-22.ttl new file mode 100644 index 00000000000..a203de82c9b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-22.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p "{ '1': _:b, '2': 42, '3': {'4': _:b} }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-23.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-23.rq new file mode 100644 index 00000000000..52d3753acd4 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-23.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p ?list . + + BIND( cdt:get(?list,1) AS ?e1 ) + BIND( cdt:get(?list,3) AS ?innerlist ) + BIND( cdt:get(?innerlist,1) AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 != ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-23.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-23.ttl new file mode 100644 index 00000000000..ca1ec509c7d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-23.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p "[_:b1, 42, [_:b2] ]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-24.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-24.rq new file mode 100644 index 00000000000..e38b5dfa972 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-24.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p ?map . + + BIND( cdt:get(?map,'1') AS ?e1 ) + BIND( cdt:get(?map,'3') AS ?innermap ) + BIND( cdt:get(?innermap,'4') AS ?e3 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e3) ) + FILTER( ?e1 != ?e3 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-24.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-24.ttl new file mode 100644 index 00000000000..e9094880c5f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-24.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p "{ '1': _:b1, '2': 42, '3': {'4': _:b2} }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-25.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-25.rq new file mode 100644 index 00000000000..773ee2b1cef --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-25.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ?s ex:p ?list . + + BIND( cdt:get(?list,1) AS ?innerlist ) + BIND( cdt:get(?innerlist,1) AS ?e1 ) + + FILTER( isBLANK(?s) ) + FILTER( isBLANK(?e1) ) + FILTER( ?s = ?e1 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-25.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-25.ttl new file mode 100644 index 00000000000..219352750ab --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-25.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +_:b ex:p " [ [_:b], 42]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-26.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-26.rq new file mode 100644 index 00000000000..3c6d05d6ef1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-26.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ?s ex:p ?map . + + BIND( cdt:get(?map,'1') AS ?innermap ) + BIND( cdt:get(?innermap,'3') AS ?e1 ) + + FILTER( isBLANK(?s) ) + FILTER( isBLANK(?e1) ) + FILTER( ?s = ?e1 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-26.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-26.ttl new file mode 100644 index 00000000000..3ed6ba200df --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-26.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +_:b ex:p "{ '1': {'3': _:b}, '2': 42 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-27.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-27.rq new file mode 100644 index 00000000000..3889700951e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-27.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ?s ex:p ?list . + + BIND( cdt:get(?list,1) AS ?innerlist ) + BIND( cdt:get(?innerlist,1) AS ?e1 ) + + FILTER( isBLANK(?s) ) + FILTER( isBLANK(?e1) ) + FILTER( ?s != ?e1 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-27.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-27.ttl new file mode 100644 index 00000000000..ea8e4ec6db0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-27.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +_:b1 ex:p "[ [_:b2], 42]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-28.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-28.rq new file mode 100644 index 00000000000..938b214449f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-28.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ?s ex:p ?map . + + BIND( cdt:get(?map,'1') AS ?innermap ) + BIND( cdt:get(?innermap,'3') AS ?e1 ) + + FILTER( isBLANK(?s) ) + FILTER( isBLANK(?e1) ) + FILTER( ?s != ?e1 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-28.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-28.ttl new file mode 100644 index 00000000000..dc0498b184e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-28.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +_:b1 ex:p "{ '1': {'3': _:b2}, '2': 42 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-29.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-29.rq new file mode 100644 index 00000000000..7ee3e301649 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-29.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?list1 . + ex:s ex:p2 ?list2 . + + BIND( cdt:get(?list1,1) AS ?e1 ) + BIND( cdt:get(?list2,1) AS ?innerlist ) + BIND( cdt:get(?innerlist,1) AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 = ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-29.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-29.ttl new file mode 100644 index 00000000000..80e3b3c5860 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-29.ttl @@ -0,0 +1,8 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "[_:b, 42]"^^cdt:List . +ex:s ex:p2 "[ [_:b], 43]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-30.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-30.rq new file mode 100644 index 00000000000..54e37e63d1e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-30.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?map1 . + ex:s ex:p2 ?map2 . + + BIND( cdt:get(?map1,'1') AS ?e1 ) + BIND( cdt:get(?map2,'1') AS ?innermap ) + BIND( cdt:get(?innermap,'3') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 = ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-30.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-30.ttl new file mode 100644 index 00000000000..b5e116b8dfd --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-30.ttl @@ -0,0 +1,8 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "{ '1': _:b, '2': 42 }"^^cdt:Map . +ex:s ex:p2 "{ '1': {'3': _:b}, '2': 43 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-31.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-31.rq new file mode 100644 index 00000000000..cbbd4379c9e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-31.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?list1 . + ex:s ex:p2 ?list2 . + + BIND( cdt:get(?list1,1) AS ?e1 ) + BIND( cdt:get(?list2,1) AS ?innerlist ) + BIND( cdt:get(?innerlist,1) AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-31.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-31.ttl new file mode 100644 index 00000000000..09bb8e49691 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-31.ttl @@ -0,0 +1,8 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "[_:b1, 42]"^^cdt:List . +ex:s ex:p2 "[ [_:b2], 43]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-32.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-32.rq new file mode 100644 index 00000000000..9d5d1b22cac --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-32.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + ex:s ex:p1 ?map1 . + ex:s ex:p2 ?map2 . + + BIND( cdt:get(?map1,'1') AS ?e1 ) + BIND( cdt:get(?map2,'1') AS ?innermap ) + BIND( cdt:get(?innermap,'3') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-32.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-32.ttl new file mode 100644 index 00000000000..dd63fb29ba5 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-32.ttl @@ -0,0 +1,8 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "{ '1': _:b1, '2': 42 }"^^cdt:Map . +ex:s ex:p2 "{ '1': {'3': _:b2}, '2': 43 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-41.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-41.ttl new file mode 100644 index 00000000000..ae81042e19c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-41.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p "[_:b, 42, '[_:b]'^^ ]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-42.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-42.ttl new file mode 100644 index 00000000000..d2976d8b6c3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-42.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p """{ '1': _:b, '2': 42, '3': "{'4': _:b}"^^ }"""^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-43.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-43.ttl new file mode 100644 index 00000000000..3d5bf351cb7 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-43.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p "[_:b1, 42, '[_:b2]'^^ ]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-44.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-44.ttl new file mode 100644 index 00000000000..8e9f25f47e6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-44.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p """{ '1': _:b1, '2': 42, '3': "{'4': _:b2}"^^ }"""^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-45.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-45.ttl new file mode 100644 index 00000000000..0d5cff1a03c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-45.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +_:b ex:p "[ '[_:b]'^^, 42]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-46.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-46.ttl new file mode 100644 index 00000000000..ec80c1fbe20 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-46.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +_:b ex:p """{ '1': "{'3': _:b}"^^, '2': 42 }"""^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-47.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-47.ttl new file mode 100644 index 00000000000..02da47e903f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-47.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +_:b1 ex:p "[ '[_:b2]'^^, 42]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-48.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-48.ttl new file mode 100644 index 00000000000..6d22ca06b75 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-48.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +_:b1 ex:p """{ '1': "{'3': _:b2}"^^, '2': 42 }"""^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-49.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-49.ttl new file mode 100644 index 00000000000..3923af01254 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-49.ttl @@ -0,0 +1,8 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "[_:b, 42]"^^cdt:List . +ex:s ex:p2 "[ '[_:b]'^^, 43]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-50.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-50.ttl new file mode 100644 index 00000000000..77364e76c80 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-50.ttl @@ -0,0 +1,8 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "{ '1': _:b, '2': 42 }"^^cdt:Map . +ex:s ex:p2 """{ '1': "{'3': _:b}"^^, '2': 43 }"""^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-51.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-51.ttl new file mode 100644 index 00000000000..99d0674cf44 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-51.ttl @@ -0,0 +1,8 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "[_:b1, 42]"^^cdt:List . +ex:s ex:p2 "[ '[_:b2]'^^, 43]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-52.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-52.ttl new file mode 100644 index 00000000000..a19b160ef85 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-52.ttl @@ -0,0 +1,8 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p1 "{ '1': _:b1, '2': 42 }"^^cdt:Map . +ex:s ex:p2 """{ '1': "{'3': _:b2}"^^, '2': 43 }"""^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-01.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-01.rq new file mode 100644 index 00000000000..144f722b48d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-01.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[_:b, 42]"^^cdt:List AS ?list1 ) + ex:s ex:p ?list2 . + + BIND( cdt:get(?list1,1) AS ?e1 ) + BIND( cdt:get(?list2,1) AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-01.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-01.ttl new file mode 100644 index 00000000000..e46c2ca5c0e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-01.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p "[_:b, 42]"^^cdt:List . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-02.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-02.rq new file mode 100644 index 00000000000..cdca76e68ac --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-02.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "{ '1': _:b, '2': 42 }"^^cdt:Map AS ?map1 ) + ex:s ex:p ?map2 . + + BIND( cdt:get(?map1,'1') AS ?e1 ) + BIND( cdt:get(?map2,'1') AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ?e1 != ?e2 ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-02.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-02.ttl new file mode 100644 index 00000000000..badff0fccc2 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-02.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p "{ '1': _:b, '2': 43 }"^^cdt:Map . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-03.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-03.rq new file mode 100644 index 00000000000..0b4097da294 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-03.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "[_:b, 42]"^^cdt:List AS ?list ) + ex:s ex:p ?bn . + + BIND( cdt:get(?list,1) AS ?e1 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?bn) ) + FILTER( ?e1 != ?bn ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-03.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-03.ttl new file mode 100644 index 00000000000..d4fb3570e11 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-03.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p _:b . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-04.rq b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-04.rq new file mode 100644 index 00000000000..822b971d84b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-04.rq @@ -0,0 +1,13 @@ +PREFIX cdt: +PREFIX ex: + +ASK { + BIND( "{ '1': _:b, '2': 42 }"^^cdt:Map AS ?map ) + ex:s ex:p ?bn . + + BIND( cdt:get(?map,'1') AS ?e1 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?bn) ) + FILTER( ?e1 != ?bn ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-04.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-04.ttl new file mode 100644 index 00000000000..d4fb3570e11 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/bnodes-turtle-sparql-04.ttl @@ -0,0 +1,7 @@ +PREFIX rdf: +PREFIX rdfs: +PREFIX xsd: +PREFIX cdt: +PREFIX ex: + +ex:s ex:p _:b . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/empty.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/empty.ttl new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/manifest.ttl b/jena-arq/testing/SPARQL-CDTs/bnodes/manifest.ttl new file mode 100644 index 00000000000..b026ae1cb25 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/manifest.ttl @@ -0,0 +1,749 @@ +@prefix rdf: . +@prefix : . +@prefix rdfs: . +@prefix mf: . +@prefix qt: . +@prefix dawgt: . +@prefix sparql: . +@prefix cdt: . + +<> rdf:type mf:Manifest ; + rdfs:label "Handling of blank nodes in CDT literals" ; + mf:entries + ( + :bnodes-turtle-01 + :bnodes-turtle-02 + :bnodes-turtle-03 + :bnodes-turtle-04 + :bnodes-turtle-05 + :bnodes-turtle-06 + :bnodes-turtle-07 + :bnodes-turtle-08 + :bnodes-turtle-09 + :bnodes-turtle-10 + :bnodes-turtle-11 + :bnodes-turtle-12 + :bnodes-turtle-13 + :bnodes-turtle-14 + :bnodes-turtle-15 + :bnodes-turtle-16 + :bnodes-turtle-17 + :bnodes-turtle-18 + :bnodes-turtle-19 + + :bnodes-turtle-21 + :bnodes-turtle-22 + :bnodes-turtle-23 + :bnodes-turtle-24 + :bnodes-turtle-25 + :bnodes-turtle-26 + :bnodes-turtle-27 + :bnodes-turtle-28 + :bnodes-turtle-29 + :bnodes-turtle-30 + :bnodes-turtle-31 + :bnodes-turtle-32 + + :bnodes-turtle-41 + :bnodes-turtle-42 + :bnodes-turtle-43 + :bnodes-turtle-44 + :bnodes-turtle-45 + :bnodes-turtle-46 + :bnodes-turtle-47 + :bnodes-turtle-48 + :bnodes-turtle-49 + :bnodes-turtle-50 + :bnodes-turtle-51 + :bnodes-turtle-52 + + :bnodes-sparql-01 + :bnodes-sparql-02 + :bnodes-sparql-03 + :bnodes-sparql-04 + :bnodes-sparql-05 + :bnodes-sparql-06 + :bnodes-sparql-07 + :bnodes-sparql-08 + :bnodes-sparql-09 + + :bnodes-sparql-11 + :bnodes-sparql-12 + :bnodes-sparql-13 + :bnodes-sparql-14 + :bnodes-sparql-15 + :bnodes-sparql-16 + :bnodes-sparql-17 + :bnodes-sparql-18 + + :bnodes-sparql-21 + :bnodes-sparql-22 + :bnodes-sparql-23 + :bnodes-sparql-24 + :bnodes-sparql-25 + :bnodes-sparql-26 + :bnodes-sparql-27 + :bnodes-sparql-28 + + :bnodes-turtle-sparql-01 + :bnodes-turtle-sparql-02 + :bnodes-turtle-sparql-03 + :bnodes-turtle-sparql-04 + ) . + +:bnodes-turtle-01 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-01" ; + rdfs:comment "same blank node identifier twice within a cdt:List literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-02 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-02" ; + rdfs:comment "same blank node identifier twice within a cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-03 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-03" ; + rdfs:comment "different blank node identifiers within a cdt:List literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-04 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-04" ; + rdfs:comment "different blank node identifiers within a cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-05 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-05" ; + rdfs:comment "same blank node identifier both within a cdt:List literal and outside of the literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-06 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-06" ; + rdfs:comment "same blank node identifier both within a cdt:Map literal and outside of the literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-07 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-07" ; + rdfs:comment "different blank node identifiers within a cdt:List literal and outside of the literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-08 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-08" ; + rdfs:comment "different blank node identifiers within a cdt:Map literal and outside of the literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-09 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-09" ; + rdfs:comment "same blank node identifier within two different cdt:List literals" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-10 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-10" ; + rdfs:comment "same blank node identifier within two different cdt:Map literals" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-11 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-11" ; + rdfs:comment "different blank node identifiers within two different cdt:List literals" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-12 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-12" ; + rdfs:comment "different blank node identifiers within two different cdt:Map literals" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-13 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-13" ; + rdfs:comment "same blank node identifier both within a cdt:List literal and a cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-14 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-14" ; + rdfs:comment "different blank node identifiers within a cdt:List literal and a cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-15 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-15" ; + rdfs:comment "same blank node identifier within cdt:List literals in two different files" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data , + ; + qt:query ] ; + mf:result . + +:bnodes-turtle-16 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-16" ; + rdfs:comment "same blank node identifier within cdt:Map literals in two different files" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data , + ; + qt:query ] ; + mf:result . + +:bnodes-turtle-17 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-17" ; + rdfs:comment "same blank node identifier within a cdt:List literal in one file and outside of literals in another file" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data , + ; + qt:query ] ; + mf:result . + +:bnodes-turtle-18 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-18" ; + rdfs:comment "same blank node identifier within a cdt:Map literal in one file and outside of literals in another file" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data , + ; + qt:query ] ; + mf:result . + +:bnodes-turtle-19 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-19" ; + rdfs:comment "same blank node identifier within a cdt:List literal in one file and within a cdt:Map literal in another file" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data , + ; + qt:query ] ; + mf:result . + +:bnodes-turtle-21 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-21" ; + rdfs:comment "same blank node identifier twice within a *nested* cdt:List literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-22 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-22" ; + rdfs:comment "same blank node identifier twice within a *nested* cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-23 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-23" ; + rdfs:comment "different blank node identifiers within a *nested* cdt:List literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-24 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-24" ; + rdfs:comment "different blank node identifiers within a *nested* cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-25 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-25" ; + rdfs:comment "same blank node identifier both within a *nested* cdt:List literal and outside of the literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-26 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-26" ; + rdfs:comment "same blank node identifier both within a *nested* cdt:Map literal and outside of the literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-27 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-27" ; + rdfs:comment "different blank node identifiers within a *nested* cdt:List literal and outside of the literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-28 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-28" ; + rdfs:comment "different blank node identifiers within a *nested* cdt:Map literal and outside of the literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-29 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-29" ; + rdfs:comment "same blank node identifier within two different cdt:List literals, where one of them is nested" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-30 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-30" ; + rdfs:comment "same blank node identifier within two different cdt:Map literals, where one of them is nested" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-31 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-31" ; + rdfs:comment "different blank node identifiers within two different cdt:List literals, where one of them is nested" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-32 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-32" ; + rdfs:comment "different blank node identifiers within two different cdt:Map literals, where one of them is nested" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-41 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-41" ; + rdfs:comment "same blank node identifier twice within a *nested* cdt:List literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-42 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-42" ; + rdfs:comment "same blank node identifier twice within a *nested* cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-43 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-43" ; + rdfs:comment "different blank node identifiers within a *nested* cdt:List literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-44 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-44" ; + rdfs:comment "different blank node identifiers within a *nested* cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-45 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-45" ; + rdfs:comment "same blank node identifier both within a *nested* cdt:List literal and outside of the literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-46 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-46" ; + rdfs:comment "same blank node identifier both within a *nested* cdt:Map literal and outside of the literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-47 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-47" ; + rdfs:comment "different blank node identifiers within a *nested* cdt:List literal and outside of the literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-48 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-48" ; + rdfs:comment "different blank node identifiers within a *nested* cdt:Map literal and outside of the literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-49 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-49" ; + rdfs:comment "same blank node identifier within two different cdt:List literals, where one of them is nested" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-50 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-50" ; + rdfs:comment "same blank node identifier within two different cdt:Map literals, where one of them is nested" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-51 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-51" ; + rdfs:comment "different blank node identifiers within two different cdt:List literals, where one of them is nested" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-52 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-52" ; + rdfs:comment "different blank node identifiers within two different cdt:Map literals, where one of them is nested" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + + + +:bnodes-sparql-01 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-01" ; + rdfs:comment "same blank node identifier twice within a cdt:List literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-02 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-02" ; + rdfs:comment "same blank node identifier twice within a cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-03 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-03" ; + rdfs:comment "two different blank node identifiers within a cdt:List literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-04 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-04" ; + rdfs:comment "two different blank node identifiers within a cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-05 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-05" ; + rdfs:comment "same blank node identifier within two different cdt:List literals" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-06 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-06" ; + rdfs:comment "same blank node identifier within two different cdt:Map literals" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-07 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-07" ; + rdfs:comment "different blank node identifiers within two different cdt:List literals" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-08 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-08" ; + rdfs:comment "different blank node identifiers within two different cdt:Map literals" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-09 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-09" ; + rdfs:comment "same blank node identifier, once within a cdt:List literal and once within a cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-11 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-11" ; + rdfs:comment "same blank node identifier twice within a *nested* cdt:List literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-12 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-12" ; + rdfs:comment "same blank node identifier twice within a *nested* cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-13 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-13" ; + rdfs:comment "two different blank node identifiers within a *nested* cdt:List literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-14 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-14" ; + rdfs:comment "two different blank node identifiers within a *nested* cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-15 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-15" ; + rdfs:comment "same blank node identifier within two different cdt:List literals, where one of them is a nested one" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-16 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-16" ; + rdfs:comment "same blank node identifier within two different cdt:Map literals, where one of them is a nested one" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-17 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-17" ; + rdfs:comment "different blank node identifiers within two different cdt:List literals, where one of them is a nested one" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-18 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-18" ; + rdfs:comment "different blank node identifiers within two different cdt:Map literals, where one of them is a nested one" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-21 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-21" ; + rdfs:comment "same blank node identifier twice within a *nested* cdt:List literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-22 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-22" ; + rdfs:comment "same blank node identifier twice within a *nested* cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-23 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-23" ; + rdfs:comment "two different blank node identifiers within a *nested* cdt:List literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-24 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-24" ; + rdfs:comment "two different blank node identifiers within a *nested* cdt:Map literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-25 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-25" ; + rdfs:comment "same blank node identifier within two different cdt:List literals, where one of them is a nested one" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-26 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-26" ; + rdfs:comment "same blank node identifier within two different cdt:Map literals, where one of them is a nested one" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-27 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-27" ; + rdfs:comment "different blank node identifiers within two different cdt:List literals, where one of them is a nested one" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-sparql-28 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-sparql-28" ; + rdfs:comment "different blank node identifiers within two different cdt:Map literals, where one of them is a nested one" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + + + +:bnodes-turtle-sparql-01 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-sparql-01" ; + rdfs:comment "same blank node identifier both within a cdt:List literal in a Turtle file and within a cdt:List literal in the SPARQL query" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-sparql-02 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-sparql-02" ; + rdfs:comment "same blank node identifier both within a cdt:Map literal in a Turtle file and within a cdt:Map literal in the SPARQL query" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-sparql-03 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-sparql-03" ; + rdfs:comment "same blank node identifier both within a cdt:List literal in the SPARQL query and outside of literals in a Turtle file" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . + +:bnodes-turtle-sparql-04 rdf:type mf:QueryEvaluationTest ; + mf:name "bnodes-turtle-sparql-04" ; + rdfs:comment "same blank node identifier both within a cdt:Map literal in the SPARQL query and outside of literals in a Turtle file" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:data ; + qt:query ] ; + mf:result . diff --git a/jena-arq/testing/SPARQL-CDTs/bnodes/true.srx b/jena-arq/testing/SPARQL-CDTs/bnodes/true.srx new file mode 100644 index 00000000000..c187f066ab1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/bnodes/true.srx @@ -0,0 +1,5 @@ + + + + true + diff --git a/jena-arq/testing/SPARQL-CDTs/fold/empty.ttl b/jena-arq/testing/SPARQL-CDTs/fold/empty.ttl new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-01.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-01.rq new file mode 100644 index 00000000000..d6fdf304f64 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-01.rq @@ -0,0 +1,11 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?v) AS ?list) + WHERE { + VALUES ?v { 1 } + } + } + FILTER(?list = "[1]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-02.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-02.rq new file mode 100644 index 00000000000..9ed294fac36 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-02.rq @@ -0,0 +1,11 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?v) AS ?list) + WHERE { + FILTER(false) + } + } + FILTER(?list = "[]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-03.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-03.rq new file mode 100644 index 00000000000..019f5bf5ecf --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-03.rq @@ -0,0 +1,15 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?v) AS ?list) + WHERE { + VALUES ?v { 1 2 } + } + } + FILTER( + (cdt:get(?list, 1) = 1 && cdt:get(?list, 2) = 2) + || + (cdt:get(?list, 1) = 2 && cdt:get(?list, 2) = 1) + ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-04.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-04.rq new file mode 100644 index 00000000000..86fb69e3ecb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-04.rq @@ -0,0 +1,21 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?v) AS ?list) + WHERE { + VALUES ?v { 1 UNDEF } + } + } + + FILTER( cdt:size(?list) = 2 ) + + BIND( cdt:get(?list, 1) AS ?e1 ) + BIND( cdt:get(?list, 2) AS ?e2 ) + + FILTER( + ( ?e1 = 1 && ! BOUND(?e2) ) + || + ( ?e2 = 1 && ! BOUND(?e1) ) + ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-05.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-05.rq new file mode 100644 index 00000000000..d1ce9e51bd3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-05.rq @@ -0,0 +1,24 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?v) AS ?list) + WHERE { + VALUES ?v { 1 UNDEF UNDEF } + } + } + + FILTER( cdt:size(?list) = 3 ) + + BIND( cdt:get(?list, 1) AS ?e1 ) + BIND( cdt:get(?list, 2) AS ?e2 ) + BIND( cdt:get(?list, 3) AS ?e3 ) + + FILTER( + ( ?e1 = 1 && ! BOUND(?e2) && ! BOUND(?e3) ) + || + ( ?e2 = 1 && ! BOUND(?e1) && ! BOUND(?e3) ) + || + ( ?e3 = 1 && ! BOUND(?e1) && ! BOUND(?e2) ) + ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-01.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-01.rq new file mode 100644 index 00000000000..1378cc1cc79 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-01.rq @@ -0,0 +1,11 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(DISTINCT ?v) AS ?list) + WHERE { + VALUES ?v { 1 1 } + } + } + FILTER(?list = "[1]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-02.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-02.rq new file mode 100644 index 00000000000..6f6c04db7d1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-02.rq @@ -0,0 +1,18 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(DISTINCT ?v) AS ?list) + WHERE { + VALUES ?v { 1 2 1 } + } + } + + FILTER( cdt:size(?list) = 2 ) + + FILTER( + (cdt:get(?list, 1) = 1 && cdt:get(?list, 2) = 2) + || + (cdt:get(?list, 1) = 2 && cdt:get(?list, 2) = 1) + ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-03.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-03.rq new file mode 100644 index 00000000000..94a338a0ebf --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-03.rq @@ -0,0 +1,18 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(DISTINCT ?v) AS ?list) + WHERE { + VALUES ?v { 1 1 2 } + } + } + + FILTER( cdt:size(?list) = 2 ) + + FILTER( + (cdt:get(?list, 1) = 1 && cdt:get(?list, 2) = 2) + || + (cdt:get(?list, 1) = 2 && cdt:get(?list, 2) = 1) + ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-04.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-04.rq new file mode 100644 index 00000000000..2673de51329 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-04.rq @@ -0,0 +1,21 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(DISTINCT ?v) AS ?list) + WHERE { + VALUES ?v { 1 1 UNDEF } + } + } + + FILTER( cdt:size(?list) = 2 ) + + BIND( cdt:get(?list, 1) AS ?e1 ) + BIND( cdt:get(?list, 2) AS ?e2 ) + + FILTER( + ( ?e1 = 1 && ! BOUND(?e2) ) + || + ( ?e2 = 1 && ! BOUND(?e1) ) + ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-05.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-05.rq new file mode 100644 index 00000000000..1dbe33acae1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-05.rq @@ -0,0 +1,21 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(DISTINCT ?v) AS ?list) + WHERE { + VALUES ?v { 1 UNDEF UNDEF } + } + } + + FILTER( cdt:size(?list) = 2 ) + + BIND( cdt:get(?list, 1) AS ?e1 ) + BIND( cdt:get(?list, 2) AS ?e2 ) + + FILTER( + ( ?e1 = 1 && ! BOUND(?e2) ) + || + ( ?e2 = 1 && ! BOUND(?e1) ) + ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-06.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-06.rq new file mode 100644 index 00000000000..e9ec655bc0d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-06.rq @@ -0,0 +1,21 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(DISTINCT ?v) AS ?list) + WHERE { + VALUES ?v { 1 UNDEF UNDEF 1 } + } + } + + FILTER( cdt:size(?list) = 2 ) + + BIND( cdt:get(?list, 1) AS ?e1 ) + BIND( cdt:get(?list, 2) AS ?e2 ) + + FILTER( + ( ?e1 = 1 && ! BOUND(?e2) ) + || + ( ?e2 = 1 && ! BOUND(?e1) ) + ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-07.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-07.rq new file mode 100644 index 00000000000..8bdd1aa9918 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-07.rq @@ -0,0 +1,22 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT (FOLD(DISTINCT ?v) AS ?list) + WHERE { + VALUES ?v { "1"^^xsd:integer "01"^^xsd:integer } + } + } + + FILTER( cdt:size(?list) = 2 ) + + BIND( cdt:get(?list, 1) AS ?e1 ) + BIND( cdt:get(?list, 2) AS ?e2 ) + + FILTER( + ( SAMETERM(?e1,"1"^^xsd:integer) && SAMETERM(?e2,"01"^^xsd:integer) ) + || + ( SAMETERM(?e2,"1"^^xsd:integer) && SAMETERM(?e1,"01"^^xsd:integer) ) + ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-08.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-08.rq new file mode 100644 index 00000000000..3431aaaf876 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-08.rq @@ -0,0 +1,22 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT (FOLD(DISTINCT ?v) AS ?list) + WHERE { + VALUES ?v { "1"^^xsd:integer "01"^^xsd:integer "1"^^xsd:integer "01"^^xsd:integer } + } + } + + FILTER( cdt:size(?list) = 2 ) + + BIND( cdt:get(?list, 1) AS ?e1 ) + BIND( cdt:get(?list, 2) AS ?e2 ) + + FILTER( + ( SAMETERM(?e1,"1"^^xsd:integer) && SAMETERM(?e2,"01"^^xsd:integer) ) + || + ( SAMETERM(?e2,"1"^^xsd:integer) && SAMETERM(?e1,"01"^^xsd:integer) ) + ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-orderby-01.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-orderby-01.rq new file mode 100644 index 00000000000..3952a58a43f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-orderby-01.rq @@ -0,0 +1,31 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(DISTINCT ?v ORDER BY ASC(?sort)) AS ?list) + WHERE { + VALUES (?sort ?v) { + (1 1) + (3 3) + (2 2) + (2 2) + (3 4) + } + } + } + + FILTER( cdt:size(?list) = 4 ) + + BIND( cdt:get(?list, 1) AS ?e1 ) + BIND( cdt:get(?list, 2) AS ?e2 ) + BIND( cdt:get(?list, 3) AS ?e3 ) + BIND( cdt:get(?list, 4) AS ?e4 ) + + FILTER( ?e1 = 1 ) + FILTER( ?e2 = 2 ) + FILTER( + ( (?e3=3) && (?e4=4) ) + || + ( (?e3=4) && (?e4=3) ) + ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-orderby-02.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-orderby-02.rq new file mode 100644 index 00000000000..71423fd357d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-orderby-02.rq @@ -0,0 +1,22 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(DISTINCT ?v ORDER BY ASC(?sort)) AS ?list) + WHERE { + VALUES (?sort ?v ?other) { + (1 1 "same") + (1 1 "same") + + (3 3 "same") + (3 3 "same") + (3 3 "different") + + (2 2 "different a") + (2 2 "different b") + } + } + } + + FILTER(?list = "[1,2,3]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-orderby-03.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-orderby-03.rq new file mode 100644 index 00000000000..669d31eb648 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-distinct-orderby-03.rq @@ -0,0 +1,40 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(DISTINCT ?v ORDER BY ASC(?sort)) AS ?list) + WHERE { + VALUES (?sort ?v) { + (2 UNDEF) + (1 3) + (UNDEF "same") # duplicate 1 + (3 5) + (UNDEF "same") # duplicate 1 + (4 6) # duplicate 2 + (UNDEF "different") + (4 6) # duplicate 2 + } + } + } + + FILTER( cdt:size(?list) = 6 ) + + BIND( cdt:get(?list, 1) AS ?e1 ) + BIND( cdt:get(?list, 2) AS ?e2 ) + BIND( cdt:get(?list, 3) AS ?e3 ) + BIND( cdt:get(?list, 4) AS ?e4 ) + BIND( cdt:get(?list, 5) AS ?e5 ) + BIND( cdt:get(?list, 6) AS ?e6 ) + + FILTER( + ( (?e1="same") && (?e2="different") ) + || + ( (?e2="same") && (?e1="different") ) + ) + + FILTER( ?e3 = 3 ) + FILTER( ! BOUND(?e4) ) + FILTER( ?e5 = 5 ) + FILTER( ?e6 = 6 ) + +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-01.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-01.rq new file mode 100644 index 00000000000..ac68545f906 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-01.rq @@ -0,0 +1,11 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?v ORDER BY ?v) AS ?list) + WHERE { + VALUES ?v { 1 2 3 6 5 4 } + } + } + FILTER(?list = "[1,2,3,4,5,6]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-02.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-02.rq new file mode 100644 index 00000000000..244ccff8274 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-02.rq @@ -0,0 +1,11 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?v ORDER BY ?sort) AS ?list) + WHERE { + VALUES (?sort ?v) { (1 1) (3 2) (2 3) } + } + } + FILTER(?list = "[1,3,2]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-03.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-03.rq new file mode 100644 index 00000000000..f29540e0076 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-03.rq @@ -0,0 +1,15 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?v ORDER BY DESC(?sort)) AS ?list) + WHERE { + VALUES (?sort ?v) { + (1 "one") + (2 "two") + (3 "three") + } + } + } + FILTER(?list = "['three','two','one']"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-04.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-04.rq new file mode 100644 index 00000000000..6b8dd588cc3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-04.rq @@ -0,0 +1,18 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?v ORDER BY ASC(?sort)) AS ?list) + WHERE { + VALUES (?sort ?v) { + (1 1) + (3 3) + (2 UNDEF) + } + } + } + FILTER(cdt:get(?list, 1) = 1) + FILTER(cdt:get(?list, 3) = 3) + BIND(cdt:get(?list, 2) AS ?null) + FILTER(!BOUND(?null)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-05.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-05.rq new file mode 100644 index 00000000000..552da7f42b1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-05.rq @@ -0,0 +1,15 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?v ORDER BY ASC(?sort)) AS ?list) + WHERE { + VALUES (?sort ?v) { + ( 3) + ("literal" 4) + (UNDEF 1) + } + } + } + FILTER(?list = "[1,3,4]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-06.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-06.rq new file mode 100644 index 00000000000..fece86254d0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-list-orderby-06.rq @@ -0,0 +1,16 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?v ORDER BY ASC(?sort1) ASC(?sort2)) AS ?list) + WHERE { + VALUES (?sort1 ?sort2 ?v) { + (2 2 "three") + (2 3 "four") + (2 1 "two") + (1 UNDEF "one") + } + } + } + FILTER(?list = "['one','two','three','four']"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-map-01.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-01.rq new file mode 100644 index 00000000000..04235a0dd41 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-01.rq @@ -0,0 +1,11 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?k, ?v) AS ?map) + WHERE { + FILTER(false) + } + } + FILTER(?map = "{}"^^cdt:Map) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-map-02.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-02.rq new file mode 100644 index 00000000000..ff88b4d87bf --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-02.rq @@ -0,0 +1,15 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?k, ?v) AS ?map) + WHERE { + VALUES (?k ?v) { + (2 "two") + (1 "one") + ("hello"@en "there"@en) + } + } + } + FILTER(?map = "{\"hello\"@en:'there'@en,1:'one',2:'two'}"^^cdt:Map) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-map-03.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-03.rq new file mode 100644 index 00000000000..6ff6d91bf1c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-03.rq @@ -0,0 +1,19 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?k, ?v) AS ?map) + WHERE { + VALUES (?k ?v) { + (2 UNDEF) + (1 "one") + ("hello"@en "there"@en) + } + } + } + + FILTER(cdt:get(?map, 1) = "one") + BIND(cdt:get(?map, 2) AS ?null) + FILTER(!BOUND(?null)) + FILTER(cdt:get(?map, 'hello'@en) = "there"@en) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-map-04.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-04.rq new file mode 100644 index 00000000000..a84aa97c266 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-04.rq @@ -0,0 +1,15 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?k, ?v) AS ?map) + WHERE { + VALUES (?k ?v) { + (UNDEF "two") + (1 "one") + ("hello"@en "there"@en) + } + } + } + FILTER(?map = "{\"hello\"@en:'there'@en,1:'one'}"^^cdt:Map) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-map-05.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-05.rq new file mode 100644 index 00000000000..bd898e79a6d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-05.rq @@ -0,0 +1,19 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?k, ?v) AS ?map) + WHERE { + { + BIND( BNODE() AS ?k ) + BIND( 1 AS ?v ) + } + UNION + { + BIND( 42 AS ?k ) + BIND( 2 AS ?v ) + } + } + } + FILTER(?map = "{42:2}"^^cdt:Map) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-map-06.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-06.rq new file mode 100644 index 00000000000..7a4ae6931d4 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-06.rq @@ -0,0 +1,15 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?k, ?v) AS ?map) + WHERE { + VALUES (?k ?v) { + (1 100) + (2 201) + (2 202) + } + } + } + FILTER( (?map = "{1:100, 2:201}"^^cdt:Map) || (?map = "{1:100, 2:202}"^^cdt:Map) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-map-orderby-01.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-orderby-01.rq new file mode 100644 index 00000000000..4d95047e05a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-orderby-01.rq @@ -0,0 +1,16 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?k, ?v ORDER BY ?sort) AS ?map) + WHERE { + VALUES (?k ?v ?sort) { + (1 100 "irrelevant") + (2 201 1) + (2 203 3) + (2 202 2) + } + } + } + FILTER( ?map = "{1:100, 2:203}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/fold-map-orderby-02.rq b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-orderby-02.rq new file mode 100644 index 00000000000..f4ab9f4795b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/fold-map-orderby-02.rq @@ -0,0 +1,16 @@ +PREFIX cdt: + +ASK { + { + SELECT (FOLD(?k, ?v ORDER BY DESC(?sort)) AS ?map) + WHERE { + VALUES (?k ?v ?sort) { + (1 100 "irrelevant") + (2 201 1) + (2 203 3) + (2 202 2) + } + } + } + FILTER( ?map = "{1:100, 2:201}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/fold/manifest.ttl b/jena-arq/testing/SPARQL-CDTs/fold/manifest.ttl new file mode 100644 index 00000000000..71d216486db --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/manifest.ttl @@ -0,0 +1,354 @@ +@prefix rdf: . +@prefix : . +@prefix rdfs: . +@prefix mf: . +@prefix qt: . +@prefix dawgt: . +@prefix sparql: . +@prefix cdt: . + +<> rdf:type mf:Manifest ; + rdfs:label "SPARQL FOLD operator" ; + mf:entries + ( + :fold-list-01 + :fold-list-02 + :fold-list-03 + :fold-list-04 + :fold-list-05 + + :fold-list-distinct-01 + :fold-list-distinct-02 + :fold-list-distinct-03 + :fold-list-distinct-04 + :fold-list-distinct-05 + :fold-list-distinct-06 + :fold-list-distinct-07 + :fold-list-distinct-08 + + :fold-list-orderby-01 + :fold-list-orderby-02 + :fold-list-orderby-03 + :fold-list-orderby-04 + :fold-list-orderby-05 + :fold-list-orderby-06 + + :fold-list-distinct-orderby-01 + :fold-list-distinct-orderby-02 + :fold-list-distinct-orderby-03 + + :fold-map-01 + :fold-map-02 + :fold-map-03 + :fold-map-04 + :fold-map-05 + :fold-map-06 + + :fold-map-orderby-01 + :fold-map-orderby-02 + ) . + +:fold-list-01 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-01" ; + rdfs:comment "FOLD a single value list" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-02 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-02" ; + rdfs:comment "FOLD on empty group" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-03 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-03" ; + rdfs:comment "FOLD with two elements but no ORDER BY" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-04 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-04" ; + rdfs:comment "FOLD with two elements, including an error" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-05 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-05" ; + rdfs:comment "FOLD with three elements, including two errors" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + + +:fold-list-distinct-01 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-distinct-01" ; + rdfs:comment "FOLD with DISTINCT" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-distinct-02 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-distinct-02" ; + rdfs:comment "FOLD with DISTINCT" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-distinct-03 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-distinct-03" ; + rdfs:comment "FOLD with DISTINCT" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-distinct-04 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-distinct-04" ; + rdfs:comment "FOLD with DISTINCT" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-distinct-05 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-distinct-05" ; + rdfs:comment "FOLD with DISTINCT" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-distinct-06 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-distinct-06" ; + rdfs:comment "FOLD with DISTINCT" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-distinct-07 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-distinct-07" ; + rdfs:comment "FOLD with DISTINCT" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-distinct-08 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-distinct-08" ; + rdfs:comment "FOLD with DISTINCT" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + + +:fold-list-orderby-01 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-orderby-01" ; + rdfs:comment "FOLD with ordering on the list member values" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-orderby-02 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-orderby-02" ; + rdfs:comment "FOLD with ordering on correlated values" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-orderby-03 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-orderby-03" ; + rdfs:comment "FOLD with descending ordering on correlated values" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-orderby-04 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-orderby-04" ; + rdfs:comment "FOLD with unbound elements" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-orderby-05 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-orderby-05" ; + rdfs:comment "FOLD with ORDER BY over different types of RDF terms" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-orderby-06 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-orderby-06" ; + rdfs:comment "FOLD with ORDER BY with two sort conditions" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + + +:fold-list-distinct-orderby-01 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-distinct-orderby-01" ; + rdfs:comment "FOLD with DISTINCT and ORDER BY" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-distinct-orderby-02 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-distinct-orderby-02" ; + rdfs:comment "FOLD with DISTINCT and ORDER BY" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-list-distinct-orderby-03 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-list-distinct-orderby-03" ; + rdfs:comment "FOLD with DISTINCT and ORDER BY" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + + +:fold-map-01 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-map-01" ; + rdfs:comment "FOLD on empty group" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-map-02 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-map-02" ; + rdfs:comment "FOLD pairs into map" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-map-03 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-map-03" ; + rdfs:comment "FOLD into map with unbound values" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-map-04 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-map-04" ; + rdfs:comment "FOLD into map with unbound keys" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-map-05 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-map-05" ; + rdfs:comment "FOLD into map with blank node as key" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-map-06 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-map-06" ; + rdfs:comment "FOLD into map with duplicate keys" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + + +:fold-map-orderby-01 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-map-orderby-01" ; + rdfs:comment "FOLD for maps with ORDER BY" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:fold-map-orderby-02 rdf:type mf:QueryEvaluationTest ; + mf:name "fold-map-orderby-02" ; + rdfs:comment "FOLD for maps with ORDER BY" ; + mf:feature cdt:fold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . diff --git a/jena-arq/testing/SPARQL-CDTs/fold/true.srx b/jena-arq/testing/SPARQL-CDTs/fold/true.srx new file mode 100644 index 00000000000..c187f066ab1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/fold/true.srx @@ -0,0 +1,5 @@ + + + + true + diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/concat-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-01.rq new file mode 100644 index 00000000000..bbb3b05ef37 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + +# empty lists +ASK { + BIND("[]"^^cdt:List AS ?empty) + BIND(cdt:concat(?empty, ?empty) AS ?result) + FILTER(?result = ?empty) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/concat-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-02.rq new file mode 100644 index 00000000000..e2bf264f4d3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-02.rq @@ -0,0 +1,10 @@ +PREFIX cdt: + + +# concat identity (lhs) +ASK { + BIND("[]"^^cdt:List AS ?empty) + BIND("[1]"^^cdt:List AS ?one) + BIND(cdt:concat(?empty, ?one) AS ?result) + FILTER(?result = ?one) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/concat-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-03.rq new file mode 100644 index 00000000000..9306bc8693f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-03.rq @@ -0,0 +1,10 @@ +PREFIX cdt: + + +# concat identity (rhs) +ASK { + BIND("[]"^^cdt:List AS ?empty) + BIND("[1]"^^cdt:List AS ?one) + BIND(cdt:concat(?one, ?empty) AS ?result) + FILTER(?result = ?one) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/concat-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-04.rq new file mode 100644 index 00000000000..3f5d77d2ca6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-04.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + + +# concat duplicate 1-element +ASK { + BIND("[1]"^^cdt:List AS ?one) + BIND(cdt:concat(?one, ?one) AS ?result) + FILTER(?result = "[1,1]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/concat-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-05.rq new file mode 100644 index 00000000000..58b63f93842 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-05.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + + +# concat duplicate 2-element +ASK { + BIND("[1, 2]"^^cdt:List AS ?list) + BIND(cdt:concat(?list, ?list) AS ?result) + FILTER(?result = "[1,2,1,2]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/concat-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-06.rq new file mode 100644 index 00000000000..fa1125742e4 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-06.rq @@ -0,0 +1,10 @@ +PREFIX cdt: + + +# concat different lists +ASK { + BIND("[1, 2]"^^cdt:List AS ?lhs) + BIND("[3, 4]"^^cdt:List AS ?rhs) + BIND(cdt:concat(?lhs, ?rhs) AS ?result) + FILTER(?result = "[1,2,3,4]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/concat-07.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-07.rq new file mode 100644 index 00000000000..e8c27da5580 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-07.rq @@ -0,0 +1,10 @@ +PREFIX cdt: + + +# concat nested lists +ASK { + BIND("[[1]]"^^cdt:List AS ?lhs) + BIND("[[2]]"^^cdt:List AS ?rhs) + BIND(cdt:concat(?lhs, ?rhs) AS ?result) + FILTER(?result = "[[1],[2]]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/concat-08.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-08.rq new file mode 100644 index 00000000000..4d7c47bcf01 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-08.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + + +# nullary concat +ASK { + BIND(cdt:concat() AS ?result) + FILTER(?result = "[]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/concat-09.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-09.rq new file mode 100644 index 00000000000..7d81767101d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-09.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + + +# unary concat +ASK { + BIND("[1]"^^cdt:List AS ?input) + BIND(cdt:concat(?input) AS ?result) + FILTER(?result = "[1]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/concat-10.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-10.rq new file mode 100644 index 00000000000..9807d411bdb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-10.rq @@ -0,0 +1,10 @@ +PREFIX cdt: + + +# ternary concat +ASK { + BIND("[1]"^^cdt:List AS ?list1) + BIND("[2,3]"^^cdt:List AS ?list2) + BIND(cdt:concat(?list1, ?list2, ?list1) AS ?result) + FILTER(?result = "[1,2,3,1]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/concat-error-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-error-01.rq new file mode 100644 index 00000000000..629ca62612f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-error-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + +ASK { + BIND("[]" AS ?noListLiteral) + BIND("[1]"^^cdt:List AS ?one) + BIND(cdt:concat(?noListLiteral, ?one) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/concat-error-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-error-02.rq new file mode 100644 index 00000000000..fc5c4c0fb69 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-error-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND("[]" AS ?noListLiteral) + BIND(cdt:concat(?noListLiteral) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/concat-null-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-null-01.rq new file mode 100644 index 00000000000..83b77d7ed81 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/concat-null-01.rq @@ -0,0 +1,14 @@ +PREFIX cdt: + +ASK { + BIND("[null]"^^cdt:List AS ?list) + BIND(cdt:concat(?list, ?list) AS ?result) + + FILTER(cdt:size(?result) = 2) + + BIND(cdt:get(?result,1) AS ?elm1) + FILTER(!BOUND(?elm1)) + + BIND(cdt:get(?result,2) AS ?elm2) + FILTER(!BOUND(?elm2)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/contains-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-01.rq new file mode 100644 index 00000000000..31cf52ede35 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +# empty lists +ASK { + BIND("[]"^^cdt:List AS ?list) + FILTER(!cdt:contains(?list, 1)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/contains-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-02.rq new file mode 100644 index 00000000000..52172f204a8 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: +# contains integer +ASK { + BIND("[1]"^^cdt:List AS ?list) + FILTER(cdt:contains(?list, 1)) + FILTER(!cdt:contains(?list, 2)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/contains-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-03.rq new file mode 100644 index 00000000000..56a4bc7b9cc --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-03.rq @@ -0,0 +1,22 @@ +PREFIX cdt: +PREFIX xsd: +# contains equality +ASK { + BIND("[1,'a','b'@en,2.0]"^^cdt:List AS ?list) + + # numeric forms + FILTER(cdt:contains(?list, 1)) + FILTER(cdt:contains(?list, "+1"^^xsd:integer)) + FILTER(cdt:contains(?list, "01"^^xsd:integer)) + FILTER(cdt:contains(?list, 1.0)) + FILTER(cdt:contains(?list, 1.0)) + FILTER(cdt:contains(?list, 1e0)) + FILTER(cdt:contains(?list, 2)) + FILTER(cdt:contains(?list, 2.0)) + FILTER(cdt:contains(?list, 2e0)) + + # string forms + FILTER(cdt:contains(?list, 'a')) + FILTER(cdt:contains(?list, 'b'@en)) + FILTER(!cdt:contains(?list, 'b')) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/contains-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-04.rq new file mode 100644 index 00000000000..2ba84d5248d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + +# contains IRIs +ASK { + BIND("[,1]"^^cdt:List AS ?list) + + FILTER(cdt:contains(?list, )) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/contains-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-05.rq new file mode 100644 index 00000000000..77856f16aaf --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-05.rq @@ -0,0 +1,11 @@ +PREFIX cdt: + +# contains blank nodes +ASK { + BIND("[_:b,null,'_:b']"^^cdt:List AS ?list) + BIND( BNODE() AS ?b ) + BIND( cdt:contains(?list, ?b) AS ?result ) + + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/contains-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-06.rq new file mode 100644 index 00000000000..d731c792496 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-06.rq @@ -0,0 +1,11 @@ +PREFIX cdt: + +# contains blank nodes +ASK { + BIND("[_:b,2]"^^cdt:List AS ?list) + BIND( cdt:head(?list) AS ?elmt) + BIND( cdt:contains(?list,?elmt) AS ?result ) + + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/contains-07.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-07.rq new file mode 100644 index 00000000000..2205d51ec6e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-07.rq @@ -0,0 +1,11 @@ +PREFIX cdt: + +# nested lists +ASK { + BIND("[1,[2]]"^^cdt:List AS ?list) + BIND("[2]"^^cdt:List AS ?list2) + + FILTER(cdt:contains(?list, 1)) + FILTER(!cdt:contains(?list, 2)) + FILTER(cdt:contains(?list, ?list2)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/contains-08.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-08.rq new file mode 100644 index 00000000000..b25666e7948 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-08.rq @@ -0,0 +1,11 @@ +PREFIX cdt: + +# nested lists given as literals +ASK { + BIND("[1,'[2]'^^]"^^cdt:List AS ?list) + BIND("[2]"^^cdt:List AS ?list2) + + FILTER(cdt:contains(?list, 1)) + FILTER(!cdt:contains(?list, 2)) + FILTER(cdt:contains(?list, ?list2)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/contains-09.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-09.rq new file mode 100644 index 00000000000..98ab9c6cd13 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-09.rq @@ -0,0 +1,12 @@ +PREFIX cdt: + +# nested lists +ASK { + BIND("[1,{2:3}]"^^cdt:List AS ?list) + BIND("{2:3}"^^cdt:Map AS ?map) + + FILTER(cdt:contains(?list, 1)) + FILTER(!cdt:contains(?list, 2)) + FILTER(!cdt:contains(?list, 3)) + FILTER(cdt:contains(?list, ?map)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/contains-10.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-10.rq new file mode 100644 index 00000000000..19f75b7d723 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-10.rq @@ -0,0 +1,12 @@ +PREFIX cdt: + +# nested lists given as literals +ASK { + BIND("[1,'{2:3}'^^]"^^cdt:List AS ?list) + BIND("{2:3}"^^cdt:Map AS ?map) + + FILTER(cdt:contains(?list, 1)) + FILTER(!cdt:contains(?list, 2)) + FILTER(!cdt:contains(?list, 3)) + FILTER(cdt:contains(?list, ?map)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/contains-error-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-error-01.rq new file mode 100644 index 00000000000..af072ad7137 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-error-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND("[1]" AS ?list) + BIND(cdt:contains(?list, 1) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/contains-null-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-null-01.rq new file mode 100644 index 00000000000..cf8c964aa6e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/contains-null-01.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +# empty lists +ASK { + BIND("[1,null,2]"^^cdt:List AS ?list) + FILTER(cdt:contains(?list, 1.0)) + FILTER(cdt:contains(?list, 2.0)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/empty.ttl b/jena-arq/testing/SPARQL-CDTs/list-functions/empty.ttl new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-01.rq new file mode 100644 index 00000000000..1853377956e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# list with one integer +ASK { + BIND("[1]"^^cdt:List AS ?list) + FILTER(cdt:get(?list, 1) = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-02.rq new file mode 100644 index 00000000000..c912a17a509 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: +# list with two integers +ASK { + BIND("[1, 3]"^^cdt:List AS ?list) + FILTER(cdt:get(?list, 1) = 1) + FILTER(cdt:get(?list, 2) = 3) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-03.rq new file mode 100644 index 00000000000..03e825ab768 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-03.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with one string +ASK { + BIND("['a']"^^cdt:List AS ?list) + FILTER(cdt:get(?list, 1) = 'a') +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-04.rq new file mode 100644 index 00000000000..02d5638f84c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: +# list with two strings +ASK { + BIND("['a', 'b']"^^cdt:List AS ?list) + FILTER(cdt:get(?list, 1) = 'a') + FILTER(cdt:get(?list, 2) = 'b') +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-05.rq new file mode 100644 index 00000000000..4e93e233f3e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-05.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: +# list with two mixed types +ASK { + BIND("['a', 1]"^^cdt:List AS ?list) + FILTER(cdt:get(?list, 1) = 'a') + FILTER(cdt:get(?list, 2) = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-06.rq new file mode 100644 index 00000000000..2e65a68c9ba --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-06.rq @@ -0,0 +1,11 @@ +PREFIX cdt: +PREFIX xsd: +# list with nested empty list +ASK { + BIND("[[]]"^^cdt:List AS ?list) + BIND((cdt:get(?list, 1)) AS ?l0) + BIND((cdt:get(?l0, 1)) AS ?l1) + FILTER(BOUND(?l0)) + FILTER(!BOUND(?l1)) + FILTER(?l0 = "[]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-07.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-07.rq new file mode 100644 index 00000000000..b7b6ce119d2 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-07.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: +# list with nested list with one integer +ASK { + BIND("[[1]]"^^cdt:List AS ?list) + BIND((cdt:get(?list, 1)) AS ?l0) + BIND((cdt:get(?l0, 1)) AS ?l1) + FILTER(?l1 = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-08.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-08.rq new file mode 100644 index 00000000000..a953f7996ee --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-08.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: +# list with mixed types including nested list +ASK { + BIND("[[1], 3]"^^cdt:List AS ?list) + BIND((cdt:get(?list, 1)) AS ?l0) + BIND((cdt:get(?l0, 1)) AS ?l1) + FILTER(?l1 = 1) + FILTER(cdt:get(?list, 2) = 3) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-09.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-09.rq new file mode 100644 index 00000000000..2172c821a90 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-09.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: +# list with mixed defined and undefined types +ASK { + BIND("[null, 3]"^^cdt:List AS ?list) + BIND((cdt:get(?list, 1)) AS ?l0) + FILTER(!BOUND(?l0)) + FILTER(cdt:get(?list, 2) = 3) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-10.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-10.rq new file mode 100644 index 00000000000..35c86c2a90c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-10.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "[_:b]"^^cdt:List AS ?list ) + BIND( cdt:get(?list, 1) AS ?e1 ) + + FILTER( isBLANK(?e1) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-11.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-11.rq new file mode 100644 index 00000000000..8f9d3c1019b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-11.rq @@ -0,0 +1,12 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "[_:b]"^^cdt:List AS ?list ) + BIND( cdt:get(?list, 1) AS ?e1 ) + BIND( cdt:get(?list, 1) AS ?e1Again ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e1Again) ) + FILTER( SAMETERM(?e1, ?e1Again) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-12.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-12.rq new file mode 100644 index 00000000000..6157a9d7a0b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-12.rq @@ -0,0 +1,12 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "[_:b,_:b]"^^cdt:List AS ?list ) + BIND( cdt:get(?list, 1) AS ?e1 ) + BIND( cdt:get(?list, 2) AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( SAMETERM(?e1, ?e2) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-13.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-13.rq new file mode 100644 index 00000000000..52171a40b65 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-13.rq @@ -0,0 +1,12 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "[_:b1,_:b2]"^^cdt:List AS ?list ) + BIND( cdt:get(?list, 1) AS ?e1 ) + BIND( cdt:get(?list, 2) AS ?e2 ) + + FILTER( isBLANK(?e1) ) + FILTER( isBLANK(?e2) ) + FILTER( ! SAMETERM(?e1, ?e2) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-01.rq new file mode 100644 index 00000000000..9959a1127de --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND("[1,2,3]" AS ?list) + BIND(cdt:get(?list, 1) AS ?element) + FILTER(!BOUND(?element)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-02.rq new file mode 100644 index 00000000000..29c589c6b54 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND("[1,2,3]"^^cdt:List AS ?list) + BIND(cdt:get(?list, 10) AS ?element) + FILTER(!BOUND(?element)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-03.rq new file mode 100644 index 00000000000..4202ba6b119 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-03.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND("[1,2,3]"^^cdt:List AS ?list) + BIND(cdt:get(?list, 0) AS ?element) + FILTER(!BOUND(?element)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-04.rq new file mode 100644 index 00000000000..cd8ef621d84 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-04.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND("[1,2,3]"^^cdt:List AS ?list) + BIND(cdt:get(?list, -1) AS ?element) + FILTER(!BOUND(?element)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-05.rq new file mode 100644 index 00000000000..8e3a5c47d78 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-05.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND("[1,2,3]"^^cdt:List AS ?list) + BIND(cdt:get(?list, "invalid") AS ?element) + FILTER(!BOUND(?element)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-06.rq new file mode 100644 index 00000000000..c96079980d0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-error-06.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND("[1,2,3]"^^cdt:List AS ?list) + BIND(cdt:get(?list, 2.0) AS ?element) + FILTER(!BOUND(?element)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-null-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-null-01.rq new file mode 100644 index 00000000000..76700ebedd0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-null-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND("[null]"^^cdt:List AS ?list) + BIND(cdt:get(?list, 1) AS ?element) + FILTER(!BOUND(?element)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/get-null-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/get-null-02.rq new file mode 100644 index 00000000000..165dfd06166 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/get-null-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND("[]"^^cdt:List AS ?list) + BIND(cdt:get(?list, 1) AS ?element) + FILTER(!BOUND(?element)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-01.rq new file mode 100644 index 00000000000..bcce6665a7c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + +# empty list +ASK { + BIND("[]"^^cdt:List AS ?list) + BIND(cdt:head(?list) AS ?head) + FILTER(!BOUND(?head)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-02.rq new file mode 100644 index 00000000000..46c97d6e339 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with one integer +ASK { + BIND("[1]"^^cdt:List AS ?list) + FILTER(cdt:head(?list) = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-03.rq new file mode 100644 index 00000000000..e0ace57d432 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-03.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with two integers +ASK { + BIND("[1, 2]"^^cdt:List AS ?list) + FILTER(cdt:head(?list) = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-04.rq new file mode 100644 index 00000000000..e6ecbfd3ccc --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-04.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with one string +ASK { + BIND("['a']"^^cdt:List AS ?list) + FILTER(cdt:head(?list) = 'a') +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-05.rq new file mode 100644 index 00000000000..1c534dcee4d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-05.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with two strings +ASK { + BIND("['a', 'b']"^^cdt:List AS ?list) + FILTER(cdt:head(?list) = 'a') +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-06.rq new file mode 100644 index 00000000000..0d48393777b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-06.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with two mixed types +ASK { + BIND("['a', 1]"^^cdt:List AS ?list) + FILTER(cdt:head(?list) = 'a') +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-07.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-07.rq new file mode 100644 index 00000000000..45a4fcdbb42 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-07.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: +# list with null +ASK { + BIND("[null]"^^cdt:List AS ?list) + BIND(cdt:head(?list) AS ?head) + FILTER(!BOUND(?head)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-08.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-08.rq new file mode 100644 index 00000000000..4118dd57c08 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-08.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with nested empty list +ASK { + BIND("[[]]"^^cdt:List AS ?list) + FILTER(cdt:head(?list) = "[]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-09.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-09.rq new file mode 100644 index 00000000000..d2507388f70 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-09.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with mixed types including nested list +ASK { + BIND("[[1], 2]"^^cdt:List AS ?list) + FILTER(cdt:head(?list) = "[1]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-10.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-10.rq new file mode 100644 index 00000000000..f911d8e36a5 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-10.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: +# list with mixed defined and undefined types +ASK { + BIND("[null, 2]"^^cdt:List AS ?list) + BIND(cdt:head(?list) AS ?head) + FILTER(!BOUND(?head)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-11.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-11.rq new file mode 100644 index 00000000000..c0f34d09d97 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-11.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: +# list with mixed defined and undefined types +ASK { + BIND("[_:b]"^^cdt:List AS ?list) + BIND(cdt:head(?list) AS ?head) + FILTER(isBLANK(?head)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-12.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-12.rq new file mode 100644 index 00000000000..16728ec581b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-12.rq @@ -0,0 +1,11 @@ +PREFIX cdt: +PREFIX xsd: +# list with mixed defined and undefined types +ASK { + BIND("[_:b]"^^cdt:List AS ?list) + BIND(cdt:head(?list) AS ?head) + BIND(cdt:head(?list) AS ?headAgain) + FILTER(isBLANK(?head)) + FILTER(isBLANK(?headAgain)) + FILTER(SAMETERM(?head, ?headAgain)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-error-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-error-01.rq new file mode 100644 index 00000000000..1f1614aca5c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-error-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND("[1,2]" AS ?list) + BIND(cdt:head(?list) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-null-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-null-01.rq new file mode 100644 index 00000000000..dfacc458a94 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-null-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND("[null]"^^cdt:List AS ?list) + BIND(cdt:head(?list) AS ?head) + FILTER(!BOUND(?head)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/head-null-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/head-null-02.rq new file mode 100644 index 00000000000..80ce6919722 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/head-null-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND("[]"^^cdt:List AS ?list) + BIND(cdt:head(?list) AS ?head) + FILTER(!BOUND(?head)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-01.rq new file mode 100644 index 00000000000..9850ec55e76 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# empty list +ASK { + BIND(cdt:List() AS ?list) + FILTER(?list = "[]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-02.rq new file mode 100644 index 00000000000..e779e332cc6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + + +# list with one integer +ASK { + BIND(cdt:List(1) AS ?list) + FILTER(?list = "[1]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-03.rq new file mode 100644 index 00000000000..857c1533f8b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-03.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + + +# list with two integers +ASK { + BIND(cdt:List(1, 2) AS ?list) + FILTER(?list = "[1, 2]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-04.rq new file mode 100644 index 00000000000..3db696f8d09 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + + +# list with one string +ASK { + BIND(cdt:List("a") AS ?list) + FILTER(?list = "['a']"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-05.rq new file mode 100644 index 00000000000..2032858f254 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-05.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + + +# list with two strings +ASK { + BIND(cdt:List("a", "b") AS ?list) + FILTER(?list = "['a', 'b']"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-06.rq new file mode 100644 index 00000000000..b14d3857b46 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-06.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + + +# list with two mixed types +ASK { + BIND(cdt:List("a", 1) AS ?list) + FILTER(?list = "['a', 1]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-09.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-09.rq new file mode 100644 index 00000000000..50d0e648dab --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-09.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + + +# list with nested empty list +ASK { + BIND(cdt:List(cdt:List()) AS ?list) + FILTER(?list = "[[]]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-10.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-10.rq new file mode 100644 index 00000000000..bf4fcd7a72d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-10.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + + +# list with nested list with one integer +ASK { + BIND(cdt:List(cdt:List(1)) AS ?list) + FILTER(?list = "[[1]]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-11.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-11.rq new file mode 100644 index 00000000000..48b8e9e7116 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-11.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + + +# list with mixed types including nested list +ASK { + BIND(cdt:List(cdt:List(1), 2) AS ?list) + FILTER(?list = "[[1], 2]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-12.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-12.rq new file mode 100644 index 00000000000..235f0bddd81 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-12.rq @@ -0,0 +1,12 @@ +PREFIX cdt: + +# list with mixed defined and undefined types +ASK { + BIND(cdt:List(?unbound, ) AS ?list) + + # We use a REGEX here because we can't directly test equality of lists containing null + # we could use SAMETERM, but that would likely depend on the lexical form produced by + # the system for lists, and not necessarily tell us that the expected terms were actuall + # in the resulting list. + FILTER(REGEX(STR(?list), "\\[\\s*null\\s*,\\s*\\s*\\]")) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-13.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-13.rq new file mode 100644 index 00000000000..e787aa1072f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-13.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + + +# rdf literal syntax +ASK { + BIND(cdt:List() AS ?list) + BIND("[]"^^cdt:List AS ?expected) + FILTER(?list = ?expected) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-14.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-14.rq new file mode 100644 index 00000000000..8ccb934afa7 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-14.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + + +# STRDT constructor +ASK { + BIND(STRDT("[1]", cdt:List) AS ?list) + FILTER(?list = "[ 1 ]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-15.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-15.rq new file mode 100644 index 00000000000..e000a173acf --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-15.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + + +# list with two integers +ASK { + BIND(3 AS ?x) + BIND(cdt:List(1+4, 1+?x) AS ?list) + FILTER(?list = "[5, 4]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-16.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-16.rq new file mode 100644 index 00000000000..b12392a8bf6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-16.rq @@ -0,0 +1,12 @@ +PREFIX cdt: + +ASK { + BIND( BNODE() AS ?b ) + BIND( cdt:List(?b) AS ?list ) + + FILTER( BOUND(?list) ) # check that there was no error + + BIND( cdt:get(?list,1) AS ?e1 ) + FILTER( isBlank(?e1) ) + FILTER( SAMETERM(?e1, ?b) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-null-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-null-01.rq new file mode 100644 index 00000000000..bc30ee98959 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-null-01.rq @@ -0,0 +1,12 @@ +PREFIX cdt: + +# list with one integer +ASK { + BIND(cdt:List(?unbound) AS ?list) + + # We use a REGEX here because we can't directly test equality of lists containing null + # we could use SAMETERM, but that would likely depend on the lexical form produced by + # the system for lists, and not necessarily tell us that the expected terms were actually + # in the resulting list. + FILTER(REGEX(STR(?list), "\\[\\s*null\\s*\\]")) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-null-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-null-02.rq new file mode 100644 index 00000000000..0cebf4ccb37 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-constructor-null-02.rq @@ -0,0 +1,12 @@ +PREFIX cdt: + +# list with error as null +ASK { + BIND(cdt:List(1/0) AS ?list) + + # We use a REGEX here because we can't directly test equality of lists containing null + # we could use SAMETERM, but that would likely depend on the lexical form produced by + # the system for lists, and not necessarily tell us that the expected terms were actually + # in the resulting list. + FILTER(REGEX(STR(?list), "\\[\\s*null\\s*\\]")) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-01.rq new file mode 100644 index 00000000000..21ed12b644e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-01.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER("[ ]"^^cdt:List = "[]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-02.rq new file mode 100644 index 00000000000..4e25ff13f19 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-02.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER("[ 1 ]"^^cdt:List = "[1]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-03.rq new file mode 100644 index 00000000000..d1af3843a2f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-03.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER("[1,2]"^^cdt:List = "[ 1, '2'^^ ]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-04.rq new file mode 100644 index 00000000000..beb3ab902df --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-04.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER("[1,2]"^^cdt:List = "['+1'^^, 2.0]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-05.rq new file mode 100644 index 00000000000..d880e2e646d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-05.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER( "[]"^^cdt:List = "[ ]"^^cdt:List ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-06.rq new file mode 100644 index 00000000000..70c795ceace --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-06.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[_:b1]"^^cdt:List = "[_:b2]"^^cdt:List ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-07.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-07.rq new file mode 100644 index 00000000000..a4613e8ced5 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-07.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[_:b]"^^cdt:List = "[_:b]"^^cdt:List ) AS ?result ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-08.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-08.rq new file mode 100644 index 00000000000..0361b5e480a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-08.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( BNODE() AS ?x ) + BIND( BNODE() AS ?y ) + BIND( ( cdt:List(?x) = cdt:List(?y) ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-09.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-09.rq new file mode 100644 index 00000000000..79f3cbb4c3c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-09.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( BNODE() AS ?x ) + BIND( ( cdt:List(?x) = cdt:List(?x) ) AS ?result ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-null-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-null-01.rq new file mode 100644 index 00000000000..314bb91b10e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-null-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND("[1,null,2]"^^cdt:List = "[1,null,2]"^^cdt:List AS ?result) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-null-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-null-02.rq new file mode 100644 index 00000000000..ccffb90ce7d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-equals-null-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND("[1,null,2]"^^cdt:List = "[1,44,2]"^^cdt:List AS ?result) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-01.rq new file mode 100644 index 00000000000..70fb26b6d5c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[ ]"^^cdt:List >= "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-02.rq new file mode 100644 index 00000000000..0db477981c7 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List >= "[1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-03.rq new file mode 100644 index 00000000000..44040d1fea9 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-03.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1]"^^cdt:List >= "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-04.rq new file mode 100644 index 00000000000..f677858108c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[ 1]"^^cdt:List >= "[1 ]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-05.rq new file mode 100644 index 00000000000..efe0db13d81 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-05.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1]"^^cdt:List >= "[2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-06.rq new file mode 100644 index 00000000000..00667702c28 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-06.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[2]"^^cdt:List >= "[1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-07.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-07.rq new file mode 100644 index 00000000000..696e35ec102 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-07.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2]"^^cdt:List >= "[1,3]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-08.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-08.rq new file mode 100644 index 00000000000..44b0a7c0f4d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-08.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,3]"^^cdt:List >= "[1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-09.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-09.rq new file mode 100644 index 00000000000..9d107f74b9b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-09.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2]"^^cdt:List >= "[1,2,3]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-10.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-10.rq new file mode 100644 index 00000000000..3c8505e98b5 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-10.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2,3]"^^cdt:List >= "[1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-11.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-11.rq new file mode 100644 index 00000000000..01af549dfff --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-11.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,1,2]"^^cdt:List >= "[1,2,3]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-12.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-12.rq new file mode 100644 index 00000000000..b3c8ad78f69 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-12.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2,3]"^^cdt:List >= "[1,1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-13.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-13.rq new file mode 100644 index 00000000000..1762d705a00 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-13.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,1,1]"^^cdt:List >= "[1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-14.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-14.rq new file mode 100644 index 00000000000..02bf5e6f352 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-14.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2]"^^cdt:List >= "[1,1,1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-15.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-15.rq new file mode 100644 index 00000000000..1c359a379ee --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-15.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[true]"^^cdt:List >= "[false]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-16.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-16.rq new file mode 100644 index 00000000000..de090e31369 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-16.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[false]"^^cdt:List >= "[true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-19.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-19.rq new file mode 100644 index 00000000000..934eede7184 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-19.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,false]"^^cdt:List >= "[1,true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-20.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-20.rq new file mode 100644 index 00000000000..f58c97f74c1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-20.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,true]"^^cdt:List >= "[1,false]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-21.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-21.rq new file mode 100644 index 00000000000..14e3b647535 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-21.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,false,2]"^^cdt:List >= "[1,true,1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-22.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-22.rq new file mode 100644 index 00000000000..c9342d38eb3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-22.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,true,1]"^^cdt:List >= "[1,false,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-23.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-23.rq new file mode 100644 index 00000000000..0f342220a5b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-23.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,false,true]"^^cdt:List >= "[1,true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-24.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-24.rq new file mode 100644 index 00000000000..f404b4eaf85 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-24.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,true]"^^cdt:List >= "[1,false,true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-25.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-25.rq new file mode 100644 index 00000000000..f56080fb71f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-25.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[_:b]"^^cdt:List >= "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-26.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-26.rq new file mode 100644 index 00000000000..027a88c4595 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-26.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List >= "[_:b]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-27.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-27.rq new file mode 100644 index 00000000000..5b989eaf522 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-27.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( BNODE() AS ?x ) + BIND( BNODE() AS ?y ) + BIND( ( cdt:List(?x) >= cdt:List(?y) ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-28.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-28.rq new file mode 100644 index 00000000000..bbced570e25 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-28.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[_:b]"^^cdt:List >= "[_:b]"^^cdt:List ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-29.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-29.rq new file mode 100644 index 00000000000..f16298b3b43 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-29.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( BNODE() AS ?x ) + BIND( ( cdt:List(?x) >= cdt:List(?x) ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-31.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-31.rq new file mode 100644 index 00000000000..ade6b0bea38 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-31.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[ ]"^^cdt:List >= "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-error-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-error-03.rq new file mode 100644 index 00000000000..71ac6d6fcbc --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-error-03.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(2) AS ?list2 ) + BIND( ( "1"^^cdt:List >= ?list2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-error-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-error-04.rq new file mode 100644 index 00000000000..6a47a8e9343 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-error-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(1) AS ?list1 ) + BIND( ( ?list1 >= "2"^^cdt:List ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-01.rq new file mode 100644 index 00000000000..bd51e9b0dbb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[null]"^^cdt:List >= "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-02.rq new file mode 100644 index 00000000000..646a58beb35 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List >= "[null]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-03.rq new file mode 100644 index 00000000000..b406d1f0a19 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-03.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[null]"^^cdt:List >= "[null]"^^cdt:List ) AS ?result ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-04.rq new file mode 100644 index 00000000000..10843059381 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-04.rq @@ -0,0 +1,11 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(?x, ?y) AS ?list1 ) + BIND( cdt:List(?z) AS ?list2 ) + BIND( ( ?list1 >= ?list2 ) AS ?result) + + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-05.rq new file mode 100644 index 00000000000..ce5a27099c3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-05.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,null]"^^cdt:List >= "[2,null]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-06.rq new file mode 100644 index 00000000000..09bce3ad7a6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-equal-null-06.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(?x) AS ?list1 ) + BIND( cdt:List(BNODE()) AS ?list2 ) + BIND( ( ?list1 >= ?list2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-01.rq new file mode 100644 index 00000000000..2ff4169fd6c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[ ]"^^cdt:List > "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-02.rq new file mode 100644 index 00000000000..5ea1b43b27c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List > "[1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-03.rq new file mode 100644 index 00000000000..041b7d1520e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-03.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1]"^^cdt:List > "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-04.rq new file mode 100644 index 00000000000..4428cbc3ab2 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[ 1 ]"^^cdt:List > "[1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-05.rq new file mode 100644 index 00000000000..7ff7ee1f00c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-05.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1]"^^cdt:List > "[2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-06.rq new file mode 100644 index 00000000000..2e37745b351 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-06.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[2]"^^cdt:List > "[1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-07.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-07.rq new file mode 100644 index 00000000000..d3c2fd96fcf --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-07.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2]"^^cdt:List > "[1,3]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-08.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-08.rq new file mode 100644 index 00000000000..91ecc4de579 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-08.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,3]"^^cdt:List > "[1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-09.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-09.rq new file mode 100644 index 00000000000..697ecb49fd6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-09.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2]"^^cdt:List > "[1,2,3]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-10.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-10.rq new file mode 100644 index 00000000000..3753780729a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-10.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2,3]"^^cdt:List > "[1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-11.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-11.rq new file mode 100644 index 00000000000..c8992ecb204 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-11.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,1,2]"^^cdt:List > "[1,2,3]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-12.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-12.rq new file mode 100644 index 00000000000..ccadc2f2fc2 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-12.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2,3]"^^cdt:List > "[1,1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-13.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-13.rq new file mode 100644 index 00000000000..84e5c673a04 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-13.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,1,1]"^^cdt:List > "[1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-14.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-14.rq new file mode 100644 index 00000000000..5af4c5deb9a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-14.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2]"^^cdt:List > "[1,1,1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-15.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-15.rq new file mode 100644 index 00000000000..a6e3c8019c0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-15.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[true]"^^cdt:List > "[false]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-16.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-16.rq new file mode 100644 index 00000000000..70746cad555 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-16.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[false]"^^cdt:List > "[true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-19.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-19.rq new file mode 100644 index 00000000000..f9fd5923572 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-19.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,false]"^^cdt:List > "[1,true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-20.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-20.rq new file mode 100644 index 00000000000..574324ba6b0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-20.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,true]"^^cdt:List > "[1,false]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-21.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-21.rq new file mode 100644 index 00000000000..23f63a1a136 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-21.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,false,2]"^^cdt:List > "[1,true,1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-22.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-22.rq new file mode 100644 index 00000000000..559c59b09fa --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-22.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,true,1]"^^cdt:List > "[1,false,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-23.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-23.rq new file mode 100644 index 00000000000..fe3089b0b25 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-23.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,false,true]"^^cdt:List > "[1,true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-24.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-24.rq new file mode 100644 index 00000000000..8b60bd1c42e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-24.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,true]"^^cdt:List > "[1,false,true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-25.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-25.rq new file mode 100644 index 00000000000..a9b680ab1df --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-25.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[_:b]"^^cdt:List > "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-26.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-26.rq new file mode 100644 index 00000000000..59eb320e36c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-26.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List > "[_:b]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-27.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-27.rq new file mode 100644 index 00000000000..ca2d5b8da60 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-27.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( BNODE() AS ?x ) + BIND( BNODE() AS ?y ) + BIND( ( cdt:List(?x) > cdt:List(?y) ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-28.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-28.rq new file mode 100644 index 00000000000..21cbc743bec --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-28.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[_:b]"^^cdt:List > "[_:b]"^^cdt:List ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-29.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-29.rq new file mode 100644 index 00000000000..28d77bff7cb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-29.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( BNODE() AS ?x ) + BIND( ( cdt:List(?x) > cdt:List(?x) ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-31.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-31.rq new file mode 100644 index 00000000000..f116c7a54d6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-31.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[ ]"^^cdt:List > "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-error-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-error-03.rq new file mode 100644 index 00000000000..44e6d990ec9 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-error-03.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(2) AS ?list2 ) + BIND( ( "1"^^cdt:List > ?list2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-error-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-error-04.rq new file mode 100644 index 00000000000..e54ea409619 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-error-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(1) AS ?list1 ) + BIND( ( ?list1 > "2"^^cdt:List ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-01.rq new file mode 100644 index 00000000000..49c9dee7b8e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[null]"^^cdt:List > "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-02.rq new file mode 100644 index 00000000000..680f4accade --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List > "[null]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-03.rq new file mode 100644 index 00000000000..f4e82722c58 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-03.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[null]"^^cdt:List > "[null]"^^cdt:List ) AS ?result ) + + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-04.rq new file mode 100644 index 00000000000..1cb765ed64b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-04.rq @@ -0,0 +1,11 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(?x, ?y) AS ?list1 ) + BIND( cdt:List(?z) AS ?list2 ) + BIND( ( ?list1 > ?list2 ) AS ?result) + + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-05.rq new file mode 100644 index 00000000000..7c4b16f2459 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-05.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,null]"^^cdt:List > "[2,null]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-06.rq new file mode 100644 index 00000000000..c54b5269568 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-greater-than-null-06.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(?x) AS ?list1 ) + BIND( cdt:List(BNODE()) AS ?list2 ) + BIND( ( ?list1 > ?list2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-01.rq new file mode 100644 index 00000000000..c7bf15a96ae --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List <= "[ ]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-02.rq new file mode 100644 index 00000000000..fe6a120b994 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List <= "[1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-03.rq new file mode 100644 index 00000000000..fc4b5623e5d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-03.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1]"^^cdt:List <= "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-04.rq new file mode 100644 index 00000000000..bfde3249b79 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1]"^^cdt:List <= "[ 1 ]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-05.rq new file mode 100644 index 00000000000..263348cc0ca --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-05.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1]"^^cdt:List <= "[2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-06.rq new file mode 100644 index 00000000000..0b34d18f177 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-06.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[2]"^^cdt:List <= "[1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-07.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-07.rq new file mode 100644 index 00000000000..6bbf34c545d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-07.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2]"^^cdt:List <= "[1,3]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-08.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-08.rq new file mode 100644 index 00000000000..98eeb7b0936 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-08.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,3]"^^cdt:List <= "[1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-09.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-09.rq new file mode 100644 index 00000000000..696948dd083 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-09.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2]"^^cdt:List <= "[1,2,3]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-10.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-10.rq new file mode 100644 index 00000000000..3dda8d1db89 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-10.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2,3]"^^cdt:List <= "[1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-11.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-11.rq new file mode 100644 index 00000000000..5afc428cbcc --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-11.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,1,2]"^^cdt:List <= "[1,2,3]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-12.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-12.rq new file mode 100644 index 00000000000..5b1f702a405 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-12.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2,3]"^^cdt:List <= "[1,1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-13.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-13.rq new file mode 100644 index 00000000000..8152ba06314 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-13.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,1,1]"^^cdt:List <= "[1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-14.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-14.rq new file mode 100644 index 00000000000..c9494d4fdaf --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-14.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2]"^^cdt:List <= "[1,1,1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-15.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-15.rq new file mode 100644 index 00000000000..b7b6e7b692f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-15.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[true]"^^cdt:List <= "[false]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-16.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-16.rq new file mode 100644 index 00000000000..7f05a329216 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-16.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[false]"^^cdt:List <= "[true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-19.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-19.rq new file mode 100644 index 00000000000..2b6b3f88bde --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-19.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,false]"^^cdt:List <= "[1,true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-20.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-20.rq new file mode 100644 index 00000000000..a20d7ede430 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-20.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,true]"^^cdt:List <= "[1,false]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-21.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-21.rq new file mode 100644 index 00000000000..24750063efa --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-21.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,false,2]"^^cdt:List <= "[1,true,1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-22.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-22.rq new file mode 100644 index 00000000000..63cc444d708 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-22.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,true,1]"^^cdt:List <= "[1,false,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-23.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-23.rq new file mode 100644 index 00000000000..e73130edfee --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-23.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,false,true]"^^cdt:List <= "[1,true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-24.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-24.rq new file mode 100644 index 00000000000..d95dc680620 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-24.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,true]"^^cdt:List <= "[1,false,true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-25.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-25.rq new file mode 100644 index 00000000000..c2136e74ac0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-25.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[_:b]"^^cdt:List <= "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-26.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-26.rq new file mode 100644 index 00000000000..31fdfeeedb2 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-26.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List <= "[_:b]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-27.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-27.rq new file mode 100644 index 00000000000..8bb4fa6f667 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-27.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( BNODE() AS ?x ) + BIND( BNODE() AS ?y ) + BIND( ( cdt:List(?x) <= cdt:List(?y) ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-28.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-28.rq new file mode 100644 index 00000000000..452f1481c11 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-28.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[_:b]"^^cdt:List <= "[_:b]"^^cdt:List ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-29.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-29.rq new file mode 100644 index 00000000000..9240476d039 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-29.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( BNODE() AS ?x ) + BIND( ( cdt:List(?x) <= cdt:List(?x) ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-31.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-31.rq new file mode 100644 index 00000000000..a7ac105fa44 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-31.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List <= "[ ]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-error-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-error-03.rq new file mode 100644 index 00000000000..6cd0ea6a1fc --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-error-03.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(2) AS ?list2 ) + BIND( ( "1"^^cdt:List <= ?list2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-error-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-error-04.rq new file mode 100644 index 00000000000..bcea3634ee7 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-error-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(1) AS ?list1 ) + BIND( ( ?list1 <= "2"^^cdt:List ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-01.rq new file mode 100644 index 00000000000..99ea40a1798 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[null]"^^cdt:List <= "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-02.rq new file mode 100644 index 00000000000..315af88e6e6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List <= "[null]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-03.rq new file mode 100644 index 00000000000..1f7836889ef --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-03.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[null]"^^cdt:List <= "[null]"^^cdt:List ) AS ?result ) + + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-04.rq new file mode 100644 index 00000000000..9f234743dd0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-04.rq @@ -0,0 +1,11 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(?x, ?y) AS ?list1 ) + BIND( cdt:List(?z) AS ?list2 ) + BIND( ( ?list1 <= ?list2 ) AS ?result) + + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-05.rq new file mode 100644 index 00000000000..d48a2c8f216 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-05.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,null]"^^cdt:List <= "[2,null]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-06.rq new file mode 100644 index 00000000000..873d0f08b9b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-equal-null-06.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(?x) AS ?list1 ) + BIND( cdt:List(BNODE()) AS ?list2 ) + BIND( ( ?list1 <= ?list2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-01.rq new file mode 100644 index 00000000000..015346b077d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List < "[ ]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-02.rq new file mode 100644 index 00000000000..9b308f1dabb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List < "[1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-03.rq new file mode 100644 index 00000000000..6aa465d8de9 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-03.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1]"^^cdt:List < "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-04.rq new file mode 100644 index 00000000000..bf68893b12f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[ 1 ]"^^cdt:List < "[1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-05.rq new file mode 100644 index 00000000000..483db5c7c63 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-05.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1]"^^cdt:List < "[2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-06.rq new file mode 100644 index 00000000000..986db12654a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-06.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[2]"^^cdt:List < "[1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-07.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-07.rq new file mode 100644 index 00000000000..5c07e9cdb97 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-07.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2]"^^cdt:List < "[1,3]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-08.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-08.rq new file mode 100644 index 00000000000..d34868287eb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-08.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,3]"^^cdt:List < "[1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-09.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-09.rq new file mode 100644 index 00000000000..128490921a3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-09.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2]"^^cdt:List < "[1,2,3]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-10.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-10.rq new file mode 100644 index 00000000000..8125c2f6ce1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-10.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2,3]"^^cdt:List < "[1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-11.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-11.rq new file mode 100644 index 00000000000..46076dba9da --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-11.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,1,2]"^^cdt:List < "[1,2,3]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-12.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-12.rq new file mode 100644 index 00000000000..1901a319522 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-12.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2,3]"^^cdt:List < "[1,1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-13.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-13.rq new file mode 100644 index 00000000000..237779e1048 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-13.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,1,1]"^^cdt:List < "[1,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-14.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-14.rq new file mode 100644 index 00000000000..8bc915fbcb7 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-14.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,2]"^^cdt:List < "[1,1,1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-15.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-15.rq new file mode 100644 index 00000000000..ad5d0c556eb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-15.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[true]"^^cdt:List < "[false]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-16.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-16.rq new file mode 100644 index 00000000000..7b2dc2f56ed --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-16.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[false]"^^cdt:List < "[true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-19.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-19.rq new file mode 100644 index 00000000000..7092cde5345 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-19.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,false]"^^cdt:List < "[1,true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-20.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-20.rq new file mode 100644 index 00000000000..52a449a17da --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-20.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,true]"^^cdt:List < "[1,false]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-21.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-21.rq new file mode 100644 index 00000000000..1b5193cee28 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-21.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,false,2]"^^cdt:List < "[1,true,1]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-22.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-22.rq new file mode 100644 index 00000000000..844b3466bf6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-22.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,true,1]"^^cdt:List < "[1,false,2]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-23.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-23.rq new file mode 100644 index 00000000000..ed01b6f64a5 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-23.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,false,true]"^^cdt:List < "[1,true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-24.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-24.rq new file mode 100644 index 00000000000..8b64322aae8 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-24.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,true]"^^cdt:List < "[1,false,true]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-25.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-25.rq new file mode 100644 index 00000000000..2a58b286a79 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-25.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[_:b]"^^cdt:List < "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-26.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-26.rq new file mode 100644 index 00000000000..b07c7ce70ab --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-26.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List < "[_:b]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-27.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-27.rq new file mode 100644 index 00000000000..a64437ae107 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-27.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( BNODE() AS ?x ) + BIND( BNODE() AS ?y ) + BIND( ( cdt:List(?x) < cdt:List(?y) ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-28.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-28.rq new file mode 100644 index 00000000000..f0c06258b76 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-28.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[_:b]"^^cdt:List < "[_:b]"^^cdt:List ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-29.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-29.rq new file mode 100644 index 00000000000..366a422d09e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-29.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( BNODE() AS ?x ) + BIND( ( cdt:List(?x) < cdt:List(?x) ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-31.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-31.rq new file mode 100644 index 00000000000..cd2c36cad71 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-31.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[ ]"^^cdt:List < "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-error-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-error-03.rq new file mode 100644 index 00000000000..2f889ce9de8 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-error-03.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(2) AS ?list2 ) + BIND( ( "1"^^cdt:List < ?list2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-error-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-error-04.rq new file mode 100644 index 00000000000..9f3e62071cc --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-error-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(1) AS ?list1 ) + BIND( ( ?list1 < "2"^^cdt:List ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-01.rq new file mode 100644 index 00000000000..d734a7270c4 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[null]"^^cdt:List < "[]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-02.rq new file mode 100644 index 00000000000..7821aa350a3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[]"^^cdt:List < "[null]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-03.rq new file mode 100644 index 00000000000..d8f60ba2047 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-03.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[null]"^^cdt:List < "[null]"^^cdt:List ) AS ?result ) + + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-04.rq new file mode 100644 index 00000000000..1f858de780d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-04.rq @@ -0,0 +1,11 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(?x, ?y) AS ?list1 ) + BIND( cdt:List(?z) AS ?list2 ) + BIND( ( ?list1 < ?list2 ) AS ?result) + + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-05.rq new file mode 100644 index 00000000000..775245cd2da --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-05.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "[1,null]"^^cdt:List < "[2,null]"^^cdt:List ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-06.rq new file mode 100644 index 00000000000..d488c08ea6a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/list-less-than-null-06.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:List(?x) AS ?list1 ) + BIND( cdt:List(BNODE()) AS ?list2 ) + BIND( ( ?list1 < ?list2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/manifest.ttl b/jena-arq/testing/SPARQL-CDTs/list-functions/manifest.ttl new file mode 100644 index 00000000000..9347cc46617 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/manifest.ttl @@ -0,0 +1,3226 @@ +@prefix rdf: . +@prefix : . +@prefix rdfs: . +@prefix mf: . +@prefix qt: . +@prefix dawgt: . +@prefix sparql: . +@prefix cdt: . + +<> rdf:type mf:Manifest ; + rdfs:label "Functions for cdt:List Literals" ; + mf:entries + ( + :list-constructor-01 + :list-constructor-02 + :list-constructor-03 + :list-constructor-04 + :list-constructor-05 + :list-constructor-06 + :list-constructor-09 + :list-constructor-10 + :list-constructor-11 + :list-constructor-12 + :list-constructor-13 + :list-constructor-14 + :list-constructor-15 + :list-constructor-16 + + :concat-01 + :concat-02 + :concat-03 + :concat-04 + :concat-05 + :concat-06 + :concat-07 + :concat-08 + :concat-09 + :concat-10 + + :contains-01 + :contains-02 + :contains-03 + :contains-04 + :contains-05 + :contains-06 + :contains-07 + :contains-08 + :contains-09 + :contains-10 + + :get-01 + :get-02 + :get-03 + :get-04 + :get-05 + :get-06 + :get-07 + :get-08 + :get-09 + :get-10 + :get-11 + :get-12 + :get-13 + + :head-01 + :head-02 + :head-03 + :head-04 + :head-05 + :head-06 + :head-07 + :head-08 + :head-09 + :head-10 + :head-11 + :head-12 + + :tail-01 + :tail-02 + :tail-03 + :tail-04 + :tail-05 + :tail-06 + :tail-07 + :tail-08 + :tail-09 + :tail-10 + + :reverse-01 + :reverse-02 + :reverse-03 + :reverse-04 + :reverse-05 + :reverse-06 + :reverse-07 + :reverse-08 + :reverse-09 + :reverse-10 + + :size-01 + :size-02 + :size-03 + :size-04 + :size-05 + :size-06 + :size-07 + :size-08 + :size-09 + :size-10 + :size-11 + :size-12 + + :subseq-01 + :subseq-02 + :subseq-03 + :subseq-04 + :subseq-05 + :subseq-06 + :subseq-07 + :subseq-08 + :subseq-09 + :subseq-10 + :subseq-11 + :subseq-12 + :subseq-13 + + # Null-values + + :list-constructor-null-01 + :list-constructor-null-02 + :concat-null-01 + :contains-null-01 + :get-null-01 + :get-null-02 + :head-null-01 + :head-null-02 + + # Errors + :get-error-01 # non-list argument + :get-error-02 # invalid index (greater than size) + :get-error-03 # invalid index (zero) + :get-error-04 # invalid index (negative) + :get-error-05 # (non-integer) string index + :get-error-06 # (non-integer) decimal index + :subseq-error-01 # non-list argument + :subseq-error-02 # non-integer index + :concat-error-01 # non-list argument + :concat-error-02 # non-list argument + :contains-error-01 # non-list argument + :head-error-01 # non-list argument + :tail-error-01 # non-list argument + :reverse-error-01 # non-list argument + :size-error-01 # non-list argument + + # Equality Tests for Lists + :list-equals-01 # empty list + :list-equals-02 # single-element + :list-equals-03 # multiple-element + :list-equals-04 # multiple-element, value-space comparison + :list-equals-05 # same IRI + :list-equals-06 # blank nodes + :list-equals-07 # blank nodes + :list-equals-08 # blank nodes + :list-equals-09 # blank nodes + :list-equals-null-01 + :list-equals-null-02 + + # Comparison Tests for Lists + :list-less-than-01 + :list-less-than-02 + :list-less-than-03 + :list-less-than-04 + :list-less-than-05 + :list-less-than-06 + :list-less-than-07 + :list-less-than-08 + :list-less-than-09 + :list-less-than-10 + :list-less-than-11 + :list-less-than-12 + :list-less-than-13 + :list-less-than-14 + :list-less-than-15 + :list-less-than-16 + :list-less-than-19 + :list-less-than-20 + :list-less-than-21 + :list-less-than-22 + :list-less-than-23 + :list-less-than-24 + :list-less-than-25 + :list-less-than-26 + :list-less-than-27 + :list-less-than-28 + :list-less-than-29 + :list-less-than-31 + :list-less-than-null-01 + :list-less-than-null-02 + :list-less-than-null-03 + :list-less-than-null-04 + :list-less-than-null-05 + :list-less-than-null-06 + :list-less-than-error-03 + :list-less-than-error-04 + :list-less-equal-01 + :list-less-equal-02 + :list-less-equal-03 + :list-less-equal-04 + :list-less-equal-05 + :list-less-equal-06 + :list-less-equal-07 + :list-less-equal-08 + :list-less-equal-09 + :list-less-equal-10 + :list-less-equal-11 + :list-less-equal-12 + :list-less-equal-13 + :list-less-equal-14 + :list-less-equal-15 + :list-less-equal-16 + :list-less-equal-19 + :list-less-equal-20 + :list-less-equal-21 + :list-less-equal-22 + :list-less-equal-23 + :list-less-equal-24 + :list-less-equal-25 + :list-less-equal-26 + :list-less-equal-27 + :list-less-equal-28 + :list-less-equal-29 + :list-less-equal-31 + :list-less-equal-null-01 + :list-less-equal-null-02 + :list-less-equal-null-03 + :list-less-equal-null-04 + :list-less-equal-null-05 + :list-less-equal-null-06 + :list-less-equal-error-03 + :list-less-equal-error-04 + :list-greater-than-01 + :list-greater-than-02 + :list-greater-than-03 + :list-greater-than-04 + :list-greater-than-05 + :list-greater-than-06 + :list-greater-than-07 + :list-greater-than-08 + :list-greater-than-09 + :list-greater-than-10 + :list-greater-than-11 + :list-greater-than-12 + :list-greater-than-13 + :list-greater-than-14 + :list-greater-than-15 + :list-greater-than-16 + :list-greater-than-19 + :list-greater-than-20 + :list-greater-than-21 + :list-greater-than-22 + :list-greater-than-23 + :list-greater-than-24 + :list-greater-than-25 + :list-greater-than-26 + :list-greater-than-27 + :list-greater-than-28 + :list-greater-than-29 + :list-greater-than-31 + :list-greater-than-null-01 + :list-greater-than-null-02 + :list-greater-than-null-03 + :list-greater-than-null-04 + :list-greater-than-null-05 + :list-greater-than-null-06 + :list-greater-than-error-03 + :list-greater-than-error-04 + :list-greater-equal-01 + :list-greater-equal-02 + :list-greater-equal-03 + :list-greater-equal-04 + :list-greater-equal-05 + :list-greater-equal-06 + :list-greater-equal-07 + :list-greater-equal-08 + :list-greater-equal-09 + :list-greater-equal-10 + :list-greater-equal-11 + :list-greater-equal-12 + :list-greater-equal-13 + :list-greater-equal-14 + :list-greater-equal-15 + :list-greater-equal-16 + :list-greater-equal-19 + :list-greater-equal-20 + :list-greater-equal-21 + :list-greater-equal-22 + :list-greater-equal-23 + :list-greater-equal-24 + :list-greater-equal-25 + :list-greater-equal-26 + :list-greater-equal-27 + :list-greater-equal-28 + :list-greater-equal-29 + :list-greater-equal-31 + :list-greater-equal-null-01 + :list-greater-equal-null-02 + :list-greater-equal-null-03 + :list-greater-equal-null-04 + :list-greater-equal-null-05 + :list-greater-equal-null-06 + :list-greater-equal-error-03 + :list-greater-equal-error-04 + + # sameTerm Tests for Lists + :sameterm-01 # empty list + :sameterm-02 # single-element + :sameterm-03 # multiple-element + :sameterm-04 # multiple-element, different lexical-space, same value-space elements (!sameTerm) + :sameterm-null-01 # list with null (allowed since the test is on the list lexical, not the elements) + ) . + +:list-constructor-01 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-01" ; + rdfs:comment "construct an empty list" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-02 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-02" ; + rdfs:comment "construct a list with a single integer element" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-03 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-03" ; + rdfs:comment "construct a list with two integer elements" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-04 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-04" ; + rdfs:comment "construct a list with a single string element" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-05 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-05" ; + rdfs:comment "construct a list with two string elements" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-06 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-06" ; + rdfs:comment "construct a list with two elements of differing type" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-09 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-09" ; + rdfs:comment "construct a list with a nested, empty list element" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-10 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-10" ; + rdfs:comment "construct a list with a nested list with a single integer element" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-11 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-11" ; + rdfs:comment "construct a list with two elements of different type, one being a nested list" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-12 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-12" ; + rdfs:comment "construct a list with two elements of different type, one being a null element produced by unbound variable error" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-13 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-13" ; + rdfs:comment "construct two equal lists, one by list constructor and the other by literal syntax" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-14 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-14" ; + rdfs:comment "construct a list using STRDT" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-15 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-15" ; + rdfs:comment "construct a list with two integer elements that are the results of evaluating sub-expression including operators" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-16 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-16" ; + rdfs:comment "construct a list with a blank node and check that the identity of the blank node is preserved" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:concat-01 rdf:type mf:QueryEvaluationTest ; + mf:name "concat-01" ; + mf:feature cdt:concat ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:concat-02 rdf:type mf:QueryEvaluationTest ; + mf:name "concat-02" ; + mf:feature cdt:concat ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:concat-03 rdf:type mf:QueryEvaluationTest ; + mf:name "concat-03" ; + mf:feature cdt:concat ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:concat-04 rdf:type mf:QueryEvaluationTest ; + mf:name "concat-04" ; + mf:feature cdt:concat ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:concat-05 rdf:type mf:QueryEvaluationTest ; + mf:name "concat-05" ; + mf:feature cdt:concat ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:concat-06 rdf:type mf:QueryEvaluationTest ; + mf:name "concat-06" ; + mf:feature cdt:concat ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:concat-07 rdf:type mf:QueryEvaluationTest ; + mf:name "concat-07" ; + mf:feature cdt:concat ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:concat-08 rdf:type mf:QueryEvaluationTest ; + mf:name "concat-08" ; + mf:feature cdt:concat ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:concat-09 rdf:type mf:QueryEvaluationTest ; + mf:name "concat-09" ; + mf:feature cdt:concat ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:concat-10 rdf:type mf:QueryEvaluationTest ; + mf:name "concat-10" ; + mf:feature cdt:concat ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:contains-01 rdf:type mf:QueryEvaluationTest ; + mf:name "contains-01" ; + mf:feature cdt:contains ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:contains-02 rdf:type mf:QueryEvaluationTest ; + mf:name "contains-02" ; + mf:feature cdt:contains ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:contains-03 rdf:type mf:QueryEvaluationTest ; + mf:name "contains-03" ; + mf:feature cdt:contains ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:contains-04 rdf:type mf:QueryEvaluationTest ; + mf:name "contains-04" ; + mf:feature cdt:contains ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:contains-05 rdf:type mf:QueryEvaluationTest ; + mf:name "contains-05" ; + mf:feature cdt:contains ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:contains-06 rdf:type mf:QueryEvaluationTest ; + mf:name "contains-06" ; + mf:feature cdt:contains ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:contains-07 rdf:type mf:QueryEvaluationTest ; + mf:name "contains-07" ; + mf:feature cdt:contains ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:contains-08 rdf:type mf:QueryEvaluationTest ; + mf:name "contains-08" ; + mf:feature cdt:contains ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:contains-09 rdf:type mf:QueryEvaluationTest ; + mf:name "contains-09" ; + mf:feature cdt:contains ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:contains-10 rdf:type mf:QueryEvaluationTest ; + mf:name "contains-10" ; + mf:feature cdt:contains ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-01 rdf:type mf:QueryEvaluationTest ; + mf:name "get-01" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-02 rdf:type mf:QueryEvaluationTest ; + mf:name "get-02" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-03 rdf:type mf:QueryEvaluationTest ; + mf:name "get-03" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-04 rdf:type mf:QueryEvaluationTest ; + mf:name "get-04" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-05 rdf:type mf:QueryEvaluationTest ; + mf:name "get-05" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-06 rdf:type mf:QueryEvaluationTest ; + mf:name "get-06" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-07 rdf:type mf:QueryEvaluationTest ; + mf:name "get-07" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-08 rdf:type mf:QueryEvaluationTest ; + mf:name "get-08" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-09 rdf:type mf:QueryEvaluationTest ; + mf:name "get-09" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-10 rdf:type mf:QueryEvaluationTest ; + mf:name "get-10" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-11 rdf:type mf:QueryEvaluationTest ; + mf:name "get-11" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-12 rdf:type mf:QueryEvaluationTest ; + mf:name "get-12" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-13 rdf:type mf:QueryEvaluationTest ; + mf:name "get-13" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-01 rdf:type mf:QueryEvaluationTest ; + mf:name "head-01" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-02 rdf:type mf:QueryEvaluationTest ; + mf:name "head-02" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-03 rdf:type mf:QueryEvaluationTest ; + mf:name "head-03" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-04 rdf:type mf:QueryEvaluationTest ; + mf:name "head-04" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-05 rdf:type mf:QueryEvaluationTest ; + mf:name "head-05" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-06 rdf:type mf:QueryEvaluationTest ; + mf:name "head-06" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-07 rdf:type mf:QueryEvaluationTest ; + mf:name "head-07" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-08 rdf:type mf:QueryEvaluationTest ; + mf:name "head-08" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-09 rdf:type mf:QueryEvaluationTest ; + mf:name "head-09" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-10 rdf:type mf:QueryEvaluationTest ; + mf:name "head-10" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-11 rdf:type mf:QueryEvaluationTest ; + mf:name "head-11" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-12 rdf:type mf:QueryEvaluationTest ; + mf:name "head-12" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:tail-01 rdf:type mf:QueryEvaluationTest ; + mf:name "tail-01" ; + mf:feature cdt:tail ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:tail-02 rdf:type mf:QueryEvaluationTest ; + mf:name "tail-02" ; + mf:feature cdt:tail ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:tail-03 rdf:type mf:QueryEvaluationTest ; + mf:name "tail-03" ; + mf:feature cdt:tail ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:tail-04 rdf:type mf:QueryEvaluationTest ; + mf:name "tail-04" ; + mf:feature cdt:tail ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:tail-05 rdf:type mf:QueryEvaluationTest ; + mf:name "tail-05" ; + mf:feature cdt:tail ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:tail-06 rdf:type mf:QueryEvaluationTest ; + mf:name "tail-06" ; + mf:feature cdt:tail ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:tail-07 rdf:type mf:QueryEvaluationTest ; + mf:name "tail-07" ; + mf:feature cdt:tail ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:tail-08 rdf:type mf:QueryEvaluationTest ; + mf:name "tail-08" ; + mf:feature cdt:tail ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:tail-09 rdf:type mf:QueryEvaluationTest ; + mf:name "tail-09" ; + mf:feature cdt:tail ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:tail-10 rdf:type mf:QueryEvaluationTest ; + mf:name "tail-10" ; + mf:feature cdt:tail ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:reverse-01 rdf:type mf:QueryEvaluationTest ; + mf:name "reverse-01" ; + mf:feature cdt:reverse ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:reverse-02 rdf:type mf:QueryEvaluationTest ; + mf:name "reverse-02" ; + mf:feature cdt:reverse ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:reverse-03 rdf:type mf:QueryEvaluationTest ; + mf:name "reverse-03" ; + mf:feature cdt:reverse ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:reverse-04 rdf:type mf:QueryEvaluationTest ; + mf:name "reverse-04" ; + mf:feature cdt:reverse ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:reverse-05 rdf:type mf:QueryEvaluationTest ; + mf:name "reverse-05" ; + mf:feature cdt:reverse ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:reverse-06 rdf:type mf:QueryEvaluationTest ; + mf:name "reverse-06" ; + mf:feature cdt:reverse ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:reverse-07 rdf:type mf:QueryEvaluationTest ; + mf:name "reverse-07" ; + mf:feature cdt:reverse ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:reverse-08 rdf:type mf:QueryEvaluationTest ; + mf:name "reverse-08" ; + mf:feature cdt:reverse ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:reverse-09 rdf:type mf:QueryEvaluationTest ; + mf:name "reverse-09" ; + mf:feature cdt:reverse ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:reverse-10 rdf:type mf:QueryEvaluationTest ; + mf:name "reverse-10" ; + mf:feature cdt:reverse ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-01 rdf:type mf:QueryEvaluationTest ; + mf:name "size-01" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-02 rdf:type mf:QueryEvaluationTest ; + mf:name "size-02" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-03 rdf:type mf:QueryEvaluationTest ; + mf:name "size-03" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-04 rdf:type mf:QueryEvaluationTest ; + mf:name "size-04" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-05 rdf:type mf:QueryEvaluationTest ; + mf:name "size-05" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-06 rdf:type mf:QueryEvaluationTest ; + mf:name "size-06" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-07 rdf:type mf:QueryEvaluationTest ; + mf:name "size-07" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-08 rdf:type mf:QueryEvaluationTest ; + mf:name "size-08" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-09 rdf:type mf:QueryEvaluationTest ; + mf:name "size-09" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-10 rdf:type mf:QueryEvaluationTest ; + mf:name "size-10" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-11 rdf:type mf:QueryEvaluationTest ; + mf:name "size-11" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-12 rdf:type mf:QueryEvaluationTest ; + mf:name "size-12" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-01 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-01" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-02 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-02" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-03 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-03" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-04 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-04" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-05 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-05" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-06 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-06" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-07 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-07" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-08 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-08" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-09 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-09" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-10 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-10" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-11 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-11" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-12 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-12" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-13 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-13" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-null-01" ; + rdfs:comment "list constructor on null argument" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-constructor-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "list-constructor-null-02" ; + rdfs:comment "construct a list one null element produced by expression evaluation error" ; + mf:feature cdt:list-constructor ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:concat-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "concat-null-01" ; + rdfs:comment "concat with null" ; + mf:feature cdt:concat ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:contains-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "contains-null-01" ; + rdfs:comment "contains over list containing null" ; + mf:feature cdt:contains ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "get-null-01" ; + rdfs:comment "get returning null" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "get-null-02" ; + rdfs:comment "get on empty list" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "head-null-01" ; + rdfs:comment "head returning null" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "head-null-02" ; + rdfs:comment "head on empty list" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-error-01 rdf:type mf:QueryEvaluationTest ; + mf:name "get-error-01" ; + rdfs:comment "get on invalid index" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-error-02 rdf:type mf:QueryEvaluationTest ; + mf:name "get-error-02" ; + rdfs:comment "get with non-integer index" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-error-03 rdf:type mf:QueryEvaluationTest ; + mf:name "get-error-03" ; + rdfs:comment "get with non-list argument" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-error-04 rdf:type mf:QueryEvaluationTest ; + mf:name "get-error-04" ; + rdfs:comment "get with non-list argument" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-error-05 rdf:type mf:QueryEvaluationTest ; + mf:name "get-error-05" ; + rdfs:comment "get with non-list argument" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-error-06 rdf:type mf:QueryEvaluationTest ; + mf:name "get-error-06" ; + rdfs:comment "get with non-list argument" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-error-01 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-error-01" ; + rdfs:comment "subseq with non-list argument" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:subseq-error-02 rdf:type mf:QueryEvaluationTest ; + mf:name "subseq-error-02" ; + rdfs:comment "subseq with non-integer index" ; + mf:feature cdt:subseq ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:concat-error-01 rdf:type mf:QueryEvaluationTest ; + mf:name "concat-error-01" ; + rdfs:comment "concat with non-list argument" ; + mf:feature cdt:concat ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:concat-error-02 rdf:type mf:QueryEvaluationTest ; + mf:name "concat-error-02" ; + rdfs:comment "concat with non-list argument" ; + mf:feature cdt:concat ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:contains-error-01 rdf:type mf:QueryEvaluationTest ; + mf:name "contains-error-01" ; + rdfs:comment "contains with non-list argument" ; + mf:feature cdt:contains ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:head-error-01 rdf:type mf:QueryEvaluationTest ; + mf:name "head-error-01" ; + rdfs:comment "head with non-list argument" ; + mf:feature cdt:head ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:tail-error-01 rdf:type mf:QueryEvaluationTest ; + mf:name "tail-error-01" ; + rdfs:comment "tail with non-list argument" ; + mf:feature cdt:tail ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:reverse-error-01 rdf:type mf:QueryEvaluationTest ; + mf:name "reverse-error-01" ; + rdfs:comment "reverse with non-list argument" ; + mf:feature cdt:reverse ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-error-01 rdf:type mf:QueryEvaluationTest ; + mf:name "size-error-01" ; + rdfs:comment "size with non-list argument" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-equals-01 rdf:type mf:QueryEvaluationTest ; + mf:name "list-equals-01" ; + rdfs:comment "equals test on empty list" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-equals-02 rdf:type mf:QueryEvaluationTest ; + mf:name "list-equals-02" ; + rdfs:comment "equals test on single-element" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-equals-03 rdf:type mf:QueryEvaluationTest ; + mf:name "list-equals-03" ; + rdfs:comment "equals test on multiple-element" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-equals-04 rdf:type mf:QueryEvaluationTest ; + mf:name "list-equals-04" ; + rdfs:comment "equals test on multiple-element, value-space comparison" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-equals-05 rdf:type mf:QueryEvaluationTest ; + mf:name "list-equals-05" ; + rdfs:comment "equals test on lists with same IRI" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-equals-06 rdf:type mf:QueryEvaluationTest ; + mf:name "list-equals-06" ; + rdfs:comment "equals test on lists with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-equals-07 rdf:type mf:QueryEvaluationTest ; + mf:name "list-equals-07" ; + rdfs:comment "equals test on lists with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-equals-08 rdf:type mf:QueryEvaluationTest ; + mf:name "list-equals-08" ; + rdfs:comment "equals test on lists with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-equals-09 rdf:type mf:QueryEvaluationTest ; + mf:name "list-equals-09" ; + rdfs:comment "equals test on lists with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-equals-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "list-equals-null-01" ; + rdfs:comment "equality of pairs of null within lists" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-equals-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "list-equals-null-02" ; + rdfs:comment "null is not equal to any RDF term" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-01 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-01" ; + rdfs:comment "less-than test on two empty lists" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-02 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-02" ; + rdfs:comment "less-than test with one empty list" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-03 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-03" ; + rdfs:comment "less-than test with one empty list" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-04 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-04" ; + rdfs:comment "less-than test with equal lists" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-05 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-05" ; + rdfs:comment "less-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-06 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-06" ; + rdfs:comment "less-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-07 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-07" ; + rdfs:comment "less-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-08 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-08" ; + rdfs:comment "less-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-09 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-09" ; + rdfs:comment "less-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-10 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-10" ; + rdfs:comment "less-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-11 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-11" ; + rdfs:comment "less-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-12 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-12" ; + rdfs:comment "less-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-13 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-13" ; + rdfs:comment "less-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-14 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-14" ; + rdfs:comment "less-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-15 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-15" ; + rdfs:comment "less-than test with booleans" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-16 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-16" ; + rdfs:comment "less-than test with booleans" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-19 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-19" ; + rdfs:comment "less-than test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-20 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-20" ; + rdfs:comment "less-than test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-21 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-21" ; + rdfs:comment "less-than test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-22 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-22" ; + rdfs:comment "less-than test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-23 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-23" ; + rdfs:comment "less-than test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-24 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-24" ; + rdfs:comment "less-than test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-25 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-25" ; + rdfs:comment "less-than test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-26 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-26" ; + rdfs:comment "less-than test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-27 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-27" ; + rdfs:comment "less-than test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-28 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-28" ; + rdfs:comment "less-than test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-29 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-29" ; + rdfs:comment "less-than test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-31 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-31" ; + rdfs:comment "less-than test with IRIs" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-null-01" ; + rdfs:comment "less-than test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-null-02" ; + rdfs:comment "less-than test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-null-03 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-null-03" ; + rdfs:comment "less-than test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-null-04 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-null-04" ; + rdfs:comment "less-than test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-null-05 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-null-05" ; + rdfs:comment "less-than test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-null-06 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-null-06" ; + rdfs:comment "less-than test with null and blank node" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-error-03 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-error-03" ; + rdfs:comment "less-than test with ill-formed literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-than-error-04 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-than-error-04" ; + rdfs:comment "less-than test with ill-formed literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-01 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-01" ; + rdfs:comment "less-equal test on two empty lists" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-02 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-02" ; + rdfs:comment "less-equal test with one empty list" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-03 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-03" ; + rdfs:comment "less-equal test with one empty list" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-04 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-04" ; + rdfs:comment "less-equal test with equal lists" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-05 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-05" ; + rdfs:comment "less-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-06 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-06" ; + rdfs:comment "less-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-07 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-07" ; + rdfs:comment "less-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-08 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-08" ; + rdfs:comment "less-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-09 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-09" ; + rdfs:comment "less-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-10 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-10" ; + rdfs:comment "less-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-11 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-11" ; + rdfs:comment "less-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-12 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-12" ; + rdfs:comment "less-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-13 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-13" ; + rdfs:comment "less-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-14 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-14" ; + rdfs:comment "less-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-15 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-15" ; + rdfs:comment "less-equal test with booleans" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-16 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-16" ; + rdfs:comment "less-equal test with booleans" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-19 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-19" ; + rdfs:comment "less-equal test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-20 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-20" ; + rdfs:comment "less-equal test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-21 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-21" ; + rdfs:comment "less-equal test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-22 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-22" ; + rdfs:comment "less-equal test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-23 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-23" ; + rdfs:comment "less-equal test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-24 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-24" ; + rdfs:comment "less-equal test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-25 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-25" ; + rdfs:comment "less-equal test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-26 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-26" ; + rdfs:comment "less-equal test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-27 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-27" ; + rdfs:comment "less-equal test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-28 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-28" ; + rdfs:comment "less-equal test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-29 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-29" ; + rdfs:comment "less-equal test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-31 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-31" ; + rdfs:comment "less-equal test with IRIs" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-null-01" ; + rdfs:comment "less-equal test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-null-02" ; + rdfs:comment "less-equal test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-null-03 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-null-03" ; + rdfs:comment "less-equal test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-null-04 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-null-04" ; + rdfs:comment "less-equal test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-null-05 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-null-05" ; + rdfs:comment "less-equal test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-null-06 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-null-06" ; + rdfs:comment "less-equal test with null and blank node" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-error-03 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-error-03" ; + rdfs:comment "less-equal test with ill-formed literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-less-equal-error-04 rdf:type mf:QueryEvaluationTest ; + mf:name "list-less-equal-error-04" ; + rdfs:comment "less-equal test with ill-formed literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-01 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-01" ; + rdfs:comment "greater-than test on two empty lists" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-02 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-02" ; + rdfs:comment "greater-than test with one empty list" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-03 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-03" ; + rdfs:comment "greater-than test with one empty list" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-04 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-04" ; + rdfs:comment "greater-than test with equal lists" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-05 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-05" ; + rdfs:comment "greater-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-06 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-06" ; + rdfs:comment "greater-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-07 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-07" ; + rdfs:comment "greater-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-08 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-08" ; + rdfs:comment "greater-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-09 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-09" ; + rdfs:comment "greater-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-10 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-10" ; + rdfs:comment "greater-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-11 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-11" ; + rdfs:comment "greater-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-12 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-12" ; + rdfs:comment "greater-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-13 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-13" ; + rdfs:comment "greater-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-14 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-14" ; + rdfs:comment "greater-than test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-15 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-15" ; + rdfs:comment "greater-than test with booleans" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-16 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-16" ; + rdfs:comment "greater-than test with booleans" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-19 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-19" ; + rdfs:comment "greater-than test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-20 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-20" ; + rdfs:comment "greater-than test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-21 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-21" ; + rdfs:comment "greater-than test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-22 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-22" ; + rdfs:comment "greater-than test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-23 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-23" ; + rdfs:comment "greater-than test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-24 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-24" ; + rdfs:comment "greater-than test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-25 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-25" ; + rdfs:comment "greater-than test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-26 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-26" ; + rdfs:comment "greater-than test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-27 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-27" ; + rdfs:comment "greater-than test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-28 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-28" ; + rdfs:comment "greater-than test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-29 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-29" ; + rdfs:comment "greater-than test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-31 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-31" ; + rdfs:comment "greater-than test with IRIs" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-null-01" ; + rdfs:comment "greater-than test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-null-02" ; + rdfs:comment "greater-than test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-null-03 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-null-03" ; + rdfs:comment "greater-than test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-null-04 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-null-04" ; + rdfs:comment "greater-than test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-null-05 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-null-05" ; + rdfs:comment "greater-than test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-null-06 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-null-06" ; + rdfs:comment "greater-than test with null and blank node" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-error-03 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-error-03" ; + rdfs:comment "greater-than test with ill-formed literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-than-error-04 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-than-error-04" ; + rdfs:comment "greater-than test with ill-formed literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-01 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-01" ; + rdfs:comment "greater-equal test on two empty lists" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-02 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-02" ; + rdfs:comment "greater-equal test with one empty list" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-03 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-03" ; + rdfs:comment "greater-equal test with one empty list" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-04 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-04" ; + rdfs:comment "greater-equal test with equal lists" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-05 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-05" ; + rdfs:comment "greater-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-06 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-06" ; + rdfs:comment "greater-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-07 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-07" ; + rdfs:comment "greater-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-08 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-08" ; + rdfs:comment "greater-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-09 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-09" ; + rdfs:comment "greater-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-10 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-10" ; + rdfs:comment "greater-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-11 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-11" ; + rdfs:comment "greater-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-12 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-12" ; + rdfs:comment "greater-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-13 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-13" ; + rdfs:comment "greater-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-14 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-14" ; + rdfs:comment "greater-equal test with integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-15 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-15" ; + rdfs:comment "greater-equal test with booleans" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-16 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-16" ; + rdfs:comment "greater-equal test with booleans" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-19 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-19" ; + rdfs:comment "greater-equal test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-20 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-20" ; + rdfs:comment "greater-equal test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-21 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-21" ; + rdfs:comment "greater-equal test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-22 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-22" ; + rdfs:comment "greater-equal test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-23 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-23" ; + rdfs:comment "greater-equal test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-24 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-24" ; + rdfs:comment "greater-equal test with mixed types" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-25 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-25" ; + rdfs:comment "greater-equal test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-26 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-26" ; + rdfs:comment "greater-equal test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-27 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-27" ; + rdfs:comment "greater-equal test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-28 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-28" ; + rdfs:comment "greater-equal test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-29 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-29" ; + rdfs:comment "greater-equal test with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-31 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-31" ; + rdfs:comment "greater-equal test with IRIs" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-null-01" ; + rdfs:comment "greater-equal test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-null-02" ; + rdfs:comment "greater-equal test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-null-03 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-null-03" ; + rdfs:comment "greater-equal test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-null-04 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-null-04" ; + rdfs:comment "greater-equal test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-null-05 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-null-05" ; + rdfs:comment "greater-equal test with nulls" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-null-06 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-null-06" ; + rdfs:comment "greater-equal test with null and blank node" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-error-03 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-error-03" ; + rdfs:comment "greater-equal test with ill-formed literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:list-greater-equal-error-04 rdf:type mf:QueryEvaluationTest ; + mf:name "list-greater-equal-error-04" ; + rdfs:comment "greater-equal test with ill-formed literal" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:sameterm-01 rdf:type mf:QueryEvaluationTest ; + mf:name "sameterm-01" ; + rdfs:comment "sameterm test on empty list" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:sameterm-02 rdf:type mf:QueryEvaluationTest ; + mf:name "sameterm-02" ; + rdfs:comment "sameterm test on single-element" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:sameterm-03 rdf:type mf:QueryEvaluationTest ; + mf:name "sameterm-03" ; + rdfs:comment "sameterm test on multiple-element" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:sameterm-04 rdf:type mf:QueryEvaluationTest ; + mf:name "sameterm-04" ; + rdfs:comment "sameterm test on multiple-element, lexical-space comparison" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:sameterm-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "sameterm-null-01" ; + rdfs:comment "sameterm test on list with null (allowed since the test is on the list lexical, not the elements)" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-01.rq new file mode 100644 index 00000000000..4383d70e4fa --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# empty list +ASK { + BIND("[]"^^cdt:List AS ?list) + FILTER(cdt:reverse(?list) = ?list) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-02.rq new file mode 100644 index 00000000000..4a3b1111c4d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with one integer +ASK { + BIND("[1]"^^cdt:List AS ?list) + FILTER(cdt:reverse(?list) = ?list) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-03.rq new file mode 100644 index 00000000000..77a4d48550d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-03.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with two integers +ASK { + BIND("[1, 2]"^^cdt:List AS ?list) + FILTER(cdt:reverse(?list) = "[2,1]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-04.rq new file mode 100644 index 00000000000..a62b3b6cc67 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-04.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with one string +ASK { + BIND("['a']"^^cdt:List AS ?list) + FILTER(cdt:reverse(?list) = "['a']"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-05.rq new file mode 100644 index 00000000000..8c96fc10b54 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-05.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with two strings +ASK { + BIND("['a', 'b']"^^cdt:List AS ?list) + FILTER(cdt:reverse(?list) = "['b','a']"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-06.rq new file mode 100644 index 00000000000..ed3589bb49d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-06.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with two mixed types +ASK { + BIND("['a', 1]"^^cdt:List AS ?list) + FILTER(cdt:reverse(?list) = "[1,'a']"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-07.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-07.rq new file mode 100644 index 00000000000..06e8abc644b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-07.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: +# list with null +ASK { + BIND("[null]"^^cdt:List AS ?list) + BIND(cdt:reverse(?list) AS ?result) + BIND(cdt:List(?unbound) AS ?expected) + FILTER(SAMETERM(?result, ?expected)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-08.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-08.rq new file mode 100644 index 00000000000..8f3c294e762 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-08.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with nested empty list +ASK { + BIND("[[]]"^^cdt:List AS ?list) + FILTER(cdt:reverse(?list) = ?list) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-09.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-09.rq new file mode 100644 index 00000000000..1517911b997 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-09.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with mixed types including nested list +ASK { + BIND("[[1], 2]"^^cdt:List AS ?list) + FILTER(cdt:reverse(?list) = "[2,[1]]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-10.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-10.rq new file mode 100644 index 00000000000..4bce4827b93 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-10.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: +# list with mixed defined and undefined types +ASK { + BIND("[null, 2]"^^cdt:List AS ?list) + BIND(cdt:reverse(?list) AS ?result) + BIND(cdt:List(2, ?unbound) AS ?expected) + FILTER(SAMETERM(?result, ?expected)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-error-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-error-01.rq new file mode 100644 index 00000000000..81e6110b483 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/reverse-error-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND("[1,2]" AS ?list) + BIND(cdt:reverse(?list) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-01.rq new file mode 100644 index 00000000000..ff66bd6f2a8 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-01.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER(SAMETERM("[]"^^cdt:List, "[]"^^cdt:List)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-02.rq new file mode 100644 index 00000000000..7af415de598 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-02.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER(SAMETERM("[1]"^^cdt:List, "[1]"^^cdt:List)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-03.rq new file mode 100644 index 00000000000..101083bffc9 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-03.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER(!SAMETERM("[1,2]"^^cdt:List, "[1,'2'^^]"^^cdt:List)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-04.rq new file mode 100644 index 00000000000..f3e7be095ca --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-04.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER(!SAMETERM("[1,2,3]"^^cdt:List, "[ 1, 2, 3 ]"^^cdt:List)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-null-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-null-01.rq new file mode 100644 index 00000000000..0e1766124ef --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/sameterm-null-01.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER(SAMETERM("[1,null,2]"^^cdt:List, "[1,null,2]"^^cdt:List)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/size-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/size-01.rq new file mode 100644 index 00000000000..2d040c0141e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/size-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# empty list +ASK { + BIND("[]"^^cdt:List AS ?list) + FILTER(cdt:size(?list) = 0) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/size-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/size-02.rq new file mode 100644 index 00000000000..9633d1dce7d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/size-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with one integer +ASK { + BIND("[1]"^^cdt:List AS ?list) + FILTER(cdt:size(?list) = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/size-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/size-03.rq new file mode 100644 index 00000000000..a1ec15329b6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/size-03.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with two integers +ASK { + BIND("[1, 2]"^^cdt:List AS ?list) + FILTER(cdt:size(?list) = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/size-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/size-04.rq new file mode 100644 index 00000000000..5733686eaa1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/size-04.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with one string +ASK { + BIND("['a']"^^cdt:List AS ?list) + FILTER(cdt:size(?list) = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/size-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/size-05.rq new file mode 100644 index 00000000000..27fe8449a0e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/size-05.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with two strings +ASK { + BIND("['a', 'b']"^^cdt:List AS ?list) + FILTER(cdt:size(?list) = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/size-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/size-06.rq new file mode 100644 index 00000000000..5bc7637365d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/size-06.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with two mixed types +ASK { + BIND("['a', 1]"^^cdt:List AS ?list) + FILTER(cdt:size(?list) = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/size-07.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/size-07.rq new file mode 100644 index 00000000000..c39f1949ecf --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/size-07.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with error as null +ASK { + BIND("[null]"^^cdt:List AS ?list) + FILTER(cdt:size(?list) = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/size-08.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/size-08.rq new file mode 100644 index 00000000000..920e6979621 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/size-08.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with unbound as null +ASK { + BIND("[null]"^^cdt:List AS ?list) + FILTER(cdt:size(?list) = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/size-09.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/size-09.rq new file mode 100644 index 00000000000..ac57087ef77 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/size-09.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with nested empty list +ASK { + BIND("[[]]"^^cdt:List AS ?list) + FILTER(cdt:size(?list) = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/size-10.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/size-10.rq new file mode 100644 index 00000000000..88f02e4ee47 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/size-10.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with nested list with one integer +ASK { + BIND("[[1]]"^^cdt:List AS ?list) + FILTER(cdt:size(?list) = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/size-11.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/size-11.rq new file mode 100644 index 00000000000..dca93e3a287 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/size-11.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with mixed types including nested list +ASK { + BIND("[[1], 2]"^^cdt:List AS ?list) + FILTER(cdt:size(?list) = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/size-12.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/size-12.rq new file mode 100644 index 00000000000..ea68b510b8e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/size-12.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with mixed defined and undefined types +ASK { + BIND("[null, 2]"^^cdt:List AS ?list) + FILTER(cdt:size(?list) = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/size-error-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/size-error-01.rq new file mode 100644 index 00000000000..47db4e0b4be --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/size-error-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND("[1,2]" AS ?list) + BIND(cdt:size(?list) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-01.rq new file mode 100644 index 00000000000..36b419f8441 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# subseq 1-1 +ASK { + BIND("[1,2,3,4,5,6,7,8,9,10]"^^cdt:List AS ?list) + FILTER(cdt:subseq(?list, 1, 1) = "[1]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-02.rq new file mode 100644 index 00000000000..44a6b730c8b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# subseq 2-3 +ASK { + BIND("[1,2,3,4,5,6,7,8,9,10]"^^cdt:List AS ?list) + FILTER(cdt:subseq(?list, 2, 3) = "[2, 3, 4]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-03.rq new file mode 100644 index 00000000000..74c14694468 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-03.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# subseq 1-arg +ASK { + BIND("[1,2,3,4,5,6,7,8,9,10]"^^cdt:List AS ?list) + FILTER(cdt:subseq(?list, 7) = "[7,8,9,10]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-04.rq new file mode 100644 index 00000000000..5c99f6d5010 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-04.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# empty list +ASK { + BIND("[]"^^cdt:List AS ?list) + FILTER(cdt:subseq(?list, 1, 0) = ?list) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-05.rq new file mode 100644 index 00000000000..0f9b0212cbc --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-05.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# empty list +ASK { + BIND("[]"^^cdt:List AS ?list) + FILTER(cdt:subseq(?list, 1) = ?list) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-06.rq new file mode 100644 index 00000000000..6e9c696d6f8 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-06.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# special case: idx = size+1 and length=0 +ASK { + BIND("[1,2,3]"^^cdt:List AS ?list) + FILTER(cdt:subseq(?list, 4, 0) = "[]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-07.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-07.rq new file mode 100644 index 00000000000..d91de2a7d43 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-07.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# special case: idx = size+1 and no length given +ASK { + BIND("[1,2,3]"^^cdt:List AS ?list) + FILTER(cdt:subseq(?list, 4) = "[]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-08.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-08.rq new file mode 100644 index 00000000000..fed22c3a38e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-08.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + +# 1 arg overrun +ASK { + BIND("[1,2,3]"^^cdt:List AS ?list) + BIND(cdt:subseq(?list, 5) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-09.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-09.rq new file mode 100644 index 00000000000..5283078f477 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-09.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + +# 2 args overrun +ASK { + BIND("[1,2,3]"^^cdt:List AS ?list) + BIND(cdt:subseq(?list, 5, 0) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-10.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-10.rq new file mode 100644 index 00000000000..2f6bbac1999 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-10.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + +# 2 args overrun +ASK { + BIND("[1,2,3]"^^cdt:List AS ?list) + BIND(cdt:subseq(?list, 4, 1) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-11.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-11.rq new file mode 100644 index 00000000000..d48851f42b6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-11.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: +# subseq overrun 10-2 +ASK { + BIND("[1,2,3,4,5,6,7,8,9,10]"^^cdt:List AS ?list) + BIND(cdt:subseq(?list, 10, 2) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-12.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-12.rq new file mode 100644 index 00000000000..ded71ce53da --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-12.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: +# subseq underrun 0-2 +ASK { + BIND("[1,2,3,4,5,6,7,8,9,10]"^^cdt:List AS ?list) + BIND(cdt:subseq(?list, 0, 2) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-13.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-13.rq new file mode 100644 index 00000000000..ae90166f3ee --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-13.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: +# subseq 1-arg underrun +ASK { + BIND("[1,2,3,4,5,6,7,8,9,10]"^^cdt:List AS ?list) + BIND(cdt:subseq(?list, -2) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-error-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-error-01.rq new file mode 100644 index 00000000000..d3be2861fe4 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-error-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND("[1,2,3,4,5,6,7,8,9,10]" AS ?list) + BIND(cdt:subseq(?list, 2, 3) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-error-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-error-02.rq new file mode 100644 index 00000000000..fcb525ebefe --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/subseq-error-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND("[1,2,3,4,5,6,7,8,9,10]"^^cdt:List AS ?list) + BIND(cdt:subseq(?list, "invalid", 3) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/tail-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-01.rq new file mode 100644 index 00000000000..b48227ccaab --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + +# empty list +ASK { + BIND("[]"^^cdt:List AS ?list) + BIND(cdt:tail(?list) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/tail-02.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-02.rq new file mode 100644 index 00000000000..f3a67b08c86 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with one integer +ASK { + BIND("[1]"^^cdt:List AS ?list) + FILTER(cdt:tail(?list) = "[]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/tail-03.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-03.rq new file mode 100644 index 00000000000..f8f53db39d3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-03.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with two integers +ASK { + BIND("[1, 2]"^^cdt:List AS ?list) + FILTER(cdt:tail(?list) = "[2]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/tail-04.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-04.rq new file mode 100644 index 00000000000..e74541cae02 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-04.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with one string +ASK { + BIND("['a']"^^cdt:List AS ?list) + FILTER(cdt:tail(?list) = "[]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/tail-05.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-05.rq new file mode 100644 index 00000000000..c58486a46ea --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-05.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with two strings +ASK { + BIND("['a', 'b']"^^cdt:List AS ?list) + FILTER(cdt:tail(?list) = "['b']"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/tail-06.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-06.rq new file mode 100644 index 00000000000..590df7ae041 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-06.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with two mixed types +ASK { + BIND("['a', 1]"^^cdt:List AS ?list) + FILTER(cdt:tail(?list) = "[1]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/tail-07.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-07.rq new file mode 100644 index 00000000000..857124b6ce4 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-07.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with null +ASK { + BIND("[null]"^^cdt:List AS ?list) + FILTER(cdt:tail(?list) = "[]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/tail-08.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-08.rq new file mode 100644 index 00000000000..acf1633c195 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-08.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with nested empty list +ASK { + BIND("[[]]"^^cdt:List AS ?list) + FILTER(cdt:tail(?list) = "[]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/tail-09.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-09.rq new file mode 100644 index 00000000000..4e66669f5cc --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-09.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with mixed types including nested list +ASK { + BIND("[[1], 2]"^^cdt:List AS ?list) + FILTER(cdt:tail(?list) = "[2]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/tail-10.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-10.rq new file mode 100644 index 00000000000..f307c909165 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-10.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: +# list with mixed defined and undefined types +ASK { + BIND("[null, 2]"^^cdt:List AS ?list) + FILTER(cdt:tail(?list) = "[2]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/tail-error-01.rq b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-error-01.rq new file mode 100644 index 00000000000..8d2be93fae3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/tail-error-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND("[1,2]" AS ?list) + BIND(cdt:tail(?list) AS ?result) + FILTER(!BOUND(?result)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/list-functions/true.srx b/jena-arq/testing/SPARQL-CDTs/list-functions/true.srx new file mode 100644 index 00000000000..c187f066ab1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/list-functions/true.srx @@ -0,0 +1,5 @@ + + + + true + diff --git a/jena-arq/testing/SPARQL-CDTs/manifest-all.ttl b/jena-arq/testing/SPARQL-CDTs/manifest-all.ttl new file mode 100644 index 00000000000..f352dd7c80a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/manifest-all.ttl @@ -0,0 +1,16 @@ +@prefix rdf: . +@prefix rdfs: . +@prefix mf: . +@prefix qt: . + +<> a mf:Manifest ; + rdfs:label "SPARQL Composite Datatype tests" ; + mf:include ( + + + + + + + ) ; +. diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/containsKey-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/containsKey-01.rq new file mode 100644 index 00000000000..04941676210 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/containsKey-01.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +# empty map +ASK { + BIND("{}"^^cdt:Map AS ?map) + BIND(cdt:containsKey(?map, 1) AS ?result) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/containsKey-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/containsKey-02.rq new file mode 100644 index 00000000000..3734ca2c1df --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/containsKey-02.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +# 1-entry map +ASK { + BIND("{1: 'one'}"^^cdt:Map AS ?map) + FILTER(cdt:containsKey(?map, 1)) + FILTER(!cdt:containsKey(?map, "01"^^xsd:integer)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/containsKey-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/containsKey-03.rq new file mode 100644 index 00000000000..ef81a3deecb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/containsKey-03.rq @@ -0,0 +1,11 @@ +PREFIX cdt: + +# 2-entry map +ASK { + BIND("{1: 'one', 2: 'two'}"^^cdt:Map AS ?map) + FILTER(cdt:containsKey(?map, 1)) + FILTER(cdt:containsKey(?map, 2)) + + FILTER(!cdt:containsKey(?map, 'one')) + FILTER(!cdt:containsKey(?map, 'two')) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/empty.ttl b/jena-arq/testing/SPARQL-CDTs/map-functions/empty.ttl new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/get-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/get-01.rq new file mode 100644 index 00000000000..820a6157183 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/get-01.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +# list with one integer +ASK { + BIND("{'hello'@en:'there'@en,1:'one',2:'two'}"^^cdt:Map AS ?map) + FILTER(cdt:get(?map, 1) = "one") + FILTER(cdt:get(?map, 2) = "two") + FILTER(cdt:get(?map, 'hello'@en) = "there"@en) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/get-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/get-02.rq new file mode 100644 index 00000000000..98acf81c72a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/get-02.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND("{1:'one', 2:'two', '02'^^: 'also two'}"^^cdt:Map AS ?map) + FILTER(cdt:get(?map, 1) = "one") + FILTER(cdt:get(?map, 2) = "two") + FILTER(cdt:get(?map, "02"^^xsd:integer) = "also two") +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/get-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/get-03.rq new file mode 100644 index 00000000000..69de1689d04 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/get-03.rq @@ -0,0 +1,12 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{ 1: _:b, 2: _:b }"^^cdt:Map AS ?map ) + BIND( cdt:get(?map, 1) AS ?v1 ) + BIND( cdt:get(?map, 2) AS ?v2 ) + + FILTER( isBLANK(?v1) ) + FILTER( isBLANK(?v2) ) + FILTER( SAMETERM(?v1, ?v2) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/get-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/get-04.rq new file mode 100644 index 00000000000..54133e0a931 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/get-04.rq @@ -0,0 +1,12 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{ 1: _:b1, 2: _:b2 }"^^cdt:Map AS ?map ) + BIND( cdt:get(?map, 1) AS ?v1 ) + BIND( cdt:get(?map, 2) AS ?v2 ) + + FILTER( isBLANK(?v1) ) + FILTER( isBLANK(?v2) ) + FILTER( ! SAMETERM(?v1, ?v2) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/get-error-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/get-error-01.rq new file mode 100644 index 00000000000..3e755e64b2e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/get-error-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + +# list with one integer +ASK { + BIND("{1:'one',2:'two',4:'four'}"^^cdt:Map AS ?map) + BIND(cdt:get(?map, 3) AS ?null) + FILTER(!BOUND(?null)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/get-null-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/get-null-01.rq new file mode 100644 index 00000000000..910a4e9e066 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/get-null-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + +# list with one integer +ASK { + BIND("{1:'one',2:'two',3:null,4:'four'}"^^cdt:Map AS ?map) + BIND(cdt:get(?map, 3) AS ?null) + FILTER(!BOUND(?null)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/keys-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/keys-01.rq new file mode 100644 index 00000000000..523fde778de --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/keys-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# empty map +ASK { + BIND("{}"^^cdt:Map AS ?map) + FILTER(cdt:keys(?map) = "[]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/keys-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/keys-02.rq new file mode 100644 index 00000000000..d658ae5d437 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/keys-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# 1-entry map +ASK { + BIND("{1: 'one'}"^^cdt:Map AS ?map) + FILTER(cdt:keys(?map) = "[1]"^^cdt:List) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/keys-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/keys-03.rq new file mode 100644 index 00000000000..8bdfd43f815 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/keys-03.rq @@ -0,0 +1,10 @@ +PREFIX cdt: + +# 2-entry map +ASK { + BIND("{1: 'one', 2: 'two'}"^^cdt:Map AS ?map) + BIND(cdt:keys(?map) AS ?keys) + FILTER(cdt:size(?keys) = 2) + FILTER(cdt:contains(?keys, 1)) + FILTER(cdt:contains(?keys, 2)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/manifest.ttl b/jena-arq/testing/SPARQL-CDTs/map-functions/manifest.ttl new file mode 100644 index 00000000000..3496be5df22 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/manifest.ttl @@ -0,0 +1,2081 @@ +@prefix rdf: . +@prefix : . +@prefix rdfs: . +@prefix mf: . +@prefix qt: . +@prefix dawgt: . +@prefix sparql: . +@prefix cdt: . + +<> rdf:type mf:Manifest ; + rdfs:label "Functions for cdt:Map Literals" ; + mf:entries + ( + :get-01 + :get-02 + :get-03 + :get-04 + :get-null-01 + :get-error-01 + + :size-01 + :size-02 + :size-03 + :size-04 + :size-05 + + :keys-01 + :keys-02 + :keys-03 + + :containsKey-01 + :containsKey-02 + :containsKey-03 + + :map-constructor-01 + :map-constructor-02 + :map-constructor-03 + :map-constructor-04 + :map-constructor-05 + :map-constructor-06 + :map-constructor-07 + :map-constructor-08 + :map-constructor-09 + :map-constructor-10 + :map-constructor-11 + + :map-equals-01 # empty map + :map-equals-02 # single-element + :map-equals-03 # single-entry, integer shortcut syntax + :map-equals-04 # single-entry, keys with different lexical form but same value + :map-equals-05 # same IRI + :map-equals-06 # blank nodes + :map-equals-07 # blank nodes + :map-equals-08 # blank nodes + :map-equals-09 # blank nodes + :map-equals-null-01 + :map-equals-null-02 + + :map-less-than-01 + :map-less-than-02 + :map-less-than-03 + :map-less-than-04 + :map-less-than-05 + :map-less-than-06 + :map-less-than-07 + :map-less-than-08 + :map-less-than-09 + :map-less-than-10 + :map-less-than-11 + :map-less-than-12 + :map-less-than-13 + :map-less-than-14 + :map-less-than-15 + :map-less-than-16 + :map-less-than-17 + :map-less-than-18 + :map-less-than-19 + :map-less-than-20 + :map-less-than-21 + + :map-less-than-error-01 + :map-less-than-error-02 + :map-less-than-null-01 + :map-less-than-null-02 + :map-less-than-null-03 + :map-less-than-null-04 + + :map-less-equal-01 + :map-less-equal-02 + :map-less-equal-03 + :map-less-equal-04 + :map-less-equal-05 + :map-less-equal-06 + :map-less-equal-07 + :map-less-equal-08 + :map-less-equal-09 + :map-less-equal-10 + :map-less-equal-11 + :map-less-equal-12 + :map-less-equal-13 + :map-less-equal-14 + :map-less-equal-15 + :map-less-equal-16 + :map-less-equal-17 + :map-less-equal-18 + :map-less-equal-19 + :map-less-equal-20 + :map-less-equal-21 + + :map-less-equal-error-01 + :map-less-equal-error-02 + :map-less-equal-null-01 + :map-less-equal-null-02 + :map-less-equal-null-03 + :map-less-equal-null-04 + + :map-greater-than-01 + :map-greater-than-02 + :map-greater-than-03 + :map-greater-than-04 + :map-greater-than-05 + :map-greater-than-06 + :map-greater-than-07 + :map-greater-than-08 + :map-greater-than-09 + :map-greater-than-10 + :map-greater-than-11 + :map-greater-than-12 + :map-greater-than-13 + :map-greater-than-14 + :map-greater-than-15 + :map-greater-than-16 + :map-greater-than-17 + :map-greater-than-18 + :map-greater-than-19 + :map-greater-than-20 + :map-greater-than-21 + + :map-greater-than-error-01 + :map-greater-than-error-02 + :map-greater-than-null-01 + :map-greater-than-null-02 + :map-greater-than-null-03 + :map-greater-than-null-04 + + :map-greater-equal-01 + :map-greater-equal-02 + :map-greater-equal-03 + :map-greater-equal-04 + :map-greater-equal-05 + :map-greater-equal-06 + :map-greater-equal-07 + :map-greater-equal-08 + :map-greater-equal-09 + :map-greater-equal-10 + :map-greater-equal-11 + :map-greater-equal-12 + :map-greater-equal-13 + :map-greater-equal-14 + :map-greater-equal-15 + :map-greater-equal-16 + :map-greater-equal-17 + :map-greater-equal-18 + :map-greater-equal-19 + :map-greater-equal-20 + :map-greater-equal-21 + + :map-greater-equal-error-01 + :map-greater-equal-error-02 + :map-greater-equal-null-01 + :map-greater-equal-null-02 + :map-greater-equal-null-03 + :map-greater-equal-null-04 + + :merge-01 + :merge-02 + :merge-03 + :merge-04 + :merge-05 + :merge-06 + :merge-07 + :merge-08 + :merge-null-01 + :merge-null-02 + :merge-null-03 + :merge-null-04 + + :put-01 + :put-02 + :put-03 + :put-04 + :put-05 + :put-06 + :put-07 + :put-08 + :put-09 + :put-10 + :put-11 + :put-12 + :put-13 + :put-14 + :put-15 + + :put-error-01 + :put-error-02 + :put-error-03 + :put-error-04 + :put-error-05 + + :remove-01 + :remove-02 + :remove-03 + :remove-04 + :remove-05 + :remove-06 + :remove-07 + :remove-08 + :remove-09 + :remove-10 + :remove-11 + + # sameTerm Tests for Maps + :sameterm-01 # empty list + :sameterm-02 # single-pair + :sameterm-03 # single-pair, same entry, but different lexical form for integers + :sameterm-04 # single-pair, same entry, but different lexical form for whitespace + :sameterm-05 # single-pair, same entry with blank node + :sameterm-null-01 # map with null + ) . + +:get-01 rdf:type mf:QueryEvaluationTest ; + mf:name "get-01" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-02 rdf:type mf:QueryEvaluationTest ; + mf:name "get-02" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-03 rdf:type mf:QueryEvaluationTest ; + mf:name "get-03" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-04 rdf:type mf:QueryEvaluationTest ; + mf:name "get-04" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "get-null-01" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:get-error-01 rdf:type mf:QueryEvaluationTest ; + mf:name "get-error-01" ; + mf:feature cdt:get ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-01 rdf:type mf:QueryEvaluationTest ; + mf:name "size-01" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-02 rdf:type mf:QueryEvaluationTest ; + mf:name "size-02" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-03 rdf:type mf:QueryEvaluationTest ; + mf:name "size-03" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-04 rdf:type mf:QueryEvaluationTest ; + mf:name "size-04" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:size-05 rdf:type mf:QueryEvaluationTest ; + mf:name "size-05" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:keys-01 rdf:type mf:QueryEvaluationTest ; + mf:name "keys-01" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:keys-02 rdf:type mf:QueryEvaluationTest ; + mf:name "keys-02" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:keys-03 rdf:type mf:QueryEvaluationTest ; + mf:name "keys-03" ; + mf:feature cdt:size ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:containsKey-01 rdf:type mf:QueryEvaluationTest ; + mf:name "containsKey-01" ; + mf:feature cdt:containsKey ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:containsKey-02 rdf:type mf:QueryEvaluationTest ; + mf:name "containsKey-02" ; + mf:feature cdt:containsKey ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:containsKey-03 rdf:type mf:QueryEvaluationTest ; + mf:name "containsKey-03" ; + mf:feature cdt:containsKey ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-constructor-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-constructor-01" ; + mf:feature cdt:Map ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-constructor-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-constructor-02" ; + mf:feature cdt:Map ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-constructor-03 rdf:type mf:QueryEvaluationTest ; + mf:name "map-constructor-03" ; + mf:feature cdt:Map ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-constructor-04 rdf:type mf:QueryEvaluationTest ; + mf:name "map-constructor-04" ; + mf:feature cdt:Map ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-constructor-05 rdf:type mf:QueryEvaluationTest ; + mf:name "map-constructor-05" ; + mf:feature cdt:Map ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-constructor-06 rdf:type mf:QueryEvaluationTest ; + mf:name "map-constructor-06" ; + mf:feature cdt:Map ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-constructor-07 rdf:type mf:QueryEvaluationTest ; + mf:name "map-constructor-07" ; + mf:feature cdt:Map ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-constructor-08 rdf:type mf:QueryEvaluationTest ; + mf:name "map-constructor-08" ; + mf:feature cdt:Map ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-constructor-09 rdf:type mf:QueryEvaluationTest ; + mf:name "map-constructor-09" ; + mf:feature cdt:Map ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-constructor-10 rdf:type mf:QueryEvaluationTest ; + mf:name "map-constructor-10" ; + mf:feature cdt:Map ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-constructor-11 rdf:type mf:QueryEvaluationTest ; + mf:name "map-constructor-11" ; + mf:feature cdt:Map ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-equals-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-equals-01" ; + rdfs:comment "equals test on empty list" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-equals-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-equals-02" ; + rdfs:comment "equals test on single-element" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-equals-03 rdf:type mf:QueryEvaluationTest ; + mf:name "map-equals-03" ; + rdfs:comment "equals test on single-element, integer shortcut syntax" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-equals-04 rdf:type mf:QueryEvaluationTest ; + mf:name "map-equals-04" ; + rdfs:comment "equals test on single-element, keys with different lexical form but same value" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-equals-05 rdf:type mf:QueryEvaluationTest ; + mf:name "map-equals-05" ; + rdfs:comment "equals test on lists with same IRI" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-equals-06 rdf:type mf:QueryEvaluationTest ; + mf:name "map-equals-06" ; + rdfs:comment "equals test on lists with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-equals-07 rdf:type mf:QueryEvaluationTest ; + mf:name "map-equals-07" ; + rdfs:comment "equals test on lists with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-equals-08 rdf:type mf:QueryEvaluationTest ; + mf:name "map-equals-08" ; + rdfs:comment "equals test on lists with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-equals-09 rdf:type mf:QueryEvaluationTest ; + mf:name "map-equals-09" ; + rdfs:comment "equals test on lists with blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-equals-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-equals-null-01" ; + rdfs:comment "equality of pairs of null within maps" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-equals-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-equals-null-02" ; + rdfs:comment "null is not equal to any RDF term" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-01" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-02" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-03 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-03" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-04 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-04" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-05 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-05" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-06 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-06" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-07 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-07" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-08 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-08" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-09 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-09" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-10 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-10" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-11 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-11" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-12 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-12" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-13 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-13" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-14 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-14" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-15 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-15" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-16 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-16" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-17 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-17" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-18 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-18" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-19 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-19" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-20 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-20" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-21 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-21" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-error-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-error-01" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-error-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-error-02" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-null-01" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-null-02" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-null-03 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-null-03" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-than-null-04 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-than-null-04" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-01" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-02" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-03 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-03" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-04 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-04" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-05 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-05" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-06 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-06" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-07 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-07" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-08 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-08" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-09 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-09" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-10 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-10" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-11 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-11" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-12 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-12" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-13 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-13" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-14 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-14" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-15 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-15" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-16 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-16" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-17 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-17" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-18 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-18" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-19 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-19" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-20 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-20" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-21 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-21" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-error-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-error-01" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-error-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-error-02" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-null-01" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-null-02" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-null-03 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-null-03" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-less-equal-null-04 rdf:type mf:QueryEvaluationTest ; + mf:name "map-less-equal-null-04" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-01" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-02" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-03 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-03" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-04 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-04" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-05 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-05" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-06 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-06" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-07 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-07" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-08 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-08" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-09 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-09" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-10 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-10" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-11 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-11" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-12 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-12" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-13 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-13" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-14 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-14" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-15 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-15" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-16 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-16" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-17 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-17" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-18 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-18" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-19 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-19" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-20 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-20" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-21 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-21" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-error-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-error-01" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-error-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-error-02" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-null-01" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-null-02" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-null-03 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-null-03" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-than-null-04 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-than-null-04" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-01" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-02" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-03 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-03" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-04 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-04" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-05 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-05" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-06 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-06" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-07 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-07" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-08 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-08" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-09 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-09" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-10 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-10" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-11 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-11" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-12 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-12" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-13 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-13" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-14 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-14" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-15 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-15" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-16 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-16" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-17 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-17" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-18 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-18" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-19 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-19" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-20 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-20" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-21 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-21" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-error-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-error-01" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-error-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-error-02" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-null-01" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-null-02" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-null-03 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-null-03" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:map-greater-equal-null-04 rdf:type mf:QueryEvaluationTest ; + mf:name "map-greater-equal-null-04" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:merge-01 rdf:type mf:QueryEvaluationTest ; + mf:name "merge-01" ; + mf:feature cdt:merge ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:merge-02 rdf:type mf:QueryEvaluationTest ; + mf:name "merge-02" ; + mf:feature cdt:merge ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:merge-03 rdf:type mf:QueryEvaluationTest ; + mf:name "merge-03" ; + mf:feature cdt:merge ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:merge-04 rdf:type mf:QueryEvaluationTest ; + mf:name "merge-04" ; + mf:feature cdt:merge ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:merge-05 rdf:type mf:QueryEvaluationTest ; + mf:name "merge-05" ; + mf:feature cdt:merge ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:merge-06 rdf:type mf:QueryEvaluationTest ; + mf:name "merge-06" ; + mf:feature cdt:merge ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:merge-07 rdf:type mf:QueryEvaluationTest ; + mf:name "merge-07" ; + mf:feature cdt:merge ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:merge-08 rdf:type mf:QueryEvaluationTest ; + mf:name "merge-08" ; + mf:feature cdt:merge ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:merge-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "merge-null-01" ; + mf:feature cdt:merge ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:merge-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "merge-null-02" ; + mf:feature cdt:merge ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:merge-null-03 rdf:type mf:QueryEvaluationTest ; + mf:name "merge-null-03" ; + mf:feature cdt:merge ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:merge-null-04 rdf:type mf:QueryEvaluationTest ; + mf:name "merge-null-04" ; + mf:feature cdt:merge ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-01 rdf:type mf:QueryEvaluationTest ; + mf:name "put-01" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-02 rdf:type mf:QueryEvaluationTest ; + mf:name "put-02" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-03 rdf:type mf:QueryEvaluationTest ; + mf:name "put-03" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-04 rdf:type mf:QueryEvaluationTest ; + mf:name "put-04" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-05 rdf:type mf:QueryEvaluationTest ; + mf:name "put-05" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-06 rdf:type mf:QueryEvaluationTest ; + mf:name "put-06" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-07 rdf:type mf:QueryEvaluationTest ; + mf:name "put-07" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-08 rdf:type mf:QueryEvaluationTest ; + mf:name "put-08" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-09 rdf:type mf:QueryEvaluationTest ; + mf:name "put-09" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-10 rdf:type mf:QueryEvaluationTest ; + mf:name "put-10" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-11 rdf:type mf:QueryEvaluationTest ; + mf:name "put-11" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-12 rdf:type mf:QueryEvaluationTest ; + mf:name "put-12" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-13 rdf:type mf:QueryEvaluationTest ; + mf:name "put-13" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-14 rdf:type mf:QueryEvaluationTest ; + mf:name "put-14" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-15 rdf:type mf:QueryEvaluationTest ; + mf:name "put-15" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-error-01 rdf:type mf:QueryEvaluationTest ; + mf:name "put-error-01" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-error-02 rdf:type mf:QueryEvaluationTest ; + mf:name "put-error-02" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-error-03 rdf:type mf:QueryEvaluationTest ; + mf:name "put-error-03" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-error-04 rdf:type mf:QueryEvaluationTest ; + mf:name "put-error-04" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:put-error-05 rdf:type mf:QueryEvaluationTest ; + mf:name "put-error-05" ; + mf:feature cdt:put ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:remove-01 rdf:type mf:QueryEvaluationTest ; + mf:name "remove-01" ; + mf:feature cdt:remove ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:remove-02 rdf:type mf:QueryEvaluationTest ; + mf:name "remove-02" ; + mf:feature cdt:remove ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:remove-03 rdf:type mf:QueryEvaluationTest ; + mf:name "remove-03" ; + mf:feature cdt:remove ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:remove-04 rdf:type mf:QueryEvaluationTest ; + mf:name "remove-04" ; + mf:feature cdt:remove ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:remove-05 rdf:type mf:QueryEvaluationTest ; + mf:name "remove-05" ; + mf:feature cdt:remove ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:remove-06 rdf:type mf:QueryEvaluationTest ; + mf:name "remove-06" ; + mf:feature cdt:remove ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:remove-07 rdf:type mf:QueryEvaluationTest ; + mf:name "remove-07" ; + mf:feature cdt:remove ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:remove-08 rdf:type mf:QueryEvaluationTest ; + mf:name "remove-08" ; + mf:feature cdt:remove ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:remove-09 rdf:type mf:QueryEvaluationTest ; + mf:name "remove-09" ; + mf:feature cdt:remove ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:remove-10 rdf:type mf:QueryEvaluationTest ; + mf:name "remove-10" ; + mf:feature cdt:remove ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:remove-11 rdf:type mf:QueryEvaluationTest ; + mf:name "remove-11" ; + mf:feature cdt:remove ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:sameterm-01 rdf:type mf:QueryEvaluationTest ; + mf:name "sameterm-01" ; + rdfs:comment "sameterm test on empty map" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:sameterm-02 rdf:type mf:QueryEvaluationTest ; + mf:name "sameterm-02" ; + rdfs:comment "sameterm test on single-pair" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:sameterm-03 rdf:type mf:QueryEvaluationTest ; + mf:name "sameterm-03" ; + rdfs:comment "sameterm test on same entry, but different lexical form for integers" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:sameterm-04 rdf:type mf:QueryEvaluationTest ; + mf:name "sameterm-04" ; + rdfs:comment "sameterm test on same entry, but different lexical form for whitespace" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:sameterm-05 rdf:type mf:QueryEvaluationTest ; + mf:name "sameterm-05" ; + rdfs:comment "sameterm test on same entry with blank node" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:sameterm-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "sameterm-null-01" ; + rdfs:comment "sameterm test on list with null (allowed since the test is on the list lexical, not the elements)" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-01.rq new file mode 100644 index 00000000000..24c7ceee413 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:Map() AS ?map ) + FILTER( ?map = "{}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-02.rq new file mode 100644 index 00000000000..dfee4418200 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:Map(1,2,3,4) AS ?map ) + FILTER( ?map = "{1:2, 3:4}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-03.rq new file mode 100644 index 00000000000..b3922cb8681 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-03.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:Map(1,2,1,4) AS ?map ) + FILTER( ?map = "{1:4}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-04.rq new file mode 100644 index 00000000000..15578009929 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-04.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:Map(1,"one", '01'^^xsd:integer, "also one") AS ?map ) + FILTER( ?map = "{1:'one', '01'^^: 'also one'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-05.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-05.rq new file mode 100644 index 00000000000..00ce460d538 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-05.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:Map(1,"one", '01'^^xsd:integer, "also one", 1,"one again") AS ?map ) + FILTER( ?map = "{1:'one again', '01'^^: 'also one'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-06.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-06.rq new file mode 100644 index 00000000000..141e12a3217 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-06.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:Map("hello"@en,"one", "hello", "also one") AS ?map ) + FILTER( ?map = "{'hello'@en:'one', 'hello':'also one'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-07.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-07.rq new file mode 100644 index 00000000000..152af33f6d9 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-07.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:Map(,"uri", "hello", ) AS ?map ) + FILTER( ?map = "{:'uri', 'hello':}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-08.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-08.rq new file mode 100644 index 00000000000..44d9c1f6335 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-08.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:Map(1,2, ?unbound, 4, 5,6) AS ?map ) + FILTER( ?map = "{1:2, 5:6}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-09.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-09.rq new file mode 100644 index 00000000000..ab2f4bda758 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-09.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:Map(1,2, BNODE(), 4, 5,6) AS ?map ) + FILTER( ?map = "{1:2, 5:6}"^^cdt:Map ) # a blank node is not a valid map key +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-10.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-10.rq new file mode 100644 index 00000000000..3a64f2c8dd1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-10.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( cdt:Map(1,2, 3,?unbound) AS ?map ) + + FILTER( BOUND(?map) ) # check that there was no error + FILTER( cdt:size(?map) = 2 ) + + FILTER( cdt:get(?map,1) = 2 ) + + FILTER( cdt:containsKey(?map,3) ) + BIND( cdt:get(?map,3) AS ?v2 ) + FILTER( ! BOUND(?v2) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-11.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-11.rq new file mode 100644 index 00000000000..b345161045d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-constructor-11.rq @@ -0,0 +1,17 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( BNODE() AS ?bnode ) + BIND( cdt:Map(1,2, 3,?bnode) AS ?map ) + + FILTER( BOUND(?map) ) # check that there was no error + FILTER( cdt:size(?map) = 2 ) + + FILTER( cdt:get(?map,1) = 2 ) + + FILTER( cdt:containsKey(?map,3) ) + BIND( cdt:get(?map,3) AS ?v2 ) + FILTER( isBlank(?v2) ) + FILTER( SAMETERM(?v2, ?bnode) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-01.rq new file mode 100644 index 00000000000..67240ba0464 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-01.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER("{ }"^^cdt:Map = "{}"^^cdt:Map) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-02.rq new file mode 100644 index 00000000000..b0159821108 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-02.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER("{ 1: 1 }"^^cdt:Map = "{1:1}"^^cdt:Map) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-03.rq new file mode 100644 index 00000000000..28e6fcde60d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-03.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER("{1:2}"^^cdt:Map = "{ 1 : '2'^^ }"^^cdt:Map) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-04.rq new file mode 100644 index 00000000000..99192acfb82 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-04.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND("{1:2}"^^cdt:Map = "{'+1'^^ : 2.0}"^^cdt:Map AS ?result) + FILTER( ! ?result ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-05.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-05.rq new file mode 100644 index 00000000000..e1a47e0bc88 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-05.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER( "{:true}"^^cdt:Map = "{ : true }"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-06.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-06.rq new file mode 100644 index 00000000000..4adc8e83c53 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-06.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:_:b1}"^^cdt:Map = "{1:_:b1}"^^cdt:Map ) AS ?result ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-07.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-07.rq new file mode 100644 index 00000000000..9364290b005 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-07.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:_:b1}"^^cdt:Map = "{1:_:b2}"^^cdt:Map ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-08.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-08.rq new file mode 100644 index 00000000000..528eebd5257 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-08.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( BNODE() AS ?x ) + BIND( BNODE() AS ?y ) + BIND( ( cdt:Map(1, ?x) = cdt:Map(1, ?y) ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-09.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-09.rq new file mode 100644 index 00000000000..323c37be1ea --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-09.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( BNODE() AS ?x ) + BIND( ( cdt:Map(1, ?x) = cdt:Map(1, ?x) ) AS ?result ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-null-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-null-01.rq new file mode 100644 index 00000000000..76bc5233aec --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-null-01.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND("{1:null}"^^cdt:Map = "{1:null}"^^cdt:Map AS ?result) + + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-null-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-null-02.rq new file mode 100644 index 00000000000..a157c9f0bcb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-equals-null-02.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND("{1:null}"^^cdt:Map = "{1:44}"^^cdt:Map AS ?result) + + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-01.rq new file mode 100644 index 00000000000..d6070ad3e7d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{}"^^cdt:Map >= "{ }"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-02.rq new file mode 100644 index 00000000000..cdca9fe7176 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{}"^^cdt:Map >= "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-03.rq new file mode 100644 index 00000000000..52a9b41e02e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-03.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map >= "{}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-04.rq new file mode 100644 index 00000000000..3cd6db241d1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map >= "{ 1:42 }"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-05.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-05.rq new file mode 100644 index 00000000000..8f90f42cda2 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-05.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map >= "{2:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-06.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-06.rq new file mode 100644 index 00000000000..5e5feae5205 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-06.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{2:42}"^^cdt:Map >= "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-07.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-07.rq new file mode 100644 index 00000000000..e7754c89c21 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-07.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map >= "{1:43}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-08.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-08.rq new file mode 100644 index 00000000000..b5a8ad27cc7 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-08.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:43}"^^cdt:Map >= "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-09.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-09.rq new file mode 100644 index 00000000000..6b25434e260 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-09.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:42}"^^cdt:Map >= "{2:42, 1:43}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-10.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-10.rq new file mode 100644 index 00000000000..4657dea40da --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-10.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:42}"^^cdt:Map >= "{2:43, 1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-11.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-11.rq new file mode 100644 index 00000000000..bc9e7749f86 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-11.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:43}"^^cdt:Map >= "{2:42, 1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-12.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-12.rq new file mode 100644 index 00000000000..0b440beec75 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-12.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map >= "{2:43, 1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-13.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-13.rq new file mode 100644 index 00000000000..5aac5cb6f6d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-13.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:43}"^^cdt:Map >= "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-14.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-14.rq new file mode 100644 index 00000000000..2d85c9c0786 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-14.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:41, 2:43}"^^cdt:Map >= "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-15.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-15.rq new file mode 100644 index 00000000000..586856eb984 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-15.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'001'^^ : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'01'^^ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 >= ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-16.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-16.rq new file mode 100644 index 00000000000..cee7618d736 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-16.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1: '001'^^ }"^^cdt:Map AS ?map1 ) + BIND( "{1: '01'^^ }"^^cdt:Map AS ?map2 ) + BIND( (?map1 >= ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-17.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-17.rq new file mode 100644 index 00000000000..ff892fdfee0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-17.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'2'^^ : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'1'^^ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 >= ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-18.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-18.rq new file mode 100644 index 00000000000..44f4dddc6ca --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-18.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'1'@sv : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'2'@en : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 >= ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-19.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-19.rq new file mode 100644 index 00000000000..b39aa6a4b32 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-19.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'1'@sv : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'1'@en : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 >= ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-20.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-20.rq new file mode 100644 index 00000000000..cf55e6c1934 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-20.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1 : 41}"^^cdt:Map AS ?map1 ) + BIND( "{ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 >= ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-21.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-21.rq new file mode 100644 index 00000000000..cba0a92fc76 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-21.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{ : 41}"^^cdt:Map AS ?map1 ) + BIND( "{ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 >= ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-error-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-error-01.rq new file mode 100644 index 00000000000..d692b96d829 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-error-01.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +# IRIs as map values cannot be compared based on < +ASK { + BIND( "{1: }"^^cdt:Map AS ?map1 ) + BIND( "{1: }"^^cdt:Map AS ?map2 ) + BIND( (?map1 >= ?map2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-error-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-error-02.rq new file mode 100644 index 00000000000..0ab7dbd97dc --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-error-02.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +# IRIs as map values cannot be compared to literals +ASK { + BIND( "{1: }"^^cdt:Map AS ?map1 ) + BIND( "{1: 42}"^^cdt:Map AS ?map2 ) + BIND( (?map1 >= ?map2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-null-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-null-01.rq new file mode 100644 index 00000000000..bf3050ee911 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-null-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:null}"^^cdt:Map >= "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-null-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-null-02.rq new file mode 100644 index 00000000000..b5d45b3018d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-null-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:null}"^^cdt:Map >= "{1:43, 2:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-null-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-null-03.rq new file mode 100644 index 00000000000..de8806cd4ef --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-null-03.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:null}"^^cdt:Map >= "{1:null}"^^cdt:Map ) AS ?result ) + + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-null-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-null-04.rq new file mode 100644 index 00000000000..c92b1faef66 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-equal-null-04.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:null}"^^cdt:Map >= "{1:null, 2:42}"^^cdt:Map ) AS ?result ) + + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-01.rq new file mode 100644 index 00000000000..b7b05e788cd --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{}"^^cdt:Map > "{ }"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-02.rq new file mode 100644 index 00000000000..ec3ec47d099 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{}"^^cdt:Map > "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-03.rq new file mode 100644 index 00000000000..8035cdd5de8 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-03.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map > "{}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-04.rq new file mode 100644 index 00000000000..4508c72f3b5 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map > "{ 1:42 }"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-05.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-05.rq new file mode 100644 index 00000000000..e278f31d420 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-05.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map > "{2:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-06.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-06.rq new file mode 100644 index 00000000000..d6170aade76 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-06.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{2:42}"^^cdt:Map > "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-07.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-07.rq new file mode 100644 index 00000000000..a10c9100104 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-07.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map > "{1:43}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-08.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-08.rq new file mode 100644 index 00000000000..6b00305ea24 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-08.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:43}"^^cdt:Map > "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-09.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-09.rq new file mode 100644 index 00000000000..0cc5ce6d2fa --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-09.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:42}"^^cdt:Map > "{2:42, 1:43}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-10.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-10.rq new file mode 100644 index 00000000000..65015f81fb3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-10.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:42}"^^cdt:Map > "{2:43, 1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-11.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-11.rq new file mode 100644 index 00000000000..bb865cffb98 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-11.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:43}"^^cdt:Map > "{2:42, 1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-12.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-12.rq new file mode 100644 index 00000000000..7661faa26b1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-12.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map > "{2:43, 1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-13.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-13.rq new file mode 100644 index 00000000000..709105e2705 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-13.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:43}"^^cdt:Map > "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-14.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-14.rq new file mode 100644 index 00000000000..6f0fe6ee962 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-14.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:41, 2:43}"^^cdt:Map > "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-15.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-15.rq new file mode 100644 index 00000000000..41c1f7874e9 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-15.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'001'^^ : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'01'^^ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 > ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-16.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-16.rq new file mode 100644 index 00000000000..9d93b5ed95e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-16.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1: '001'^^ }"^^cdt:Map AS ?map1 ) + BIND( "{1: '01'^^ }"^^cdt:Map AS ?map2 ) + BIND( (?map1 > ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-17.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-17.rq new file mode 100644 index 00000000000..0ef9f033da5 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-17.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'2'^^ : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'1'^^ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 > ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-18.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-18.rq new file mode 100644 index 00000000000..6b446e74a00 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-18.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'1'@sv : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'2'@en : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 > ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-19.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-19.rq new file mode 100644 index 00000000000..c93b65922a6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-19.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'1'@sv : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'1'@en : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 > ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-20.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-20.rq new file mode 100644 index 00000000000..4cd9c949779 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-20.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1 : 41}"^^cdt:Map AS ?map1 ) + BIND( "{ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 > ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-21.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-21.rq new file mode 100644 index 00000000000..08e1cd3090f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-21.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{ : 41}"^^cdt:Map AS ?map1 ) + BIND( "{ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 > ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-error-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-error-01.rq new file mode 100644 index 00000000000..87f6638fed5 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-error-01.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +# IRIs as map values cannot be compared based on < +ASK { + BIND( "{1: }"^^cdt:Map AS ?map1 ) + BIND( "{1: }"^^cdt:Map AS ?map2 ) + BIND( (?map1 > ?map2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-error-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-error-02.rq new file mode 100644 index 00000000000..6d503ba87f9 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-error-02.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +# IRIs as map values cannot be compared to literals +ASK { + BIND( "{1: }"^^cdt:Map AS ?map1 ) + BIND( "{1: 42}"^^cdt:Map AS ?map2 ) + BIND( (?map1 > ?map2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-null-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-null-01.rq new file mode 100644 index 00000000000..0a111216e02 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-null-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:null}"^^cdt:Map > "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-null-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-null-02.rq new file mode 100644 index 00000000000..c73288ba148 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-null-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:null}"^^cdt:Map > "{1:43, 2:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-null-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-null-03.rq new file mode 100644 index 00000000000..eb9bd83d3ab --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-null-03.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:null}"^^cdt:Map > "{1:null}"^^cdt:Map ) AS ?result ) + + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-null-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-null-04.rq new file mode 100644 index 00000000000..812e032e1f1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-greater-than-null-04.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:null}"^^cdt:Map > "{1:null, 2:42}"^^cdt:Map ) AS ?result ) + + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-01.rq new file mode 100644 index 00000000000..495f5f3caef --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{}"^^cdt:Map <= "{ }"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-02.rq new file mode 100644 index 00000000000..f7ed335f642 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{}"^^cdt:Map <= "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-03.rq new file mode 100644 index 00000000000..732181a562c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-03.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map <= "{}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-04.rq new file mode 100644 index 00000000000..d6a1b95b9e6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map <= "{ 1:42 }"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-05.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-05.rq new file mode 100644 index 00000000000..bb808d6de1d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-05.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map <= "{2:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-06.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-06.rq new file mode 100644 index 00000000000..fbd0320bb58 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-06.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{2:42}"^^cdt:Map <= "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-07.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-07.rq new file mode 100644 index 00000000000..84b26d1da77 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-07.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map <= "{1:43}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-08.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-08.rq new file mode 100644 index 00000000000..7dfdb4cf22e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-08.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:43}"^^cdt:Map <= "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-09.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-09.rq new file mode 100644 index 00000000000..fe2a2ba1456 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-09.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:42}"^^cdt:Map <= "{2:42, 1:43}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-10.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-10.rq new file mode 100644 index 00000000000..1d440990254 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-10.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:42}"^^cdt:Map <= "{2:43, 1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-11.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-11.rq new file mode 100644 index 00000000000..d8e2bb0282b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-11.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:43}"^^cdt:Map <= "{2:42, 1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-12.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-12.rq new file mode 100644 index 00000000000..36bd3b10253 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-12.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map <= "{2:43, 1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-13.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-13.rq new file mode 100644 index 00000000000..7bd85cf71dd --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-13.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:43}"^^cdt:Map <= "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-14.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-14.rq new file mode 100644 index 00000000000..0ce22f4763d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-14.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:41, 2:43}"^^cdt:Map <= "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-15.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-15.rq new file mode 100644 index 00000000000..e0fb8c36cf9 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-15.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'001'^^ : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'01'^^ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 <= ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-16.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-16.rq new file mode 100644 index 00000000000..fd20e5bb825 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-16.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1: '001'^^ }"^^cdt:Map AS ?map1 ) + BIND( "{1: '01'^^ }"^^cdt:Map AS ?map2 ) + BIND( (?map1 <= ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-17.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-17.rq new file mode 100644 index 00000000000..25a2f79833e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-17.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'2'^^ : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'1'^^ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 <= ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-18.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-18.rq new file mode 100644 index 00000000000..f51f4facbac --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-18.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'1'@sv : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'2'@en : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 <= ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-19.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-19.rq new file mode 100644 index 00000000000..6d3b223e360 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-19.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'1'@sv : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'1'@en : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 <= ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-20.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-20.rq new file mode 100644 index 00000000000..d8fa45606a2 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-20.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1 : 41}"^^cdt:Map AS ?map1 ) + BIND( "{ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 <= ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-21.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-21.rq new file mode 100644 index 00000000000..7b3d87ec0a0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-21.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{ : 41}"^^cdt:Map AS ?map1 ) + BIND( "{ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 <= ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-error-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-error-01.rq new file mode 100644 index 00000000000..6f8d63befa0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-error-01.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +# IRIs as map values cannot be compared based on < +ASK { + BIND( "{1: }"^^cdt:Map AS ?map1 ) + BIND( "{1: }"^^cdt:Map AS ?map2 ) + BIND( (?map1 <= ?map2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-error-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-error-02.rq new file mode 100644 index 00000000000..e9dc57a2d7e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-error-02.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +# IRIs as map values cannot be compared to literals +ASK { + BIND( "{1: }"^^cdt:Map AS ?map1 ) + BIND( "{1: 42}"^^cdt:Map AS ?map2 ) + BIND( (?map1 <= ?map2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-null-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-null-01.rq new file mode 100644 index 00000000000..19aca09cd51 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-null-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:null}"^^cdt:Map <= "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-null-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-null-02.rq new file mode 100644 index 00000000000..9733a4ee702 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-null-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:null}"^^cdt:Map < "{1:43, 2:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-null-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-null-03.rq new file mode 100644 index 00000000000..a49505965d6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-null-03.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:null}"^^cdt:Map < "{1:null}"^^cdt:Map ) AS ?result ) + + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-null-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-null-04.rq new file mode 100644 index 00000000000..2a9553d4a72 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-equal-null-04.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:null}"^^cdt:Map < "{1:null, 2:42}"^^cdt:Map ) AS ?result ) + + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-01.rq new file mode 100644 index 00000000000..301d499820b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{}"^^cdt:Map < "{ }"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-02.rq new file mode 100644 index 00000000000..f05c1818f0d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{}"^^cdt:Map < "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-03.rq new file mode 100644 index 00000000000..ae7eac4c911 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-03.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map < "{}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-04.rq new file mode 100644 index 00000000000..a458eb496bf --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map < "{ 1:42 }"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-05.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-05.rq new file mode 100644 index 00000000000..114b3fcb28d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-05.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map < "{2:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-06.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-06.rq new file mode 100644 index 00000000000..3b95e73703c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-06.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{2:42}"^^cdt:Map < "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-07.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-07.rq new file mode 100644 index 00000000000..962a21c7008 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-07.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map < "{1:43}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-08.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-08.rq new file mode 100644 index 00000000000..98ea6502bde --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-08.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:43}"^^cdt:Map < "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-09.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-09.rq new file mode 100644 index 00000000000..537a727c1a3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-09.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:42}"^^cdt:Map < "{2:42, 1:43}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-10.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-10.rq new file mode 100644 index 00000000000..67c0bfce86c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-10.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:42}"^^cdt:Map < "{2:43, 1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-11.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-11.rq new file mode 100644 index 00000000000..b847491699b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-11.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:43}"^^cdt:Map < "{2:42, 1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-12.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-12.rq new file mode 100644 index 00000000000..c4bdfb35922 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-12.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42}"^^cdt:Map < "{2:43, 1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-13.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-13.rq new file mode 100644 index 00000000000..bccc0b7fa16 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-13.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:43}"^^cdt:Map < "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-14.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-14.rq new file mode 100644 index 00000000000..ac0f834e8a7 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-14.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:41, 2:43}"^^cdt:Map < "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-15.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-15.rq new file mode 100644 index 00000000000..5fbda080e1f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-15.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'001'^^ : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'01'^^ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 < ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-16.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-16.rq new file mode 100644 index 00000000000..631106d40a0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-16.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1: '001'^^ }"^^cdt:Map AS ?map1 ) + BIND( "{1: '01'^^ }"^^cdt:Map AS ?map2 ) + BIND( (?map1 < ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-17.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-17.rq new file mode 100644 index 00000000000..24abc60d57c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-17.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'2'^^ : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'1'^^ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 < ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-18.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-18.rq new file mode 100644 index 00000000000..c52fbf82b64 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-18.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'1'@sv : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'2'@en : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 < ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-19.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-19.rq new file mode 100644 index 00000000000..b128fa94ebd --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-19.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{'1'@sv : 41}"^^cdt:Map AS ?map1 ) + BIND( "{'1'@en : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 < ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-20.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-20.rq new file mode 100644 index 00000000000..99b50c6efa5 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-20.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1 : 41}"^^cdt:Map AS ?map1 ) + BIND( "{ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 < ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-21.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-21.rq new file mode 100644 index 00000000000..dd01d5ab876 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-21.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{ : 41}"^^cdt:Map AS ?map1 ) + BIND( "{ : 41}"^^cdt:Map AS ?map2 ) + BIND( (?map1 < ?map2 ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = false ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-error-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-error-01.rq new file mode 100644 index 00000000000..dbbf16c856a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-error-01.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +# IRIs as map values cannot be compared based on < +ASK { + BIND( "{1: }"^^cdt:Map AS ?map1 ) + BIND( "{1: }"^^cdt:Map AS ?map2 ) + BIND( (?map1 < ?map2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-error-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-error-02.rq new file mode 100644 index 00000000000..6aa34c7b153 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-error-02.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +# IRIs as map values cannot be compared to literals +ASK { + BIND( "{1: }"^^cdt:Map AS ?map1 ) + BIND( "{1: 42}"^^cdt:Map AS ?map2 ) + BIND( (?map1 < ?map2 ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-null-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-null-01.rq new file mode 100644 index 00000000000..8abe6f4f14a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-null-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:null}"^^cdt:Map < "{1:42}"^^cdt:Map ) AS ?result ) + FILTER( ! BOUND(?result) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-null-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-null-02.rq new file mode 100644 index 00000000000..9733a4ee702 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-null-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:42, 2:null}"^^cdt:Map < "{1:43, 2:42}"^^cdt:Map ) AS ?result ) + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-null-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-null-03.rq new file mode 100644 index 00000000000..a085d4c5d3d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-null-03.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:null}"^^cdt:Map <= "{1:null}"^^cdt:Map ) AS ?result ) + + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-null-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-null-04.rq new file mode 100644 index 00000000000..d9a3a57b18f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/map-less-than-null-04.rq @@ -0,0 +1,9 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( ( "{1:null}"^^cdt:Map <= "{1:null, 2:42}"^^cdt:Map ) AS ?result ) + + FILTER( BOUND(?result) ) + FILTER( ?result = true ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/merge-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-01.rq new file mode 100644 index 00000000000..eed6a712ab1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-01.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{}"^^cdt:Map AS ?map1 ) + BIND( "{}"^^cdt:Map AS ?map2 ) + BIND( cdt:merge(?map1, ?map2) AS ?merged ) + + FILTER( ?merged = "{}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/merge-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-02.rq new file mode 100644 index 00000000000..75057208ede --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-02.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1: 'one'}"^^cdt:Map AS ?map1 ) + BIND( "{}"^^cdt:Map AS ?map2 ) + BIND( cdt:merge(?map1, ?map2) AS ?merged ) + + FILTER( ?merged = "{1: 'one'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/merge-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-03.rq new file mode 100644 index 00000000000..d91a4b5101b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-03.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{}"^^cdt:Map AS ?map1 ) + BIND( "{1: 'one'}"^^cdt:Map AS ?map2 ) + BIND( cdt:merge(?map1, ?map2) AS ?merged ) + + FILTER( ?merged = "{1: 'one'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/merge-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-04.rq new file mode 100644 index 00000000000..f626e35edad --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-04.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1: 'one'}"^^cdt:Map AS ?map1 ) + BIND( "{2: 'two'}"^^cdt:Map AS ?map2 ) + BIND( cdt:merge(?map1, ?map2) AS ?merged ) + + FILTER( ?merged = "{1: 'one', 2: 'two'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/merge-05.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-05.rq new file mode 100644 index 00000000000..fa12ec8e689 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-05.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1: 'one', 2: 'two'}"^^cdt:Map AS ?map1 ) + BIND( "{1: 'another one', 3: 'three'}"^^cdt:Map AS ?map2 ) + BIND( cdt:merge(?map1, ?map2) AS ?merged ) + + FILTER( ?merged = "{1: 'one', 2: 'two', 3: 'three'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/merge-06.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-06.rq new file mode 100644 index 00000000000..82142c1bc10 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-06.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1: 'one', 2: 'two'}"^^cdt:Map AS ?map1 ) + BIND( "{'01'^^: 'another one', 3: 'three'}"^^cdt:Map AS ?map2 ) + BIND( cdt:merge(?map1, ?map2) AS ?merged ) + + FILTER( ?merged = "{1: 'one', '01'^^: 'another one', 2: 'two', 3: 'three'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/merge-07.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-07.rq new file mode 100644 index 00000000000..2ee2f6efed4 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-07.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{: 'one', 2: 'two'}"^^cdt:Map AS ?map1 ) + BIND( "{'hello'@en: }"^^cdt:Map AS ?map2 ) + BIND( cdt:merge(?map1, ?map2) AS ?merged ) + + FILTER( ?merged = "{: 'one', 2: 'two', 'hello'@en: }"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/merge-08.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-08.rq new file mode 100644 index 00000000000..72326fcc44c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-08.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{: 'one', 'hello': 42}"^^cdt:Map AS ?map1 ) + BIND( "{: 'ONE', 'hello'@en: }"^^cdt:Map AS ?map2 ) + BIND( cdt:merge(?map1, ?map2) AS ?merged ) + + FILTER( ?merged = "{: 'one', 'hello': 42, 'hello'@en: }"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/merge-null-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-null-01.rq new file mode 100644 index 00000000000..7118071d1f5 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-null-01.rq @@ -0,0 +1,18 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1: null, 2: 'two'}"^^cdt:Map AS ?map1 ) + BIND( "{3: 'three'}"^^cdt:Map AS ?map2 ) + BIND( cdt:merge(?map1, ?map2) AS ?merged ) + + FILTER( cdt:size(?merged) = 3 ) + + FILTER( cdt:containsKey(?merged,1) ) + BIND( cdt:get(?merged,1) AS ?x ) + FILTER( ! BOUND(?x) ) + + FILTER( cdt:get(?merged,2) = "two" ) + + FILTER( cdt:get(?merged,3) = "three" ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/merge-null-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-null-02.rq new file mode 100644 index 00000000000..5f730a2cf33 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-null-02.rq @@ -0,0 +1,18 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1: 'one', 2: 'two'}"^^cdt:Map AS ?map1 ) + BIND( "{3: null}"^^cdt:Map AS ?map2 ) + BIND( cdt:merge(?map1, ?map2) AS ?merged ) + + FILTER( cdt:size(?merged) = 3 ) + + FILTER( cdt:containsKey(?merged,3) ) + BIND( cdt:get(?merged,3) AS ?x ) + FILTER( ! BOUND(?x) ) + + FILTER( cdt:get(?merged,1) = "one" ) + + FILTER( cdt:get(?merged,2) = "two" ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/merge-null-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-null-03.rq new file mode 100644 index 00000000000..fbc08e9e538 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-null-03.rq @@ -0,0 +1,14 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1: null}"^^cdt:Map AS ?map1 ) + BIND( "{1: 'one'}"^^cdt:Map AS ?map2 ) + BIND( cdt:merge(?map1, ?map2) AS ?merged ) + + FILTER( cdt:size(?merged) = 1 ) + + FILTER( cdt:containsKey(?merged,1) ) + BIND( cdt:get(?merged,1) AS ?x ) + FILTER( ! BOUND(?x) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/merge-null-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-null-04.rq new file mode 100644 index 00000000000..7f603d410e1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/merge-null-04.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1: 'one'}"^^cdt:Map AS ?map1 ) + BIND( "{1: null}"^^cdt:Map AS ?map2 ) + BIND( cdt:merge(?map1, ?map2) AS ?merged ) + + FILTER( ?merged = "{1: 'one'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-01.rq new file mode 100644 index 00000000000..ea78bc11e12 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-01.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND( "{}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, 1, "one") AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = "{1:'one'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-02.rq new file mode 100644 index 00000000000..4e5abd50335 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-02.rq @@ -0,0 +1,12 @@ +PREFIX cdt: + +ASK { + BIND( "{}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, 1, ?unbound) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( cdt:size(?mapOut) = 1 ) + FILTER( cdt:containsKey(?mapOut,1) ) + BIND( cdt:get(?mapOut,1) AS ?value ) + FILTER( ! BOUND(?value) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-03.rq new file mode 100644 index 00000000000..f31aa232147 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-03.rq @@ -0,0 +1,12 @@ +PREFIX cdt: + +ASK { + BIND( "{}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, 1) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( cdt:size(?mapOut) = 1 ) + FILTER( cdt:containsKey(?mapOut,1) ) + BIND( cdt:get(?mapOut,1) AS ?value ) + FILTER( ! BOUND(?value) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-04.rq new file mode 100644 index 00000000000..89e32f3746b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-04.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND( "{1:'one', 2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, 1, "one") AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = ?mapIn ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-05.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-05.rq new file mode 100644 index 00000000000..49508c4bd23 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-05.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND( "{1:'one', 2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, 1, "alsoOne") AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = "{1:'alsoOne', 2:'two'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-06.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-06.rq new file mode 100644 index 00000000000..7b719b1dff6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-06.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND( "{1:null, 2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, 1, "one") AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = "{1:'one', 2:'two'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-07.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-07.rq new file mode 100644 index 00000000000..30beb3727c1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-07.rq @@ -0,0 +1,15 @@ +PREFIX cdt: + +ASK { + BIND( "{1:'one', 2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, 1, ?unbound) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( cdt:size(?mapOut) = 2 ) + + FILTER( cdt:containsKey(?mapOut,1) ) + BIND( cdt:get(?mapOut,1) AS ?v1 ) + FILTER( ! BOUND(?v1) ) + + FILTER( cdt:get(?mapOut,2) = "two" ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-08.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-08.rq new file mode 100644 index 00000000000..47aa279eeea --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-08.rq @@ -0,0 +1,15 @@ +PREFIX cdt: + +ASK { + BIND( "{1:'one', 2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, 1) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( cdt:size(?mapOut) = 2 ) + + FILTER( cdt:containsKey(?mapOut,1) ) + BIND( cdt:get(?mapOut,1) AS ?v1 ) + FILTER( ! BOUND(?v1) ) + + FILTER( cdt:get(?mapOut,2) = "two" ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-09.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-09.rq new file mode 100644 index 00000000000..d4cff7a46ad --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-09.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND( "{1:'one'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, 2, "two") AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = "{1:'one', 2:'two'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-10.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-10.rq new file mode 100644 index 00000000000..2db72225104 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-10.rq @@ -0,0 +1,15 @@ +PREFIX cdt: + +ASK { + BIND( "{1:'one'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, 2, ?unbound) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( cdt:size(?mapOut) = 2 ) + + FILTER( cdt:get(?mapOut,1) = "one" ) + + FILTER( cdt:containsKey(?mapOut,2) ) + BIND( cdt:get(?mapOut,2) AS ?v2 ) + FILTER( ! BOUND(?v2) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-11.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-11.rq new file mode 100644 index 00000000000..073fd9a1aab --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-11.rq @@ -0,0 +1,15 @@ +PREFIX cdt: + +ASK { + BIND( "{1:'one'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, 2) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( cdt:size(?mapOut) = 2 ) + + FILTER( cdt:get(?mapOut,1) = "one" ) + + FILTER( cdt:containsKey(?mapOut,2) ) + BIND( cdt:get(?mapOut,2) AS ?v2 ) + FILTER( ! BOUND(?v2) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-12.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-12.rq new file mode 100644 index 00000000000..727c746486c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-12.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1:'one', 2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, "01"^^xsd:integer, "alsoOne") AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = "{1:'one', '01'^^:'alsoOne', 2:'two'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-13.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-13.rq new file mode 100644 index 00000000000..d956701e9fc --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-13.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND( "{'hello'@en:'one', 2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, 'hello'@en, "alsoOne") AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = "{'hello'@en:'alsoOne', 2:'two'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-14.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-14.rq new file mode 100644 index 00000000000..fd61141bd3c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-14.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND( "{'hello'@en:'one', 2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, 'hello', "alsoOne") AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = "{'hello'@en:'one', 'hello':'alsoOne', 2:'two'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-15.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-15.rq new file mode 100644 index 00000000000..1c2b041a378 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-15.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND( "{:'one', 2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, , "alsoOne") AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = "{:'alsoOne', 2:'two'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-01.rq new file mode 100644 index 00000000000..24ae878b51d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-01.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + +ASK { + BIND( "{}" AS ?mapIn ) # not a cdt:Map literal + BIND( cdt:put(?mapIn, 1, "one") AS ?mapOut ) + + FILTER( ! BOUND(?mapOut) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-02.rq new file mode 100644 index 00000000000..109eb2c4793 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-02.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + +ASK { + BIND( "{ 1 }"^^cdt:Map AS ?mapIn ) # a cdt:Map literal that is not well-formed + BIND( cdt:put(?mapIn, 1, "one") AS ?mapOut ) + + FILTER( ! BOUND(?mapOut) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-03.rq new file mode 100644 index 00000000000..2e96f878aa2 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-03.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + +ASK { + BIND( "{}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, BNODE(), "one") AS ?mapOut ) # blank nodes are not valid as map keys + + FILTER( ! BOUND(?mapOut) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-04.rq new file mode 100644 index 00000000000..7aeba3904a9 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-04.rq @@ -0,0 +1,8 @@ +PREFIX cdt: + +ASK { + BIND( "{}"^^cdt:Map AS ?mapIn ) + BIND( cdt:put(?mapIn, ?unbound, "one") AS ?mapOut ) # unbound map key + + FILTER( ! BOUND(?mapOut) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-05.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-05.rq new file mode 100644 index 00000000000..b1df47e9555 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/put-error-05.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND( cdt:put(?unbound, 1, "one") AS ?mapOut ) # unbound cdt:Map literal + + FILTER( ! BOUND(?mapOut) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/remove-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-01.rq new file mode 100644 index 00000000000..3dee66fb970 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-01.rq @@ -0,0 +1,11 @@ +PREFIX cdt: + +ASK { + BIND( "{1:'one',2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:remove(?mapIn, BNODE()) AS ?mapOut ) # special case because a bnode is not a map key + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( SAMETERM(?mapIn,?mapOut) ) # by definition of this special case, + # the input term must be returned + # (input and output must be the same term) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/remove-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-02.rq new file mode 100644 index 00000000000..463f9981097 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-02.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND( "{}"^^cdt:Map AS ?mapIn ) + BIND( cdt:remove(?mapIn, 1) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = "{}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/remove-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-03.rq new file mode 100644 index 00000000000..3684db8f60b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-03.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND( "{1:'one'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:remove(?mapIn, 1) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = "{}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/remove-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-04.rq new file mode 100644 index 00000000000..f42963eab23 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-04.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND( "{1:'one',2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:remove(?mapIn, 1) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = "{2:'two'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/remove-05.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-05.rq new file mode 100644 index 00000000000..74c653ce559 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-05.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1:'one', '02'^^:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:remove(?mapIn, '02'^^xsd:integer) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = "{1:'one'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/remove-06.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-06.rq new file mode 100644 index 00000000000..80547e21329 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-06.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1:'one', '02'^^:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:remove(?mapIn, '2'^^xsd:integer) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = ?mapIn ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/remove-07.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-07.rq new file mode 100644 index 00000000000..2fded4f5b69 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-07.rq @@ -0,0 +1,10 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + BIND( "{1:'one', 2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:remove(?mapIn, '02'^^xsd:integer) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = ?mapIn ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/remove-08.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-08.rq new file mode 100644 index 00000000000..43afdcf7460 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-08.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND("{'hello'@en:'there'@en, 1:'one', 2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:remove(?mapIn, 'hello'@en) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = "{1:'one', 2:'two'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/remove-09.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-09.rq new file mode 100644 index 00000000000..b652047ea39 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-09.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND("{'hello'@en:'there'@en, 1:'one', 2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:remove(?mapIn, 'hello') AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = ?mapIn ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/remove-10.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-10.rq new file mode 100644 index 00000000000..c0047b98139 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-10.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND("{'hello':'there', 1:'one', 2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:remove(?mapIn, 'hello'@en) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = ?mapIn ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/remove-11.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-11.rq new file mode 100644 index 00000000000..677a8f2ffe3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/remove-11.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND("{:'there'@en, 1:'one', 2:'two'}"^^cdt:Map AS ?mapIn ) + BIND( cdt:remove(?mapIn, ) AS ?mapOut ) + + FILTER( BOUND(?mapOut) ) # check that there was no error + FILTER( ?mapOut = "{1:'one', 2:'two'}"^^cdt:Map ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-01.rq new file mode 100644 index 00000000000..c9cdc16d575 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-01.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER(SAMETERM("{}"^^cdt:Map, "{}"^^cdt:Map)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-02.rq new file mode 100644 index 00000000000..2afd488839f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-02.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER(SAMETERM("{1: 1}"^^cdt:Map, "{1: 1}"^^cdt:Map)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-03.rq new file mode 100644 index 00000000000..096c9202fca --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-03.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER(! SAMETERM("{1: 2}"^^cdt:Map, "{1: '2'^^}"^^cdt:Map)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-04.rq new file mode 100644 index 00000000000..4c6e9c584e3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-04.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER(! SAMETERM("{ 1: 1 }"^^cdt:Map, "{1:1}"^^cdt:Map)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-05.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-05.rq new file mode 100644 index 00000000000..5f9c2143e40 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-05.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER(SAMETERM("{ 1: _:a }"^^cdt:Map, "{ 1: _:a }"^^cdt:Map)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-null-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-null-01.rq new file mode 100644 index 00000000000..d929a63b2b1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/sameterm-null-01.rq @@ -0,0 +1,6 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + FILTER(SAMETERM("{1:null}"^^cdt:Map, "{1:null}"^^cdt:Map)) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/size-01.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/size-01.rq new file mode 100644 index 00000000000..b71c7cba36f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/size-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# empty map +ASK { + BIND("{}"^^cdt:Map AS ?map) + FILTER(cdt:size(?map) = 0) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/size-02.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/size-02.rq new file mode 100644 index 00000000000..41818080b61 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/size-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# 1-entry map +ASK { + BIND("{1: 'one'}"^^cdt:Map AS ?map) + FILTER(cdt:size(?map) = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/size-03.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/size-03.rq new file mode 100644 index 00000000000..84f06e2b2c8 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/size-03.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# 2-entry map +ASK { + BIND("{1: 'one', 2: 'two'}"^^cdt:Map AS ?map) + FILTER(cdt:size(?map) = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/size-04.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/size-04.rq new file mode 100644 index 00000000000..f78148e0d76 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/size-04.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# 2-entry map, mixed types +ASK { + BIND("{1: 'one', 'hello'@en: 2.5}"^^cdt:Map AS ?map) + FILTER(cdt:size(?map) = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/size-05.rq b/jena-arq/testing/SPARQL-CDTs/map-functions/size-05.rq new file mode 100644 index 00000000000..d6a8faa0347 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/size-05.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +# 2-entry map, including null value +ASK { + BIND("{1: 'one', 2: null}"^^cdt:Map AS ?map) + FILTER(cdt:size(?map) = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/map-functions/true.srx b/jena-arq/testing/SPARQL-CDTs/map-functions/true.srx new file mode 100644 index 00000000000..c187f066ab1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/map-functions/true.srx @@ -0,0 +1,5 @@ + + + + true + diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/empty.ttl b/jena-arq/testing/SPARQL-CDTs/orderby/empty.ttl new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/manifest.ttl b/jena-arq/testing/SPARQL-CDTs/orderby/manifest.ttl new file mode 100644 index 00000000000..8b2b9b3bf09 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/manifest.ttl @@ -0,0 +1,291 @@ +@prefix rdf: . +@prefix : . +@prefix rdfs: . +@prefix mf: . +@prefix qt: . +@prefix dawgt: . +@prefix sparql: . +@prefix cdt: . + +<> rdf:type mf:Manifest ; + rdfs:label "ORDER BY for cdt:List and cdt:Map literals" ; + mf:entries + ( + :order-list-03 + :order-list-04 + :order-list-05 + :order-list-06 + :order-list-07 + :order-list-08 + :order-list-09 + :order-list-10 + + :order-list-null-01 + :order-list-null-02 + + :order-map-03 + :order-map-03 + :order-map-04 + :order-map-05 + :order-map-06 + :order-map-07 + :order-map-08 + :order-map-09 + :order-map-10 + :order-map-11 + :order-map-12 + :order-map-13 + :order-map-14 + :order-map-15 + :order-map-16 + :order-map-17 + + :order-map-null-01 + :order-map-null-02 + ) . + +:order-list-03 rdf:type mf:QueryEvaluationTest ; + mf:name "order-list-03" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-list-04 rdf:type mf:QueryEvaluationTest ; + mf:name "order-list-04" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-list-05 rdf:type mf:QueryEvaluationTest ; + mf:name "order-list-05" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-list-06 rdf:type mf:QueryEvaluationTest ; + mf:name "order-list-06" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-list-07 rdf:type mf:QueryEvaluationTest ; + mf:name "order-list-07" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-list-08 rdf:type mf:QueryEvaluationTest ; + mf:name "order-list-08" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-list-09 rdf:type mf:QueryEvaluationTest ; + mf:name "order-list-09" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-list-10 rdf:type mf:QueryEvaluationTest ; + mf:name "order-list-10" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + + +:order-list-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "order-list-null-01" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-list-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "order-list-null-02" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + + +:order-map-03 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-03" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-04 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-04" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-05 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-05" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-06 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-06" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-07 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-07" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-08 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-08" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-09 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-09" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-10 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-10" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-11 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-11" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-12 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-12" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-13 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-13" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-14 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-14" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-15 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-15" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-16 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-16" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-17 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-17" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + + +:order-map-null-01 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-null-01" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . + +:order-map-null-02 rdf:type mf:QueryEvaluationTest ; + mf:name "order-map-null-02" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result ; + . diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-list-03.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-03.rq new file mode 100644 index 00000000000..689416cfc51 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-03.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?list) { + (1 "[1]"^^cdt:List) + (2 "[ 2]"^^cdt:List) # the space is on purpose, to make sure the comparison is not done in terms of the lexical forms + } + } + ORDER BY ?list LIMIT 1 + } + FILTER (?id = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-list-04.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-04.rq new file mode 100644 index 00000000000..4e67eaf17f4 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-04.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?list) { + (1 "['01'^^]"^^cdt:List) + (2 "['001'^^]"^^cdt:List) + } + } + ORDER BY ?list LIMIT 1 + } + FILTER ( (?id = 1) || (?id = 2) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-list-05.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-05.rq new file mode 100644 index 00000000000..85918ac433c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-05.rq @@ -0,0 +1,18 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?list) { + (1 "[1]"^^cdt:List) + (2 "[ ]"^^cdt:List) + (3 "[ 2]"^^cdt:List) # the spaces are on purpose, to make sure the comparison is not done in terms of the lexical forms + (4 "[ ]"^^cdt:List) + (5 "[3]"^^cdt:List) + } + } + ORDER BY ?list LIMIT 1 + } + FILTER ( (?id = 2) || (?id = 4) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-list-06.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-06.rq new file mode 100644 index 00000000000..5782ad842f6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-06.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?list) { + (1 "[ 1, 1]"^^cdt:List) # the leading space is on purpose, to make sure the comparison is not done in terms of the lexical forms + (2 "[1]"^^cdt:List) + } + } + ORDER BY ?list LIMIT 1 + } + FILTER (?id = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-list-07.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-07.rq new file mode 100644 index 00000000000..cbdf9e32700 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-07.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?list) { + (1 "[1, 1]"^^cdt:List) + (2 "[2]"^^cdt:List) + } + } + ORDER BY ?list LIMIT 1 + } + FILTER (?id = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-list-08.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-08.rq new file mode 100644 index 00000000000..129cf1c96bb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-08.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?list) { + (1 "[2, 1]"^^cdt:List) + (2 "[2, 2]"^^cdt:List) + } + } + ORDER BY ?list LIMIT 1 + } + FILTER (?id = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-list-09.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-09.rq new file mode 100644 index 00000000000..1754162fd2b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-09.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?list) { + (1 "[, 1]"^^cdt:List) + (2 "[, 2]"^^cdt:List) + } + } + ORDER BY ?list LIMIT 1 + } + FILTER (?id = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-list-10.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-10.rq new file mode 100644 index 00000000000..755a43e616f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-10.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?list) { + (1 "[, ]"^^cdt:List) + (2 "[, ]"^^cdt:List) + } + } + ORDER BY ?list LIMIT 1 + } + FILTER (?id = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-list-null-01.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-null-01.rq new file mode 100644 index 00000000000..d087a21fd1a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-null-01.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?list) { + (1 "[null, 1]"^^cdt:List) + (2 "[null, 2]"^^cdt:List) # the added space is on purpose, to make sure the comparison is not done in terms of the lexical forms + } + } + ORDER BY ?list LIMIT 1 + } + FILTER (?id = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-list-null-02.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-null-02.rq new file mode 100644 index 00000000000..d3b601b0acd --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-list-null-02.rq @@ -0,0 +1,16 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?list) { + (1 "[ null , 1]"^^cdt:List) + (2 "[ 'hello', 2]"^^cdt:List) + (3 "[null , 3]"^^cdt:List) + } + } + ORDER BY DESC(?list) LIMIT 1 # attention, DESC here to check that the non-null element ordered highest + } + FILTER (?id = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-03.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-03.rq new file mode 100644 index 00000000000..985acd8c359 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-03.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{1: 42}"^^cdt:Map) + (2 "{ 2: 42}"^^cdt:Map) # the space is on purpose, to make sure the comparison is not done in terms of the lexical forms + } + } + ORDER BY ?map LIMIT 1 + } + FILTER (?id = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-04.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-04.rq new file mode 100644 index 00000000000..b2b1c777590 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-04.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{ '01'^^: 42 }"^^cdt:Map) + (2 "{ '001'^^: 42 }"^^cdt:Map) + } + } + ORDER BY ?map LIMIT 1 + } + FILTER (?id = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-05.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-05.rq new file mode 100644 index 00000000000..87f1c02a479 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-05.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{ '1'^^: 42 }"^^cdt:Map) # note, different datatype + (2 "{ '2'^^: 42 }"^^cdt:Map) + } + } + ORDER BY ?map LIMIT 1 + } + FILTER (?id = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-06.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-06.rq new file mode 100644 index 00000000000..77b73acd231 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-06.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{ : 42 }"^^cdt:Map) + (2 "{ '2'^^: 42}"^^cdt:Map) + } + } + ORDER BY ?map LIMIT 1 + } + FILTER (?id = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-07.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-07.rq new file mode 100644 index 00000000000..6687b346ec9 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-07.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{ : 42 }"^^cdt:Map) + (2 "{ : 42 }"^^cdt:Map) + } + } + ORDER BY ?map LIMIT 1 + } + FILTER (?id = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-08.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-08.rq new file mode 100644 index 00000000000..75d67c869bb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-08.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{1: 42}"^^cdt:Map) + (2 "{ 1: 43}"^^cdt:Map) # the space is on purpose, to make sure the comparison is not done in terms of the lexical forms + } + } + ORDER BY ?map LIMIT 1 + } + FILTER (?id = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-09.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-09.rq new file mode 100644 index 00000000000..5556e1735a5 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-09.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{ 1: '01'^^ }"^^cdt:Map) + (2 "{ 1: '001'^^ }"^^cdt:Map) + } + } + ORDER BY ?map LIMIT 1 + } + FILTER ( (?id = 1) || (?id = 2) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-10.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-10.rq new file mode 100644 index 00000000000..50c7412925e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-10.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{ 1: 1 }"^^cdt:Map) + (2 "{ 1: }"^^cdt:Map) + } + } + ORDER BY ?map LIMIT 1 + } + FILTER (?id = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-11.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-11.rq new file mode 100644 index 00000000000..97290bb324e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-11.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{ 1: }"^^cdt:Map) + (2 "{ 1: }"^^cdt:Map) + } + } + ORDER BY ?map LIMIT 1 + } + FILTER (?id = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-12.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-12.rq new file mode 100644 index 00000000000..4e6b3685b83 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-12.rq @@ -0,0 +1,18 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{1:42}"^^cdt:Map) + (2 "{ }"^^cdt:Map) + (3 "{ 2:42}"^^cdt:Map) # the spaces are on purpose, to make sure the comparison is not done in terms of the lexical forms + (4 "{ }"^^cdt:Map) + (5 "{3:42}"^^cdt:Map) + } + } + ORDER BY ?map LIMIT 1 + } + FILTER ( (?id = 2) || (?id = 4) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-13.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-13.rq new file mode 100644 index 00000000000..9386a467b2b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-13.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{ 1: 42, 3: 42}"^^cdt:Map) + (2 "{1: 42}"^^cdt:Map) # the space is on purpose, to make sure the comparison is not done in terms of the lexical forms + } + } + ORDER BY ?map LIMIT 1 + } + FILTER (?id = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-14.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-14.rq new file mode 100644 index 00000000000..b297601ce79 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-14.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{1: 42, 3: 42}"^^cdt:Map) + (2 "{2: 42}"^^cdt:Map) + } + } + ORDER BY ?map LIMIT 1 + } + FILTER (?id = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-15.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-15.rq new file mode 100644 index 00000000000..7a7caccfcc8 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-15.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{1: 42, 3: 42}"^^cdt:Map) + (2 "{1: 43}"^^cdt:Map) + } + } + ORDER BY ?map LIMIT 1 + } + FILTER (?id = 1) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-16.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-16.rq new file mode 100644 index 00000000000..8815fc04996 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-16.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{1: 42, 3: 42}"^^cdt:Map) + (2 "{1: 42, 2: 42}"^^cdt:Map) + } + } + ORDER BY ?map LIMIT 1 + } + FILTER (?id = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-17.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-17.rq new file mode 100644 index 00000000000..18fa2bdebbb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-17.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{3: 41, 1: 42, 2: 43}"^^cdt:Map) + (2 "{3: 42, 1: 42, 2: 42}"^^cdt:Map) + } + } + ORDER BY ?map LIMIT 1 + } + FILTER (?id = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-null-01.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-null-01.rq new file mode 100644 index 00000000000..d1cadd64d79 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-null-01.rq @@ -0,0 +1,15 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{ 1:null, 2:42}"^^cdt:Map) # the added space is on purpose, to make sure the comparison is not done in terms of the lexical forms + (2 "{1:null, 2:41}"^^cdt:Map) + } + } + ORDER BY ?map LIMIT 1 + } + FILTER (?id = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/order-map-null-02.rq b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-null-02.rq new file mode 100644 index 00000000000..0d4d90dbd1d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/order-map-null-02.rq @@ -0,0 +1,16 @@ +PREFIX cdt: +PREFIX xsd: + +ASK { + { + SELECT * WHERE { + VALUES (?id ?map) { + (1 "{ 1:null, 2:41}"^^cdt:Map) + (2 "{ 1:'hello', 2:42}"^^cdt:Map) + (3 "{ 1:null, 2:43}"^^cdt:Map) + } + } + ORDER BY DESC(?map) LIMIT 1 # attention, DESC here to check that the non-null element ordered highest + } + FILTER (?id = 2) +} diff --git a/jena-arq/testing/SPARQL-CDTs/orderby/true.srx b/jena-arq/testing/SPARQL-CDTs/orderby/true.srx new file mode 100644 index 00000000000..c187f066ab1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/orderby/true.srx @@ -0,0 +1,5 @@ + + + + true + diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/empty.ttl b/jena-arq/testing/SPARQL-CDTs/unfold/empty.ttl new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/manifest.ttl b/jena-arq/testing/SPARQL-CDTs/unfold/manifest.ttl new file mode 100644 index 00000000000..a829a67e6f3 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/manifest.ttl @@ -0,0 +1,483 @@ +@prefix rdf: . +@prefix : . +@prefix rdfs: . +@prefix mf: . +@prefix qt: . +@prefix dawgt: . +@prefix sparql: . +@prefix cdt: . + +<> rdf:type mf:Manifest ; + rdfs:label "SPARQL UNFOLD operator" ; + mf:entries + ( + :unfold-list-1var-01 + :unfold-list-1var-02 + :unfold-list-1var-03 + :unfold-list-1var-04 + :unfold-list-1var-05 + :unfold-list-1var-06 + :unfold-list-1var-07 + :unfold-list-1var-08 + :unfold-list-1var-09 + :unfold-list-1var-10 + + :unfold-get-list-1var-01 + :unfold-get-list-1var-02 + :unfold-get-list-1var-03 + :unfold-get-list-1var-04 + + :unfold-list-2vars-01 + :unfold-list-2vars-02 + :unfold-list-2vars-03 + :unfold-list-2vars-04 + :unfold-list-2vars-05 + :unfold-list-2vars-06 + :unfold-list-2vars-07 + :unfold-list-2vars-08 + :unfold-list-2vars-09 + :unfold-list-2vars-10 + + :unfold-get-list-2vars-01 + :unfold-get-list-2vars-02 + :unfold-get-list-2vars-03 + :unfold-get-list-2vars-04 + :unfold-get-list-2vars-05 + :unfold-get-list-2vars-06 + + :unfold-map-1var-01 + :unfold-map-1var-02 + :unfold-map-1var-03 + :unfold-map-1var-04 + + :unfold-map-2vars-01 + :unfold-map-2vars-02 + :unfold-map-2vars-03 + :unfold-map-2vars-04 + :unfold-map-2vars-05 + :unfold-map-2vars-06 + :unfold-map-2vars-07 + :unfold-map-2vars-08 + ) . + +:unfold-list-1var-01 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-1var-01" ; + rdfs:comment "two list elements" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-1var-02 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-1var-02" ; + rdfs:comment "three list elements, including a duplicate" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-1var-03 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-1var-03" ; + rdfs:comment "two list elements, mixed datatypes" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-1var-04 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-1var-04" ; + rdfs:comment "two list elements, IRIs" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-1var-05 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-1var-05" ; + rdfs:comment "two list elements, IRI and literal" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-1var-06 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-1var-06" ; + rdfs:comment "two list elements, IRI and blank node" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-1var-07 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-1var-07" ; + rdfs:comment "three list elements, IRI and two distinct blank nodes" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-1var-08 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-1var-08" ; + rdfs:comment "three list elements, IRI and the same blank node twice" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-1var-09 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-1var-09" ; + rdfs:comment "two list elements, IRI and null value" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-1var-10 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-1var-10" ; + rdfs:comment "three list elements, IRI and two null values" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + + + +:unfold-get-list-1var-01 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-get-list-1var-01" ; + rdfs:comment "list literal with one blank node" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-get-list-1var-02 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-get-list-1var-02" ; + rdfs:comment "list literal with the same blank node twice" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-get-list-1var-03 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-get-list-1var-03" ; + rdfs:comment "construct list with one blank node" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-get-list-1var-04 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-get-list-1var-04" ; + rdfs:comment "construct list with the same blank node twice" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + + + +:unfold-list-2vars-01 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-2vars-01" ; + rdfs:comment "two list elements" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-2vars-02 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-2vars-02" ; + rdfs:comment "three list elements, including a duplicate" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-2vars-03 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-2vars-03" ; + rdfs:comment "two list elements, mixed datatypes" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-2vars-04 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-2vars-04" ; + rdfs:comment "two list elements, IRIs" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-2vars-05 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-2vars-05" ; + rdfs:comment "two list elements, IRI and literal" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-2vars-06 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-2vars-06" ; + rdfs:comment "two list elements, IRI and blank node" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-2vars-07 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-2vars-07" ; + rdfs:comment "three list elements, IRI and two distinct blank nodes" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-2vars-08 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-2vars-08" ; + rdfs:comment "three list elements, IRI and the same blank node twice" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-2vars-09 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-2vars-09" ; + rdfs:comment "two list elements, IRI and null value" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-list-2vars-10 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-list-2vars-10" ; + rdfs:comment "three list elements, IRI and two null values" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + + + +:unfold-get-list-2vars-01 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-get-list-2vars-01" ; + rdfs:comment "list literal with one blank node" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-get-list-2vars-02 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-get-list-2vars-02" ; + rdfs:comment "list literal with the same blank node twice" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-get-list-2vars-03 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-get-list-2vars-03" ; + rdfs:comment "construct list with one blank node" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-get-list-2vars-04 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-get-list-2vars-04" ; + rdfs:comment "construct list with the same blank node twice" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-get-list-2vars-05 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-get-list-2vars-05" ; + rdfs:comment "list literal with the two blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-get-list-2vars-06 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-get-list-2vars-06" ; + rdfs:comment "construct list with the two blank nodes" ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + + + +:unfold-map-1var-01 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-map-1var-01" ; + rdfs:comment "two entries, integer keys" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-map-1var-02 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-map-1var-02" ; + rdfs:comment "two entries, mixed literal keys" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-map-1var-03 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-map-1var-03" ; + rdfs:comment "two entries, IRI keys" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-map-1var-04 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-map-1var-04" ; + rdfs:comment "two entries, IRI and literal key" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + + + +:unfold-map-2vars-01 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-map-2vars-01" ; + rdfs:comment "two entries, different values" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-map-2vars-02 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-map-2vars-02" ; + rdfs:comment "two entries, same values" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-map-2vars-03 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-map-2vars-03" ; + rdfs:comment "two entries, mixed types" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-map-2vars-04 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-map-2vars-04" ; + rdfs:comment "two entries, IRI keys" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-map-2vars-05 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-map-2vars-05" ; + rdfs:comment "two entries, IRI values" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-map-2vars-06 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-map-2vars-06" ; + rdfs:comment "two entries, distinct blank nodes as values" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-map-2vars-07 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-map-2vars-07" ; + rdfs:comment "two entries, same blank node as values" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + +:unfold-map-2vars-08 rdf:type mf:QueryEvaluationTest ; + mf:name "unfold-map-2vars-08" ; + rdfs:comment "two entries, one with a null value as value" ; + mf:feature cdt:unfold ; + dawgt:approval dawgt:Proposed ; + mf:action + [ qt:query ; + qt:data ] ; + mf:result . + + diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/true.srx b/jena-arq/testing/SPARQL-CDTs/unfold/true.srx new file mode 100644 index 00000000000..c187f066ab1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/true.srx @@ -0,0 +1,5 @@ + + + + true + diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-1var-01.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-1var-01.rq new file mode 100644 index 00000000000..e344e5588eb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-1var-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND( "[_:b]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt ) + FILTER( SAMETERM(?elmt, cdt:get(?list,1)) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-1var-02.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-1var-02.rq new file mode 100644 index 00000000000..2f13d6827a5 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-1var-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND( "[_:b, _:b]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt ) + FILTER( SAMETERM(?elmt, cdt:get(?list,1)) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-1var-03.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-1var-03.rq new file mode 100644 index 00000000000..214fb1b5c59 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-1var-03.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND ( BNODE() AS ?b ) + BIND( cdt:List(?b) AS ?list ) + + UNFOLD( ?list AS ?elmt ) + FILTER( SAMETERM(?elmt, cdt:get(?list,1)) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-1var-04.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-1var-04.rq new file mode 100644 index 00000000000..5dfa74d793c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-1var-04.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND ( BNODE() AS ?b ) + BIND( cdt:List(?b, ?b) AS ?list ) + + UNFOLD( ?list AS ?elmt ) + FILTER( SAMETERM(?elmt, cdt:get(?list,1)) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-01.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-01.rq new file mode 100644 index 00000000000..691b07209b8 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-01.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND( "[_:b]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt, ?idx ) + FILTER( SAMETERM(?elmt, cdt:get(?list,1)) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-02.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-02.rq new file mode 100644 index 00000000000..69b8cd3d82e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-02.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND( "[_:b, _:b]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt, ?idx ) + FILTER( SAMETERM(?elmt, cdt:get(?list,1)) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-03.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-03.rq new file mode 100644 index 00000000000..19cb28e874c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-03.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND ( BNODE() AS ?b ) + BIND( cdt:List(?b) AS ?list ) + + UNFOLD( ?list AS ?elmt, ?idx ) + FILTER( SAMETERM(?elmt, cdt:get(?list,1)) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-04.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-04.rq new file mode 100644 index 00000000000..7aa08d91276 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-04.rq @@ -0,0 +1,9 @@ +PREFIX cdt: + +ASK { + BIND ( BNODE() AS ?b ) + BIND( cdt:List(?b, ?b) AS ?list ) + + UNFOLD( ?list AS ?elmt, ?idx ) + FILTER( SAMETERM(?elmt, cdt:get(?list,1)) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-05.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-05.rq new file mode 100644 index 00000000000..90dc68d5f1d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-05.rq @@ -0,0 +1,7 @@ +PREFIX cdt: + +ASK { + BIND( "[_:b1, _:b2]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt, ?idx ) + FILTER( SAMETERM(?elmt, cdt:get(?list,?idx)) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-06.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-06.rq new file mode 100644 index 00000000000..8da24a458f6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-get-list-2vars-06.rq @@ -0,0 +1,10 @@ +PREFIX cdt: + +ASK { + BIND ( BNODE() AS ?b1 ) + BIND ( BNODE() AS ?b2 ) + BIND( cdt:List(?b1, ?b2) AS ?list ) + + UNFOLD( ?list AS ?elmt, ?idx ) + FILTER( SAMETERM(?elmt, cdt:get(?list,?idx)) ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-01.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-01.rq new file mode 100644 index 00000000000..ecb6d874d73 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-01.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt WHERE { + BIND( "[1,2]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-01.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-01.srj new file mode 100644 index 00000000000..3f575ceece9 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-01.srj @@ -0,0 +1,14 @@ +{ "head": { + "vars": [ "elmt" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-02.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-02.rq new file mode 100644 index 00000000000..71186ea1778 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-02.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt WHERE { + BIND( "[1,1,2]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-02.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-02.srj new file mode 100644 index 00000000000..68ae874d37c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-02.srj @@ -0,0 +1,17 @@ +{ "head": { + "vars": [ "elmt" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-03.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-03.rq new file mode 100644 index 00000000000..1c0dbfae629 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-03.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt WHERE { + BIND( "[true,1]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-03.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-03.srj new file mode 100644 index 00000000000..ab85d1f1b68 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-03.srj @@ -0,0 +1,14 @@ +{ "head": { + "vars": [ "elmt" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "true" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-04.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-04.rq new file mode 100644 index 00000000000..b3316a4fd7b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-04.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt WHERE { + BIND( "[, ]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-04.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-04.srj new file mode 100644 index 00000000000..2c8585a9a7b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-04.srj @@ -0,0 +1,14 @@ +{ "head": { + "vars": [ "elmt" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "uri" , "value": "http://example/1" } + }, + { + "elmt": { "type": "uri" , "value": "http://example/2" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-05.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-05.rq new file mode 100644 index 00000000000..7e9df68d0f8 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-05.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt WHERE { + BIND( "[, 1]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-05.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-05.srj new file mode 100644 index 00000000000..e5acb97435e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-05.srj @@ -0,0 +1,14 @@ +{ "head": { + "vars": [ "elmt" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "uri" , "value": "http://example/1" } + }, + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-06.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-06.rq new file mode 100644 index 00000000000..7135d89f768 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-06.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt WHERE { + BIND( "[, _:x]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-06.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-06.srj new file mode 100644 index 00000000000..9c313fe0e7e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-06.srj @@ -0,0 +1,14 @@ +{ "head": { + "vars": [ "elmt" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "uri" , "value": "http://example/1" } + }, + { + "elmt": { "type": "bnode" , "value": "b0" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-07.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-07.rq new file mode 100644 index 00000000000..e13150d108a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-07.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt WHERE { + BIND( "[, _:x, _:y]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-07.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-07.srj new file mode 100644 index 00000000000..f9a5b2ce744 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-07.srj @@ -0,0 +1,17 @@ +{ "head": { + "vars": [ "elmt" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "uri" , "value": "http://example/1" } + }, + { + "elmt": { "type": "bnode" , "value": "b0" } + }, + { + "elmt": { "type": "bnode" , "value": "b1" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-08.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-08.rq new file mode 100644 index 00000000000..ebf055b9927 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-08.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt WHERE { + BIND( "[, _:x, _:x]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-08.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-08.srj new file mode 100644 index 00000000000..83fd0dafd1d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-08.srj @@ -0,0 +1,17 @@ +{ "head": { + "vars": [ "elmt" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "uri" , "value": "http://example/1" } + }, + { + "elmt": { "type": "bnode" , "value": "b0" } + }, + { + "elmt": { "type": "bnode" , "value": "b0" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-09.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-09.rq new file mode 100644 index 00000000000..7fef59f648b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-09.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt WHERE { + BIND( "[, null]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-09.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-09.srj new file mode 100644 index 00000000000..19199bc0eb2 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-09.srj @@ -0,0 +1,13 @@ +{ "head": { + "vars": [ "elmt" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "uri" , "value": "http://example/1" } + }, + { + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-10.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-10.rq new file mode 100644 index 00000000000..692f520caa8 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-10.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt WHERE { + BIND( "[, null, null]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-10.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-10.srj new file mode 100644 index 00000000000..2cd1d2cbad6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-1var-10.srj @@ -0,0 +1,15 @@ +{ "head": { + "vars": [ "elmt" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "uri" , "value": "http://example/1" } + }, + { + }, + { + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-01.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-01.rq new file mode 100644 index 00000000000..65854604678 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-01.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt ?idx WHERE { + BIND( "[1,2]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt, ?idx ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-01.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-01.srj new file mode 100644 index 00000000000..d72c9080627 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-01.srj @@ -0,0 +1,16 @@ +{ "head": { + "vars": [ "elmt", "idx" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-02.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-02.rq new file mode 100644 index 00000000000..0c332c4825c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-02.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt ?idx WHERE { + BIND( "[1,1,2]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt, ?idx ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-02.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-02.srj new file mode 100644 index 00000000000..9c161ea7a6a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-02.srj @@ -0,0 +1,20 @@ +{ "head": { + "vars": [ "elmt", "idx" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" } + }, + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "3" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-03.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-03.rq new file mode 100644 index 00000000000..5c0a76f1f1a --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-03.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt ?idx WHERE { + BIND( "[true,1]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt, ?idx ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-03.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-03.srj new file mode 100644 index 00000000000..7e3b9f7a898 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-03.srj @@ -0,0 +1,16 @@ +{ "head": { + "vars": [ "elmt", "idx" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" } + }, + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "true" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-04.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-04.rq new file mode 100644 index 00000000000..2538eb4660e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-04.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt ?idx WHERE { + BIND( "[, ]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt, ?idx ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-04.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-04.srj new file mode 100644 index 00000000000..426591f50e0 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-04.srj @@ -0,0 +1,16 @@ +{ "head": { + "vars": [ "elmt", "idx" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "uri" , "value": "http://example/1" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "elmt": { "type": "uri" , "value": "http://example/2" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-05.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-05.rq new file mode 100644 index 00000000000..c9fe7cf165f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-05.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt ?idx WHERE { + BIND( "[, 1]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt, ?idx ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-05.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-05.srj new file mode 100644 index 00000000000..0b3ff6f7685 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-05.srj @@ -0,0 +1,16 @@ +{ "head": { + "vars": [ "elmt", "idx" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "uri" , "value": "http://example/1" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "elmt": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-06.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-06.rq new file mode 100644 index 00000000000..69596252c45 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-06.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt ?idx WHERE { + BIND( "[, _:x]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt, ?idx ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-06.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-06.srj new file mode 100644 index 00000000000..45f10b33e9b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-06.srj @@ -0,0 +1,16 @@ +{ "head": { + "vars": [ "elmt", "idx" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "uri" , "value": "http://example/1" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "elmt": { "type": "bnode" , "value": "b0" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-07.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-07.rq new file mode 100644 index 00000000000..ccb4c466a70 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-07.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt ?idx WHERE { + BIND( "[, _:x, _:y]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt, ?idx ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-07.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-07.srj new file mode 100644 index 00000000000..db239ce3fcb --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-07.srj @@ -0,0 +1,20 @@ +{ "head": { + "vars": [ "elmt", "idx" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "uri" , "value": "http://example/1" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "elmt": { "type": "bnode" , "value": "b0" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" } + }, + { + "elmt": { "type": "bnode" , "value": "b1" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "3" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-08.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-08.rq new file mode 100644 index 00000000000..5a1848d8cb1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-08.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt ?idx WHERE { + BIND( "[, _:x, _:x]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt, ?idx ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-08.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-08.srj new file mode 100644 index 00000000000..62969f04296 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-08.srj @@ -0,0 +1,20 @@ +{ "head": { + "vars": [ "elmt", "idx" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "uri" , "value": "http://example/1" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "elmt": { "type": "bnode" , "value": "b0" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" } + }, + { + "elmt": { "type": "bnode" , "value": "b0" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "3" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-09.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-09.rq new file mode 100644 index 00000000000..689a8009005 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-09.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt ?idx WHERE { + BIND( "[, null]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt, ?idx ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-09.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-09.srj new file mode 100644 index 00000000000..d843e62a326 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-09.srj @@ -0,0 +1,15 @@ +{ "head": { + "vars": [ "elmt", "idx" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "uri" , "value": "http://example/1" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-10.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-10.rq new file mode 100644 index 00000000000..006e8a8d15d --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-10.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?elmt ?idx WHERE { + BIND( "[, null, null]"^^cdt:List AS ?list ) + UNFOLD( ?list AS ?elmt, ?idx ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-10.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-10.srj new file mode 100644 index 00000000000..7d7941e175c --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-list-2vars-10.srj @@ -0,0 +1,18 @@ +{ "head": { + "vars": [ "elmt", "idx" ] + } , + "results": { + "bindings": [ + { + "elmt": { "type": "uri" , "value": "http://example/1" }, + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" } + }, + { + "idx": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "3" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-01.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-01.rq new file mode 100644 index 00000000000..62435a71ca6 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-01.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?k WHERE { + BIND( "{1:3, 2:4}"^^cdt:Map AS ?map ) + UNFOLD( ?map AS ?k ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-01.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-01.srj new file mode 100644 index 00000000000..ca6992e1b9e --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-01.srj @@ -0,0 +1,14 @@ +{ "head": { + "vars": [ "k" ] + } , + "results": { + "bindings": [ + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-02.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-02.rq new file mode 100644 index 00000000000..0a05a795e09 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-02.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?k WHERE { + BIND( "{1:3, true:4}"^^cdt:Map AS ?map ) + UNFOLD( ?map AS ?k ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-02.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-02.srj new file mode 100644 index 00000000000..30993975398 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-02.srj @@ -0,0 +1,14 @@ +{ "head": { + "vars": [ "k" ] + } , + "results": { + "bindings": [ + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "true" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-03.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-03.rq new file mode 100644 index 00000000000..316dacb8ee1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-03.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?k WHERE { + BIND( "{:3, :4}"^^cdt:Map AS ?map ) + UNFOLD( ?map AS ?k ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-03.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-03.srj new file mode 100644 index 00000000000..d0f057a71b5 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-03.srj @@ -0,0 +1,14 @@ +{ "head": { + "vars": [ "k" ] + } , + "results": { + "bindings": [ + { + "k": { "type": "uri" , "value": "http://example/1" } + }, + { + "k": { "type": "uri" , "value": "http://example/2" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-04.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-04.rq new file mode 100644 index 00000000000..0fa9e06eb52 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-04.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?k WHERE { + BIND( "{:3, 1:4}"^^cdt:Map AS ?map ) + UNFOLD( ?map AS ?k ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-04.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-04.srj new file mode 100644 index 00000000000..c1e2148864f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-1var-04.srj @@ -0,0 +1,14 @@ +{ "head": { + "vars": [ "k" ] + } , + "results": { + "bindings": [ + { + "k": { "type": "uri" , "value": "http://example/1" } + }, + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-01.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-01.rq new file mode 100644 index 00000000000..52238c08b23 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-01.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?k ?v WHERE { + BIND( "{1:3, 2:4}"^^cdt:Map AS ?map ) + UNFOLD( ?map AS ?k, ?v ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-01.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-01.srj new file mode 100644 index 00000000000..5e621c74115 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-01.srj @@ -0,0 +1,16 @@ +{ "head": { + "vars": [ "k", "v" ] + } , + "results": { + "bindings": [ + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" }, + "v": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "3" } + }, + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" }, + "v": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "4" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-02.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-02.rq new file mode 100644 index 00000000000..dde67501e54 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-02.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?k ?v WHERE { + BIND( "{1:3, 2:3}"^^cdt:Map AS ?map ) + UNFOLD( ?map AS ?k, ?v ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-02.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-02.srj new file mode 100644 index 00000000000..31971149626 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-02.srj @@ -0,0 +1,16 @@ +{ "head": { + "vars": [ "k", "v" ] + } , + "results": { + "bindings": [ + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" }, + "v": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "3" } + }, + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" }, + "v": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "3" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-03.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-03.rq new file mode 100644 index 00000000000..b110c129001 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-03.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?k ?v WHERE { + BIND( "{1:false, true:3}"^^cdt:Map AS ?map ) + UNFOLD( ?map AS ?k, ?v ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-03.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-03.srj new file mode 100644 index 00000000000..4e3d16ee7e8 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-03.srj @@ -0,0 +1,16 @@ +{ "head": { + "vars": [ "k", "v" ] + } , + "results": { + "bindings": [ + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" }, + "v": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "false" } + }, + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#boolean" , "value": "true" }, + "v": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "3" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-04.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-04.rq new file mode 100644 index 00000000000..8758a55ff08 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-04.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?k ?v WHERE { + BIND( "{:3, :4}"^^cdt:Map AS ?map ) + UNFOLD( ?map AS ?k, ?v ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-04.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-04.srj new file mode 100644 index 00000000000..6c160ec8bb4 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-04.srj @@ -0,0 +1,16 @@ +{ "head": { + "vars": [ "k", "v" ] + } , + "results": { + "bindings": [ + { + "k": { "type": "uri" , "value": "http://example/1" }, + "v": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "3" } + }, + { + "k": { "type": "uri" , "value": "http://example/2" }, + "v": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "4" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-05.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-05.rq new file mode 100644 index 00000000000..76eccfbf022 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-05.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?k ?v WHERE { + BIND( "{1:, 2:}"^^cdt:Map AS ?map ) + UNFOLD( ?map AS ?k, ?v ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-05.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-05.srj new file mode 100644 index 00000000000..5ae65bb3595 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-05.srj @@ -0,0 +1,16 @@ +{ "head": { + "vars": [ "k", "v" ] + } , + "results": { + "bindings": [ + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" }, + "v": { "type": "uri" , "value": "http://example/1" } + }, + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" }, + "v": { "type": "uri" , "value": "http://example/2" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-06.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-06.rq new file mode 100644 index 00000000000..dcf0c864661 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-06.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?k ?v WHERE { + BIND( "{1: _:x, 2: _:y}"^^cdt:Map AS ?map ) + UNFOLD( ?map AS ?k, ?v ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-06.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-06.srj new file mode 100644 index 00000000000..7adf07e3132 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-06.srj @@ -0,0 +1,16 @@ +{ "head": { + "vars": [ "k", "v" ] + } , + "results": { + "bindings": [ + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" }, + "v": { "type": "bnode" , "value": "b0" } + }, + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" }, + "v": { "type": "bnode" , "value": "b1" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-07.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-07.rq new file mode 100644 index 00000000000..42c4c0d6b59 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-07.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?k ?v WHERE { + BIND( "{1: _:x, 2: _:x}"^^cdt:Map AS ?map ) + UNFOLD( ?map AS ?k, ?v ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-07.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-07.srj new file mode 100644 index 00000000000..74c4b0e33d1 --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-07.srj @@ -0,0 +1,16 @@ +{ "head": { + "vars": [ "k", "v" ] + } , + "results": { + "bindings": [ + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" }, + "v": { "type": "bnode" , "value": "b0" } + }, + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" }, + "v": { "type": "bnode" , "value": "b0" } + } + ] + } +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-08.rq b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-08.rq new file mode 100644 index 00000000000..c1a3172d47f --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-08.rq @@ -0,0 +1,6 @@ +PREFIX cdt: + +SELECT ?k ?v WHERE { + BIND( "{1:null, 2:4}"^^cdt:Map AS ?map ) + UNFOLD( ?map AS ?k, ?v ) +} diff --git a/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-08.srj b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-08.srj new file mode 100644 index 00000000000..e27adcb859b --- /dev/null +++ b/jena-arq/testing/SPARQL-CDTs/unfold/unfold-map-2vars-08.srj @@ -0,0 +1,15 @@ +{ "head": { + "vars": [ "k", "v" ] + } , + "results": { + "bindings": [ + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "1" } + }, + { + "k": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "2" }, + "v": { "type": "literal" , "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "value": "4" } + } + ] + } +} diff --git a/jena-core/src/main/java/org/apache/jena/graph/impl/LiteralLabel.java b/jena-core/src/main/java/org/apache/jena/graph/impl/LiteralLabel.java index 06b5adb0ec7..809edfa21a2 100644 --- a/jena-core/src/main/java/org/apache/jena/graph/impl/LiteralLabel.java +++ b/jena-core/src/main/java/org/apache/jena/graph/impl/LiteralLabel.java @@ -177,6 +177,28 @@ private static String indexingLang(String lang) { hash = calcHashCode(); } + /** + * Create a typed literal for which both the lexical form and the value + * form are already available. This constructor does not attempt any + * validation of the given lexical form, nor any check that the given + * lexical form does indeed represent the given value. Use with care! + * + * @param lex the lexical form of the literal (assumed to be well-formed + * for the given datatype) + * @param value the value of the literal (assumed to be the value obtained + * when applying the lexical-to-value mapping of the the given + * datatype to the given lexical form) + * @param dtype the datatype of the literal + */ + /*package*/ LiteralLabel(String lex, Object value, RDFDatatype dtype) throws DatatypeFormatException { + this.dtype = Objects.requireNonNull(dtype); + this.lexicalForm = Objects.requireNonNull(lex); + this.value = Objects.requireNonNull(value); + this.lang = ""; + this.wellformed = true; + hash = calcHashCode(); + } + /** * Internal function to set the object value from the lexical form. * Requires datatype to be set. Return true if it succeeded else false. diff --git a/jena-core/src/main/java/org/apache/jena/graph/impl/LiteralLabelFactory.java b/jena-core/src/main/java/org/apache/jena/graph/impl/LiteralLabelFactory.java index ee5793f0591..8621c4c9ce3 100644 --- a/jena-core/src/main/java/org/apache/jena/graph/impl/LiteralLabelFactory.java +++ b/jena-core/src/main/java/org/apache/jena/graph/impl/LiteralLabelFactory.java @@ -108,6 +108,21 @@ public static LiteralLabel createByValue(Object value, RDFDatatype dtype) throws return new LiteralLabel(value, dtype); } + /** + * Create a typed literal for which both the lexical form and the value + * form are already available. Use with care! + * + * @param lex the lexical form of the literal (assumed to be well-formed + * for the given datatype) + * @param value the value of the literal (assumed to be the value obtained + * when applying the lexical-to-value mapping of the the given + * datatype to the given lexical form) + * @param dtype the datatype of the literal + */ + public static LiteralLabel createIncludingValue(String lex, Object value, RDFDatatype dtype) { + return new LiteralLabel(lex, value, dtype); + } + /** * Build a typed literal label from its value form using * whatever datatype is currently registered as the default diff --git a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/BuildElementVisitor.java b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/BuildElementVisitor.java index 6e21ddc0564..6976cce240d 100644 --- a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/BuildElementVisitor.java +++ b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/BuildElementVisitor.java @@ -68,6 +68,12 @@ public void visit(ElementBind el) { result = el; } + @Override + public void visit(ElementUnfold el) { + // no change + result = el; + } + @Override public void visit(ElementData el) { // no change @@ -205,4 +211,4 @@ public void visit(ElementSubQuery el) { result = el; } -} \ No newline at end of file +} diff --git a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ElementRewriter.java b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ElementRewriter.java index 969ebaa63ec..5c29d008580 100644 --- a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ElementRewriter.java +++ b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/ElementRewriter.java @@ -19,6 +19,7 @@ import java.util.Iterator; import java.util.Map; +import java.util.Objects; import org.apache.jena.arq.querybuilder.AbstractQueryBuilder; import org.apache.jena.graph.Node; @@ -100,6 +101,23 @@ public void visit(ElementBind el) { } } + @Override + public void visit(ElementUnfold el) { +// TODO: double check this method; I copied and adapted the method of +// ElementBind (see above) but I am not entirely sure it is correct + Node n1 = changeNode(el.getVar1()); + Node n2 = changeNode(el.getVar2()); + if ( Objects.equals(n1, el.getVar1()) && Objects.equals(n2, el.getVar2()) ) { + ExprRewriter exprRewriter = new ExprRewriter(values); + el.getExpr().visit(exprRewriter); + push( new ElementUnfold(exprRewriter.getResult(), el.getVar1(), el.getVar2()) ); + } else { + // push( new ElementBind( el.getVar(), NodeValue.makeNode( n )) ); + // no op + push(new ElementTriplesBlock()); + } + } + @Override public void visit(ElementData el) { ElementData retval = new ElementData(); @@ -195,4 +213,4 @@ public void visit(ElementSubQuery el) { push(new ElementSubQuery(AbstractQueryBuilder.rewrite(q, values))); } -} \ No newline at end of file +} diff --git a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/OpRewriter.java b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/OpRewriter.java index 65a80d9fce1..7b236273cd5 100644 --- a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/OpRewriter.java +++ b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/rewriters/OpRewriter.java @@ -203,6 +203,12 @@ public void visit(OpExtend opExtend) { push(OpExtend.extend(pop(), rewrite(opExtend.getVarExprList()))); } + @Override + public void visit(OpUnfold opUnfold) { + opUnfold.getSubOp().visit(this); + push( new OpUnfold(pop(), opUnfold.getExpr(), opUnfold.getVar1(), opUnfold.getVar2()) ); + } + @Override public void visit(OpJoin opJoin) { opJoin.getRight().visit(this); @@ -331,4 +337,4 @@ public void visit(OpTopN opTop) { expRewriter.rewriteSortConditionList(opTop.getConditions()); push(new OpTopN(pop(), opTop.getLimit(), expRewriter.rewriteSortConditionList(opTop.getConditions()))); } -} \ No newline at end of file +} diff --git a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/updatebuilder/QuadIteratorBuilder.java b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/updatebuilder/QuadIteratorBuilder.java index 39be11c8703..3ad11cfdac0 100644 --- a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/updatebuilder/QuadIteratorBuilder.java +++ b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/updatebuilder/QuadIteratorBuilder.java @@ -91,6 +91,12 @@ public void visit(ElementBind el) { } + @Override + public void visit(ElementUnfold el) { + throw new QueryParseException("unfold not permitted in data quad", -1, -1); + + } + @Override public void visit(ElementData el) { throw new QueryParseException("element data not permitted in data quad", -1, -1); @@ -158,4 +164,4 @@ public void visit(ElementSubQuery el) { q.getQueryPattern().visit(this); } -} \ No newline at end of file +} diff --git a/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/querybuilder/WhereValidator.java b/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/querybuilder/WhereValidator.java index b94c3d8052c..34ff6cf5b1b 100644 --- a/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/querybuilder/WhereValidator.java +++ b/jena-extras/jena-querybuilder/src/test/java/org/apache/jena/arq/querybuilder/WhereValidator.java @@ -90,6 +90,12 @@ public void visit(ElementBind el) { return; } + @Override + public void visit(ElementUnfold el) { + checkMatching(el); + return; + } + @Override public void visit(ElementData el) { checkMatching(el); @@ -195,4 +201,4 @@ public void visit(ElementSubQuery el) { } } -} \ No newline at end of file +} diff --git a/jena-permissions/src/main/java/org/apache/jena/permissions/query/rewriter/OpRewriter.java b/jena-permissions/src/main/java/org/apache/jena/permissions/query/rewriter/OpRewriter.java index d0a55a9c539..15f29e69450 100644 --- a/jena-permissions/src/main/java/org/apache/jena/permissions/query/rewriter/OpRewriter.java +++ b/jena-permissions/src/main/java/org/apache/jena/permissions/query/rewriter/OpRewriter.java @@ -314,6 +314,19 @@ public void visit(final OpExtend opExtend) { addOp(OpExtend.extend(rewriteOp1(opExtend), opExtend.getVarExprList())); } + /** + * rewrites the subop of unfold. + */ + @Override + public void visit(final OpUnfold opUnfold) { + if (LOG.isDebugEnabled()) { + LOG.debug("Starting visiting OpUnfold"); + } + Op subOp = rewriteOp1(opUnfold); + OpUnfold opUnfold2 = new OpUnfold(subOp, opUnfold.getExpr(), opUnfold.getVar1(), opUnfold.getVar2()); + addOp(opUnfold2); + } + /** * rewrites the subop of filter. */