Class WhitelistPoiCategoryFilter

  • All Implemented Interfaces:
    PoiCategoryFilter

    public class WhitelistPoiCategoryFilter
    extends java.lang.Object
    implements PoiCategoryFilter
    Whitelist category filter that accepts all categories and their sub-categories in the whitelist.
    • Constructor Detail

      • WhitelistPoiCategoryFilter

        public WhitelistPoiCategoryFilter()
        Default constructor.
    • Method Detail

      • addCategory

        public void addCategory​(PoiCategory category)
        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:
        addCategory in interface PoiCategoryFilter
        Parameters:
        category - The category to be added to the whitelist.
      • getAcceptedSuperCategories

        public java.util.Collection<PoiCategory> getAcceptedSuperCategories()
        Description copied from interface: PoiCategoryFilter
        Returns 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:
        getAcceptedSuperCategories in interface PoiCategoryFilter
        Returns:
        Set of top-level categories for all accepted categories.
      • isAcceptedCategory

        public boolean isAcceptedCategory​(PoiCategory category)
        Description copied from interface: PoiCategoryFilter
        Returns true if a POI's category is accepted and therefore shall be added to the poi file.
        Specified by:
        isAcceptedCategory in interface PoiCategoryFilter
        Parameters:
        category - The POI's category.
        Returns:
        true if a POI's category is accepted and therefore shall be added to the poi file.