Package com.stardog.stark.query
Interface QueryFactory
-
public interface QueryFactoryInterface 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 errorbut 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 BooleanQueryask(java.lang.String theQuery)Create the boolean query with the default base ("http://api.stardog.com/") for parsing.BooleanQueryask(java.lang.String theQuery, java.lang.String theBase)Create a new boolean query.default GraphQuerygraph(java.lang.String theQuery)Create the graph query with the default base ("http://api.stardog.com/") for parsing.GraphQuerygraph(java.lang.String theQuery, java.lang.String theBase)Create a new graph query.default SelectQueryselect(java.lang.String theQuery)Create the select query with the default base ("http://api.stardog.com/") for parsing.SelectQueryselect(java.lang.String theQuery, java.lang.String theBase)Create a new select query.default UpdateQueryupdate(java.lang.String theQuery)Create the update query with the default base ("http://api.stardog.com/") for parsing.UpdateQueryupdate(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
-
-