Class WrappedGraph

    • Constructor Detail

      • WrappedGraph

        public WrappedGraph​(Graph base)
    • Method Detail

      • getWrapped

        public Graph getWrapped()
      • dependsOn

        public boolean dependsOn​(Graph other)
        Description copied from interface: Graph
        true if this graph's content depends on the other graph. May be pessimistic (ie return true if it's not sure). Typically true when a graph is a composition of other graphs, eg union.
        Specified by:
        dependsOn in interface Graph
        Parameters:
        other - the graph this graph may depend on
        Returns:
        false if this does not depend on other
      • getPrefixMapping

        public PrefixMapping getPrefixMapping()
        Description copied from interface: Graph
        returns this Graph's prefix mapping. Each call on a given Graph gets the same PrefixMapping object, which is the one used by the Graph.
        Specified by:
        getPrefixMapping in interface Graph
      • add

        public void add​(Triple t)
        Description copied from interface: Graph
        Add the triple t (if possible) to the set belonging to this graph
        Specified by:
        add in interface Graph
        Parameters:
        t - the triple to add to the graph
      • delete

        public void delete​(Triple t)
        Description copied from interface: Graph
        Delete the triple t (if possible) from the set belonging to this graph
        Specified by:
        delete in interface Graph
        Parameters:
        t - the triple to delete to the graph
      • clear

        public void clear()
        Description copied from interface: Graph
        Remove all the statements from this graph.
        Specified by:
        clear in interface Graph
      • 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
      • 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
        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 s,
                                             Node p,
                                             Node o)
        Description copied from interface: Graph
        Returns an iterator over Triples matching a pattern.
        Specified by:
        find in interface Graph
        Returns:
        an iterator of triples in this graph matching the pattern.
      • 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
      • 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
      • close

        public void close()
        Description copied from interface: Graph
        Free all resources, any further use of this Graph is an error.
        Specified by:
        close in interface Graph
      • isClosed

        public boolean isClosed()
        Description copied from interface: Graph
        Answer true iff .close() has been called on this Graph.
        Specified by:
        isClosed in interface Graph
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: Graph
        Answer true iff this graph is empty. "Empty" means "has as few triples as it can manage", because an inference graph may have irremovable axioms and their consequences.
        Specified by:
        isEmpty in interface Graph
      • size

        public int size()
        Description copied from interface: Graph
        For a concrete graph this returns the number of triples in the graph. For graphs which might infer additional triples it results an estimated lower bound of the number of triples. For example, an inference graph might return the number of triples in the raw data graph.
        Specified by:
        size in interface Graph