public class MappedPositionManager extends PositionManager
Modifier and Type | Field and Description |
---|---|
protected java.util.List<MappedPositionListener> |
mappedPositionListeners |
persistedPositions, persistenceManager, positioningStarted, positionListeners, technologies
Constructor and Description |
---|
MappedPositionManager()
Creates a position manager with default file: positionManagerData.xml in the same directory
|
MappedPositionManager(java.io.File file)
Creates a position manager which will persist the data in a given file.
|
MappedPositionManager(PersistenceManager persistenceManager)
Creates a position manager which will persist the data in a given file.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<MappingPoint> |
getMappedPositionMappingPoints()
Delivers all mapped positions.
|
void |
map(MappingPoint mappingPoint)
Maps the current position and persists it in a new thread.
|
protected java.lang.String |
MappingPointToName(MappingPoint MappingPoint)
Converts a point to a formatted string
|
protected MappingPoint |
nameToMappingPoint(java.lang.String name)
Converts a formatted string to point.
|
void |
registerPositionListener(MappedPositionListener mappedPositionListener)
Registers a position listener which will be notified if a position has been calculated and received.
|
void |
removeAllPositionListener()
Removes all position listeners.
|
void |
removeMappedPosition(MappingPoint mappingPoint)
Removes a mapped position in a new thread.
|
void |
removeMappedPosition(MappingPoint mappingPoint,
java.lang.String technology)
Removes mapped technology data of a given position.
|
void |
removePositionListener(MappedPositionListener mappedPositionListener)
Removes a position listener.
|
void |
startPositioning(long interval)
Starts positioning in a new thread with given time interval between position receiving.
|
addTechnology, collectNearestNeighboursTechnologies, getMappedPositions, init, map, match, mergeNearestNeighboursTechnologies, registerPositionListener, removeAllMappedPositions, removeAllTechnologies, removeMappedPosition, removeMappedPosition, removePositionListener, removeTechnology, startPositioning, stopPositioning
protected java.util.List<MappedPositionListener> mappedPositionListeners
public MappedPositionManager() throws PositioningPersistenceException
PositioningPersistenceException
- if the persistence file could not be opened or readpublic MappedPositionManager(PersistenceManager persistenceManager) throws PositioningPersistenceException
persistenceManager
- persistenceManager with defined filePositioningPersistenceException
- if the persistence file could not be opened or readpublic MappedPositionManager(java.io.File file) throws PositioningPersistenceException
file
- persistence filePositioningPersistenceException
- if the persistence file could not be opened or readpublic void registerPositionListener(MappedPositionListener mappedPositionListener)
mappedPositionListener
- position listenerpublic void removePositionListener(MappedPositionListener mappedPositionListener)
mappedPositionListener
- position listenerpublic void removeAllPositionListener()
removeAllPositionListener
in class PositionManager
public void startPositioning(long interval)
startPositioning
in class PositionManager
interval
- time interval in millisecondspublic void map(MappingPoint mappingPoint)
mappingPoint
- current positionpublic void removeMappedPosition(MappingPoint mappingPoint)
mappingPoint
- current positionpublic void removeMappedPosition(MappingPoint mappingPoint, java.lang.String technology)
mappingPoint
- current positiontechnology
- technologypublic java.util.List<MappingPoint> getMappedPositionMappingPoints()
protected MappingPoint nameToMappingPoint(java.lang.String name)
name
- Point-String splitted with | for X, Y and Zprotected java.lang.String MappingPointToName(MappingPoint MappingPoint)
MappingPoint
- point