Interface Lists

All Known Implementing Classes:
JenaLists, OwlapiLists, Rdf4jLists

public interface Lists
This interface is used to work with ontology sequences.

Currently, two kinds of sequences are supported:

  • Simple lists - simple LISP-style singly-linked lists, where each node is the subject of a statement pointing to the next node,
  • Referenced lists - lists, where each node points to the next element and also to its contents.
  • Method Details

    • loadSimpleList

      List<Axiom<NamedResource>> loadSimpleList(SimpleListDescriptor descriptor) throws OntoDriverException
      Loads simple list specified by the descriptor.

      The returned axioms should be iterable in the same order as they were put into the sequence in the ontology.

      Parameters:
      descriptor - Describes the list's properties as well as the context from which the list should be loaded.
      Returns:
      Axioms matching the specified list descriptor
      Throws:
      OntoDriverException - If an ontology access error occurs
      IllegalStateException - If called on a closed connection
    • persistSimpleList

      void persistSimpleList(SimpleListValueDescriptor descriptor) throws OntoDriverException
      Persists simple list values specified by the descriptor.

      The sequence is persisted in the order in which it appears in the descriptor.

      Parameters:
      descriptor - List values descriptor
      Throws:
      OntoDriverException - If an ontology access error occurs
      IllegalStateException - If called on a closed connection
    • updateSimpleList

      void updateSimpleList(SimpleListValueDescriptor descriptor) throws OntoDriverException
      Updates simple list based on values specified in the descriptor.

      It is up to the driver implementation to decide whether the old list will be removed and the new values inserted or whether a merge will be performed.

      Parameters:
      descriptor - List values descriptor
      Throws:
      OntoDriverException - If an ontology access error occurs
      IllegalStateException - If called on a closed connection
    • loadReferencedList

      List<Axiom<?>> loadReferencedList(ReferencedListDescriptor descriptor) throws OntoDriverException
      Loads referenced list specified by the descriptor.

      The returned axioms should be iterable in the same order as they were put into the sequence in the ontology.

      Parameters:
      descriptor - Describes list's properties, including node content assertion. Also may specify context from which the list should be loaded
      Returns:
      Axioms matching the specified list descriptor
      Throws:
      OntoDriverException - If an ontology access error occurs
      IllegalStateException - If called on a closed connection
    • persistReferencedList

      <T> void persistReferencedList(ReferencedListValueDescriptor<T> descriptor) throws OntoDriverException
      Persists referenced list values specified by the descriptor.

      The sequence is persisted in the order in which it appears in the descriptor.

      Parameters:
      descriptor - List values descriptor
      Throws:
      OntoDriverException - If an ontology access error occurs
      IllegalStateException - If called on a closed connection
    • updateReferencedList

      <T> void updateReferencedList(ReferencedListValueDescriptor<T> descriptor) throws OntoDriverException
      Updates referenced list based on the values in the specified list descriptor.

      It is up to the driver implementation whether the update will be realized by removing the old list and persisting the new values, or by merging the new list into the old one.

      Parameters:
      descriptor - List values descriptor
      Throws:
      OntoDriverException - If an ontology access error occurs
      IllegalStateException - If called on a closed connection