Package org.aksw.jena_sparql_api.compare
Class QueryExecutionCompare
java.lang.Object
org.aksw.jena_sparql_api.compare.QueryExecutionCompare
- All Implemented Interfaces:
AutoCloseable,org.apache.jena.query.QueryExecution
- Author:
- Claus Stadler Date: 1/5/12 Time: 12:33 AM
-
Constructor Summary
ConstructorsConstructorDescriptionQueryExecutionCompare(org.apache.jena.query.Query query, String queryString, org.apache.jena.query.QueryExecution a, org.apache.jena.query.QueryExecution b, boolean isOrdered) QueryExecutionCompare(org.apache.jena.query.Query query, org.apache.jena.query.QueryExecution a, org.apache.jena.query.QueryExecution b, boolean isOrdered) -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Stop in mid execution.voidclose()Close the query execution and stop query evaluation as soon as convenient.static org.aksw.commons.collections.diff.Diff<org.apache.jena.query.Dataset>compareDataset(org.apache.jena.query.Dataset a, org.apache.jena.query.Dataset b) static ModelDiffcompareModel(org.apache.jena.rdf.model.Model a, org.apache.jena.rdf.model.Model b) booleanexecAsk()Execute an ASK queryorg.apache.jena.rdf.model.ModelExecute a CONSTRUCT queryorg.apache.jena.rdf.model.ModelexecConstruct(org.apache.jena.rdf.model.Model model) Execute a CONSTRUCT query, putting the statements into 'model'.org.apache.jena.query.Datasetorg.apache.jena.query.DatasetexecConstructDataset(org.apache.jena.query.Dataset dataset) Iterator<org.apache.jena.sparql.core.Quad>Iterator<org.apache.jena.graph.Triple>Set time, in millisecondsorg.apache.jena.rdf.model.ModelExecute a DESCRIBE queryorg.apache.jena.rdf.model.ModelexecDescribe(org.apache.jena.rdf.model.Model model) Execute a DESCRIBE query, putting the statements into 'model'.Iterator<org.apache.jena.graph.Triple>org.apache.jena.atlas.json.JsonArrayexecJson()Iterator<org.apache.jena.atlas.json.JsonObject>org.apache.jena.query.ResultSetExecute a SELECT queryorg.apache.jena.sparql.util.ContextThe properties associated with a query execution - implementation specific parameters This includes Java objects (so it is not an RDF graph).org.apache.jena.query.DatasetThe dataset against which the query will execute.org.apache.jena.query.QuerygetQuery()The query associated with a query execution.longlongbooleanisClosed()booleanvoidlog(long added, long removed) voidlog(org.apache.jena.sparql.algebra.Table ra, org.apache.jena.sparql.algebra.Table rb) voidlogAsk()voidvoidlogModel()voidstatic StringtoString(org.apache.jena.query.Dataset dataset, org.apache.jena.riot.RDFFormat format) static StringtoString(org.apache.jena.rdf.model.Model model, org.apache.jena.riot.RDFFormat format)
-
Constructor Details
-
QueryExecutionCompare
public QueryExecutionCompare(org.apache.jena.query.Query query, org.apache.jena.query.QueryExecution a, org.apache.jena.query.QueryExecution b, boolean isOrdered) -
QueryExecutionCompare
public QueryExecutionCompare(org.apache.jena.query.Query query, String queryString, org.apache.jena.query.QueryExecution a, org.apache.jena.query.QueryExecution b, boolean isOrdered)
-
-
Method Details
-
compareModel
public static ModelDiff compareModel(org.apache.jena.rdf.model.Model a, org.apache.jena.rdf.model.Model b) -
compareDataset
public static org.aksw.commons.collections.diff.Diff<org.apache.jena.query.Dataset> compareDataset(org.apache.jena.query.Dataset a, org.apache.jena.query.Dataset b) -
isDifference
public boolean isDifference() -
getDataset
public org.apache.jena.query.Dataset getDataset()The dataset against which the query will execute. May be null, implying it is expected that the query itself has a dataset description.- Specified by:
getDatasetin interfaceorg.apache.jena.query.QueryExecution
-
getContext
public org.apache.jena.sparql.util.Context getContext()The properties associated with a query execution - implementation specific parameters This includes Java objects (so it is not an RDF graph). Keys should be URIs as strings. May be null (this implementation does not provide any configuration).- Specified by:
getContextin interfaceorg.apache.jena.query.QueryExecution
-
getQuery
public org.apache.jena.query.Query getQuery()The query associated with a query execution. May be null (QueryExecution may have been created by other means)- Specified by:
getQueryin interfaceorg.apache.jena.query.QueryExecution
-
execSelect
public org.apache.jena.query.ResultSet execSelect()Execute a SELECT query- Specified by:
execSelectin interfaceorg.apache.jena.query.QueryExecution
-
log
public void log(long added, long removed) -
log
public void log(org.apache.jena.sparql.algebra.Table ra, org.apache.jena.sparql.algebra.Table rb) -
logResultSet
public void logResultSet() -
logModel
public void logModel() -
logDataset
public void logDataset() -
toString
public static String toString(org.apache.jena.rdf.model.Model model, org.apache.jena.riot.RDFFormat format) -
toString
public static String toString(org.apache.jena.query.Dataset dataset, org.apache.jena.riot.RDFFormat format) -
logAsk
public void logAsk() -
execConstruct
public org.apache.jena.rdf.model.Model execConstruct()Execute a CONSTRUCT query- Specified by:
execConstructin interfaceorg.apache.jena.query.QueryExecution
-
execConstruct
public org.apache.jena.rdf.model.Model execConstruct(org.apache.jena.rdf.model.Model model) Execute a CONSTRUCT query, putting the statements into 'model'.- Specified by:
execConstructin interfaceorg.apache.jena.query.QueryExecution- Returns:
- Model The model argument for casaded code.
-
execDescribe
public org.apache.jena.rdf.model.Model execDescribe()Execute a DESCRIBE query- Specified by:
execDescribein interfaceorg.apache.jena.query.QueryExecution
-
execDescribe
public org.apache.jena.rdf.model.Model execDescribe(org.apache.jena.rdf.model.Model model) Execute a DESCRIBE query, putting the statements into 'model'.- Specified by:
execDescribein interfaceorg.apache.jena.query.QueryExecution- Returns:
- Model The model argument for casaded code.
-
execAsk
public boolean execAsk()Execute an ASK query- Specified by:
execAskin interfaceorg.apache.jena.query.QueryExecution
-
abort
public void abort()Stop in mid execution. This method can be called in parallel with other methods on the QueryExecution object. There is no guarantee that the concrete implementation actual will stop or that it will do so immediately. No operations on the query execution or any associated result set are permitted after this call and may cause exceptions to be thrown.- Specified by:
abortin interfaceorg.apache.jena.query.QueryExecution
-
close
public void close()Close the query execution and stop query evaluation as soon as convenient. It is important to close query execution objects in order to release resources such as working memory and to stop the query execution. Some storage subsystems require explicit ends of operations and this operation will cause those to be called where necessary. No operations on the query execution or any associated result set are permitted after this call. This method should not be called in parallel with other methods on the QueryExecution object.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceorg.apache.jena.query.QueryExecution
-
execConstructTriples
Set time, in milliseconds- Specified by:
execConstructTriplesin interfaceorg.apache.jena.query.QueryExecution- See Also:
-
#setTimeout(long, java.util.concurrent.TimeUnit, long, java.util.concurrent.TimeUnit)
-
execDescribeTriples
- Specified by:
execDescribeTriplesin interfaceorg.apache.jena.query.QueryExecution
-
getTimeout1
public long getTimeout1()- Specified by:
getTimeout1in interfaceorg.apache.jena.query.QueryExecution
-
getTimeout2
public long getTimeout2()- Specified by:
getTimeout2in interfaceorg.apache.jena.query.QueryExecution
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceorg.apache.jena.query.QueryExecution
-
execConstructQuads
- Specified by:
execConstructQuadsin interfaceorg.apache.jena.query.QueryExecution
-
execConstructDataset
public org.apache.jena.query.Dataset execConstructDataset()- Specified by:
execConstructDatasetin interfaceorg.apache.jena.query.QueryExecution
-
execConstructDataset
public org.apache.jena.query.Dataset execConstructDataset(org.apache.jena.query.Dataset dataset) - Specified by:
execConstructDatasetin interfaceorg.apache.jena.query.QueryExecution
-
execJson
public org.apache.jena.atlas.json.JsonArray execJson()- Specified by:
execJsonin interfaceorg.apache.jena.query.QueryExecution
-
execJsonItems
- Specified by:
execJsonItemsin interfaceorg.apache.jena.query.QueryExecution
-
getQueryString
- Specified by:
getQueryStringin interfaceorg.apache.jena.query.QueryExecution
-