Package cz.cvut.kbss.ontodriver.rdf4j
Class Rdf4jLists
java.lang.Object
cz.cvut.kbss.ontodriver.rdf4j.Rdf4jLists
- All Implemented Interfaces:
Lists
-
Constructor Summary
ConstructorsConstructorDescriptionRdf4jLists
(Rdf4jAdapter adapter, Procedure beforeCallback, Procedure afterChangeCallback) -
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.
-
Constructor Details
-
Rdf4jLists
-
-
Method Details
-
loadSimpleList
public List<Axiom<NamedResource>> loadSimpleList(SimpleListDescriptor descriptor) throws OntoDriverException Description copied from interface:Lists
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.
- Specified by:
loadSimpleList
in interfaceLists
- 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
-
persistSimpleList
Description copied from interface:Lists
Persists simple list values specified by the descriptor.The sequence is persisted in the order in which it appears in the descriptor.
- Specified by:
persistSimpleList
in interfaceLists
- Parameters:
descriptor
- List values descriptor- Throws:
OntoDriverException
- If an ontology access error occurs
-
updateSimpleList
Description copied from interface:Lists
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.
- Specified by:
updateSimpleList
in interfaceLists
- Parameters:
descriptor
- List values descriptor- Throws:
OntoDriverException
- If an ontology access error occurs
-
loadReferencedList
public List<Axiom<?>> loadReferencedList(ReferencedListDescriptor descriptor) throws OntoDriverException Description copied from interface:Lists
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.
- Specified by:
loadReferencedList
in interfaceLists
- 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
-
persistReferencedList
public <T> void persistReferencedList(ReferencedListValueDescriptor<T> descriptor) throws OntoDriverException Description copied from interface:Lists
Persists referenced list values specified by the descriptor.The sequence is persisted in the order in which it appears in the descriptor.
- Specified by:
persistReferencedList
in interfaceLists
- Parameters:
descriptor
- List values descriptor- Throws:
OntoDriverException
- If an ontology access error occurs
-
updateReferencedList
public <T> void updateReferencedList(ReferencedListValueDescriptor<T> descriptor) throws OntoDriverException Description copied from interface:Lists
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.
- Specified by:
updateReferencedList
in interfaceLists
- Parameters:
descriptor
- List values descriptor- Throws:
OntoDriverException
- If an ontology access error occurs
-