Class QueryExecutionCompare

java.lang.Object
org.aksw.jena_sparql_api.compare.QueryExecutionCompare
All Implemented Interfaces:
AutoCloseable, org.apache.jena.query.QueryExecution

public class QueryExecutionCompare extends Object implements org.apache.jena.query.QueryExecution
Author:
Claus Stadler

Date: 1/5/12 Time: 12:33 AM

  • Constructor Summary

    Constructors
    Constructor
    Description
    QueryExecutionCompare(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 Type
    Method
    Description
    void
    Stop in mid execution.
    void
    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 ModelDiff
    compareModel(org.apache.jena.rdf.model.Model a, org.apache.jena.rdf.model.Model b)
     
    boolean
    Execute an ASK query
    org.apache.jena.rdf.model.Model
    Execute a CONSTRUCT query
    org.apache.jena.rdf.model.Model
    execConstruct(org.apache.jena.rdf.model.Model model)
    Execute a CONSTRUCT query, putting the statements into 'model'.
    org.apache.jena.query.Dataset
     
    org.apache.jena.query.Dataset
    execConstructDataset(org.apache.jena.query.Dataset dataset)
     
    Iterator<org.apache.jena.sparql.core.Quad>
     
    Iterator<org.apache.jena.graph.Triple>
    Set time, in milliseconds
    org.apache.jena.rdf.model.Model
    Execute a DESCRIBE query
    org.apache.jena.rdf.model.Model
    execDescribe(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.JsonArray
     
    Iterator<org.apache.jena.atlas.json.JsonObject>
     
    org.apache.jena.query.ResultSet
    Execute a SELECT query
    org.apache.jena.sparql.util.Context
    The properties associated with a query execution - implementation specific parameters This includes Java objects (so it is not an RDF graph).
    org.apache.jena.query.Dataset
    The dataset against which the query will execute.
    org.apache.jena.query.Query
    The query associated with a query execution.
     
    long
     
    long
     
    boolean
     
    boolean
     
    void
    log(long added, long removed)
     
    void
    log(org.apache.jena.sparql.algebra.Table ra, org.apache.jena.sparql.algebra.Table rb)
     
    void
     
    void
     
    void
     
    void
     
    static String
    toString(org.apache.jena.query.Dataset dataset, org.apache.jena.riot.RDFFormat format)
     
    static String
    toString(org.apache.jena.rdf.model.Model model, org.apache.jena.riot.RDFFormat format)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      getDataset in interface org.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:
      getContext in interface org.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:
      getQuery in interface org.apache.jena.query.QueryExecution
    • execSelect

      public org.apache.jena.query.ResultSet execSelect()
      Execute a SELECT query
      Specified by:
      execSelect in interface org.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:
      execConstruct in interface org.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:
      execConstruct in interface org.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:
      execDescribe in interface org.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:
      execDescribe in interface org.apache.jena.query.QueryExecution
      Returns:
      Model The model argument for casaded code.
    • execAsk

      public boolean execAsk()
      Execute an ASK query
      Specified by:
      execAsk in interface org.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:
      abort in interface org.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:
      close in interface AutoCloseable
      Specified by:
      close in interface org.apache.jena.query.QueryExecution
    • execConstructTriples

      public Iterator<org.apache.jena.graph.Triple> execConstructTriples()
      Set time, in milliseconds
      Specified by:
      execConstructTriples in interface org.apache.jena.query.QueryExecution
      See Also:
      • #setTimeout(long, java.util.concurrent.TimeUnit, long, java.util.concurrent.TimeUnit)
    • execDescribeTriples

      public Iterator<org.apache.jena.graph.Triple> execDescribeTriples()
      Specified by:
      execDescribeTriples in interface org.apache.jena.query.QueryExecution
    • getTimeout1

      public long getTimeout1()
      Specified by:
      getTimeout1 in interface org.apache.jena.query.QueryExecution
    • getTimeout2

      public long getTimeout2()
      Specified by:
      getTimeout2 in interface org.apache.jena.query.QueryExecution
    • isClosed

      public boolean isClosed()
      Specified by:
      isClosed in interface org.apache.jena.query.QueryExecution
    • execConstructQuads

      public Iterator<org.apache.jena.sparql.core.Quad> execConstructQuads()
      Specified by:
      execConstructQuads in interface org.apache.jena.query.QueryExecution
    • execConstructDataset

      public org.apache.jena.query.Dataset execConstructDataset()
      Specified by:
      execConstructDataset in interface org.apache.jena.query.QueryExecution
    • execConstructDataset

      public org.apache.jena.query.Dataset execConstructDataset(org.apache.jena.query.Dataset dataset)
      Specified by:
      execConstructDataset in interface org.apache.jena.query.QueryExecution
    • execJson

      public org.apache.jena.atlas.json.JsonArray execJson()
      Specified by:
      execJson in interface org.apache.jena.query.QueryExecution
    • execJsonItems

      public Iterator<org.apache.jena.atlas.json.JsonObject> execJsonItems()
      Specified by:
      execJsonItems in interface org.apache.jena.query.QueryExecution
    • getQueryString

      public String getQueryString()
      Specified by:
      getQueryString in interface org.apache.jena.query.QueryExecution