|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.glitter.query.QueryController
public class QueryController
The QueryController is a central point for much of the information that characterizes a parsed
and prepared query. A QueryController is populated as a query is parsed, and its information is used to
feed other parts of the query system (e.g. the RDFDataset)
| Constructor Summary | |
|---|---|
QueryController()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addDefaultGraph(java.net.URI g)
Notes a default graph found in the query in a FROM clause |
void |
addNamedGraph(java.net.URI g)
Notes a named graph found in the query in a FROM NAMED clause |
void |
addOrderingCondition(OrderingCondition condition)
Notes an OrderingCondition (expression + sort direction) found in a query
in an ORDER BY clause. |
java.net.URI |
getBaseUri()
|
java.util.Set<java.net.URI> |
getDefaultGraphs()
|
int |
getLimit()
|
java.util.Set<java.net.URI> |
getNamedGraphs()
|
int |
getOffset()
|
java.util.List<OrderingCondition> |
getOrderingConditions()
|
GraphPattern |
getQueryPattern()
|
QueryResultForm |
getQueryResultForm()
|
QueryResults |
getQueryResults()
Retrieves the query results. |
java.lang.String |
getQueryString()
|
QueryType |
getQueryType()
|
SolutionGenerator |
getSolutionGenerator()
|
boolean |
isOrdered()
|
void |
mapPrefix(java.lang.String prefix,
java.net.URI uri)
Records a mapping from a given prefix to its URI expansion. |
java.net.URI |
resolveQName(java.lang.String prefix,
java.lang.String localPart)
Fully resolves a prefixed name into the full URI that it represents |
java.net.URI |
resolveQName(java.lang.String prefix,
java.lang.String localPart,
boolean fullyResolve)
Resolves a prefixed name into the full URI that it represents. |
java.net.URI |
resolveUri(java.lang.String s)
See resolveUri(URI). |
java.net.URI |
resolveUri(java.net.URI u)
Resolves the given (possibly relative) URI against a base URI, if one has been set. |
void |
setBaseUri(java.net.URI u)
Sets the base URI against which relative URIs are resolved. |
void |
setLimit(int limit)
Sets the solution limit as given by a LIMIT clause |
void |
setOffset(int offset)
Sets the offset into the solution sequence as given by a OFFSET clause |
void |
setQueryPattern(GraphPattern pattern)
Sets the root node in the WHERE clause of the query |
void |
setQueryResultForm(QueryResultForm resultForm)
Sets the query form. |
void |
setQueryResults(QueryResults queryResults)
Sets the results of executing the query. |
void |
setSolutionGenerator(SolutionGenerator solutionGenerator)
Sets the SolutionGenerator used for generating bindings while executing the query. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QueryController()
| Method Detail |
|---|
public void addDefaultGraph(java.net.URI g)
g - public void addNamedGraph(java.net.URI g)
g - public void addOrderingCondition(OrderingCondition condition)
OrderingCondition (expression + sort direction) found in a query
in an ORDER BY clause. Note that the order that addOrderingCondition(OrderingCondition) is
called is significant and should match the order the conditions are present in the query.
condition - public java.net.URI getBaseUri()
getBaseUri in interface QueryInformationpublic java.util.Set<java.net.URI> getDefaultGraphs()
URIs that identify the components of the default graph for this querypublic int getLimit()
getLimit in interface QueryInformationpublic java.util.Set<java.net.URI> getNamedGraphs()
URIs that identify the named graphs for this querypublic int getOffset()
getOffset in interface QueryInformationpublic java.util.List<OrderingCondition> getOrderingConditions()
getOrderingConditions in interface QueryInformationpublic GraphPattern getQueryPattern()
getQueryPattern in interface QueryInformationpublic QueryResultForm getQueryResultForm()
getQueryResultForm in interface QueryInformationpublic java.lang.String getQueryString()
getQueryString in interface QueryInformationpublic QueryType getQueryType()
getQueryType in interface QueryInformationpublic boolean isOrdered()
OrderingConditions
public void mapPrefix(java.lang.String prefix,
java.net.URI uri)
URI expansion. See resolveQName(String, String)
prefix - uri -
public java.net.URI resolveQName(java.lang.String prefix,
java.lang.String localPart)
throws ParseException
URI that it represents
prefix - The prefix part of the prefixed name (before the ':')localPart - The local name part of the prefixed name (after the ':')
URI
ParseException
public java.net.URI resolveQName(java.lang.String prefix,
java.lang.String localPart,
boolean fullyResolve)
throws ParseException
URI that it represents.
prefix - The prefix part of the prefixed name (before the ':')localPart - The local name part of the prefixed name (after the ':')fullyResolve - If false, simply resolve the prefix. If true,
also resolve a relative URI based on our base URI. See resolveUri(String).
ParseException
public java.net.URI resolveUri(java.lang.String s)
throws java.net.URISyntaxException
resolveUri(URI).
s - String form of the URI to resolve.
URI.
java.net.URISyntaxExceptionpublic java.net.URI resolveUri(java.net.URI u)
URI against a base URI, if one has been set.
u - The URI to resolve.
public void setBaseUri(java.net.URI u)
u - the bsae URIpublic void setLimit(int limit)
limit - public void setOffset(int offset)
offset - public void setQueryPattern(GraphPattern pattern)
pattern - public void setQueryResultForm(QueryResultForm resultForm)
Projection, Ask, or Construct.
resultForm - public QueryResults getQueryResults()
setQueryResults(QueryResults) has
been called.
QueryResultspublic void setQueryResults(QueryResults queryResults)
queryResults - public SolutionGenerator getSolutionGenerator()
getSolutionGenerator in interface QueryInformationpublic void setSolutionGenerator(SolutionGenerator solutionGenerator)
SolutionGenerator used for generating bindings while executing the query.
solutionGenerator -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||