public class AGGraphQuery extends AGQuery implements GraphQuery
RDFS_PLUS_PLUS, RESTRICTION, SPARQL_COVERAGE_PLANNER, SPARQL_IDENTITY_PLANNER
Constructor and Description |
---|
AGGraphQuery(AGRepositoryConnection con,
QueryLanguage ql,
String queryString,
String baseURI)
Creates an AGGraphQuery instance for the given connection.
|
Modifier and Type | Method and Description |
---|---|
long |
count()
Evaluates the query and returns only the number of results
to the client (counting is done on the server, the results
are not returned).
|
void |
download(File file,
RDFFormat format)
Evaluates the query and saves the results to a file.
|
void |
download(String file,
RDFFormat format)
Evaluates the query and saves the results to a file.
|
GraphQueryResult |
evaluate()
Evaluates the query and returns a GraphQueryResult.
|
void |
evaluate(RDFHandler handler)
Evaluates the query and uses handler to process the result.
|
InputStream |
stream(RDFFormat format)
Evaluates the query and returns the result as an input stream.
|
analyze, download, download, download, download, getBaseURI, getBindingsArray, getEngine, getEntailmentRegime, getFranzOptionPrefixString, getLanguage, getLimit, getName, getOffset, getPlanner, getQueryString, isCheckVariables, isLoggingEnabled, isPrepared, setCheckVariables, setEngine, setEntailmentRegime, setIncludeInferred, setLimit, setLoggingEnabled, setOffset, setPlanner, setPrepared, setSaveName, stream, stream, toString
getMaxQueryTime, setMaxQueryTime
clearBindings, getBindings, getDataset, getIncludeInferred, getMaxExecutionTime, removeBinding, setBinding, setDataset, setMaxExecutionTime
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMaxQueryTime, setMaxQueryTime
clearBindings, getBindings, getDataset, getIncludeInferred, getMaxExecutionTime, removeBinding, setBinding, setDataset, setIncludeInferred, setMaxExecutionTime
public AGGraphQuery(AGRepositoryConnection con, QueryLanguage ql, String queryString, String baseURI)
con
- the connectionql
- the query languagequeryString
- the querybaseURI
- the base URI for the querypublic GraphQueryResult evaluate() throws QueryEvaluationException
evaluate
in interface GraphQuery
QueryEvaluationException
public void evaluate(RDFHandler handler) throws QueryEvaluationException, RDFHandlerException
evaluate
in interface GraphQuery
QueryEvaluationException
RDFHandlerException
public long count() throws QueryEvaluationException
QueryEvaluationException
- if an error occurs while evaluating the querypublic void download(File file, RDFFormat format) throws QueryEvaluationException
file
- Output path.format
- Output format.QueryEvaluationException
- if there is an error while evaluating querypublic void download(String file, RDFFormat format) throws QueryEvaluationException
file
- Output path.format
- Output format.QueryEvaluationException
- if there is an error while evaluating querypublic InputStream stream(RDFFormat format) throws QueryEvaluationException
Note that it is important to close the returned stream, to avoid resource leaks.
format
- Output format.QueryEvaluationException
- if there is an error while evaluating queryCopyright © 2024 Franz Inc.. All rights reserved.