Package org.goplanit.osm.defaults
Class OsmWaterwayTypeConfiguration
- java.lang.Object
-
- org.goplanit.osm.defaults.OsmWaterwayTypeConfiguration
-
- All Implemented Interfaces:
OsmInfrastructureConfiguration
public class OsmWaterwayTypeConfiguration extends Object implements OsmInfrastructureConfiguration
Configuration options regarding the activation/deactivation of specific OSM waterway route types in the parser. Note that we use two different keys for this, which is only possible because all values across both keys are unique and the key itself is not used. If this chanegs this approach needs to be revisited.- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected static OsmInfrastructureConfigurationDEFAULT_FERRYHIGHWAY_CONFIGURATIONdefault configuration for 'ferry=_some_highway_type_' configuration pertaining to ferriesprotected static OsmInfrastructureConfigurationDEFAULT_ROUTEFERRY_CONFIGURATIONdefault configuration for 'route=' configuration pertaining to ferriesprotected OsmInfrastructureConfigurationferryHighwayConfigurationconfiguration for 'ferry=_some_highway_type_' configuration pertaining to ferriesprotected OsmInfrastructureConfigurationrouteFerryConfiguration
-
Constructor Summary
Constructors Modifier Constructor Description OsmWaterwayTypeConfiguration()Default constructorprotectedOsmWaterwayTypeConfiguration(OsmWaterwayTypeConfiguration toCopy)copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(String... osmWayTypeValues)Choose to add a given way value to be on top of the defaults, e.g.voidactivate(List<String> osmWayTypeValues)Choose to add a given way value to be on top of the defaults, e.g.voidactivateAll()activate all types explicitlyvoiddeactivate(String osmValue)Choose to not parse the given combination of way subtype, e.g.voiddeactivateAll()deactivate all types explicitlyOsmInfrastructureConfigurationdeepClone()Deep clone instanceMap<String,Set<String>>getActivatedTypes()create a copy of the currently supported way types in set formMap<String,Set<String>>getDeactivatedTypes()create a copy of the currently unsupported way types in set formbooleanisActivated(String osmValue)Verify if the passed in OSM way type is explicitly supported.booleanisDeactivated(String osmValue)Verify if the passed in OSM way type is explicitly unsupported.voidlogDeactivatedTypes()
-
-
-
Field Detail
-
DEFAULT_ROUTEFERRY_CONFIGURATION
protected static OsmInfrastructureConfiguration DEFAULT_ROUTEFERRY_CONFIGURATION
default configuration for 'route=' configuration pertaining to ferries
-
DEFAULT_FERRYHIGHWAY_CONFIGURATION
protected static OsmInfrastructureConfiguration DEFAULT_FERRYHIGHWAY_CONFIGURATION
default configuration for 'ferry=_some_highway_type_' configuration pertaining to ferries
-
routeFerryConfiguration
protected OsmInfrastructureConfiguration routeFerryConfiguration
-
ferryHighwayConfiguration
protected OsmInfrastructureConfiguration ferryHighwayConfiguration
configuration for 'ferry=_some_highway_type_' configuration pertaining to ferries
-
-
Constructor Detail
-
OsmWaterwayTypeConfiguration
protected OsmWaterwayTypeConfiguration(OsmWaterwayTypeConfiguration toCopy)
copy constructor- Parameters:
toCopy- the one to copy
-
OsmWaterwayTypeConfiguration
public OsmWaterwayTypeConfiguration()
Default constructor
-
-
Method Detail
-
logDeactivatedTypes
public void logDeactivatedTypes()
- Specified by:
logDeactivatedTypesin interfaceOsmInfrastructureConfiguration
-
isDeactivated
public boolean isDeactivated(String osmValue)
Verify if the passed in OSM way type is explicitly unsupported. Unsupported types will be ignored when processing ways.- Specified by:
isDeactivatedin interfaceOsmInfrastructureConfiguration- Parameters:
osmValue- , e.g. primary, road- Returns:
- true when unSupported, false if not (which means it is either supported, or not registered)
-
isActivated
public boolean isActivated(String osmValue)
Verify if the passed in OSM way type is explicitly supported. Supported types will be processed and converted into link(segments).- Specified by:
isActivatedin interfaceOsmInfrastructureConfiguration- Parameters:
osmValue- , e.g. primary- Returns:
- true when supported, false if not (which means it is unsupported, or not registered)
-
deactivate
public void deactivate(String osmValue)
Choose to not parse the given combination of way subtype, e.g. highway=road- Specified by:
deactivatein interfaceOsmInfrastructureConfiguration- Parameters:
osmValue- to use
-
activate
public void activate(String... osmWayTypeValues)
Choose to add a given way value to be on top of the defaults, e.g. highway=road- Specified by:
activatein interfaceOsmInfrastructureConfiguration- Parameters:
osmWayTypeValues- to activate
-
activate
public void activate(List<String> osmWayTypeValues)
Choose to add a given way value to be on top of the defaults, e.g. highway=road- Specified by:
activatein interfaceOsmInfrastructureConfiguration- Parameters:
osmWayTypeValues- to activate
-
getActivatedTypes
public Map<String,Set<String>> getActivatedTypes()
create a copy of the currently supported way types in set form- Specified by:
getActivatedTypesin interfaceOsmInfrastructureConfiguration- Returns:
- set of supported types (by underlying key), any modifications on this set have no impact on the instance internals
-
getDeactivatedTypes
public Map<String,Set<String>> getDeactivatedTypes()
create a copy of the currently unsupported way types in set form- Specified by:
getDeactivatedTypesin interfaceOsmInfrastructureConfiguration- Returns:
- deactivated way types (by underlying key), any modifications on this set have no impact on the instance internals
-
deactivateAll
public void deactivateAll()
deactivate all types explicitly- Specified by:
deactivateAllin interfaceOsmInfrastructureConfiguration
-
activateAll
public void activateAll()
activate all types explicitly- Specified by:
activateAllin interfaceOsmInfrastructureConfiguration
-
deepClone
public OsmInfrastructureConfiguration deepClone()
Deep clone instance- Specified by:
deepClonein interfaceOsmInfrastructureConfiguration- Returns:
- deep clone
-
-