public abstract class AbstractPoiPersistenceManager extends java.lang.Object implements PoiPersistenceManager
PoiPersistenceManager
interface. This implementation
provides functionality for accessing the SQLite database.Modifier and Type | Field and Description |
---|---|
protected PoiCategoryManager |
categoryManager |
protected PointOfInterest |
poi |
protected java.lang.String |
poiFile |
protected PoiFileInfo |
poiFileInfo |
protected java.util.List<PointOfInterest> |
ret |
Modifier | Constructor and Description |
---|---|
protected |
AbstractPoiPersistenceManager() |
Modifier and Type | Method and Description |
---|---|
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. |
PoiCategoryManager |
getCategoryManager() |
java.lang.String |
getPoiFile() |
PoiFileInfo |
getPoiFileInfo() |
protected static java.lang.String |
getSQLSelectString(PoiCategoryFilter filter,
int count,
int version)
Gets the SQL query that looks up POI entries.
|
void |
setCategoryManager(PoiCategoryManager categoryManager)
Sets this manager's
PoiCategoryManager for retrieving and editing POI categories. |
protected static java.util.Set<org.mapsforge.core.model.Tag> |
stringToTags(java.lang.String data)
Convert tags string representation with '\r' delimiter to collection.
|
protected static java.lang.String |
tagsToString(java.util.Set<org.mapsforge.core.model.Tag> tags)
Convert tags collection to string representation with '\r' delimiter.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, findInRect, findPointByID, insertPointOfInterest, insertPointsOfInterest, isClosed, isValidDataBase, readPoiFileInfo, removePointOfInterest
protected PoiCategoryManager categoryManager
protected java.lang.String poiFile
protected PoiFileInfo poiFileInfo
protected final java.util.List<PointOfInterest> ret
protected PointOfInterest poi
public 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.findNearPosition
in interface PoiPersistenceManager
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.public PoiCategoryManager getCategoryManager()
getCategoryManager
in interface PoiPersistenceManager
public java.lang.String getPoiFile()
getPoiFile
in interface PoiPersistenceManager
public PoiFileInfo getPoiFileInfo()
getPoiFileInfo
in interface PoiPersistenceManager
protected static java.lang.String getSQLSelectString(PoiCategoryFilter filter, int count, int version)
filter
- The filter object for determining all wanted categories (may be null).count
- Count of patterns to search in points of interest data (may be 0).version
- POI specification version.public void setCategoryManager(PoiCategoryManager categoryManager)
PoiCategoryManager
for retrieving and editing POI categories.setCategoryManager
in interface PoiPersistenceManager
categoryManager
- The category manager to be set.protected static java.util.Set<org.mapsforge.core.model.Tag> stringToTags(java.lang.String data)
protected static java.lang.String tagsToString(java.util.Set<org.mapsforge.core.model.Tag> tags)