java.lang.Object
de.iip_ecosphere.platform.configuration.easyProducer.aas.AbstractAasElement
de.iip_ecosphere.platform.configuration.easyProducer.aas.AasField
Direct Known Subclasses:
AasOperation

public class AasField extends AbstractAasElement
Represents a field in an AasType.
Author:
Holger Eichelberger, SSE
  • Field Details

    • BASIC_TYPES

      private static final Set<String> BASIC_TYPES
    • smeType

      private AasSmeType smeType
    • isMultiValued

      private boolean isMultiValued
    • valueType

      private String valueType
    • exampleValues

      private String[] exampleValues
    • exampleExplanation

      private String exampleExplanation
    • lowerCardinality

      private int lowerCardinality
    • upperCardinality

      private int upperCardinality
    • aspect

      private String aspect
  • Constructor Details

    • AasField

      AasField()
      Creates an instance.
    • AasField

      AasField(AasField field)
      Copies values of field.
      Parameters:
      field - the source element
  • Method Details

    • setSmeType

      void setSmeType(AasSmeType smeType)
      Defines the submodelelement type.
      Parameters:
      smeType - the submodelelement type
    • getSmeType

      public AasSmeType getSmeType()
      Returns the submodelelement type.
      Returns:
      the submodelelement type
    • setIdShort

      void setIdShort(String idShort, boolean isMultiValued)
      Defines the idShort.
      Parameters:
      idShort - the idShort without multi-value counting suffix.
      isMultiValued - whether the field is multi-valued
    • isMultiValued

      public boolean isMultiValued()
      Returns whether the field is multi-valued, i.e., with multi-value counting suffix.
      Returns:
      true for multi-valued, false else
    • getAspect

      public String getAspect()
      Returns the optional aspect this field is assigned to.
      Returns:
      the aspect, may be null for none
    • setAspect

      void setAspect(String aspect)
      Defines the aspect this field is assigned to.
      Parameters:
      aspect - the aspect, may be null for none
    • setValueType

      void setValueType(String valueType)
      Defines the value type.
      Parameters:
      valueType - the value type
    • hasValueType

      public boolean hasValueType()
      Returns whether this field has a value type defined.
      Returns:
      true for defined, false for not defined
    • setExampleValues

      void setExampleValues(String... value)
      Defines the optional example value(s).
      Parameters:
      value - the example value(s)
    • getExampleValues

      public String[] getExampleValues()
      Returns the optional example value(s).
      Returns:
      the example values
    • setExampleExplanation

      void setExampleExplanation(String exampleExplanation)
      Defines the optional example explanation.
      Parameters:
      exampleExplanation - the example explanation
    • getExampleExplanation

      public String getExampleExplanation()
      Returns the optional example explanation.
      Returns:
      the example explanation
    • setCardinality

      void setCardinality(int lowerUpper)
      Defines the lower and upper cardinality to the same value.
      Parameters:
      lowerUpper - the lower and upper cardinality, the minimum integer for none
    • setCardinality

      void setCardinality(int lowerCardinality, int upperCardinality)
      Defines the lower and upper cardinality.
      Parameters:
      lowerCardinality - the lower cardinality, the minimum integer for none
      upperCardinality - the upper cardinality, the minimum integer for none
    • getLowerCardinality

      public int getLowerCardinality()
      Returns whether the lower cardinality.
      Returns:
      the upper cardinality, the minimum integer for none
    • getUpperCardinality

      public int getUpperCardinality()
      Returns whether the upper cardinality.
      Returns:
      the upper cardinality, the minimum integer for none
    • hasCardinality

      public boolean hasCardinality()
      Returns whether the field has a specified cardinality.
      Returns:
      true for cardinality, false else
    • getValueType

      public String getValueType()
      Returns the value type.
      Returns:
      the value type
    • isBasicType

      public static boolean isBasicType(String type)
      Returns whether the given type is considered to be a known, basic type.
      Parameters:
      type - the type
      Returns:
      true for known, false else
    • mapPropertyType

      static String mapPropertyType(String valueType, String dflt)
      Maps a field valueType for AAS properties.
      Parameters:
      valueType - the actual type, may be null or empty
      dflt - the default value if none matchex, may be null, valueType etc.
      Returns:
      the resulting type, may be null
    • getIvmlValueType

      public String getIvmlValueType(boolean log)
      Returns the value type as IVML type.
      Parameters:
      log - log the output
      Returns:
      the IVML value type
    • getLogger

      private static de.iip_ecosphere.platform.support.logging.Logger getLogger()
      Returns the logger instance for this class.
      Returns:
      the logger instance