Package org.mapsforge.poi.storage
Class WhitelistPoiCategoryFilter
java.lang.Object
org.mapsforge.poi.storage.WhitelistPoiCategoryFilter
- All Implemented Interfaces:
PoiCategoryFilter
Whitelist category filter that accepts all categories and their sub-categories in the whitelist.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCategory(PoiCategory category) Adds a POI category to the whitelist.Returns a set of top-level categories for all accepted categories.booleanisAcceptedCategory(PoiCategory category) Returns true if a POI's category is accepted and therefore shall be added to the poi file.
-
Constructor Details
-
WhitelistPoiCategoryFilter
public WhitelistPoiCategoryFilter()Default constructor.
-
-
Method Details
-
addCategory
Adds a POI category to the whitelist. A parent category (e.g. amenity_food) automatically white lists its sub-categories. (Example: If amenity_food is in the whitelist and fast_food is a child category of amenity_food, then the filter will also accept POIs of category fast_food).- Specified by:
addCategoryin interfacePoiCategoryFilter- Parameters:
category- The category to be added to the whitelist.
-
getAcceptedCategories
- Specified by:
getAcceptedCategoriesin interfacePoiCategoryFilter- Returns:
- All elements in the whitelist, including their children.
-
getAcceptedSuperCategories
Description copied from interface:PoiCategoryFilterReturns a set of top-level categories for all accepted categories. These are all accepted categories whose parent category is null or not an accepted category.- Specified by:
getAcceptedSuperCategoriesin interfacePoiCategoryFilter- Returns:
- Set of top-level categories for all accepted categories.
-
isAcceptedCategory
Description copied from interface:PoiCategoryFilterReturns true if a POI's category is accepted and therefore shall be added to the poi file.- Specified by:
isAcceptedCategoryin interfacePoiCategoryFilter- Parameters:
category- The POI's category.- Returns:
- true if a POI's category is accepted and therefore shall be added to the poi file.
-