org.hops.common
Class RecognitionObject

java.lang.Object
  extended by org.hops.common.RecognitionObject
All Implemented Interfaces:
java.io.Serializable

public class RecognitionObject
extends java.lang.Object
implements java.io.Serializable

Author:
alopez
See Also:
Serialized Form

Constructor Summary
RecognitionObject()
          Creates a new instance of RecognitionObject
 
Method Summary
 HopsAttribute addAttribute(HopsAttribute attribute)
          Adds an attribute to the RecognitionObject If the key exists, then replaces the old attribute with the new one.
 void addAttribute(HopsAttribute[] attributes)
          Adds a list of attributes to the RecognitionObject
 void clear()
          Clear the RecognitionObject
 HopsAttribute[] getAllAttributes()
          Returns all the attributes recognized
 HopsAttribute getAttribute(java.lang.String key)
          Returns an attribute recognized
 java.util.Collection getAttributes()
          Returns all the attributes stored
 int getFrom()
          Gets the from of the current pagination.
 java.util.Set getKeys()
          Returns all the keys of the attributes stored
 int getLength()
          Gets the length of the current pagination.
 org.apache.log4j.Logger getLogger()
          Gets the logger
 int getRemaining()
          Gets the remaining of the current pagination.
 int getTotal()
          Gets the total of the current pagination.
 void remove(java.lang.String key)
          Remove the attribute
 void setFrom(int from)
          Sets the from of the current pagination (called by the OM).
 void setTotal(int total)
          Sets the total of the current pagination (called by the OM)
 int size()
          Gets the size of the attributes stored in the RecognitionObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecognitionObject

public RecognitionObject()
Creates a new instance of RecognitionObject

Method Detail

addAttribute

public HopsAttribute addAttribute(HopsAttribute attribute)
Adds an attribute to the RecognitionObject If the key exists, then replaces the old attribute with the new one. If not, this is added to the structure.

Parameters:
attribute - The attribute to add
Returns:
Previous value associated with specified key of the attribute, or null if there was no mapping for key.

addAttribute

public void addAttribute(HopsAttribute[] attributes)
Adds a list of attributes to the RecognitionObject

Parameters:
attributes - List of attributes to add

getAttribute

public HopsAttribute getAttribute(java.lang.String key)
Returns an attribute recognized

Parameters:
key - The key of the attribue
Returns:
The attribute that corresponds with the name

getAllAttributes

public HopsAttribute[] getAllAttributes()
Returns all the attributes recognized

Returns:
The list of attributes recognized

getKeys

public java.util.Set getKeys()
Returns all the keys of the attributes stored

Returns:
All the keys stored

getAttributes

public java.util.Collection getAttributes()
Returns all the attributes stored

Returns:
All the attributes stored as Collection data structure

remove

public void remove(java.lang.String key)
Remove the attribute

Parameters:
key - the attribute name

clear

public void clear()
Clear the RecognitionObject


size

public int size()
Gets the size of the attributes stored in the RecognitionObject


getLogger

public org.apache.log4j.Logger getLogger()
Gets the logger


setTotal

public void setTotal(int total)
Sets the total of the current pagination (called by the OM)


getTotal

public int getTotal()
Gets the total of the current pagination.


setFrom

public void setFrom(int from)
Sets the from of the current pagination (called by the OM).


getFrom

public int getFrom()
Gets the from of the current pagination.


getRemaining

public int getRemaining()
Gets the remaining of the current pagination.


getLength

public int getLength()
Gets the length of the current pagination.