Class TagDefinition

    • Constructor Detail

      • TagDefinition

        public TagDefinition()
      • TagDefinition

        public TagDefinition​(java.lang.String name,
                             TagType type)
      • TagDefinition

        public TagDefinition​(Tag copy)
        Copy constructor makes a deep (including children, if applicable) copy of the given tag. The implementation of the actual tag isn't important, this copy constructor will probe the tag for all pertinent attributes and store copies of them
      • TagDefinition

        public TagDefinition​(TagDiff diff,
                             TagType type)
      • TagDefinition

        public TagDefinition​(Tag copy,
                             boolean copyTagChildren)
        Special copy constructor that can omit copying the tag's children
      • TagDefinition

        public TagDefinition​(Tag copy,
                             boolean copyTagChildren,
                             boolean onlyLocalDefinitions)
        Copies the tag, optionally with children, and optionally eliminating non-local overrides & extended prop values (for getting just the core udt instance definition)
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: Tag
        Returns the name of the tag.
        Specified by:
        getName in interface Tag
      • getType

        public TagType getType()
        Description copied from interface: Tag
        Returns the type of this tag.
        Specified by:
        getType in interface Tag
      • getDataType

        public DataType getDataType()
        Description copied from interface: Tag
        Returns the datatype of this tag's value property
        Specified by:
        getDataType in interface Tag
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: Tag
        Returns the enabled bit for this tag
        Specified by:
        isEnabled in interface Tag
      • getCurrentValue

        public QualifiedValue getCurrentValue()
        Description copied from interface: Tag
        Returns the value in qualified form- along with quality and timestamp.
        Specified by:
        getCurrentValue in interface Tag
      • getAccessRights

        public AccessRightsType getAccessRights()
        Description copied from interface: Tag
        Gets the type of access rights for this tag
        Specified by:
        getAccessRights in interface Tag
      • getAlarmStates

        public AlarmConfiguration getAlarmStates()
        Description copied from interface: Tag
        Returns the list of alarm states for this tag
        Specified by:
        getAlarmStates in interface Tag
      • getExtendedProperties

        public PropertySet getExtendedProperties()
      • getAttribute

        @Nullable
        public QualifiedValue getAttribute​(Property<?> prop)
        Description copied from interface: Tag
        Gets the value of the given tag attribute.
        Specified by:
        getAttribute in interface Tag
      • getChildren

        public java.util.List<? extends TagNode> getChildren()
        Description copied from interface: TagNode
        Returns a list of children.
        Specified by:
        getChildren in interface TagNode
        Returns:
        children, NULL if not a folder.
      • setEnabled

        public void setEnabled​(boolean en)
        Description copied from interface: MutableTag
        Sets this tag enabled/disabled
        Specified by:
        setEnabled in interface MutableTag
      • setName

        public void setName​(java.lang.String name)
        Description copied from interface: MutableTag
        Sets the name of this tag
        Specified by:
        setName in interface MutableTag
      • setType

        public void setType​(TagType type)
      • setDataType

        public void setDataType​(DataType type)
        Description copied from interface: MutableTag
        Sets the data type for this tag. The existing value will most likely be lost.
        Specified by:
        setDataType in interface MutableTag
      • setAttribute

        public void setAttribute​(Property<?> prop,
                                 QualifiedValue value)
                          throws java.lang.ClassCastException
        Description copied from interface: MutableTag
        Sets the value of the given tag attribute. If the type of the argument is incorrect, an ClassCastException will be thrown.
        Specified by:
        setAttribute in interface MutableTag
        Throws:
        java.lang.ClassCastException
      • setCurrentValue

        public void setCurrentValue​(QualifiedValue value)
                             throws java.lang.ClassCastException
        Description copied from interface: MutableTag
        Sets this tags value. Will throw an ClassCastException if the value cannot be coerced into the datatype of this tag.
        Specified by:
        setCurrentValue in interface MutableTag
        Throws:
        java.lang.ClassCastException
      • setValue

        public void setValue​(TagValue tv)
                      throws java.lang.ClassCastException
        Throws:
        java.lang.ClassCastException
      • addChild

        public void addChild​(TagNode tag)
      • addChildren

        public void addChildren​(java.util.Collection<TagNode> tags)
      • removeChild

        public Tag removeChild​(java.lang.String name)
      • getChild

        public TagNode getChild​(java.lang.String name)
      • setAlarmStates

        public void setAlarmStates​(AlarmStateList states)
        This function is used to convert items stored through xml serialization, like transaction groups. *
      • getAttributesFrom

        public static PropertySet getAttributesFrom​(Tag copy)
      • setRawAttributes

        public void setRawAttributes​(java.util.Map<TagProp,​java.lang.Object> value)
      • getPropertyOverrides

        public OverrideMap getPropertyOverrides()
        Gets (or creates) the overridden property tree. Used for UDTs, property overrides shadow properties in sub tags.
      • compareTo

        public int compareTo​(Tag that)
        Specified by:
        compareTo in interface java.lang.Comparable<Tag>
      • toBase64String

        public java.lang.String toBase64String()
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • fromBase64String

        public static Tag fromBase64String​(java.lang.String str)
      • applyDiff

        public void applyDiff​(TagDiff diff)