ist.palcom.services.proximity
Class NFCModule

java.lang.Object
  extended by ist.palcom.services.proximity.NFCModule

public class NFCModule
extends java.lang.Object

NFCModule is a virtual NFC-device which implement the same interface as the ProximityService. The function updateNFCdata() needs to be changed depending on the NFC hardware being used.


Constructor Summary
NFCModule()
           
 
Method Summary
 java.lang.String allProximityHistory()
          This method returns a list of all objects currently in proximity.
 java.lang.String isCloseToObject(java.lang.String objectID)
          This method tells wether a specified object is in proximity or not.
 java.lang.String listCloseObjects()
          This method returns a list of all objects currently in proximity.
 java.lang.String objectProximityHistory(java.lang.String objectID)
          This method returns a list of all objects currently in proximity.
 void recordHistory(boolean status)
          Tells NFCModule wether to record timestamps on all objects or not.
 void recordObjectHistory(java.lang.String objectID, boolean status)
          Tells NFCModule wether to record timestamps on the object specified or not.
 void updateNFCdata()
          This function is responsible for updating the NFCDeviceInfo array with real data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NFCModule

public NFCModule()
Method Detail

isCloseToObject

public java.lang.String isCloseToObject(java.lang.String objectID)
This method tells wether a specified object is in proximity or not.

Parameters:
objectID - textstring identifying the object of interest
Returns:
textstring containing either "True" or "False"

listCloseObjects

public java.lang.String listCloseObjects()
This method returns a list of all objects currently in proximity. The XML string is built upp like this:
 <objects_in_proximity>
    <object id"objectID" inproximity="true | false" recstatus="true|false">
    ...
    </objects_in_proximity>
 
One object element is listed for each object currently in proximity. objectID is preferably the same as the deviceID of the Palcom or non Palcom nodes.

Returns:
A XML string representing all object currently in proximity

allProximityHistory

public java.lang.String allProximityHistory()
This method returns a list of all objects currently in proximity. The XML string is built upp like this:
 <object_history>
    <object id"objectID" inproximity="true | false" recstatus="true|false"/>
       <timestamp>time-and-date-text-string</timestamp>
       ...
    </object>
    ...
 </object_history>
 
There is one object element for each object that has been in proximity and one timestamp element for each time one of the objects was in proximity.

Returns:
A XML string representing all objects proximity history

objectProximityHistory

public java.lang.String objectProximityHistory(java.lang.String objectID)
This method returns a list of all objects currently in proximity. The XML string is built upp like this:
 <object_history/>
    <object id"objectID" inproximity="true | false" recstatus="true|false"/>
       <timestamp>time-and-date-text-string</timestamp/>
       ...
    </object>
 </object_history/>
 
Same as allProximityHistory() but with only one object element.

Parameters:
objectID - textstring identifying the object of interest
Returns:
A XML string representing the specified object's proximity history

recordObjectHistory

public void recordObjectHistory(java.lang.String objectID,
                                boolean status)
Tells NFCModule wether to record timestamps on the object specified or not.

Parameters:
objectID - textstring identifying the object of interest
status - textstring specifying wether to record or not. Can be "True" or "False". The method treats the parameter as case insensitive.

recordHistory

public void recordHistory(boolean status)
Tells NFCModule wether to record timestamps on all objects or not.

Parameters:
status - textstring specifying wether to record or not. Can be "True" or "False". The method treats the parameter as case insensitive.

updateNFCdata

public void updateNFCdata()
This function is responsible for updating the NFCDeviceInfo array with real data. Read the internal comments in the method definition for further guidance.