Class RDFConnectionUtils

java.lang.Object
org.aksw.jenax.dataaccess.sparql.connection.common.RDFConnectionUtils

public class RDFConnectionUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.jena.rdfconnection.RDFConnection
    enableRelativeIrisInQueryResults(org.apache.jena.rdfconnection.RDFConnection delegate)
     
    static org.apache.jena.sparql.engine.QueryIterator
    exec(org.apache.jena.sparql.exec.QueryExecBuilder builder, boolean isSilent, boolean isStreamingAllowed)
    Obtain a RowSet from the given queryExecBuilder.
    static org.apache.jena.sparql.engine.QueryIterator
    execService(org.apache.jena.sparql.algebra.op.OpService opService, org.apache.jena.rdfconnection.RDFConnection target, boolean isStreamingAllowed, org.apache.jena.sparql.core.DatasetDescription datasetDescription)
    Runs an OpService on the given connection.
    static org.apache.jena.sparql.engine.QueryIterator
    execService(org.apache.jena.sparql.engine.binding.Binding binding, org.apache.jena.sparql.engine.ExecutionContext execCxt, org.apache.jena.sparql.algebra.op.OpService opService, org.apache.jena.rdfconnection.RDFConnection target, boolean isStreamingAllowed, boolean applyDatasetDescription)
    Runs an OpService on the given connection.
    static org.apache.jena.query.Dataset
    getDataset(org.apache.jena.rdfconnection.RDFConnectionLocal conn)
    Reflective access to an RDFConnectionModular's dataset.
    static org.apache.jena.rdfconnection.RDFDatasetConnection
    Reflective access to an RDFConnectionModular's datasetConnection.
    static org.apache.jena.rdfconnection.SparqlQueryConnection
    Reflective access to an RDFConnectionModular's queryConnection.
    static org.apache.jena.rdfconnection.SparqlUpdateConnection
    Reflective access to an RDFConnectionModular's updateConnection.
    static org.apache.jena.rdfconnection.RDFDatasetConnection
    unwrapDatasetConnection(org.apache.jena.rdfconnection.RDFDatasetConnection conn)
     
    static org.apache.jena.rdfconnection.SparqlQueryConnection
    unwrapQueryConnection(org.apache.jena.rdfconnection.SparqlQueryConnection conn)
     
    static org.apache.jena.rdfconnection.SparqlUpdateConnection
    unwrapUpdateConnection(org.apache.jena.rdfconnection.SparqlUpdateConnection conn)
     
    static org.apache.jena.rdfconnection.RDFConnection
    withCloseShield(org.apache.jena.rdfconnection.RDFConnection conn)
    Context symbol for placing a data source into the query execution context (for sub queries).
    static org.apache.jena.rdfconnection.RDFConnection
    wrapWithAutoDisableReorder(org.apache.jena.rdfconnection.RDFConnection conn)
     
    static org.apache.jena.rdfconnection.RDFConnection
    wrapWithBuilderTransform(org.apache.jena.rdfconnection.RDFConnection rawConn, QueryExecBuilderTransform queryBuilderTransform, UpdateExecBuilderTransform updateBuilderTransform)
     
    static org.apache.jena.rdfconnection.RDFConnection
    wrapWithContextMutator(org.apache.jena.rdfconnection.RDFConnection rawConn)
     
    static org.apache.jena.rdfconnection.RDFConnection
    wrapWithContextMutator(org.apache.jena.rdfconnection.RDFConnection rawConn, Consumer<org.apache.jena.sparql.util.Context> contextMutator)
     
    static org.apache.jena.rdfconnection.RDFConnection
    wrapWithLinkTransform(org.apache.jena.rdfconnection.RDFConnection conn, RDFLinkTransform linkTransform)
    Adapt the given connection as a link.
    static org.apache.jena.rdfconnection.RDFConnection
    wrapWithQueryOnly(org.apache.jena.rdfconnection.RDFConnection conn)
     
    static org.apache.jena.rdfconnection.RDFConnection
    wrapWithQueryTransform(org.apache.jena.rdfconnection.RDFConnection conn, QueryTransform queryTransform)
     
    static org.apache.jena.rdfconnection.RDFConnection
    wrapWithQueryTransform(org.apache.jena.rdfconnection.RDFConnection conn, QueryTransform queryTransform, QueryExecTransform queryExecTransform)
     
    static org.apache.jena.rdfconnection.RDFConnection
    wrapWithStmtTransform(org.apache.jena.rdfconnection.RDFConnection conn, org.aksw.jenax.stmt.core.SparqlStmtTransform transform)
     
    static org.apache.jena.rdfconnection.RDFConnection
    wrapWithUpdateTransform(org.apache.jena.rdfconnection.RDFConnection conn, Function<? super org.apache.jena.update.UpdateRequest,? extends org.apache.jena.update.UpdateRequest> updateTransform, BiFunction<? super org.apache.jena.update.UpdateRequest,? super org.apache.jena.update.UpdateProcessor,? extends org.apache.jena.update.UpdateProcessor> updateExecTransform)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RDFConnectionUtils

      public RDFConnectionUtils()
  • Method Details

    • withCloseShield

      public static org.apache.jena.rdfconnection.RDFConnection withCloseShield(org.apache.jena.rdfconnection.RDFConnection conn)
      Context symbol for placing a data source into the query execution context (for sub queries). (Alternatively, the execCxt's datasetGraph could be a DatasetGraphSparqlService)
    • unwrapQueryConnection

      public static org.apache.jena.rdfconnection.SparqlQueryConnection unwrapQueryConnection(org.apache.jena.rdfconnection.SparqlQueryConnection conn)
    • unwrapUpdateConnection

      public static org.apache.jena.rdfconnection.SparqlUpdateConnection unwrapUpdateConnection(org.apache.jena.rdfconnection.SparqlUpdateConnection conn)
    • unwrapDatasetConnection

      public static org.apache.jena.rdfconnection.RDFDatasetConnection unwrapDatasetConnection(org.apache.jena.rdfconnection.RDFDatasetConnection conn)
    • getQueryConnection

      public static org.apache.jena.rdfconnection.SparqlQueryConnection getQueryConnection(RDFConnectionModular conn)
      Reflective access to an RDFConnectionModular's queryConnection.
    • getUpdateConnection

      public static org.apache.jena.rdfconnection.SparqlUpdateConnection getUpdateConnection(RDFConnectionModular conn)
      Reflective access to an RDFConnectionModular's updateConnection.
    • getDatasetConnection

      public static org.apache.jena.rdfconnection.RDFDatasetConnection getDatasetConnection(RDFConnectionModular conn)
      Reflective access to an RDFConnectionModular's datasetConnection.
    • getDataset

      public static org.apache.jena.query.Dataset getDataset(org.apache.jena.rdfconnection.RDFConnectionLocal conn)
      Reflective access to an RDFConnectionModular's dataset.
    • wrapWithBuilderTransform

      public static org.apache.jena.rdfconnection.RDFConnection wrapWithBuilderTransform(org.apache.jena.rdfconnection.RDFConnection rawConn, QueryExecBuilderTransform queryBuilderTransform, UpdateExecBuilderTransform updateBuilderTransform)
    • wrapWithContextMutator

      public static org.apache.jena.rdfconnection.RDFConnection wrapWithContextMutator(org.apache.jena.rdfconnection.RDFConnection rawConn)
    • wrapWithContextMutator

      public static org.apache.jena.rdfconnection.RDFConnection wrapWithContextMutator(org.apache.jena.rdfconnection.RDFConnection rawConn, Consumer<org.apache.jena.sparql.util.Context> contextMutator)
    • wrapWithLinkTransform

      public static org.apache.jena.rdfconnection.RDFConnection wrapWithLinkTransform(org.apache.jena.rdfconnection.RDFConnection conn, RDFLinkTransform linkTransform)
      Adapt the given connection as a link. Then apply the transform to that link and return the result.
    • wrapWithQueryTransform

      public static org.apache.jena.rdfconnection.RDFConnection wrapWithQueryTransform(org.apache.jena.rdfconnection.RDFConnection conn, QueryTransform queryTransform)
    • wrapWithStmtTransform

      public static org.apache.jena.rdfconnection.RDFConnection wrapWithStmtTransform(org.apache.jena.rdfconnection.RDFConnection conn, org.aksw.jenax.stmt.core.SparqlStmtTransform transform)
    • wrapWithQueryTransform

      public static org.apache.jena.rdfconnection.RDFConnection wrapWithQueryTransform(org.apache.jena.rdfconnection.RDFConnection conn, QueryTransform queryTransform, QueryExecTransform queryExecTransform)
    • wrapWithUpdateTransform

      public static org.apache.jena.rdfconnection.RDFConnection wrapWithUpdateTransform(org.apache.jena.rdfconnection.RDFConnection conn, Function<? super org.apache.jena.update.UpdateRequest,? extends org.apache.jena.update.UpdateRequest> updateTransform, BiFunction<? super org.apache.jena.update.UpdateRequest,? super org.apache.jena.update.UpdateProcessor,? extends org.apache.jena.update.UpdateProcessor> updateExecTransform)
    • enableRelativeIrisInQueryResults

      public static org.apache.jena.rdfconnection.RDFConnection enableRelativeIrisInQueryResults(org.apache.jena.rdfconnection.RDFConnection delegate)
    • wrapWithQueryOnly

      public static org.apache.jena.rdfconnection.RDFConnection wrapWithQueryOnly(org.apache.jena.rdfconnection.RDFConnection conn)
    • wrapWithAutoDisableReorder

      public static org.apache.jena.rdfconnection.RDFConnection wrapWithAutoDisableReorder(org.apache.jena.rdfconnection.RDFConnection conn)
    • execService

      public static org.apache.jena.sparql.engine.QueryIterator execService(org.apache.jena.sparql.engine.binding.Binding binding, org.apache.jena.sparql.engine.ExecutionContext execCxt, org.apache.jena.sparql.algebra.op.OpService opService, org.apache.jena.rdfconnection.RDFConnection target, boolean isStreamingAllowed, boolean applyDatasetDescription)
      Runs an OpService on the given connection. Resulting bindings must be compatible with the given one and will be merged with it.
      Parameters:
      binding - The parent binding that is merged with the bindings obtained from the execution.
      execCxt - The execution context
      opService - The service operation to delegate to the RDFConnection. Its serviceNode is ignored, but silent is repsected.
      isStreamingAllowed - If true then a live iterator over the result is returned. Otherwise the method materializes the data before returning. If opService.isSilent() is true then isStreaming has no effect because all data must be materialized first in order to detect errors.
      applyDatasetDescription - If true, then check if the execCxt's datasat is a DynamicDatasets and apply its default and named graph IRIs to the generated query.
    • execService

      public static org.apache.jena.sparql.engine.QueryIterator execService(org.apache.jena.sparql.algebra.op.OpService opService, org.apache.jena.rdfconnection.RDFConnection target, boolean isStreamingAllowed, org.apache.jena.sparql.core.DatasetDescription datasetDescription)
      Runs an OpService on the given connection. Ignores the service IRI but considers the silent flag.
    • exec

      public static org.apache.jena.sparql.engine.QueryIterator exec(org.apache.jena.sparql.exec.QueryExecBuilder builder, boolean isSilent, boolean isStreamingAllowed)
      Obtain a RowSet from the given queryExecBuilder. The RowSet is materialized when the silent flag is set or streaming is disallowed. Otherwise it is streamed.