|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.placelab.mapper.AbstractMapper
Provides convenience methods for packing and unpacking Beacons in a Mapper, for caching Beacons in memory when they are used, and for storing Beacons of multiple types. Only Mapper implementers should be concerned with this class.
| Field Summary | |
static java.lang.Class |
UNKNOWN_BEACON_CLASS
|
| Constructor Summary | |
AbstractMapper(boolean shouldCache)
|
|
| Method Summary | |
void |
addBeaconClass(Beacon beacon)
|
void |
addBeaconClass(java.lang.String type,
java.lang.String className)
|
Beacon |
createBeacon(java.lang.String storageString)
Implementation dependent method to unpack a Beacon from the Mapper |
Beacon |
findBeacon(java.lang.String id)
Returns the first Beacon found that has a matching id, or null if no Beacon is returned. |
java.util.Vector |
findBeacons(java.lang.String id)
Find all Beacons in the Mapper that match the given id. |
protected abstract java.util.Vector |
findBeaconsImpl(java.lang.String id)
|
protected java.util.Vector |
getBeaconsFromStorageString(java.lang.String storage)
Unpacks a Vector of Beacons using Mapper.createBeacon(String)
stored separated by newlines. |
boolean |
overrideOnPut()
|
boolean |
putBeacon(java.lang.String id,
Beacon beacon)
Load a new single Beacon into the Mapper |
boolean |
putBeacons(java.lang.String id,
java.util.Vector beacons)
Put a Vector of Beacons for one unique id into the Mapper |
protected abstract boolean |
putBeaconsImpl(java.lang.String id,
java.util.Vector beacons)
|
abstract java.util.Enumeration |
query(Coordinate c1,
Coordinate c2)
c1 and c2 define opposing corners of a rectangular area in which you wish to get an Iterator over all Beacons in that area. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.placelab.mapper.Mapper |
close, deleteAll, endBulkPuts, isOpened, open, startBulkPuts |
| Field Detail |
public static java.lang.Class UNKNOWN_BEACON_CLASS
| Constructor Detail |
public AbstractMapper(boolean shouldCache)
| Method Detail |
public void addBeaconClass(java.lang.String type,
java.lang.String className)
public void addBeaconClass(Beacon beacon)
public Beacon findBeacon(java.lang.String id)
Mapper
findBeacon in interface Mapperid - the unique identifier for the Beaconpublic java.util.Vector findBeacons(java.lang.String id)
Mapper
findBeacons in interface Mapperid - the unique identifier for the Beacon
public boolean putBeacon(java.lang.String id,
Beacon beacon)
Mapper
putBeacon in interface Mapperid - the unique id for the Beaconbeacon - a new Beacon to be put into the Mapper
public boolean putBeacons(java.lang.String id,
java.util.Vector beacons)
Mapper
putBeacons in interface Mapperid - the unique id to key the Beacons tobeacons - the Beacons to add
public Beacon createBeacon(java.lang.String storageString)
Mapper
createBeacon in interface Mapperprotected java.util.Vector getBeaconsFromStorageString(java.lang.String storage)
Mapper.createBeacon(String)
stored separated by newlines.
public abstract java.util.Enumeration query(Coordinate c1,
Coordinate c2)
Mapper
query in interface Mapperprotected abstract java.util.Vector findBeaconsImpl(java.lang.String id)
protected abstract boolean putBeaconsImpl(java.lang.String id,
java.util.Vector beacons)
public boolean overrideOnPut()
overrideOnPut in interface Mapper
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||