OsmAnd/OsmAnd-java/src/net/osmand/osm/PoiCategory.java

53 lines
885 B
Java
Raw Normal View History

2015-01-19 22:22:27 +01:00
package net.osmand.osm;
2015-01-20 23:32:35 +01:00
import java.util.ArrayList;
import java.util.List;
2015-02-18 23:21:57 +01:00
2015-01-20 23:32:35 +01:00
public class PoiCategory extends PoiFilter {
2015-02-18 23:21:57 +01:00
2015-01-20 23:32:35 +01:00
private List<PoiFilter> poiFilters = new ArrayList<PoiFilter>();
2015-02-18 23:21:57 +01:00
private int regId;
private String defaultTag;
public PoiCategory(MapPoiTypes registry, String keyName, int regId) {
2015-01-27 01:05:40 +01:00
super(registry, null, keyName);
2015-02-18 23:21:57 +01:00
this.regId = regId;
2015-01-19 22:22:27 +01:00
}
2015-02-18 23:21:57 +01:00
2015-01-20 23:32:35 +01:00
public void addPoiType(PoiFilter poi) {
poiFilters.add(poi);
2015-01-19 22:22:27 +01:00
}
2015-02-18 23:21:57 +01:00
2015-01-27 01:05:40 +01:00
public List<PoiFilter> getPoiFilters() {
return poiFilters;
}
2015-01-20 23:32:35 +01:00
2015-02-18 23:21:57 +01:00
public String getDefaultTag() {
if(defaultTag == null) {
return keyName;
}
return defaultTag;
}
public void setDefaultTag(String defaultTag) {
this.defaultTag = defaultTag;
}
public boolean isWiki() {
return keyName.equals(MapPoiTypes.OSM_WIKI_CATEGORY);
}
public String getKey() {
return keyName;
}
public int ordinal() {
return regId;
}
2015-04-05 13:51:01 +02:00
2015-01-19 22:22:27 +01:00
}