com.ibm.sensorevent.model
Class Group

java.lang.Object
  extended by com.ibm.sensorevent.model.generic.GenericGroup
      extended by com.ibm.sensorevent.model.Group
All Implemented Interfaces:
IGenericGroup, IGroup, java.io.Serializable
Direct Known Subclasses:
Header, Payload, PayloadMetaData, Tag, TagRead

public class Group
extends GenericGroup
implements IGroup

Group represents a GenericGroup in the IBM sensor event model. Group adds function to GenericGroup that is specific to the IBM sensor event model.

The interface associated with this class is IGroup.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
           
 
Fields inherited from class com.ibm.sensorevent.model.generic.GenericGroup
attributes, groups, name
 
Constructor Summary
protected Group()
          Constructs a Group
protected Group(java.lang.String name)
          Constructs a Group with the specified name
 
Method Summary
static IGenericGroup fromMap(java.util.Map map)
          Converts a java.util.Map to an IGenericGroup.
static IGenericGroup fromTypedMap(java.util.Map map)
          Converts a java.util.Map to an IGenericGroup.
static IGenericGroup getInstance()
          Factory method to create a Group
static IGenericGroup getInstance(java.lang.String name)
          Factory method to create a Group with the specified name
protected  void processGroup(java.util.Map map, IGenericGroup group)
           
protected static void processMap(IGroup group, java.util.Map map)
           
protected  void processTypedGroup(java.util.Map map, IGenericGroup group)
           
protected static void processTypedMap(IGroup group, java.util.Map map)
           
 java.util.Map toMap()
          Converts all values in the group to a java.util.Map of strings
 java.util.Map toTypedMap()
          Converts all values in the group to a java.util.Map; the values' data types are preserved
 
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.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

Group

protected Group()
         throws SensorEventException
Constructs a Group

Throws:
SensorEventException

Group

protected Group(java.lang.String name)
         throws SensorEventException
Constructs a Group with the specified name

Parameters:
name - the name of the Group
Throws:
SensorEventException
Method Detail

getInstance

public static IGenericGroup getInstance()
                                 throws SensorEventException
Factory method to create a Group

Throws:
SensorEventException

getInstance

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

Parameters:
name - the name of the Group
Throws:
SensorEventException

fromMap

public static IGenericGroup fromMap(java.util.Map map)
                             throws SensorEventException
Converts a java.util.Map to an IGenericGroup. Assumes that all values are strings.

Parameters:
map - the java.util.Map to convert
Throws:
SensorEventException

fromTypedMap

public static IGenericGroup fromTypedMap(java.util.Map map)
                                  throws SensorEventException
Converts a java.util.Map to an IGenericGroup. Values' data types are preserved in the map.

Parameters:
map - the java.util.Map to convert
Throws:
SensorEventException

toMap

public java.util.Map toMap()
                    throws SensorEventException
Converts all values in the group to a java.util.Map of strings

Specified by:
toMap in interface IGroup
Throws:
SensorEventException

toTypedMap

public java.util.Map toTypedMap()
                         throws SensorEventException
Converts all values in the group to a java.util.Map; the values' data types are preserved

Specified by:
toTypedMap in interface IGroup
Throws:
SensorEventException

processTypedGroup

protected void processTypedGroup(java.util.Map map,
                                 IGenericGroup group)
                          throws SensorEventException
Throws:
SensorEventException

processGroup

protected void processGroup(java.util.Map map,
                            IGenericGroup group)
                     throws SensorEventException
Throws:
SensorEventException

processTypedMap

protected static void processTypedMap(IGroup group,
                                      java.util.Map map)
                               throws SensorEventException
Throws:
SensorEventException

processMap

protected static void processMap(IGroup group,
                                 java.util.Map map)
                          throws SensorEventException
Throws:
SensorEventException


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