Interface Store


public interface Store
An rdf object store.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, Set<org.apache.commons.rdf.api.Triple> newTriples, String logMsg)
    Adds all Triples to the graph with the passed graphName.
    void
    add(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.Graph graph, String logMsg)
    Adds all Triples of the passed graph to the graph with the passed graphName.
    void
    addItem(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.IRI collectionSubject, org.apache.commons.rdf.api.IRI item, String logMsg)
    Add the passed item to the collection with the passed name in the graph with the passed graphName.
    Optional<org.apache.commons.rdf.api.Graph>
    find(org.apache.commons.rdf.api.BlankNodeOrIRI graphName)
    Try to find a Graph with the passed graphName.
    Optional<org.apache.commons.rdf.api.Graph>
    find(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.BlankNodeOrIRI subject)
    Try to find a Graph with the passed subject/id and extracts the Triples matching the passed subject.
    Optional<org.apache.commons.rdf.api.Graph>
    find(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.BlankNodeOrIRI subject, int deep)
    Try to find a Graph with the passed subject/id and extracts the Triples matching the passed subject.
    Optional<org.apache.commons.rdf.api.Graph>
    find(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI predicate, org.apache.commons.rdf.api.RDFTerm object)
     
    Map<org.apache.commons.rdf.api.BlankNodeOrIRI,org.apache.commons.rdf.api.Graph>
    findAll(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, List<org.apache.commons.rdf.api.BlankNodeOrIRI> subject)
     
    Set<org.apache.commons.rdf.api.IRI>
    findCollection(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.IRI member)
    Searches for Collections, where the passed member is a member of.
    Optional<org.apache.commons.rdf.api.IRI>
    findLatestRevisionSubject(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.IRI collectionSubject)
    Gets the subject of the latest revision.
    List<org.apache.commons.rdf.api.IRI>
    getCollection(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.BlankNodeOrIRI collectionSubject)
     
    Set<org.apache.commons.rdf.api.BlankNodeOrIRI>
     
    void
    remove(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, Set<org.apache.commons.rdf.api.BlankNodeOrIRI> subjects, String logMsg)
    Removes all triples with the passed subjects.
    void
    saveCollection(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.IRI collectionSubject, List<org.apache.commons.rdf.api.IRI> items, String logMsg)
    Saves the List of IRI int the collection with the passed name in the graph with the passed graphName.
    List<org.apache.commons.rdf.api.IRI>
    subCollection(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.BlankNodeOrIRI collectionSubject, int offset, int limit)
     
  • Method Details

    • add

      void add(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.Graph graph, String logMsg)
      Adds all Triples of the passed graph to the graph with the passed graphName.
      Parameters:
      graphName -
      graph -
      logMsg -
    • add

      void add(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, Set<org.apache.commons.rdf.api.Triple> newTriples, String logMsg)
      Adds all Triples to the graph with the passed graphName.
      Parameters:
      graphName -
      newTriples -
      logMsg -
    • remove

      void remove(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, Set<org.apache.commons.rdf.api.BlankNodeOrIRI> subjects, String logMsg)
      Removes all triples with the passed subjects.
      Parameters:
      graphName -
      subjects -
      logMsg -
    • find

      Optional<org.apache.commons.rdf.api.Graph> find(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.BlankNodeOrIRI subject)
      Try to find a Graph with the passed subject/id and extracts the Triples matching the passed subject.
      Parameters:
      graphName - The name of the namedGraph.
      subject - The id of the namedGraph.
      Returns:
      Triples matching the passed subject contained in the Graph for the passed graphName.
    • find

      Optional<org.apache.commons.rdf.api.Graph> find(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.BlankNodeOrIRI subject, int deep)
      Try to find a Graph with the passed subject/id and extracts the Triples matching the passed subject.
      Parameters:
      graphName - The name of the namedGraph.
      subject - The id of the namedGraph.
      deep - deep of resolve references.
      Returns:
      Triples matching the passed subject contained in the Graph for the passed graphName.
    • find

      Optional<org.apache.commons.rdf.api.Graph> find(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.BlankNodeOrIRI subject, org.apache.commons.rdf.api.IRI predicate, org.apache.commons.rdf.api.RDFTerm object)
    • findAll

      Map<org.apache.commons.rdf.api.BlankNodeOrIRI,org.apache.commons.rdf.api.Graph> findAll(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, List<org.apache.commons.rdf.api.BlankNodeOrIRI> subject)
    • findLatestRevisionSubject

      Optional<org.apache.commons.rdf.api.IRI> findLatestRevisionSubject(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.IRI collectionSubject)
      Gets the subject of the latest revision.
      Parameters:
      graphName -
      collectionSubject -
      Returns:
      The subject of the latest revision.
    • find

      Optional<org.apache.commons.rdf.api.Graph> find(org.apache.commons.rdf.api.BlankNodeOrIRI graphName)
      Try to find a Graph with the passed graphName.
      Parameters:
      graphName - The name of the namedGraph.
      Returns:
      Graph for the passed graphName.
    • getGraphNames

      Set<org.apache.commons.rdf.api.BlankNodeOrIRI> getGraphNames()
      Returns:
      Set of all known graphNames.
    • saveCollection

      void saveCollection(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.IRI collectionSubject, List<org.apache.commons.rdf.api.IRI> items, String logMsg)
      Saves the List of IRI int the collection with the passed name in the graph with the passed graphName.
      Parameters:
      graphName -
      collectionSubject -
      items -
      logMsg -
      Throws:
      IllegalStateException - if the collectioon already exists.
    • addItem

      void addItem(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.IRI collectionSubject, org.apache.commons.rdf.api.IRI item, String logMsg)
      Add the passed item to the collection with the passed name in the graph with the passed graphName.
      Parameters:
      graphName -
      collectionSubject -
      item -
      logMsg -
    • getCollection

      List<org.apache.commons.rdf.api.IRI> getCollection(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.BlankNodeOrIRI collectionSubject)
      Parameters:
      graphName -
      collectionSubject -
      Returns:
      The collection with the passed name in the graph with the passed graphName.
    • subCollection

      List<org.apache.commons.rdf.api.IRI> subCollection(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.BlankNodeOrIRI collectionSubject, int offset, int limit)
      Parameters:
      graphName -
      collectionSubject -
      offset -
      limit -
      Returns:
      The collection page with the passed name in the graph with the passed graphName, starting at position offset ending on position offset + limit.
    • findCollection

      Set<org.apache.commons.rdf.api.IRI> findCollection(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.IRI member)
      Searches for Collections, where the passed member is a member of.
      Parameters:
      graphName -
      member -
      Returns:
      List of Collections, where the passed member is a member of.