public abstract class AbstractTag extends java.lang.Object implements MutableTag
Modifier and Type | Field and Description |
---|---|
protected AccessRightsType |
accessRights |
protected java.util.Map<TagProp,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 TagValue |
coerceValue(TagValue value)
Coerces the value inside the argument TagValue 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
|
TagValue |
getAttribute(TagProp prop)
Gets the value of the given tag attribute.
|
Tag |
getChild(java.lang.String name) |
java.util.List<? extends Tag> |
getChildren() |
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<TagProp,java.lang.Object> |
getRawAttributes() |
TagValue |
getValue()
Returns the value in qualified form- along with quality and timestamp.
|
boolean |
isAlarmingSupported()
Returns true if this tag supports alarming, false otherwise
|
boolean |
isEnabled()
Returns the enabled bit for this tag
|
static boolean |
isValidName(java.lang.String name)
Returns true if the given name is a valid name for a SQLTag or not.
|
static void |
main(java.lang.String[] agrs) |
Tag |
removeChild(java.lang.String name) |
static java.lang.String |
sanitizeName(java.lang.String name)
Takes a string and replaces any illegal characters with underscores.
|
void |
setAccessRights(AccessRightsType accessRights)
Sets the type of access rights for this tag.
|
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 permissionModel)
Sets the tag's permission model
|
void |
setRawAttributes(java.util.Map<TagProp,java.lang.Object> value) |
void |
setValue(TagValue value)
Sets this tags value.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setAlarmStates
getAlarmStates, getType
protected java.util.Map<TagProp,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 TagValue getValue()
Tag
public void setValue(TagValue value) throws java.lang.ClassCastException
MutableTag
setValue
in interface MutableTag
java.lang.ClassCastException
protected TagValue coerceValue(TagValue 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 TagValue getAttribute(TagProp prop)
Tag
getAttribute
in interface Tag
public void setAttribute(TagProp prop, TagValue value) throws java.lang.ClassCastException
MutableTag
setAttribute
in interface MutableTag
java.lang.ClassCastException
public java.util.Map<TagProp,java.lang.Object> getRawAttributes()
public void setRawAttributes(java.util.Map<TagProp,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)
MutableTag
setPermissionModel
in interface MutableTag
public TagEventScripts getEventScripts()
getEventScripts
in interface Tag
public void setEventScripts(TagEventScripts scripts)
setEventScripts
in interface MutableTag
public boolean isAlarmingSupported()
Tag
isAlarmingSupported
in interface Tag
public int compareTo(Tag that)
compareTo
in interface java.lang.Comparable<Tag>
public static boolean isValidName(java.lang.String name)
public static java.lang.String sanitizeName(java.lang.String name) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static void main(java.lang.String[] agrs)