org.fosstrak.hal
Class Observation

java.lang.Object
  extended by org.fosstrak.hal.Observation

public class Observation
extends java.lang.Object

The Observation class provides a set of methods and fields that represent a result of an identification process. Every Observation object is uniquely defined by its timestamp, which specifies when a certain observation has been made.

Every Observation is associated to a read point. Thereby the term read point refers to a reader's antenna.

Author:
Matthias Lampe, lampe@acm.org, Christian Floerkemeier, floerkem@mit.edu

Field Summary
 boolean successful
          Flag the indicates whether the identify operation has been performed successfully or not.
 
Constructor Summary
Observation()
          creates an empty Observation.
Observation(java.lang.String halName, java.lang.String readPointName, long timestamp, java.lang.String[] ids, TagDescriptor[] tagDescriptors, boolean successful)
          creates an Observation with the given parameters.
 
Method Summary
 boolean containsId(java.lang.String id)
          Checks if the observation contains a specific ID.
 java.lang.String getHalName()
          Returns the name of the HAL.
 java.lang.String[] getIds()
          Gets the identified tags.
 java.lang.String getReadPointName()
          Gets the name of the read point involved in the identification.
 boolean getSuccessful()
          gets the successful flag.
 TagDescriptor[] getTagDescriptors()
          Gets the tag descriptor of the detected tags.
 long getTimestamp()
          Gets the timestamp.
 void setHalName(java.lang.String halName)
          Sets the HAL controller instance name.
 void setIds(java.lang.String[] ids)
          Sets the IDs of the identified tags.
 void setReadPointName(java.lang.String readPointName)
          Sets the name of the read point involved in the identification.
 void setSuccessful(boolean successful)
          sets the successful flag.
 void setTagDescriptors(TagDescriptor[] tagDescriptors)
          Sets The tag descriptors of the detected tags.
 void setTimestamp(long timestamp)
          Sets The timestamp.
 java.lang.String toString()
          Returns a String containing all the observation information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

successful

public boolean successful
Flag the indicates whether the identify operation has been performed successfully or not.

Constructor Detail

Observation

public Observation()
creates an empty Observation.


Observation

public Observation(java.lang.String halName,
                   java.lang.String readPointName,
                   long timestamp,
                   java.lang.String[] ids,
                   TagDescriptor[] tagDescriptors,
                   boolean successful)
creates an Observation with the given parameters.

Method Detail

getHalName

public java.lang.String getHalName()
Returns the name of the HAL.

Returns:
The name of the HAL

setHalName

public void setHalName(java.lang.String halName)
Sets the HAL controller instance name.

Parameters:
halName - the HAL controller instance name to set

getReadPointName

public java.lang.String getReadPointName()
Gets the name of the read point involved in the identification.

Returns:
The name of the read point

setReadPointName

public void setReadPointName(java.lang.String readPointName)
Sets the name of the read point involved in the identification.

Parameters:
readPointName - The name of read point to set

getTimestamp

public long getTimestamp()
Gets the timestamp.

Returns:
The timestamp

setTimestamp

public void setTimestamp(long timestamp)
Sets The timestamp.

Parameters:
timestamp - The timestamp

getIds

public java.lang.String[] getIds()
Gets the identified tags.

Returns:
The tag IDs

setIds

public void setIds(java.lang.String[] ids)
Sets the IDs of the identified tags.

Parameters:
ids - the tag IDs

getTagDescriptors

public TagDescriptor[] getTagDescriptors()
Gets the tag descriptor of the detected tags.

Returns:
The tag descriptors of the detected tags

setTagDescriptors

public void setTagDescriptors(TagDescriptor[] tagDescriptors)
Sets The tag descriptors of the detected tags.

Parameters:
tagDescriptors - the tag descriptord of the detected tags

getSuccessful

public boolean getSuccessful()
gets the successful flag.


setSuccessful

public void setSuccessful(boolean successful)
sets the successful flag.


containsId

public boolean containsId(java.lang.String id)
Checks if the observation contains a specific ID.

Parameters:
id - the
Returns:
true it the ID has been found, false otherwise

toString

public java.lang.String toString()
Returns a String containing all the observation information.

Overrides:
toString in class java.lang.Object
Returns:
The observation as string


Copyright © 2008. All Rights Reserved.