hmi.sensors.eyebox2.directaccess
Class Face

java.lang.Object
  extended by hmi.xml.XMLStructureAdapter
      extended by hmi.sensors.eyebox2.directaccess.Face
All Implemented Interfaces:
XMLStructure

public class Face
extends XMLStructureAdapter

Stores the information about a detected face. This information includes the id of the face, its position and the latest time it was detected.

Author:
Mark ter Maat

Field Summary
(package private) static String BMLTNAMESPACE
           
private  int id
           
private  Position position
           
private  String time
           
private static String XMLTAG
           
 
Fields inherited from class hmi.xml.XMLStructureAdapter
ATTRIBUTE_TOKEN_DELIMITERS, COMMA_SEPARATOR, DECODEDARRAYSIZE, DEFAULT_RECOVER_MODE, NEWLINE, SYSTEMNEWLINE, TAB, TAB_STRING
 
Constructor Summary
Face()
           
Face(int id, Position position, String time)
          Creates a new instance of Face with the given id, position and time.
Face(int id, String time)
          Creates a new instance of Face with the given ID and the given time.
 
Method Summary
 StringBuilder appendAttributes(StringBuilder buf)
           
 void decodeAttributes(HashMap<String,String> attrMap, XMLTokenizer tokenizer)
          decodes all attributes.
 int getId()
           
 String getNamespace()
          Returns the (full, unabbreviated) namespace string for this XMLStructure Class
 Position getPosition()
           
 String getTime()
           
 String getXMLTag()
          The XML Stag for XML encoding -- use this method to find out the run-time xml tag of an object
 void setPosition(Position position)
           
static String xmlTag()
          The XML Stag for XML encoding -- use this static method when you want to see if a given String equals the xml tag for this class
 
Methods inherited from class hmi.xml.XMLStructureAdapter
appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttributes, appendAttributeString, appendAttributeString, appendBooleans, appendCloseEmptyTag, appendCloseSTag, appendComment, appendContent, appendContent, appendDoubleElement, appendEmptyTag, appendEmptyTag, appendEmptyTag, appendEmptyTag, appendEmptyTag, appendEmptyTag, appendETag, appendETag, appendFloatArrayElement, appendFloatElement, appendFloats, appendIntArrayElement, appendIntElement, appendInts, appendLongElement, appendNewLine, appendNewLine, appendNewLine, appendOpenSTag, appendOptionalDoubleElement, appendOptionalFloatElement, appendOptionalIntElement, appendOptionalLongElement, appendSpaces, appendSpaces, appendSTag, appendSTag, appendSTag, appendStringArrayElement, appendStrings, appendSystemNewLine, appendTab, appendTextElement, appendXML, appendXML, appendXML, appendXML, appendXML, appendXMLStructure, appendXMLStructureList, appendXMLTextElementList, countTokens, countTokens, decodeAttribute, decodeAttribute, decodeBoolean, decodeBooleanArray, decodeBooleanArray, decodeBooleanArray, decodeBooleanArray, decodeContent, decodeDouble, decodeDoubleArray, decodeDoubleArray, decodeDoubleArray, decodeDoubleArray, decodeFloat, decodeFloatArray, decodeFloatArray, decodeFloatArray, decodeFloatArray, decodeInt, decodeIntArray, decodeIntArray, decodeIntArray, decodeIntArray, decodeLong, decodeStringArray, decodeStringArray, decodeStringArray, decodeStringArray, decodeXMLStructureList, decodeXMLValueElement, getOptionalAttribute, getOptionalAttribute, getOptionalBooleanAttribute, getOptionalDoubleAttribute, getOptionalFloatAttribute, getOptionalIntAttribute, getOptionalLongAttribute, getRequiredAttribute, getRequiredBooleanAttribute, getRequiredDoubleAttribute, getRequiredFloatAttribute, getRequiredIntAttribute, getRequiredLongAttribute, getTagLine, hasContent, parseXMLElement, postProcess, preProcess, readXML, readXML, readXML, setConsoleAttributeEnabled, setDefaultRecoverMode, setRecoverMode, spaces, toString, toXMLString, toXMLString, toXMLString, toXMLString, toXMLString, toXMLString, writeXML, writeXML, writeXML, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

private int id

position

private Position position

time

private String time

XMLTAG

private static final String XMLTAG
See Also:
Constant Field Values

BMLTNAMESPACE

static final String BMLTNAMESPACE
See Also:
Constant Field Values
Constructor Detail

Face

public Face()

Face

public Face(int id,
            String time)
Creates a new instance of Face with the given ID and the given time.

Parameters:
id - the id of this face
time - the time when this face was detected

Face

public Face(int id,
            Position position,
            String time)
Creates a new instance of Face with the given id, position and time.

Parameters:
id - the id of this face
position - the position of of the detected face
time - the time when this face was detected
Method Detail

getPosition

public Position getPosition()
Returns:
the position

setPosition

public void setPosition(Position position)
Parameters:
position - the position to set

getId

public int getId()
Returns:
the id

getTime

public String getTime()
Returns:
the latestTime

appendAttributes

public StringBuilder appendAttributes(StringBuilder buf)
Overrides:
appendAttributes in class XMLStructureAdapter

decodeAttributes

public void decodeAttributes(HashMap<String,String> attrMap,
                             XMLTokenizer tokenizer)
Description copied from class: XMLStructureAdapter
decodes all attributes. The default implementation calls decodeAttribute for every attribute in turn. The decodeAttributes method can be reimplemented when attributes must be processed in some particular order.

Overrides:
decodeAttributes in class XMLStructureAdapter

xmlTag

public static String xmlTag()
The XML Stag for XML encoding -- use this static method when you want to see if a given String equals the xml tag for this class


getXMLTag

public String getXMLTag()
The XML Stag for XML encoding -- use this method to find out the run-time xml tag of an object

Specified by:
getXMLTag in interface XMLStructure
Overrides:
getXMLTag in class XMLStructureAdapter

getNamespace

public String getNamespace()
Description copied from class: XMLStructureAdapter
Returns the (full, unabbreviated) namespace string for this XMLStructure Class

Overrides:
getNamespace in class XMLStructureAdapter