public class TagDefinition extends BasicPropertySet implements MutableTag, TagNode, java.io.Serializable
Constructor and Description |
---|
TagDefinition() |
TagDefinition(java.lang.String name,
TagType type) |
TagDefinition(Tag copy)
Copy constructor makes a deep (including children, if applicable) copy of the given tag.
|
TagDefinition(Tag copy,
boolean copyTagChildren)
Special copy constructor that can omit copying the tag's children
|
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)
|
TagDefinition(TagDefinition copy) |
TagDefinition(TagDiff diff,
TagType type) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(TagNode tag) |
void |
addChildren(java.util.Collection<TagNode> tags) |
void |
applyDiff(TagDiff diff) |
int |
compareTo(Tag that) |
static Tag |
fromBase64String(java.lang.String str) |
<T> T |
get(Property<T> prop)
Retrieves the value of the property, or null if this set doesn't contain that property.
|
AccessRightsType |
getAccessRights()
Gets the type of access rights for this tag
|
AlarmConfiguration |
getAlarmStates()
Returns the list of alarm states for this tag
|
TagValue |
getAttribute(TagProp prop)
Gets the value of the given tag attribute.
|
static PropertySet |
getAttributesFrom(Tag copy) |
TagNode |
getChild(java.lang.String name) |
java.util.List<? extends TagNode> |
getChildren()
Returns a list of children.
|
DataType |
getDataType()
Returns the datatype of this tag's value property
|
TagEventScripts |
getEventScripts() |
PropertySet |
getExtendedProperties() |
java.lang.String |
getName()
Returns the name of the tag.
|
<T> T |
getOrDefault(Property<T> prop) |
TagPermissionsModel |
getPermissionModel()
Returns this tags permission model, if any
|
OverrideMap |
getPropertyOverrides()
Gets (or creates) the overridden property tree.
|
TagType |
getType()
Returns the type of this tag.
|
TagValue |
getValue()
Returns the value in qualified form- along with quality and timestamp.
|
boolean |
isAlarmingSupported()
Deprecated.
|
boolean |
isEnabled()
Returns the enabled bit for this tag
|
boolean |
isInherited(Property<?> prop)
Indicates whether the property was inherited from a parent type.
|
Tag |
removeChild(java.lang.String name) |
void |
setAccessRights(AccessRightsType type)
Sets the type of access rights for this tag.
|
void |
setAlarmStates(AlarmConfiguration config) |
void |
setAlarmStates(AlarmStateList states)
This function is used to convert items stored through xml serialization, like transaction groups.
|
void |
setAttribute(TagProp prop,
TagValue value)
Sets the value of the given tag attribute.
|
void |
setDataType(DataType type)
Sets the data type for this tag.
|
void |
setEnabled(boolean en)
Sets this tag enabled/disabled
|
void |
setEventScripts(TagEventScripts scripts) |
void |
setName(java.lang.String name)
Sets the name of this tag
|
void |
setPermissionModel(TagPermissionsModel model)
Sets the tag's permission model
|
void |
setRawAttributes(java.util.Map<TagProp,java.lang.Object> value) |
void |
setType(TagType type) |
void |
setValue(TagValue value)
Sets this tags value.
|
java.lang.String |
toBase64String() |
addPropertyChangeListener, addPropertyChangeListener, change, contains, equals, firePropertyChange, getCount, getOrElse, getProperties, getRawValueMap, getValues, isExtended, iterator, merge, merge, of, remove, removePropertyChangeListener, removePropertyChangeListener, set, set, setDirect, setRawValueMap, toString
public TagDefinition()
public TagDefinition(java.lang.String name, TagType type)
public TagDefinition(Tag copy)
copy
- public TagDefinition(TagDefinition copy)
public TagDefinition(Tag copy, boolean copyTagChildren)
public TagDefinition(Tag copy, boolean copyTagChildren, boolean onlyLocalDefinitions)
public java.lang.String getName()
Tag
public TagType getType()
Tag
public DataType getDataType()
Tag
getDataType
in interface Tag
public boolean isEnabled()
Tag
public TagValue getValue()
Tag
public AccessRightsType getAccessRights()
Tag
getAccessRights
in interface Tag
public TagPermissionsModel getPermissionModel()
Tag
getPermissionModel
in interface Tag
public AlarmConfiguration getAlarmStates()
Tag
getAlarmStates
in interface Tag
public TagEventScripts getEventScripts()
getEventScripts
in interface Tag
public PropertySet getExtendedProperties()
@Deprecated public boolean isAlarmingSupported()
isAlarmingSupported
in interface Tag
public TagValue getAttribute(TagProp prop)
Tag
getAttribute
in interface Tag
public java.util.List<? extends TagNode> getChildren()
TagNode
getChildren
in interface TagNode
public void setEnabled(boolean en)
MutableTag
setEnabled
in interface MutableTag
public void setName(java.lang.String name)
MutableTag
setName
in interface MutableTag
public void setType(TagType type)
public void setDataType(DataType type)
MutableTag
setDataType
in interface MutableTag
public void setAccessRights(AccessRightsType type)
MutableTag
setAccessRights
in interface MutableTag
public void setPermissionModel(TagPermissionsModel model)
MutableTag
setPermissionModel
in interface MutableTag
public void setAlarmStates(AlarmConfiguration config)
setAlarmStates
in interface MutableTag
public void setEventScripts(TagEventScripts scripts)
setEventScripts
in interface MutableTag
public void setAttribute(TagProp prop, TagValue value) throws java.lang.ClassCastException
MutableTag
setAttribute
in interface MutableTag
java.lang.ClassCastException
public void setValue(TagValue value) throws java.lang.ClassCastException
MutableTag
setValue
in interface MutableTag
java.lang.ClassCastException
public void addChild(TagNode tag)
public void addChildren(java.util.Collection<TagNode> tags)
public Tag removeChild(java.lang.String name)
public TagNode getChild(java.lang.String name)
public <T> T get(Property<T> prop)
PropertyValueSource
get
in interface PropertyValueSource
get
in class BasicPropertySet
public <T> T getOrDefault(Property<T> prop)
getOrDefault
in interface PropertyValueSource
getOrDefault
in class BasicPropertySet
Property.getDefaultValue()
if not present.public void setAlarmStates(AlarmStateList states)
public static PropertySet getAttributesFrom(Tag copy)
public void setRawAttributes(java.util.Map<TagProp,java.lang.Object> value)
public boolean isInherited(Property<?> prop)
PropertyValueSource
isInherited
in interface PropertyValueSource
isInherited
in class BasicPropertySet
public OverrideMap getPropertyOverrides()
public int compareTo(Tag that)
compareTo
in interface java.lang.Comparable<Tag>
public java.lang.String toBase64String() throws java.io.IOException
java.io.IOException
public static Tag fromBase64String(java.lang.String str)
public void applyDiff(TagDiff diff)