Interface Lists
- All Known Implementing Classes:
JenaLists
,OwlapiLists
,Rdf4jLists
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 Summary
Modifier and TypeMethodDescriptionloadReferencedList
(ReferencedListDescriptor descriptor) Loads referenced list specified by the descriptor.loadSimpleList
(SimpleListDescriptor descriptor) Loads simple list specified by the descriptor.<T> void
persistReferencedList
(ReferencedListValueDescriptor<T> descriptor) Persists referenced list values specified by the descriptor.void
persistSimpleList
(SimpleListValueDescriptor descriptor) Persists simple list values specified by the descriptor.<T> void
updateReferencedList
(ReferencedListValueDescriptor<T> descriptor) Updates referenced list based on the values in the specified list descriptor.void
updateSimpleList
(SimpleListValueDescriptor descriptor) Updates simple list based on values specified in the descriptor.
-
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 occursIllegalStateException
- If called on a closed connection
-
persistSimpleList
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 occursIllegalStateException
- If called on a closed connection
-
updateSimpleList
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 occursIllegalStateException
- If called on a closed connection
-
loadReferencedList
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 occursIllegalStateException
- 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 occursIllegalStateException
- 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 occursIllegalStateException
- If called on a closed connection
-