Package cz.cvut.kbss.ontodriver.rdf4j
Class Rdf4jProperties
java.lang.Object
cz.cvut.kbss.ontodriver.rdf4j.Rdf4jProperties
- All Implemented Interfaces:
Properties
-
Constructor Summary
ConstructorsConstructorDescriptionRdf4jProperties
(Rdf4jAdapter adapter, Procedure beforeCallback, Procedure afterChangeCallback) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperties
(NamedResource individual, URI context, Map<Assertion, Set<Value<?>>> properties) Adds the specified property values into the ontology.Collection<Axiom<?>>
getProperties
(NamedResource individual, URI context, boolean includeInferred) Loads property values for the specified individual.void
removeProperties
(NamedResource individual, URI context, Map<Assertion, Set<Value<?>>> properties) Removes the specified property values from the ontology.
-
Constructor Details
-
Rdf4jProperties
public Rdf4jProperties(Rdf4jAdapter adapter, Procedure beforeCallback, Procedure afterChangeCallback)
-
-
Method Details
-
getProperties
public Collection<Axiom<?>> getProperties(NamedResource individual, URI context, boolean includeInferred) throws Rdf4jDriverException Description copied from interface:Properties
Loads property values for the specified individual.This method essentially does the same as
Connection.find(cz.cvut.kbss.ontodriver.descriptor.AxiomDescriptor)
. It is up to the OOM provider to decide which values are part of the object model and which are unmapped.- Specified by:
getProperties
in interfaceProperties
- Parameters:
individual
- Individual for which property values should be loadedcontext
- Context from which to load the property valuesincludeInferred
- Whether to included inferred knowledge- Returns:
- Collection of axioms representing property values
- Throws:
Rdf4jDriverException
-
addProperties
public void addProperties(NamedResource individual, URI context, Map<Assertion, Set<Value<?>>> properties) throws OntoDriverExceptionDescription copied from interface:Properties
Adds the specified property values into the ontology.The property values are either URIs (in case of object properties) or data literals of the appropriate Java type.
- Specified by:
addProperties
in interfaceProperties
- Parameters:
individual
- Property subjectcontext
- Context into which to store the property valuesproperties
- The values to add- Throws:
OntoDriverException
- When storage access error occurs
-
removeProperties
public void removeProperties(NamedResource individual, URI context, Map<Assertion, Set<Value<?>>> properties) throws OntoDriverExceptionDescription copied from interface:Properties
Removes the specified property values from the ontology.The property values are either URIs (in case of object properties) or data literals of the appropriate Java type.
- Specified by:
removeProperties
in interfaceProperties
- Parameters:
individual
- Property subjectcontext
- Context from which to remove the property valuesproperties
- The values to remove- Throws:
OntoDriverException
- When storage access error occurs
-