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, CollectionInfo collectionInfo, 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)
    Try to find a Graph with the passed subject/predicate.
    Map<org.apache.commons.rdf.api.IRI,org.apache.commons.rdf.api.Graph>
    find(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.IRI predicate, org.apache.commons.rdf.api.RDFTerm object)
    Try to find Graphs with the passed predicate.
    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)
    Find object with the passed subjects in the passed graph.
    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, int deep)
    Find object with the passed subjects in the passed graph and resolve dependencies up to the passed depth.
    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.
    getCollection(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.IRI 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, PersistableRdfPubCollection persistableRdfPubCollection, String logMsg)
    Saves the List of IRI int the collection with the passed name in the graph with the passed graphName.
    subCollection(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, CollectionInfo collectionInfo, 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 - up to which hierarchy level should object references be resolved ?
      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)
      Try to find a Graph with the passed subject/predicate.
      Parameters:
      graphName - The name of the namedGraph.
      subject - The subject to search for.
      predicate - The predicate to search for.
      object - The object to search for.
      Returns:
    • find

      Map<org.apache.commons.rdf.api.IRI,org.apache.commons.rdf.api.Graph> find(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, org.apache.commons.rdf.api.IRI predicate, org.apache.commons.rdf.api.RDFTerm object)
      Try to find Graphs with the passed predicate.
      Parameters:
      graphName - The name of the namedGraph.
      predicate - The predicate to search for.
      object - The object to search for.
      Returns:
      Graphs matching the passed predicate/object ordered by subject.
    • 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)
      Find object with the passed subjects in the passed graph.
      Parameters:
      graphName - The name of the namedGraph.
      subject - The subjects to search
      Returns:
      Map With Graphs by Subject.
    • 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, int deep)
      Find object with the passed subjects in the passed graph and resolve dependencies up to the passed depth.
      Parameters:
      graphName - The name of the namedGraph.
      subject - The subjects to search
      deep - up to which hierarchy level should object references be resolved ?
      Returns:
      Map With Graphs by 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, PersistableRdfPubCollection persistableRdfPubCollection, String logMsg)
      Saves the List of IRI int the collection with the passed name in the graph with the passed graphName.
      Parameters:
      graphName -
      persistableRdfPubCollection -
      logMsg -
      Throws:
      IllegalStateException - if the collectioon already exists.
    • addItem

      void addItem(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, CollectionInfo collectionInfo, 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 -
      collectionInfo -
      item -
      logMsg -
    • getCollection

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

      Optional<PersistableRdfPubCollection> subCollection(org.apache.commons.rdf.api.BlankNodeOrIRI graphName, CollectionInfo collectionInfo, int offset, int limit)
      Parameters:
      graphName -
      collectionInfo -
      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<PersistableRdfPubCollection> 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.