Package com.stardog.stark.query
Interface QueryFactory
-
public interface QueryFactory
Interface for creating
queries
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
- Implementation Notes:
- The factory is _not required_ to parse the query when creating it. That can be deferred until execution.
All of the methods can potentially throw a
parse error
but the exception is only thrown when queries are parse at creation time. Parsing could be done lazily prior to execution in which case the creation error would be reported as part of the execution process
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default BooleanQuery
ask(java.lang.String theQuery)
Create the boolean query with the default base ("http://api.stardog.com/") for parsing.BooleanQuery
ask(java.lang.String theQuery, java.lang.String theBase)
Create a new boolean query.default GraphQuery
graph(java.lang.String theQuery)
Create the graph query with the default base ("http://api.stardog.com/") for parsing.GraphQuery
graph(java.lang.String theQuery, java.lang.String theBase)
Create a new graph query.default SelectQuery
select(java.lang.String theQuery)
Create the select query with the default base ("http://api.stardog.com/") for parsing.SelectQuery
select(java.lang.String theQuery, java.lang.String theBase)
Create a new select query.default UpdateQuery
update(java.lang.String theQuery)
Create the update query with the default base ("http://api.stardog.com/") for parsing.UpdateQuery
update(java.lang.String theQuery, java.lang.String theBase)
Create a new update query.
-
-
-
Method Detail
-
select
@Nonnull default SelectQuery select(@Nonnull java.lang.String theQuery)
Create the select query with the default base ("http://api.stardog.com/") for parsing.- Parameters:
theQuery
- the query- Returns:
- the query
- Throws:
MalformedQuery
- if this query is not syntactically valid
-
select
@Nonnull SelectQuery select(@Nonnull java.lang.String theQuery, @Nonnull java.lang.String theBase)
Create a new select query.- Parameters:
theQuery
- the querytheBase
- the base IRI for parsing- Returns:
- the query
- Throws:
MalformedQuery
- if this query is not syntactically valid
-
graph
@Nonnull default GraphQuery graph(@Nonnull java.lang.String theQuery)
Create the graph query with the default base ("http://api.stardog.com/") for parsing.- Parameters:
theQuery
- the query- Returns:
- the query
- Throws:
MalformedQuery
- if this query is not syntactically valid
-
graph
@Nonnull GraphQuery graph(@Nonnull java.lang.String theQuery, @Nonnull java.lang.String theBase)
Create a new graph query.- Parameters:
theQuery
- the querytheBase
- the base IRI for parsing- Returns:
- the query
- Throws:
MalformedQuery
- if this query is not syntactically valid
-
ask
@Nonnull default BooleanQuery ask(@Nonnull java.lang.String theQuery)
Create the boolean query with the default base ("http://api.stardog.com/") for parsing.- Parameters:
theQuery
- the query- Returns:
- the query
- Throws:
MalformedQuery
- if this query is not syntactically valid
-
ask
@Nonnull BooleanQuery ask(@Nonnull java.lang.String theQuery, @Nonnull java.lang.String theBase)
Create a new boolean query.- Parameters:
theQuery
- the querytheBase
- the base IRI for parsing- Returns:
- the query
- Throws:
MalformedQuery
- if this query is not syntactically valid
-
update
@Nonnull default UpdateQuery update(@Nonnull java.lang.String theQuery)
Create the update query with the default base ("http://api.stardog.com/") for parsing.- Parameters:
theQuery
- the query- Returns:
- the query
- Throws:
MalformedQuery
- if this query is not syntactically valid
-
update
@Nonnull UpdateQuery update(@Nonnull java.lang.String theQuery, @Nonnull java.lang.String theBase)
Create a new update query.- Parameters:
theQuery
- the querytheBase
- the base IRI for parsing- Returns:
- the query
- Throws:
MalformedQuery
- if this query is not syntactically valid
-
-