Package com.stardog.stark.query
Interface Query
- All Known Subinterfaces:
BooleanQuery,GraphQuery,ReadQuery,SelectQuery,UpdateQuery
public interface Query
A query over a semantic graph
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
- Implementation Notes:
- By default, a `Query` is assumed to have no timeout, reasoning disabled, and use
Datasets.NO_DATASETas its active graph for evaluation.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault StringbaseIRI()Return the base URI for this querydataset()Return theDatasetwithin the database the query should be executed against.Specify theDatasetwithin the database the query should be executed against.language()The language the query is serialized inSet the parameter to the `xsd:boolean` valueSet the parameter to the xsd:byte valueSet the parameter to the `xsd:double` valueSet the parameter to the `xsd:float` valueSet the parameter to the `xsd:int` valueSet the parameter to the `xsd:long` valueSet the parameter to the `xsd:short` valueSet theValueof the parameterSet the parameter to the specified value.Set the parameter to the xsd:string valueSet the parameter to the xsd:URI valueSet the parameter to the xsd:date valueparameter(String theName, GregorianCalendar theValue) Set the parameter to the xsd:dateTime valueReturn *a copy* of the current parameters.booleanReturn whether or not reasoning should be used when evaluating this queryreasoning(boolean theEnabled) Set whether or not this query should be evaluated using reasoningremoveParameter(String theName) Unset the given parameter.string()The query stringlongtimeout()Return the timeout of thisQuery*in milliseconds*.Set the timeout of thisQuery
-
Field Details
-
NO_TIMEOUT
static final long NO_TIMEOUTConstant for no timeout- See Also:
-
-
Method Details
-
reasoning
boolean reasoning()Return whether or not reasoning should be used when evaluating this query- Returns:
- `true` if enabled, `false` otherwise
-
reasoning
Set whether or not this query should be evaluated using reasoning- Parameters:
theEnabled- `true` to use reasoning, `false` otherwise- Returns:
- this `Query`
-
string
The query string- Returns:
- the query string
-
baseIRI
Return the base URI for this query- Returns:
- the base
-
language
The language the query is serialized in- Returns:
- the query language
-
timeout
long timeout()Return the timeout of thisQuery*in milliseconds*.- Returns:
- the timeout (ms); `-1L` is returned when the timeout value is *not* set
-
timeout
Set the timeout of thisQuery- Parameters:
theTimeout- the timeout, `-1L` should be used to disable the timeouttheUnit- the unit for the timeout value- Returns:
- this object
-
dataset
Return theDatasetwithin the database the query should be executed against.- Returns:
- the active graph for the query
- API Note:
- Some query languages allow the active graph, ie the dataset, to be specified _within_ the query. In those cases, it is expected that this dataset would *override* any provided in the query.
-
dataset
Specify theDatasetwithin the database the query should be executed against.- Parameters:
theDataset- the dataset- Returns:
- this query
- API Note:
- Some query languages allow the active graph, ie the dataset, to be specified _within_ the query. In those cases, it is expected that this dataset would *override* any provided in the query.
-
parameter
Set theValueof the parameter- Parameters:
theName- the parameter to settheValue- the value of the parameter- Returns:
- this query
-
parameter
Set the parameter to the `xsd:int` value- Parameters:
theName- the parameter to settheValue- the value of the parameter- Returns:
- this query
-
parameter
Set the parameter to the `xsd:long` value- Parameters:
theName- the parameter to settheValue- the value of the parameter- Returns:
- this query
-
parameter
Set the parameter to the `xsd:float` value- Parameters:
theName- the parameter to settheValue- the value of the parameter- Returns:
- this query
-
parameter
Set the parameter to the `xsd:double` value- Parameters:
theName- the parameter to settheValue- the value of the parameter- Returns:
- this query
-
parameter
Set the parameter to the `xsd:short` value- Parameters:
theName- the parameter to settheValue- the value of the parameter- Returns:
- this query
-
parameter
Set the parameter to the `xsd:boolean` value- Parameters:
theName- the parameter to settheValue- the value of the parameter- Returns:
- this query
-
parameter
Set the parameter to the xsd:byte value- Parameters:
theName- the parameter to settheValue- the value of the parameter- Returns:
- this query
-
parameter
Set the parameter to the xsd:string value- Parameters:
theName- the parameter to settheValue- the value of the parameter- Returns:
- this query
-
parameter
Set the parameter to the xsd:date value- Parameters:
theName- the parameter to settheValue- the value of the parameter- Returns:
- this query
-
parameter
Set the parameter to the xsd:dateTime value- Parameters:
theName- the parameter to settheValue- the value of the parameter- Returns:
- this query
-
parameter
Set the parameter to the xsd:URI value- Parameters:
theName- the parameter to settheURI- the value of the parameter- Returns:
- this query
-
parameter
Set the parameter to the specified value. Convenience method which will delegate to one of the other parameter(...) methods- Parameters:
theName- the parameter nametheObj- the param value- Returns:
- this query
-
removeParameter
Unset the given parameter. If it is not set, this method does nothing.- Parameters:
theName- the parameter- Returns:
- this query
-
parameters
Return *a copy* of the current parameters. Modifications to this `Map` are not reflected in the current set parameters.- Returns:
- the parameters
-