Class JenaDTKGEngine
java.lang.Object
io.github.webbasedwodt.DTKGEngine.impl.JenaDTKGEngine
- All Implemented Interfaces:
DTKGEngine
,DTKGEngineReader
This class provides an implementation of the
DTKGEngine
using
Apache Jena.-
Constructor Summary
ConstructorsConstructorDescriptionJenaDTKGEngine
(URI digitalTwinUri, String digitalTwinType) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addActionId
(String actionId) Add an available action on the Digital Twin Knowledge Graph.void
addDigitalTwinPropertyUpdate
(RdfProperty property, Node newValue) Add or update a Digital Twin property within the Digital Twin Knowledge Graph.void
addDTKGObserver
(DTKGObserver observer) Add aDTKGObserver
that will be notified for each DTKG update.void
addRelationship
(RdfProperty relationshipPredicate, Individual targetIndividual) Add a relationship with another Digital Twin.Obtain the current status of the Digital Twin Knowledge Graph.boolean
removeActionId
(String actionId) Remove an action from the Digital Twin Knowledge Graph.void
Method that allows to signal the deletion or the stop of the underlying Digital Twin.boolean
removeProperty
(RdfProperty property) Remove a Digital Twin property within the Digital Twin Knowledge Graph.boolean
removeRelationship
(RdfProperty relationshipPredicate) Delete all the occurrences of a relationship with another Digital Twin.boolean
removeRelationship
(RdfProperty relationshipPredicate, Individual targetIndividual) Delete an existing relationship with another Digital Twin.
-
Constructor Details
-
JenaDTKGEngine
Default constructor.- Parameters:
digitalTwinUri
- the uri of the Digital Twin for which this class creates the DTKGdigitalTwinType
- the type of the Digital Twin
-
-
Method Details
-
removeDigitalTwin
public void removeDigitalTwin()Description copied from interface:DTKGEngine
Method that allows to signal the deletion or the stop of the underlying Digital Twin.- Specified by:
removeDigitalTwin
in interfaceDTKGEngine
-
addDigitalTwinPropertyUpdate
Description copied from interface:DTKGEngine
Add or update a Digital Twin property within the Digital Twin Knowledge Graph.- Specified by:
addDigitalTwinPropertyUpdate
in interfaceDTKGEngine
- Parameters:
property
- the property to add/updatenewValue
- the value of the property.
-
removeProperty
Description copied from interface:DTKGEngine
Remove a Digital Twin property within the Digital Twin Knowledge Graph.- Specified by:
removeProperty
in interfaceDTKGEngine
- Parameters:
property
- the property to delete.- Returns:
- true if deleted, false if not-existent.
-
addRelationship
Description copied from interface:DTKGEngine
Add a relationship with another Digital Twin.- Specified by:
addRelationship
in interfaceDTKGEngine
- Parameters:
relationshipPredicate
- the associated predicatetargetIndividual
- the target individual
-
removeRelationship
Description copied from interface:DTKGEngine
Delete an existing relationship with another Digital Twin.- Specified by:
removeRelationship
in interfaceDTKGEngine
- Parameters:
relationshipPredicate
- the associated predicatetargetIndividual
- the target individual.- Returns:
- true if correctly deleted, false if the relationship doesn't exist
-
removeRelationship
Description copied from interface:DTKGEngine
Delete all the occurrences of a relationship with another Digital Twin.- Specified by:
removeRelationship
in interfaceDTKGEngine
- Parameters:
relationshipPredicate
- the associated predicate- Returns:
- true if correctly deleted, false if the relationship doesn't exist
-
addActionId
Description copied from interface:DTKGEngine
Add an available action on the Digital Twin Knowledge Graph.- Specified by:
addActionId
in interfaceDTKGEngine
- Parameters:
actionId
- the action identifier to identify the available action.
-
removeActionId
Description copied from interface:DTKGEngine
Remove an action from the Digital Twin Knowledge Graph.- Specified by:
removeActionId
in interfaceDTKGEngine
- Parameters:
actionId
- the action identifier to remove- Returns:
- true if correctly deleted, false if the action id doesn't exist
-
getCurrentDigitalTwinKnowledgeGraph
Description copied from interface:DTKGEngineReader
Obtain the current status of the Digital Twin Knowledge Graph.- Specified by:
getCurrentDigitalTwinKnowledgeGraph
in interfaceDTKGEngineReader
- Returns:
- the current state of the DTKG
-
addDTKGObserver
Description copied from interface:DTKGEngine
Add aDTKGObserver
that will be notified for each DTKG update.- Specified by:
addDTKGObserver
in interfaceDTKGEngine
- Parameters:
observer
- the observer to add.
-