ParameterizedSparqlString implements PrefixMapping { public void setIri(int index, String iri) { this.setParam(index, NodeFactory.createURI(iri)); } ParameterizedSparqlString(String command, QuerySolutionMap map, String base, PrefixMapping prefixes);  ParameterizedSparqlString(String command, QuerySolutionMap map, String base);  ParameterizedSparqlString(String command, QuerySolutionMap map, PrefixMapping prefixes);  ParameterizedSparqlString(String command, QuerySolutionMap map);  ParameterizedSparqlString(String command, String base, PrefixMapping prefixes);  ParameterizedSparqlString(String command, PrefixMapping prefixes);  ParameterizedSparqlString(String command, String base);  ParameterizedSparqlString(String command);  ParameterizedSparqlString(QuerySolutionMap map, PrefixMapping prefixes);  ParameterizedSparqlString(QuerySolutionMap map);  ParameterizedSparqlString(PrefixMapping prefixes);  ParameterizedSparqlString(); Syntax getSyntax(); void setSyntax(Syntax syntax); void setCommandText(String command); void append(String text); void append(char c); void append(boolean b); void append(double d); void append(float f); void append(int i); void append(long l); void append(Object obj); void appendNode(Node n); void appendNode(RDFNode n); void appendIri(String uri); void appendIri(IRI iri); void appendLiteral(String value); void appendLiteral(String value, String lang); void appendLiteral(String value, RDFDatatype datatype); void appendLiteral(boolean b); void appendLiteral(int i); void appendLiteral(long l); void appendLiteral(float f); void appendLiteral(double d); void appendLiteral(Calendar dt); String getCommandText(); void setBaseUri(String base); String getBaseUri(); void setParams(QuerySolutionMap map); void setParam(int index, Node n); void setParam(String var, Node n); void setParam(int index, RDFNode n); void setParam(String var, RDFNode n); void setIri(int index, String iri); void setIri(String var, String iri); void setIri(int index, IRI iri); void setIri(String var, IRI iri); void setIri(int index, URL url); void setIri(String var, URL url); void setLiteral(int index, Literal lit); void setLiteral(String var, Literal lit); void setLiteral(int index, String value); void setLiteral(String var, String value); void setLiteral(int index, String value, String lang); void setLiteral(String var, String value, String lang); void setLiteral(int index, String value, RDFDatatype datatype); void setLiteral(String var, String value, RDFDatatype datatype); void setLiteral(int index, boolean value); void setLiteral(String var, boolean value); void setLiteral(int index, int i); void setLiteral(String var, int i); void setLiteral(int index, long l); void setLiteral(String var, long l); void setLiteral(int index, float f); void setLiteral(String var, float f); void setLiteral(int index, double d); void setLiteral(String var, double d); void setLiteral(int index, Calendar dt); void setLiteral(String var, Calendar dt); Node getParam(String var); Node getParam(int index); @Deprecated Iterator<String> getVars(); Map<String, Node> getVariableParameters(); Map<Integer, Node> getPositionalParameters(); Iterator<Integer> getEligiblePositionalParameters(); void clearParam(String var); void clearParam(int index); void clearParams(); @Override String toString(); Query asQuery(); Query asQuery(Syntax syntax); UpdateRequest asUpdate(); UpdateRequest asUpdate(Syntax syntax); ParameterizedSparqlString copy(); ParameterizedSparqlString copy(boolean copyParams); ParameterizedSparqlString copy(boolean copyParams, boolean copyBase, boolean copyPrefixes); @Override PrefixMapping setNsPrefix(String prefix, String uri); @Override PrefixMapping removeNsPrefix(String prefix); @Override PrefixMapping clearNsPrefixMap(); @Override PrefixMapping setNsPrefixes(PrefixMapping other); @Override PrefixMapping setNsPrefixes(Map<String, String> map); @Override PrefixMapping withDefaultMappings(PrefixMapping map); @Override String getNsPrefixURI(String prefix); @Override String getNsURIPrefix(String uri); @Override Map<String, String> getNsPrefixMap(); @Override String expandPrefix(String prefixed); @Override String shortForm(String uri); @Override String qnameFor(String uri); @Override boolean hasNoMappings(); @Override int numPrefixes(); @Override PrefixMapping lock(); @Override boolean samePrefixMappingAs(PrefixMapping other); void setValues(String valueName, Collection<? extends RDFNode> items); void setValues(String valueName, RDFNode item); void setValues(Map<String, Collection<? extends RDFNode>> itemsMap); void setRowValues(String valueName, Collection<List<? extends RDFNode>> rowItems);  }
@Test public void test_param_string_iri_1() { String cmdText = "SELECT * WHERE { ?s ?p ?o }"; ParameterizedSparqlString query = new ParameterizedSparqlString(cmdText); query.setIri("s", "http: test(query, new String[] { "<http: }
@Test public void test_param_string_iri_2() { String cmdText = "SELECT * WHERE { ?s ?p ?o }"; ParameterizedSparqlString query = new ParameterizedSparqlString(cmdText); query.setIri("p", "http: test(query, new String[] { "<http: }
@Test public void test_param_string_iri_3() { String cmdText = "SELECT * WHERE { ?s ?p ?o }"; ParameterizedSparqlString query = new ParameterizedSparqlString(cmdText); query.setIri("o", "http: test(query, new String[] { "<http: }
@Test public void test_param_string_iri_4() { String cmdText = "SELECT * WHERE { ?s ?p ?o . ?s a ?type }"; ParameterizedSparqlString query = new ParameterizedSparqlString(cmdText); query.setIri("s", "http: test(query, new String[] { "<http: }
@Test public void test_param_string_iri_5() { String cmdText = "SELECT * WHERE { ?s ?p ?o . }"; ParameterizedSparqlString query = new ParameterizedSparqlString(cmdText); query.setIri("s", "http: query.setIri("p", "http: test(query, new String[] { "<http: }
@Test public void test_param_string_bnode_1() { String cmdText = "SELECT * WHERE { ?s ?p ?o . }"; ParameterizedSparqlString query = new ParameterizedSparqlString(cmdText); query.setIri("s", "_:blankNodeID"); test(query, new String[] { "<_:blankNodeID>" }, new String[] { "?s" }); }
@Test public void test_param_string_bnode_2() { String cmdText = "INSERT { GRAPH <target> { ?node a:p ?o . } } WHERE { ?node a:p ?o . }"; ParameterizedSparqlString update = new ParameterizedSparqlString(cmdText); update.setIri("node", "_:blankNodeID"); test(update, new String[] { "<_:blankNodeID>" }, new String[] { "?node" }); }
@Test(expected = QueryException.class) public void test_param_string_simple_bad_1() { String cmdText = "SELECT ?s WHERE { ?s ?p ?o }"; ParameterizedSparqlString query = new ParameterizedSparqlString(cmdText); query.setIri("s", "http: test(query, new String[] { "<http: testAsQuery(query); }
@Test public void test_param_string_precedence_1() { String cmdText = "SELECT * WHERE { ?s ?p ?o }"; ParameterizedSparqlString query = new ParameterizedSparqlString(cmdText); query.setIri("s", "http: query.setIri("s", "http: test(query, new String[] { "<http: testAsQuery(query); }
@Test public void test_param_string_precedence_2() { String cmdText = "SELECT * WHERE { ? ?p ?o }"; ParameterizedSparqlString query = new ParameterizedSparqlString(cmdText); query.setIri(0, "http: query.setIri(0, "http: test(query, new String[] { "<http: testAsQuery(query); }
@Test public void test_param_string_name_collision_1() { String cmdText = "SELECT * WHERE { ?a ?ab ?abc }"; ParameterizedSparqlString query = new ParameterizedSparqlString(cmdText); query.setIri("a", "http: test(query, new String[] { "<http: testAsQuery(query); }
@Test public void test_param_string_name_collision_2() { String cmdText = "SELECT * WHERE { ?abc ?ab ?a. }"; ParameterizedSparqlString query = new ParameterizedSparqlString(cmdText); query.setIri("a", "http: test(query, new String[] { "<http: testAsQuery(query); }