Class DatasetGraphFilteredView

All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable, org.apache.jena.atlas.lib.Sync, DatasetGraph, DatasetGraphWrapperView, Transactional

public class DatasetGraphFilteredView extends DatasetGraphReadOnly implements DatasetGraphWrapperView
A read-only DatasetGraph that applies a filter testing all triples and quads returned by accessing the data. Only quads where the filter tests for "true" are exposed.
  • Constructor Details

  • Method Details

    • getDefaultGraph

      public org.apache.jena.graph.Graph getDefaultGraph()
      Description copied from interface: DatasetGraph
      Get the default graph as a Jena Graph
      Specified by:
      getDefaultGraph in interface DatasetGraph
      Overrides:
      getDefaultGraph in class DatasetGraphReadOnly
    • getGraph

      public org.apache.jena.graph.Graph getGraph(org.apache.jena.graph.Node graphNode)
      Description copied from interface: DatasetGraph
      Get the graph named by graphNode : returns null when there is no such graph. NB Whether a dataset contains a graph if there are no triples is not defined - see the specific implementation. Some datasets are "open" - they have all graphs even if no triples.
      Specified by:
      getGraph in interface DatasetGraph
      Overrides:
      getGraph in class DatasetGraphReadOnly
    • listGraphNodes

      public Iterator<org.apache.jena.graph.Node> listGraphNodes()
      Description copied from interface: DatasetGraph
      Iterate over all names of named graphs
      Specified by:
      listGraphNodes in interface DatasetGraph
      Overrides:
      listGraphNodes in class DatasetGraphWrapper
    • size

      public long size()
      Description copied from interface: DatasetGraph
      Get the size (number of named graphs) - may be -1 for unknown
      Specified by:
      size in interface DatasetGraph
      Overrides:
      size in class DatasetGraphWrapper
    • getUnionGraph

      public org.apache.jena.graph.Graph getUnionGraph()
      Description copied from interface: DatasetGraph
      Return a Graph that is the union of all named graphs in this dataset. This union graph is read-only (its prefix mapping in the current JVM may be changed but that may not persist).
      Specified by:
      getUnionGraph in interface DatasetGraph
      Overrides:
      getUnionGraph in class DatasetGraphWrapper
    • find

      public Iterator<Quad> find()
      Description copied from interface: DatasetGraph
      Iterate over all quads in the dataset graph
      Specified by:
      find in interface DatasetGraph
      Overrides:
      find in class DatasetGraphWrapper
    • find

      public Iterator<Quad> find(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
      Description copied from interface: DatasetGraph
      Find matching quads in the dataset (including default graph) - may include wildcards, Node.ANY or null
      Specified by:
      find in interface DatasetGraph
      Overrides:
      find in class DatasetGraphWrapper
      See Also:
      • Graph.find(Node,Node,Node)
    • find

      public Iterator<Quad> find(Quad quad)
      Description copied from interface: DatasetGraph
      Find matching quads in the dataset - may include wildcards, Node.ANY or null
      Specified by:
      find in interface DatasetGraph
      Overrides:
      find in class DatasetGraphWrapper
      See Also:
      • Graph.find(Triple)
    • findNG

      public Iterator<Quad> findNG(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
      Description copied from interface: DatasetGraph
      Find matching quads in the dataset in named graphs only - may include wildcards, Node.ANY or null
      Specified by:
      findNG in interface DatasetGraph
      Overrides:
      findNG in class DatasetGraphWrapper
      See Also:
      • Graph.find(Node,Node,Node)
    • contains

      public boolean contains(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
      Description copied from interface: DatasetGraph
      Test whether the dataset (including default graph) contains a quad - may include wildcards, Node.ANY or null
      Specified by:
      contains in interface DatasetGraph
      Overrides:
      contains in class DatasetGraphWrapper
    • contains

      public boolean contains(Quad quad)
      Description copied from interface: DatasetGraph
      Test whether the dataset contains a quad (including default graph)- may include wildcards, Node.ANY or null
      Specified by:
      contains in interface DatasetGraph
      Overrides:
      contains in class DatasetGraphWrapper
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: DatasetGraph
      Test whether the dataset is empty
      Specified by:
      isEmpty in interface DatasetGraph
      Overrides:
      isEmpty in class DatasetGraphWrapper
    • toString

      public String toString()
      Overrides:
      toString in class DatasetGraphWrapper