Class AbstractPoiPersistenceManager

    • Constructor Detail

      • AbstractPoiPersistenceManager

        protected AbstractPoiPersistenceManager()
    • Method Detail

      • findNearPosition

        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)
        Fetch 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.
        Specified by:
        findNearPosition in interface PoiPersistenceManager
        Parameters:
        point - LatLong center of the search.
        distance - in meters
        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.
        Returns:
        Collection of PointOfInterest matching a given PoiCategoryFilter and data pattern near the given position.
      • getSQLSelectString

        protected static java.lang.String getSQLSelectString​(PoiCategoryFilter filter,
                                                             int count,
                                                             int version)
        Gets the SQL query that looks up POI entries.
        Parameters:
        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.
        Returns:
        The SQL query.
      • stringToTags

        protected static java.util.Set<org.mapsforge.core.model.Tag> stringToTags​(java.lang.String data)
        Convert tags string representation with '\r' delimiter to collection.
      • tagsToString

        protected static java.lang.String tagsToString​(java.util.Set<org.mapsforge.core.model.Tag> tags)
        Convert tags collection to string representation with '\r' delimiter.