Class OpenId

  • All Implemented Interfaces:
    DataObject, Serializable

    public final class OpenId
    extends AbstractFieldsObject
    Represents the value of an identifier field that's associated with an open type. Originally generated from the following ASN.1.
     OpenId ::=
         CHOICE {
             local  INTEGER,
             global OBJECT IDENTIFIER,
             ...
         }
     
    See Also:
    Serialized Form
    • Constructor Detail

      • OpenId

        public OpenId()
    • Method Detail

      • copyOf

        public static OpenId copyOf​(OpenId from)
        Creates a new object of this type, initialising its field values from those of the given object.
        Parameters:
        from - the object from which to copy
        Returns:
        new OpenId
      • getChoice

        public OpenId.Choice getChoice()
        Gets the discriminant of the current choice.
        Returns:
        the current discriminant
      • getFieldAccessors

        public static FieldAccessor[] getFieldAccessors()
        Gets a new array of the accessors for fields of this type.
        Returns:
        FieldAccessor[]
      • getFieldsMap

        public Map<String,​Object> getFieldsMap​(boolean withAbsents)
        Gets a Map from :discriminant-name to associated-value. For a value of primitive type, the value is boxed. If choice is not set, returns a map from : to AbstractFieldsObject.FIELD_UNINITIALISED.
        Specified by:
        getFieldsMap in class AbstractFieldsObject
        Parameters:
        withAbsents - ignored, as value cannot be optional
        Returns:
        Map from :discriminant-name to associated-value
      • getGlobal

        public ObjectID getGlobal()
        Gets the value of the global choice.
        Returns:
        value of the choice, if choice is global, else null
      • getLocal

        public long getLocal()
        Gets the value of the local choice.
        Returns:
        value of the choice, if choice is local
      • isGlobalChosen

        public boolean isGlobalChosen()
        Tests whether the choice is global.
        Returns:
        true if chosen, false if not
      • isLocalChosen

        public boolean isLocalChosen()
        Tests whether the choice is local.
        Returns:
        true if chosen, false if not
      • setChoice

        protected void setChoice​(OpenId.Choice arg)
        Sets the discriminant of the current choice.
        Parameters:
        arg - the new discriminant
      • setGlobal

        public OpenId setGlobal​(ObjectID value)
        Sets the value of the global choice.
        Parameters:
        value - the new value for the choice
        Returns:
        this
      • setLocal

        public OpenId setLocal​(long value)
        Sets the value of the local choice.
        Parameters:
        value - the new value for the choice
        Returns:
        this