com.ibm.sensorevent.model.payload
Class Tag

java.lang.Object
  extended by com.ibm.sensorevent.model.generic.GenericGroup
      extended by com.ibm.sensorevent.model.Group
          extended by com.ibm.sensorevent.model.payload.Tag
All Implemented Interfaces:
IGenericGroup, IGroup, ITag, java.io.Serializable
Direct Known Subclasses:
EPCTag

public class Tag
extends Group
implements ITag

Tag represents a tag processed by Premises Server.

Tags may contain metadata in the form of String key/value pairs.

The interface associated with this class is ITag.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
           
 
Fields inherited from class com.ibm.sensorevent.model.generic.GenericGroup
attributes, groups, name
 
Fields inherited from interface com.ibm.sensorevent.model.payload.ITag
TAG, TAGID, TAGUSERDATA
 
Constructor Summary
protected Tag()
          Constructs a Tag group with a default name
protected Tag(java.lang.String name)
          Construts a Tag group with the specified name
 
Method Summary
 void addTagUserData(java.lang.String name, java.lang.String value)
          Add the name/value pair to the tag metadata
static IGenericGroup getInstance()
          Factory method to create a Tag with a default name
static IGenericGroup getInstance(Group group)
          Factory method to create a Tag from the specified group
static IGenericGroup getInstance(java.lang.String newname)
          Factory method to create a Tag with the specified name
 java.lang.String getTagID()
          Returns the tag ID attribute value
 java.lang.String getTagID(java.lang.String name)
          Returns the value of the specified attribute name
 java.lang.String getTagUserData(java.lang.String name)
          Returns the value of tag metadata with the specified name
 java.util.Map getTagUserDataMap()
          Returns all tag metadata as a java.util.Map
 void setTagID(java.lang.String value)
          Sets the tag ID attribute value
 void setTagID(java.lang.String id, java.lang.String value)
          Sets the String attribute to the specified id and value
 
Methods inherited from class com.ibm.sensorevent.model.Group
fromMap, fromTypedMap, processGroup, processMap, processTypedGroup, processTypedMap, toMap, toTypedMap
 
Methods inherited from class com.ibm.sensorevent.model.generic.GenericGroup
addAttribute, addAttributeArray, addBooleanArrayAttribute, addBooleanAttribute, addByteArrayAttribute, addByteAttribute, addDateArrayAttribute, addDateArrayAttributeAsLong, addDateAttribute, addDateAttributeAsLong, addDoubleArrayAttribute, addDoubleAttribute, addFloatArrayAttribute, addFloatAttribute, addGroup, addHexAttribute, addHexAttribute, addIntArrayAttribute, addIntAttribute, addLongArrayAttribute, addLongAttribute, addShortArrayAttribute, addShortAttribute, addStringArrayAttribute, addStringAttribute, createGroupPath, getAttribute, getAttributes, getAttributesAsList, getBooleanAttributeArrayValue, getBooleanAttributeValue, getByteAttributeArrayValue, getByteAttributeValue, getDateAttributeArrayValue, getDateAttributeArrayValueAsLong, getDateAttributeValue, getDateAttributeValueAsLong, getDoubleAttributeArrayValue, getDoubleAttributeValue, getFloatAttributeArrayValue, getFloatAttributeValue, getGroup, getGroups, getGroupsAsList, getHexAttributeValue, getHexAttributeValueAsString, getIntAttributeArrayValue, getIntAttributeValue, getLongAttributeArrayValue, getLongAttributeValue, getName, getShortAttributeArrayValue, getShortAttributeValue, getStringAttributeArrayValue, getStringAttributeValue, removeAttributes, removeGroups, setAttributes, setGroups, setName, toString, traverseGroupPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.sensorevent.model.IGroup
toMap, toTypedMap
 
Methods inherited from interface com.ibm.sensorevent.model.generic.IGenericGroup
addAttribute, addAttributeArray, addBooleanArrayAttribute, addBooleanAttribute, addByteArrayAttribute, addByteAttribute, addDateArrayAttribute, addDateArrayAttributeAsLong, addDateAttribute, addDateAttributeAsLong, addDoubleArrayAttribute, addDoubleAttribute, addFloatArrayAttribute, addFloatAttribute, addGroup, addHexAttribute, addHexAttribute, addIntArrayAttribute, addIntAttribute, addLongArrayAttribute, addLongAttribute, addShortArrayAttribute, addShortAttribute, addStringArrayAttribute, addStringAttribute, createGroupPath, getAttribute, getAttributes, getAttributesAsList, getBooleanAttributeArrayValue, getBooleanAttributeValue, getByteAttributeArrayValue, getByteAttributeValue, getDateAttributeArrayValue, getDateAttributeArrayValueAsLong, getDateAttributeValue, getDateAttributeValueAsLong, getDoubleAttributeArrayValue, getDoubleAttributeValue, getFloatAttributeArrayValue, getFloatAttributeValue, getGroup, getGroups, getGroupsAsList, getHexAttributeValue, getHexAttributeValueAsString, getIntAttributeArrayValue, getIntAttributeValue, getLongAttributeArrayValue, getLongAttributeValue, getName, getShortAttributeArrayValue, getShortAttributeValue, getStringAttributeArrayValue, getStringAttributeValue, removeAttributes, removeGroups, setAttributes, setGroups, setName, traverseGroupPath
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Constructor Detail

Tag

protected Tag()
       throws SensorEventException
Constructs a Tag group with a default name

Throws:
SensorEventException

Tag

protected Tag(java.lang.String name)
       throws SensorEventException
Construts a Tag group with the specified name

Parameters:
name - the TagRead groups name
Throws:
SensorEventException
Method Detail

getInstance

public static IGenericGroup getInstance()
                                 throws SensorEventException
Factory method to create a Tag with a default name

Throws:
SensorEventException

getInstance

public static IGenericGroup getInstance(java.lang.String newname)
                                 throws SensorEventException
Factory method to create a Tag with the specified name

Parameters:
newname - the TagRead groups name
Throws:
SensorEventException

getInstance

public static IGenericGroup getInstance(Group group)
                                 throws SensorEventException
Factory method to create a Tag from the specified group

Parameters:
group - the group to copy from
Throws:
SensorEventException

getTagID

public java.lang.String getTagID()
                          throws SensorEventException
Returns the tag ID attribute value

Specified by:
getTagID in interface ITag
Throws:
SensorEventException

setTagID

public void setTagID(java.lang.String value)
              throws SensorEventException
Sets the tag ID attribute value

Specified by:
setTagID in interface ITag
Throws:
SensorEventException

getTagID

public java.lang.String getTagID(java.lang.String name)
                          throws SensorEventException
Returns the value of the specified attribute name

Specified by:
getTagID in interface ITag
Parameters:
name - the name of the attribute
Throws:
SensorEventException

setTagID

public void setTagID(java.lang.String id,
                     java.lang.String value)
              throws SensorEventException
Sets the String attribute to the specified id and value

Specified by:
setTagID in interface ITag
Parameters:
id - the name of the attribute
value - the value of the atribute
Throws:
SensorEventException

addTagUserData

public void addTagUserData(java.lang.String name,
                           java.lang.String value)
                    throws SensorEventException
Add the name/value pair to the tag metadata

Specified by:
addTagUserData in interface ITag
Throws:
SensorEventException

getTagUserData

public java.lang.String getTagUserData(java.lang.String name)
                                throws SensorEventException
Returns the value of tag metadata with the specified name

Specified by:
getTagUserData in interface ITag
Parameters:
name - the name of the tag metadata
Throws:
SensorEventException

getTagUserDataMap

public java.util.Map getTagUserDataMap()
                                throws SensorEventException
Returns all tag metadata as a java.util.Map

Throws:
SensorEventException


Copyright © 2005 - 2009 IBM Corp. All Rights Reserved.