Interface DTOntology


  • 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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> java.util.Optional<org.apache.commons.lang3.tuple.Pair<Property,​Node>> convertPropertyValue​(java.lang.String rawProperty, T value)
      Convert a raw property and its value to the ontology model.
      java.util.Optional<org.apache.commons.lang3.tuple.Pair<Property,​Individual>> convertRelationship​(java.lang.String rawRelationship, java.lang.String targetUri)
      Convert a raw relationship and its target uri to the ontology model.
      java.lang.String getDigitalTwinType()
      This represents the type of the Digital Twin.
      java.util.Optional<java.lang.String> obtainActionType​(java.lang.String rawAction)
      Obtain the semantic type that describe the action.
      java.util.Optional<Property> obtainProperty​(java.lang.String rawProperty)
      Obtain the ontology property from the rawProperty in input.
      java.util.Optional<java.lang.String> obtainPropertyValueType​(java.lang.String rawProperty)
      Obtain the semantic type of the value for a rawProperty.
    • Method Detail

      • getDigitalTwinType

        java.lang.String getDigitalTwinType()
        This represents the type of the Digital Twin.
        Returns:
        the type of the Digital Twin
      • obtainProperty

        java.util.Optional<Property> obtainProperty​(java.lang.String rawProperty)
        Obtain the ontology property from the rawProperty in input. If the mapping cannot be done it will return an empty optional. It is valid both for dt properties and dt relationships.
        Parameters:
        rawProperty - the input raw property
        Returns:
        the Property instance
      • obtainPropertyValueType

        java.util.Optional<java.lang.String> obtainPropertyValueType​(java.lang.String rawProperty)
        Obtain the semantic type of the value for a rawProperty. It is valid both for dt properties and dt relationships.
        Parameters:
        rawProperty - the input raw property
        Returns:
        an optional for the type of the value of the property
      • convertPropertyValue

        <T> java.util.Optional<org.apache.commons.lang3.tuple.Pair<Property,​Node>> convertPropertyValue​(java.lang.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 property
        value - the value of the property
        Returns:
        an optional that is filled with the Pair of the mapped Property and its mapped value if possible
      • convertRelationship

        java.util.Optional<org.apache.commons.lang3.tuple.Pair<Property,​Individual>> convertRelationship​(java.lang.String rawRelationship,
                                                                                                               java.lang.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 relationship
        targetUri - 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
      • obtainActionType

        java.util.Optional<java.lang.String> obtainActionType​(java.lang.String rawAction)
        Obtain the semantic type that describe the action.
        Parameters:
        rawAction - the input rawAction to get the semantic type
        Returns:
        an optional with the type of the action