public abstract class AbstractTag extends java.lang.Object implements MutableTag
Modifier and Type | Field and Description |
---|---|
protected AccessRightsType |
accessRights |
protected java.util.Map<Property<?>,java.lang.Object> |
attributes |
protected boolean |
enabled |
protected TagEventScripts |
eventScripts |
protected java.lang.String |
name |
protected TagPermissionsModel |
permissionModel |
protected DataType |
type |
Modifier | Constructor and Description |
---|---|
protected |
AbstractTag() |
protected |
AbstractTag(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addChild(Tag child) |
protected QualifiedValue |
coerceValue(QualifiedValue value)
Coerces the value inside the argument QualifiedValue to this tag's datatype, if that value is not null.
|
int |
compareTo(Tag that) |
AccessRightsType |
getAccessRights()
Gets the type of access rights for this tag
|
QualifiedValue |
getAttribute(Property<?> prop)
Gets the value of the given tag attribute.
|
Tag |
getChild(java.lang.String name) |
java.util.List<? extends Tag> |
getChildren() |
QualifiedValue |
getCurrentValue()
Returns the value in qualified form- along with quality and timestamp.
|
DataType |
getDataType()
Returns the datatype of this tag's value property
|
TagEventScripts |
getEventScripts() |
java.lang.String |
getName()
Returns the name of the tag.
|
TagPermissionsModel |
getPermissionModel()
Returns this tags permission model, if any
|
java.util.Map<Property<?>,java.lang.Object> |
getRawAttributes() |
boolean |
isAlarmingSupported() |
boolean |
isEnabled()
Returns the enabled bit for this tag
|
static void |
main(java.lang.String[] agrs) |
Tag |
removeChild(java.lang.String name) |
void |
setAccessRights(AccessRightsType accessRights)
Sets the type of access rights for this tag.
|
void |
setAttribute(Property<?> prop,
QualifiedValue value)
Sets the value of the given tag attribute.
|
void |
setCurrentValue(QualifiedValue value)
Sets this tags value.
|
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 permissionModel) |
void |
setRawAttributes(java.util.Map<Property<?>,java.lang.Object> value) |
void |
setValue(TagValue tv) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setAlarmStates
getAlarmStates, getType
protected java.util.Map<Property<?>,java.lang.Object> attributes
protected DataType type
protected AccessRightsType accessRights
protected TagPermissionsModel permissionModel
protected TagEventScripts eventScripts
protected boolean enabled
protected java.lang.String name
protected AbstractTag()
protected AbstractTag(java.lang.String name)
public Tag getChild(java.lang.String name)
public Tag removeChild(java.lang.String name)
public java.lang.String getName()
Tag
public void setName(java.lang.String name)
MutableTag
setName
in interface MutableTag
public QualifiedValue getCurrentValue()
Tag
getCurrentValue
in interface Tag
public void setCurrentValue(QualifiedValue value) throws java.lang.ClassCastException
MutableTag
setCurrentValue
in interface MutableTag
java.lang.ClassCastException
public void setValue(TagValue tv) throws java.lang.ClassCastException
java.lang.ClassCastException
protected QualifiedValue coerceValue(QualifiedValue value) throws java.lang.ClassCastException
java.lang.ClassCastException
public DataType getDataType()
Tag
getDataType
in interface Tag
public boolean isEnabled()
Tag
public void setEnabled(boolean en)
MutableTag
setEnabled
in interface MutableTag
public void setDataType(DataType type)
MutableTag
setDataType
in interface MutableTag
public java.util.List<? extends Tag> getChildren()
public void addChild(Tag child)
public QualifiedValue getAttribute(Property<?> prop)
Tag
getAttribute
in interface Tag
public void setAttribute(Property<?> prop, QualifiedValue value) throws java.lang.ClassCastException
MutableTag
setAttribute
in interface MutableTag
java.lang.ClassCastException
public java.util.Map<Property<?>,java.lang.Object> getRawAttributes()
public void setRawAttributes(java.util.Map<Property<?>,java.lang.Object> value)
public AccessRightsType getAccessRights()
Tag
getAccessRights
in interface Tag
public void setAccessRights(AccessRightsType accessRights)
MutableTag
setAccessRights
in interface MutableTag
public TagPermissionsModel getPermissionModel()
Tag
getPermissionModel
in interface Tag
public void setPermissionModel(TagPermissionsModel permissionModel)
public TagEventScripts getEventScripts()
getEventScripts
in interface Tag
public void setEventScripts(TagEventScripts scripts)
setEventScripts
in interface MutableTag
public boolean isAlarmingSupported()
public int compareTo(Tag that)
compareTo
in interface java.lang.Comparable<Tag>
public static void main(java.lang.String[] agrs)