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> voidpersistReferencedList(ReferencedListValueDescriptor<T> descriptor) Persists referenced list values specified by the descriptor.voidpersistSimpleList(SimpleListValueDescriptor descriptor) Persists simple list values specified by the descriptor.<T> voidupdateReferencedList(ReferencedListValueDescriptor<T> descriptor) Updates referenced list based on the values in the specified list descriptor.voidupdateSimpleList(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:ListsLoads 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:
loadSimpleListin 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:ListsPersists simple list values specified by the descriptor.The sequence is persisted in the order in which it appears in the descriptor.
- Specified by:
persistSimpleListin interfaceLists- Parameters:
descriptor- List values descriptor- Throws:
OntoDriverException- If an ontology access error occurs
-
updateSimpleList
Description copied from interface:ListsUpdates 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:
updateSimpleListin 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:ListsLoads 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:
loadReferencedListin 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:ListsPersists referenced list values specified by the descriptor.The sequence is persisted in the order in which it appears in the descriptor.
- Specified by:
persistReferencedListin 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:ListsUpdates 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:
updateReferencedListin interfaceLists- Parameters:
descriptor- List values descriptor- Throws:
OntoDriverException- If an ontology access error occurs
-