Class GraphPlain

  • All Implemented Interfaces:
    Graph, GraphWithPerform

    public class GraphPlain
    extends WrappedGraph
    A version of Graph that enforces term equality even if the base graph uses value-indexing. With value-indexing, one value may have several object terms that represent it when the graph store RDF terms, and but matches by value. This only affects the object field of a triple in RDF but in "generalized RDF" literals can appear in any triple slot.

    • Method Detail

      • plain

        public static Graph plain​(Graph base)
        Return a graph that only has term-equality and storage in the base graph. Update affects the base graph.
      • plain

        public static Graph plain()
        Return a graph that only has term-equality.
      • remove

        public void remove​(Node s,
                           Node p,
                           Node o)
        Description copied from interface: Graph
        Remove all triples that match by find(s, p, o)
        Specified by:
        remove in interface Graph
        Overrides:
        remove in class WrappedGraph
      • contains

        public boolean contains​(Triple t)
        Description copied from interface: Graph
        Answer true iff the graph contains a triple that t matches; t may be fluid.
        Specified by:
        contains in interface Graph
        Overrides:
        contains in class WrappedGraph
      • contains

        public boolean contains​(Node s,
                                Node p,
                                Node o)
        Description copied from interface: Graph
        Answer true iff the graph contains a triple matching (s, p, o). s/p/o may be concrete or fluid. Equivalent to find(s,p,o).hasNext, but an implementation is expected to optimise this in easy cases.
        Specified by:
        contains in interface Graph
        Overrides:
        contains in class WrappedGraph
      • find

        public ExtendedIterator<Triple> find​(Triple m)
        Description copied from interface: Graph
        Returns an iterator over all the Triples that match the triple pattern.
        Specified by:
        find in interface Graph
        Overrides:
        find in class WrappedGraph
        Parameters:
        m - a Triple encoding the pattern to look for
        Returns:
        an iterator of all triples in this graph that match m
      • find

        public ExtendedIterator<Triple> find​(Node subj,
                                             Node pred,
                                             Node obj)
        Description copied from interface: Graph
        Returns an iterator over Triples matching a pattern.
        Specified by:
        find in interface Graph
        Overrides:
        find in class WrappedGraph
        Returns:
        an iterator of triples in this graph matching the pattern.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object