@Override public String toString(final int indent) { final StringBuilder sb = new StringBuilder(); final String s = indent(indent); sb.append("\n").append(s).append("CONSTRUCT {"); for (StatementPatternNode v : this) { sb.append(v.toString(indent+1)); } sb.append("\n").append(s).append("}"); if (isNativeDistinct()) sb.append(" [nativeDistinct]"); return sb.toString(); }
@Override public String toString(final int indent) { final StringBuilder sb = new StringBuilder(); final String s = indent(indent); sb.append("\n").append(s).append("CONSTRUCT {"); for (StatementPatternNode v : this) { sb.append(v.toString(indent+1)); } sb.append("\n").append(s).append("}"); if (isNativeDistinct()) sb.append(" [nativeDistinct]"); return sb.toString(); }
/** * A simple CONSTRUCT query. * * <pre> * PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> * PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> * PREFIX foaf: <http://xmlns.com/foaf/0.1/> * * CONSTRUCT { * <http://www.bigdata.com/DC> rdfs:label "DC" . * ?x rdf:type foaf:Person . * } where { * ?x rdf:type foaf:Person * } * </pre> */ public void test_construct_1() throws Exception { final ASTContainer ast = new TestHelper( "construct-1", // testURI, "construct-1.rq",// queryFileURL "construct-1.trig",// dataFileURL "construct-1-result.trig"// resultFileURL ).runTest(); final ConstructNode construct = ast.getOptimizedAST().getConstruct(); assertNotNull(construct); assertFalse(construct.isNativeDistinct()); }
/** * A simple CONSTRUCT query using a native DISTINCT filter. * * <pre> * PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> * PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> * PREFIX foaf: <http://xmlns.com/foaf/0.1/> * * CONSTRUCT { * <http://www.bigdata.com/DC> rdfs:label "DC" . * ?x rdf:type foaf:Person . * } where { * # Enable the native DISTINCT SPO filter. * hint:Query hint:nativeDistinctSPO true . * ?x rdf:type foaf:Person * } * </pre> */ public void test_construct_1a() throws Exception { final ASTContainer ast = new TestHelper( "construct-1", // testURI, "construct-1a.rq",// queryFileURL "construct-1.trig",// dataFileURL "construct-1-result.trig"// resultFileURL ).runTest(); final ConstructNode construct = ast.getOptimizedAST().getConstruct(); assertNotNull(construct); assertTrue(construct.isNativeDistinct()); }
/** * A simple CONSTRUCT query. * * <pre> * PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> * PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> * PREFIX foaf: <http://xmlns.com/foaf/0.1/> * * CONSTRUCT { * <http://www.bigdata.com/DC> rdfs:label "DC" . * ?x rdf:type foaf:Person . * } where { * ?x rdf:type foaf:Person * } * </pre> */ public void test_construct_1() throws Exception { final ASTContainer ast = new TestHelper( "construct-1", // testURI, "construct-1.rq",// queryFileURL "construct-1.trig",// dataFileURL "construct-1-result.trig"// resultFileURL ).runTest(); final ConstructNode construct = ast.getOptimizedAST().getConstruct(); assertNotNull(construct); assertFalse(construct.isNativeDistinct()); }
assertTrue(construct.isNativeDistinct());
assertTrue(construct.isNativeDistinct());
/** * A simple CONSTRUCT query using a native DISTINCT filter. * * <pre> * PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> * PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> * PREFIX foaf: <http://xmlns.com/foaf/0.1/> * * CONSTRUCT { * <http://www.bigdata.com/DC> rdfs:label "DC" . * ?x rdf:type foaf:Person . * } where { * # Enable the native DISTINCT SPO filter. * hint:Query hint:nativeDistinctSPO true . * ?x rdf:type foaf:Person * } * </pre> */ public void test_construct_1a() throws Exception { final ASTContainer ast = new TestHelper( "construct-1", // testURI, "construct-1a.rq",// queryFileURL "construct-1.trig",// dataFileURL "construct-1-result.trig"// resultFileURL ).runTest(); final ConstructNode construct = ast.getOptimizedAST().getConstruct(); assertNotNull(construct); assertTrue(construct.isNativeDistinct()); }
final boolean nativeDistinct = construct.isNativeDistinct();
/** * A simple CONSTRUCT query. * * <pre> * PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> * PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> * PREFIX foaf: <http://xmlns.com/foaf/0.1/> * * CONSTRUCT { * <http://www.bigdata.com/DC> rdfs:label "DC" . * ?x rdf:type foaf:Person . * } where { * ?x rdf:type foaf:Person * } * </pre> */ public void test_construct_1() throws Exception { final ASTContainer ast = new TestHelper( "construct-1", // testURI, "construct-1.rq",// queryFileURL "construct-1.trig",// dataFileURL "construct-1-result.trig"// resultFileURL ).runTest(); final ConstructNode construct = ast.getOptimizedAST().getConstruct(); assertNotNull(construct); assertFalse(construct.isNativeDistinct()); }
final boolean nativeDistinct = construct.isNativeDistinct();
assertTrue(construct.isNativeDistinct());
/** * A simple CONSTRUCT query using a native DISTINCT filter. * * <pre> * PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> * PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> * PREFIX foaf: <http://xmlns.com/foaf/0.1/> * * CONSTRUCT { * <http://www.bigdata.com/DC> rdfs:label "DC" . * ?x rdf:type foaf:Person . * } where { * # Enable the native DISTINCT SPO filter. * hint:Query hint:nativeDistinctSPO true . * ?x rdf:type foaf:Person * } * </pre> */ public void test_construct_1a() throws Exception { final ASTContainer ast = new TestHelper( "construct-1", // testURI, "construct-1a.rq",// queryFileURL "construct-1.trig",// dataFileURL "construct-1-result.trig"// resultFileURL ).runTest(); final ConstructNode construct = ast.getOptimizedAST().getConstruct(); assertNotNull(construct); assertTrue(construct.isNativeDistinct()); }