public interface PoiPersistenceManager
PointOfInterest
objects in named Storage/DB.
Remember to call the close()
method as soon as you are done manipulating the Storage/DB
via this PoiPersistenceManager
.Modifier and Type | Method and Description |
---|---|
void |
close()
Use this to free claimed resources.
|
java.util.Collection<PointOfInterest> |
findInRect(org.mapsforge.core.model.BoundingBox bb,
PoiCategoryFilter filter,
java.util.List<org.mapsforge.core.model.Tag> patterns,
int limit)
Find all
PointOfInterest in a rectangle specified by the given BoundingBox . |
java.util.Collection<PointOfInterest> |
findNearPosition(org.mapsforge.core.model.LatLong point,
int distance,
PoiCategoryFilter filter,
java.util.List<org.mapsforge.core.model.Tag> patterns,
int limit)
Fetch
PointOfInterest from underlying storage near a given position. |
PointOfInterest |
findPointByID(long poiID) |
PoiCategoryManager |
getCategoryManager() |
java.lang.String |
getPoiFile() |
PoiFileInfo |
getPoiFileInfo() |
void |
insertPointOfInterest(PointOfInterest poi)
Inserts a single
PointOfInterest into storage. |
void |
insertPointsOfInterest(java.util.Collection<PointOfInterest> pois)
Inserts
PointOfInterest into storage. |
boolean |
isClosed() |
boolean |
isValidDataBase() |
void |
readPoiFileInfo()
Reads the metadata for the current POI file.
|
void |
removePointOfInterest(PointOfInterest poi)
Removes a point of interest from storage.
|
void |
setCategoryManager(PoiCategoryManager categoryManager)
Sets this manager's
PoiCategoryManager for retrieving and editing POI categories. |
void close()
java.util.Collection<PointOfInterest> findInRect(org.mapsforge.core.model.BoundingBox bb, PoiCategoryFilter filter, java.util.List<org.mapsforge.core.model.Tag> patterns, int limit)
PointOfInterest
in a rectangle specified by the given BoundingBox
.
Only the POIs that are allowed by the PoiCategoryFilter
object and matching the data
pattern will be returned.bb
- BoundingBox
specifying the rectangle.filter
- POI category filter object that helps determining whether a POI should be added to
the set or not (may be null).patterns
- the patterns to search in points of interest data (may be null).limit
- max number of PointOfInterest
to be returned.Collection
of PointOfInterest
matching a given
PoiCategoryFilter
and data pattern contained in the rectangle specified by
the given BoundingBox
.java.util.Collection<PointOfInterest> findNearPosition(org.mapsforge.core.model.LatLong point, int distance, PoiCategoryFilter filter, java.util.List<org.mapsforge.core.model.Tag> patterns, int limit)
PointOfInterest
from underlying storage near a given position.
Only the POIs that are allowed by the PoiCategoryFilter
object and matching the data
pattern will be returned.point
- LatLong
center of the search.distance
- in metersfilter
- POI category filter object that helps determining whether a POI should be added to
the set or not (may be null).patterns
- the patterns to search in points of interest data (may be null).limit
- max number of PointOfInterest
to be returned.Collection
of PointOfInterest
matching a given
PoiCategoryFilter
and data pattern near the given position.PointOfInterest findPointByID(long poiID)
poiID
- the id of the point of interest that shall be returned.PointOfInterest
p where p.id == poiID.PoiCategoryManager getCategoryManager()
java.lang.String getPoiFile()
PoiFileInfo getPoiFileInfo()
void insertPointOfInterest(PointOfInterest poi)
PointOfInterest
into storage.poi
- PointOfInterest
to insert into storage.void insertPointsOfInterest(java.util.Collection<PointOfInterest> pois)
PointOfInterest
into storage.pois
- collection of PointOfInterest
to insert into storage.boolean isClosed()
boolean isValidDataBase()
void readPoiFileInfo()
void removePointOfInterest(PointOfInterest poi)
poi
- the PointOfInterest
to be removed.void setCategoryManager(PoiCategoryManager categoryManager)
PoiCategoryManager
for retrieving and editing POI categories.categoryManager
- The category manager to be set.