Franz Inc, AllegroGraph

com.franz.agraph.repository
Class AGQuery

java.lang.Object
  extended by org.openrdf.query.impl.AbstractOperation
      extended by org.openrdf.query.impl.AbstractQuery
          extended by com.franz.agraph.repository.AGQuery
All Implemented Interfaces:
org.openrdf.query.Operation, org.openrdf.query.Query
Direct Known Subclasses:
AGBooleanQuery, AGGraphQuery, AGTupleQuery, AGUpdate

public abstract class AGQuery
extends org.openrdf.query.impl.AbstractQuery

An abstract query class common to Boolean, Graph and Tuple Queries.


Field Summary
static String RDFS_PLUS_PLUS
          The default entailment regime to use when inferences are included.
static String RESTRICTION
          An entailment regime that includes hasValue, someValuesFrom and allValuesFrom reasoning in addition to RDFS++ entailment.
static String SPARQL_COVERAGE_PLANNER
          The default query planner for SPARQL.
static String SPARQL_IDENTITY_PLANNER
          A query planner for SPARQL that processes queries without doing any reordering of clauses or optimization, useful if the user knows the best order for processing the query.
 
Constructor Summary
AGQuery(AGRepositoryConnection con, org.openrdf.query.QueryLanguage ql, String queryString, String baseURI)
           
 
Method Summary
 String analyze()
          Returns the query analysis for the query.
 String getBaseURI()
          Gets the baseURI for this query.
 org.openrdf.query.Binding[] getBindingsArray()
           
 String getEngine()
          Deprecated. internal use only
 String getEntailmentRegime()
          Gets the entailment regime being used when including inferences with this query.
 org.openrdf.query.QueryLanguage getLanguage()
          Gets the query language for this query.
 int getLimit()
          Gets the limit on the number of solutions for this query.
 String getName()
          Gets the savedName for the query.
 int getOffset()
          Gets the offset, the number of solutions to skip for this query.
 String getPlanner()
          Gets the query planner that processes the query.
 String getQueryString()
          Gets the query string for this query.
 boolean isCheckVariables()
          Gets the flag for checkVariables.
 boolean isLoggingEnabled()
          Gets the loggingEnabled setting for this query.
 boolean isPrepared()
          Gets the prepared flag for the query.
 void setCheckVariables(boolean checkVariables)
          A boolean that defaults to false, indicating whether an error should be raised when a SPARQL query selects variables that are not mentioned in the query body.
 void setEngine(String engine)
          Deprecated. internal use only
 void setEntailmentRegime(String entailmentRegime)
          Sets the entailment regime to use when including inferences with this query.
 void setIncludeInferred(boolean includeInferred)
          Determine whether evaluation results of this query should include inferred statements (if any inferred statements are present in the repository).
 void setLimit(int limit)
          Sets the limit on the number of solutions for this query.
 void setLoggingEnabled(boolean loggingEnabled)
          Sets the loggingEnabled parameter for this query.
 void setOffset(int offset)
          Sets the offset, the number of solutions to skip for this query.
 void setPlanner(String planner)
          Sets the query planner to use when processing the query.
 void setPrepared(boolean prepared)
          Sets the prepared flag for the query.
 void setSaveName(String name)
          Sets the name to use when saving this query with the server's saved query service.
 String toString()
           
 
Methods inherited from class org.openrdf.query.impl.AbstractQuery
getMaxQueryTime, setMaxQueryTime
 
Methods inherited from class org.openrdf.query.impl.AbstractOperation
clearBindings, getBindings, getDataset, getIncludeInferred, removeBinding, setBinding, setDataset
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openrdf.query.Operation
clearBindings, getBindings, getDataset, getIncludeInferred, removeBinding, setBinding, setDataset
 

Field Detail

SPARQL_COVERAGE_PLANNER

public static final String SPARQL_COVERAGE_PLANNER
The default query planner for SPARQL.

See Also:
Constant Field Values

SPARQL_IDENTITY_PLANNER

public static final String SPARQL_IDENTITY_PLANNER
A query planner for SPARQL that processes queries without doing any reordering of clauses or optimization, useful if the user knows the best order for processing the query.

See Also:
Constant Field Values

RDFS_PLUS_PLUS

public static final String RDFS_PLUS_PLUS
The default entailment regime to use when inferences are included.

See Also:
Constant Field Values

RESTRICTION

public static final String RESTRICTION
An entailment regime that includes hasValue, someValuesFrom and allValuesFrom reasoning in addition to RDFS++ entailment.

See Also:
Constant Field Values
Constructor Detail

AGQuery

public AGQuery(AGRepositoryConnection con,
               org.openrdf.query.QueryLanguage ql,
               String queryString,
               String baseURI)
Method Detail

setIncludeInferred

public void setIncludeInferred(boolean includeInferred)
Determine whether evaluation results of this query should include inferred statements (if any inferred statements are present in the repository). The default setting is 'false'.

Specified by:
setIncludeInferred in interface org.openrdf.query.Operation
Overrides:
setIncludeInferred in class org.openrdf.query.impl.AbstractOperation
Parameters:
includeInferred - indicates whether inferred statements should included in the result.
See Also:
setEntailmentRegime(String)

setEntailmentRegime

public void setEntailmentRegime(String entailmentRegime)
Sets the entailment regime to use when including inferences with this query. Default is 'rdfs++'.

Parameters:
entailmentRegime - indicates the entailment regime to use when reasoning.
See Also:
RDFS_PLUS_PLUS, RESTRICTION, setIncludeInferred(boolean)

getEntailmentRegime

public String getEntailmentRegime()
Gets the entailment regime being used when including inferences with this query.


getLanguage

public org.openrdf.query.QueryLanguage getLanguage()
Gets the query language for this query.

Returns:
the query language.

getQueryString

public String getQueryString()
Gets the query string for this query.

Returns:
the query string.

setLoggingEnabled

public void setLoggingEnabled(boolean loggingEnabled)
Sets the loggingEnabled parameter for this query. Default is false.

Parameters:
loggingEnabled - boolean indicating whether logging is enabled.

isLoggingEnabled

public boolean isLoggingEnabled()
Gets the loggingEnabled setting for this query.


getBaseURI

public String getBaseURI()
Gets the baseURI for this query.

Returns:
the base URI.

getPlanner

public String getPlanner()
Gets the query planner that processes the query.

Returns:
the planner name.

setPlanner

public void setPlanner(String planner)
Sets the query planner to use when processing the query.

Parameters:
planner - the planner name.

getEngine

public String getEngine()
Deprecated. internal use only


setEngine

public void setEngine(String engine)
Deprecated. internal use only

This method is not for general use - configure server agraph.cfg QueryEngine instead.

See Also:
getEngine()

setSaveName

public void setSaveName(String name)
Sets the name to use when saving this query with the server's saved query service.

Parameters:
name - the saved name.

getName

public String getName()
Gets the savedName for the query.

Returns:
the saved name.

isPrepared

public boolean isPrepared()
Gets the prepared flag for the query.

Returns:
the prepared flag.

setPrepared

public void setPrepared(boolean prepared)
Sets the prepared flag for the query.

Parameters:
prepared - the prepared flag.

analyze

public String analyze()
               throws org.openrdf.query.QueryEvaluationException
Returns the query analysis for the query. The query is not evaluated.

Returns:
the query analysis as a string.
Throws:
org.openrdf.query.QueryEvaluationException

isCheckVariables

public boolean isCheckVariables()
Gets the flag for checkVariables.

Returns:
the checkVariables flag.

setCheckVariables

public void setCheckVariables(boolean checkVariables)
A boolean that defaults to false, indicating whether an error should be raised when a SPARQL query selects variables that are not mentioned in the query body.

Parameters:
checkVariables - the checkVariables flag.

getBindingsArray

public org.openrdf.query.Binding[] getBindingsArray()

toString

public String toString()
Overrides:
toString in class Object

getLimit

public int getLimit()
Gets the limit on the number of solutions for this query.

Returns:
limit

setLimit

public void setLimit(int limit)
Sets the limit on the number of solutions for this query. By default, the value is -1, meaning no constraint is imposed.


getOffset

public int getOffset()
Gets the offset, the number of solutions to skip for this query.

Returns:
offset

setOffset

public void setOffset(int offset)
Sets the offset, the number of solutions to skip for this query. By default, the value is -1, meaning no constraint is imposed.


Copyright © 2008-2012 Franz Inc.