Interface TripleStore

All Superinterfaces:
All Known Implementing Classes:
FastTripleStore, LegacyTripleStore, RoaringTripleStore

public interface TripleStore extends org.apache.jena.atlas.lib.Copyable<TripleStore>
A triple store is a collection of triples that supports access to triples matching a triple pattern.
  • Method Details

    • add

      void add(Triple triple)
      Add a triple to the map.
      triple - to add
    • remove

      void remove(Triple triple)
      Remove a triple from the map.
      triple - to remove
    • clear

      void clear()
      Remove all triples from the map.
    • countTriples

      int countTriples()
      Return the number of triples in the map.
    • isEmpty

      boolean isEmpty()
      Return true if the map is empty.
    • contains

      boolean contains(Triple tripleMatch)
      Answer true if the graph contains any triple matching t.
      tripleMatch - triple match pattern, which may be contained
    • stream

      Stream<Triple> stream()
      Returns a Stream of all triples in the graph. Note: BaseStream.parallel() is supported.
      a stream of triples in this graph.
    • stream

      Stream<Triple> stream(Triple tripleMatch)
      Returns a Stream of Triples matching the given pattern. Note: BaseStream.parallel() is supported.
      tripleMatch - triple match pattern
      a stream of triples in this graph matching the pattern.
    • find

      ExtendedIterator<Triple> find(Triple tripleMatch)
      Returns an ExtendedIterator of all triples in the graph matching the given triple match.
    • copy

      TripleStore copy()
      Return a new triple store that is a copy of this one. Since Nodes and Triples are immutable and shared, the copy can share the same Nodes and Triples.
      Specified by:
      copy in interface org.apache.jena.atlas.lib.Copyable<TripleStore>
      an independent copy of this store