Interface DigitalTwinSemantics
public interface DigitalTwinSemantics
This interface models the entire semantics of the Digital Twin useful to create the HWoDT Uniform Interface.
This interface once implemented, it has the responsibility of obtaining the Digital Twin classes, the domain tags,
and map raw data to RDF data, considering the domain ontology.
This interface is the one that DT Developer must implement.
-
Method Summary
Modifier and TypeMethodDescriptionObtain the Digital Twin types, expressed as RDF Classes.getDomainTag
(it.wldt.core.state.DigitalTwinStateAction action) Get the Domain Tag of a Digital Twin action.getDomainTag
(it.wldt.core.state.DigitalTwinStateProperty<?> property) Get the Domain Tag of a Digital Twin property.getDomainTag
(it.wldt.core.state.DigitalTwinStateRelationship<?> relationship) Get the Domain Tag of a Digital Twin relationship.mapData
(it.wldt.core.state.DigitalTwinStateProperty<?> property) Map the value of a Digital Twin property in a set of RDF triples.mapData
(it.wldt.core.state.DigitalTwinStateRelationshipInstance<?> relationshipInstance) Map a Digital Twin relationship instance in a set of RDF triples.
-
Method Details
-
getDigitalTwinTypes
Obtain the Digital Twin types, expressed as RDF Classes. The Digital Twin could have more than one type.- Returns:
- the list of RDF Classes that represent the domain-oriented type of the Digital Twin.
-
getDomainTag
Get the Domain Tag of a Digital Twin property. If the Digital Twin has no properties, return an emptyOptional
.- Parameters:
property
- the Digital Twin property for which obtain the corresponding Domain Tag.- Returns:
- the Domain Tag of the Digital Twin property.
-
getDomainTag
Optional<RdfUriResource> getDomainTag(it.wldt.core.state.DigitalTwinStateRelationship<?> relationship) Get the Domain Tag of a Digital Twin relationship. If the Digital Twin has no relationships, return an emptyOptional
.- Parameters:
relationship
- the Digital Twin relationship for which obtain the corresponding Domain Tag.- Returns:
- the Domain Tag of the Digital Twin relationship.
-
getDomainTag
Get the Domain Tag of a Digital Twin action. If the Digital Twin has no actions, return an emptyOptional
.- Parameters:
action
- the Digital Twin action for which obtain the corresponding Domain Tag.- Returns:
- the Domain Tag of the Digital Twin action.
-
mapData
Optional<List<RdfUnSubjectedTriple>> mapData(it.wldt.core.state.DigitalTwinStateProperty<?> property) Map the value of a Digital Twin property in a set of RDF triples.- Parameters:
property
- the property to map data.- Returns:
- the list of triples, if the property is mapped.
-
mapData
Optional<List<RdfUnSubjectedTriple>> mapData(it.wldt.core.state.DigitalTwinStateRelationshipInstance<?> relationshipInstance) Map a Digital Twin relationship instance in a set of RDF triples.- Parameters:
relationshipInstance
- the relationship instance to map.- Returns:
- the list of triples, if the relationship is mapped.
-