Class DatasetGraphUnionDefaultGraph

java.lang.Object
org.apache.jena.sparql.core.DatasetGraphWrapper
org.aksw.jenax.arq.util.dataset.DatasetGraphWrapperFindBase
org.aksw.jenax.arq.util.dataset.DatasetGraphUnionDefaultGraph
All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable, org.apache.jena.atlas.lib.Sync, org.apache.jena.sparql.core.DatasetGraph, org.apache.jena.sparql.core.DatasetGraphWrapperView, org.apache.jena.sparql.core.Transactional

public class DatasetGraphUnionDefaultGraph extends DatasetGraphWrapperFindBase implements org.apache.jena.sparql.core.DatasetGraphWrapperView
A dataset wrapper that redirects find requests on the default graph to the union graph. All named graphs of quads are remapped to the default graph to make them appear as real default graph quads. Usually, a lookup with Quad.unionGraph retains the named graphs. Mainly intended for wrapping TDB2 datasets which have the defaultUnionGraph context symbol set to true such that find(Quad.defaultGraph, ...) is transparently redirected to the union graph.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.jena.sparql.core.Transactional

    org.apache.jena.sparql.core.Transactional.Promote
  • Constructor Summary

    Constructors
    Constructor
    Description
    DatasetGraphUnionDefaultGraph(org.apache.jena.sparql.core.DatasetGraph dsg)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Iterator<org.apache.jena.sparql.core.Quad>
    actionFind(boolean ng, org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
     
    static Set<Predicate<org.apache.jena.sparql.core.DatasetGraph>>
    The set of predicates returned by this method is synchronized.
    static boolean
    isKnownUnionDefaultGraphMode(org.apache.jena.sparql.core.DatasetGraph dsg)
     
    static boolean
    isTdbUnionDefaultGraph(org.apache.jena.sparql.util.Context cxt)
     
    static org.apache.jena.sparql.core.DatasetGraph
    wrap(org.apache.jena.sparql.core.DatasetGraph dsg)
    Wrap a given dataset if it is not already wrapped by this class
    static org.apache.jena.sparql.core.DatasetGraph
    wrapIfNeeded(org.apache.jena.sparql.core.DatasetGraph dsg)
    Wrap a given dataset only if it is known to be in union default graph mode and not already wrapped by this class

    Methods inherited from class org.aksw.jenax.arq.util.dataset.DatasetGraphWrapperFindBase

    contains, contains, delegateFind, find, find, find, find, findNG, getDefaultGraph, getGraph, getUnionGraph

    Methods inherited from class org.apache.jena.sparql.core.DatasetGraphWrapper

    abort, add, add, addGraph, begin, begin, begin, clear, close, commit, containsGraph, delete, delete, deleteAny, end, get, getBase, getBaseForQuery, getContext, getCxt, getG, getLock, getR, getT, getW, getWrapped, isEmpty, isInTransaction, listGraphNodes, prefixes, promote, promote, removeGraph, size, supportsTransactionAbort, supportsTransactions, sync, toString, transactionMode, transactionType, unwrap

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.jena.sparql.core.DatasetGraph

    add, add, addAll, addGraph, clear, close, contains, contains, containsGraph, delete, delete, deleteAny, find, find, find, findNG, getContext, getDefaultGraph, getGraph, getLock, getUnionGraph, isEmpty, listGraphNodes, prefixes, removeGraph, size, stream, stream, supportsTransactionAbort, supportsTransactions

    Methods inherited from interface org.apache.jena.sparql.core.Transactional

    abort, begin, begin, begin, calc, calculate, calculateRead, calculateWrite, commit, end, exec, execute, executeRead, executeWrite, isInTransaction, promote, promote, transactionMode, transactionType
  • Constructor Details

    • DatasetGraphUnionDefaultGraph

      public DatasetGraphUnionDefaultGraph(org.apache.jena.sparql.core.DatasetGraph dsg)
  • Method Details

    • actionFind

      protected Iterator<org.apache.jena.sparql.core.Quad> actionFind(boolean ng, org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
      Specified by:
      actionFind in class DatasetGraphWrapperFindBase
      Parameters:
      ng - Controls the meaning of Node.ANY for g: If false then it matches all graphs including the default graph. When true it only matches within named graphs (and not the default graph).
    • wrap

      public static org.apache.jena.sparql.core.DatasetGraph wrap(org.apache.jena.sparql.core.DatasetGraph dsg)
      Wrap a given dataset if it is not already wrapped by this class
    • wrapIfNeeded

      public static org.apache.jena.sparql.core.DatasetGraph wrapIfNeeded(org.apache.jena.sparql.core.DatasetGraph dsg)
      Wrap a given dataset only if it is known to be in union default graph mode and not already wrapped by this class
    • getUnionDefaultGraphCheckers

      public static Set<Predicate<org.apache.jena.sparql.core.DatasetGraph>> getUnionDefaultGraphCheckers()
      The set of predicates returned by this method is synchronized. Plugins may modify the elements. Modifications only affect future DatasetGraphUnionDefaultGraph instances.
    • isTdbUnionDefaultGraph

      public static boolean isTdbUnionDefaultGraph(org.apache.jena.sparql.util.Context cxt)
    • isKnownUnionDefaultGraphMode

      public static boolean isKnownUnionDefaultGraphMode(org.apache.jena.sparql.core.DatasetGraph dsg)