I would like to run a parameterized query (http://docs.stardog.com/java/snarl/com/complexible/stardog/api/Query.html). All the examples I can find use full URI addresses such as: IRI PERSON = Values.iri("http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#Person"); aQuery.parameter("type", PERSON); |
aQuery.parameter( "type", Values.iri("ex:Person") );
PREFIX ......# Overrides by the API:# PARAMETERS ( ?type ) {# <ex:Person># }
Model aGraph = Models2.newModel(Values.statement(Values.iri("urn:subj"),
| |||
I would like to run a parameterized query (http://docs.stardog.com/java/snarl/com/complexible/stardog/api/Query.html). All the examples I can find use full URI addresses such as: IRI PERSON = Values.iri("http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#Person");
aQuery.parameter("type", PERSON);
However, I would like to use "ex:Person". But when I do:aQuery.parameter( "type", Values.iri("ex:Person") );It gets translated into the query to:PREFIX ......# Overrides by the API:# PARAMETERS ( ?type ) {# <ex:Person># }Like a full URI, so the query returns no values. How can I achieve this? I have seen the following example that seems to work, but I cannot figure it out in my case. The Javadocs don't seem to contain any useful hint.
Model aGraph = Models2.newModel(Values.statement(Values.iri("urn:subj"),
Values.iri("urn:pred"), Values.iri("urn:obj"))); Thanks.
--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.
There is a two argument method for Values.iri that takes a prefix and a local part if that's what you're after. http://docs.stardog.com/java/snarl/com/complexible/common/rdf/model/Values.html#iri-java.lang.String-java.lang.String-