Package io.github.webbasedwodt.ontology
Interface DTOntology
- All Known Implementing Classes:
OntologyManagerImpl
public interface DTOntology
It models the ontology followed by the Digital Twin.
This will be used to convert raw data to semantic data, following the domain ontology.
This interface is the one that DT Developer must implement.
-
Method Summary
Modifier and TypeMethodDescriptionThis represents the type of the Digital Twin.getDomainTag
(String rawElement) Get the Domain Tag of a Digital Twin property, relationship or action.<T> Optional<org.apache.commons.lang3.tuple.Pair<RdfProperty,
Node>> mapPropertyData
(String rawProperty, T value) Convert a raw property and its value to the ontology model.Optional<org.apache.commons.lang3.tuple.Pair<RdfProperty,
Individual>> mapRelationshipInstance
(String rawRelationship, String targetUri) Convert a raw relationship and its target uri to the ontology model.obtainEventType
(String rawEvent) Obtain the semantic type that describe the event.
-
Method Details
-
getDigitalTwinType
String getDigitalTwinType()This represents the type of the Digital Twin.- Returns:
- the type of the Digital Twin
-
getDomainTag
Get the Domain Tag of a Digital Twin property, relationship or action. If the property/relationship/action is not present, returns an emptyOptional
- Parameters:
rawElement
- the Digital Twin property/relationship/action name for which obtain the corresponding Domain Tag- Returns:
- the Domain Tag of the Digital Twin property/relationship/action
-
mapPropertyData
<T> Optional<org.apache.commons.lang3.tuple.Pair<RdfProperty,Node>> mapPropertyData(String rawProperty, T value) Convert a raw property and its value to the ontology model. If the mapping cannot be done it will return an empty optional- Type Parameters:
T
- the type of the value- Parameters:
rawProperty
- the input raw propertyvalue
- the value of the property- Returns:
- an optional that is filled with the Pair of the mapped Property and its mapped value if possible
-
mapRelationshipInstance
Optional<org.apache.commons.lang3.tuple.Pair<RdfProperty,Individual>> mapRelationshipInstance(String rawRelationship, String targetUri) Convert a raw relationship and its target uri to the ontology model. If the mapping cannot be done it will return an empty optional.- Parameters:
rawRelationship
- the input raw relationshiptargetUri
- the target uri of the relationship- Returns:
- an optional that is filled with the Pair of the mapped Property and its mapped target uri if possible
-
obtainEventType
Obtain the semantic type that describe the event.- Parameters:
rawEvent
- the input raw event name- Returns:
- an optional with the event type if present
-