Class DefaultKey

  • All Implemented Interfaces:
    Key

    public class DefaultKey
    extends java.lang.Object
    implements Key
    Default implementation of package io.adminshell.aas.v3.model.Key A key is a reference to an element by its id.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DefaultKey.Builder
      This builder class can be used to construct a DefaultKey bean.
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultKey()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      KeyType getIdType()
      Type of the key value.
      KeyElements getType()
      Denote which kind of entity is referenced.
      java.lang.String getValue()
      The key value, for example an IRDI if the idType=Irdi.
      int hashCode()  
      void setIdType​(KeyType idType)
      Type of the key value.
      void setType​(KeyElements type)
      Denote which kind of entity is referenced.
      void setValue​(java.lang.String value)
      The key value, for example an IRDI if the idType=Irdi.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • value

        protected java.lang.String value
    • Constructor Detail

      • DefaultKey

        public DefaultKey()
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getIdType

        public KeyType getIdType()
        Description copied from interface: Key
        Type of the key value. In case of idType = idShort local shall be true. In case type=GlobalReference idType shall not be IdShort. Constraint AASd-080: In case Key/type == GlobalReference idType shall not be any LocalKeyType (IdShort, FragmentId). Constraint AASd-081: In case Key/type==AssetAdministrationShell Key/idType shall not be any LocalKeyType (IdShort, FragmentId). More information under https://admin-shell.io/aas/3/0/RC01/Key/idType
        Specified by:
        getIdType in interface Key
        Returns:
        Returns the KeyType for the property idType.
      • setIdType

        public void setIdType​(KeyType idType)
        Description copied from interface: Key
        Type of the key value. In case of idType = idShort local shall be true. In case type=GlobalReference idType shall not be IdShort. Constraint AASd-080: In case Key/type == GlobalReference idType shall not be any LocalKeyType (IdShort, FragmentId). Constraint AASd-081: In case Key/type==AssetAdministrationShell Key/idType shall not be any LocalKeyType (IdShort, FragmentId). More information under https://admin-shell.io/aas/3/0/RC01/Key/idType
        Specified by:
        setIdType in interface Key
        Parameters:
        idType - desired value for the property idType.
      • getType

        public KeyElements getType()
        Description copied from interface: Key
        Denote which kind of entity is referenced. In case type = GlobalReference then the element is a global unique id. In all other cases the key references a model element of the same or of another AAS. The name of the model element is explicitly listed. More information under https://admin-shell.io/aas/3/0/RC01/Key/type
        Specified by:
        getType in interface Key
        Returns:
        Returns the KeyElements for the property type.
      • setType

        public void setType​(KeyElements type)
        Description copied from interface: Key
        Denote which kind of entity is referenced. In case type = GlobalReference then the element is a global unique id. In all other cases the key references a model element of the same or of another AAS. The name of the model element is explicitly listed. More information under https://admin-shell.io/aas/3/0/RC01/Key/type
        Specified by:
        setType in interface Key
        Parameters:
        type - desired value for the property type.
      • getValue

        public java.lang.String getValue()
        Description copied from interface: Key
        The key value, for example an IRDI if the idType=Irdi. More information under https://admin-shell.io/aas/3/0/RC01/Key/value
        Specified by:
        getValue in interface Key
        Returns:
        Returns the String for the property value.
      • setValue

        public void setValue​(java.lang.String value)
        Description copied from interface: Key
        The key value, for example an IRDI if the idType=Irdi. More information under https://admin-shell.io/aas/3/0/RC01/Key/value
        Specified by:
        setValue in interface Key
        Parameters:
        value - desired value for the property value.