org.placelab.mapper
Class BluetoothBeacon

java.lang.Object
  extended byorg.placelab.mapper.Beacon
      extended byorg.placelab.mapper.BluetoothBeacon
All Implemented Interfaces:
NeighborhoodBeacon

public class BluetoothBeacon
extends Beacon
implements NeighborhoodBeacon


Constructor Summary
BluetoothBeacon()
           
 
Method Summary
 void fromHashMap(java.util.Hashtable keyValues)
          Loads the Beacon from a HashMap where values are keyed by the appropriate fields for the Beacon type in Types
 java.lang.String getBluetoothAddress()
           
 java.lang.String getHumanReadableName()
           
 java.lang.String getId()
          Returns the bluetooth address (in general, should be a unique ID)
 int getMaximumRange()
          Gets a sensible maximum range, further than which the Beacon won't be detectable
 java.lang.String[] getNeighborhood()
          Gets an array of unique ids for the neighboring Beacons seen in the same scan as this Beacon.
 Coordinate getPosition()
          Gets the position for where this Beacon resides in the world
 java.lang.String getType()
          Gets the type of this Beacon as a String.
 void setBluetoothAddress(java.lang.String bluetoothAddress)
           
 void setHumanReadableName(java.lang.String humanReadableName)
           
 void setNeighborhood(java.lang.String[] nbrs)
          Sets the array of unique ids for the neighboring Beacons seen in the same scan as this Beacon.
 void setPosition(Coordinate position)
           
 java.util.Hashtable toHashMap()
          Stores the Beacon into a HashMap where values are keyed by the appropriate fields for the Beacon type in Types
 
Methods inherited from class org.placelab.mapper.Beacon
create, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BluetoothBeacon

public BluetoothBeacon()
Method Detail

fromHashMap

public void fromHashMap(java.util.Hashtable keyValues)
Description copied from class: Beacon
Loads the Beacon from a HashMap where values are keyed by the appropriate fields for the Beacon type in Types

Specified by:
fromHashMap in class Beacon

toHashMap

public java.util.Hashtable toHashMap()
Description copied from class: Beacon
Stores the Beacon into a HashMap where values are keyed by the appropriate fields for the Beacon type in Types

Specified by:
toHashMap in class Beacon

getType

public java.lang.String getType()
Description copied from class: Beacon
Gets the type of this Beacon as a String. Known Beacon types are listed in Types

Specified by:
getType in class Beacon

getBluetoothAddress

public java.lang.String getBluetoothAddress()
Returns:
Returns the bluetoothAddress.

setBluetoothAddress

public void setBluetoothAddress(java.lang.String bluetoothAddress)
Parameters:
bluetoothAddress - The bluetoothAddress to set.

getHumanReadableName

public java.lang.String getHumanReadableName()
Returns:
Returns the humanReadableName.

setHumanReadableName

public void setHumanReadableName(java.lang.String humanReadableName)
Parameters:
humanReadableName - The humanReadableName to set.

getPosition

public Coordinate getPosition()
Description copied from class: Beacon
Gets the position for where this Beacon resides in the world

Specified by:
getPosition in class Beacon
Returns:
Returns the position.

setPosition

public void setPosition(Coordinate position)
Parameters:
position - The position to set.

getId

public java.lang.String getId()
Returns the bluetooth address (in general, should be a unique ID)

Specified by:
getId in class Beacon
See Also:
Beacon.getId()

getNeighborhood

public java.lang.String[] getNeighborhood()
Description copied from interface: NeighborhoodBeacon
Gets an array of unique ids for the neighboring Beacons seen in the same scan as this Beacon. The array does not include the id for this Beacon.

Specified by:
getNeighborhood in interface NeighborhoodBeacon

setNeighborhood

public void setNeighborhood(java.lang.String[] nbrs)
Description copied from interface: NeighborhoodBeacon
Sets the array of unique ids for the neighboring Beacons seen in the same scan as this Beacon. The array does not include the id for this Beacon.

Specified by:
setNeighborhood in interface NeighborhoodBeacon

getMaximumRange

public int getMaximumRange()
Description copied from class: Beacon
Gets a sensible maximum range, further than which the Beacon won't be detectable

Specified by:
getMaximumRange in class Beacon