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 OsmInfrastructureConfiguration
DEFAULT_FERRYHIGHWAY_CONFIGURATION
default configuration for 'ferry=_some_highway_type_' configuration pertaining to ferriesprotected static OsmInfrastructureConfiguration
DEFAULT_ROUTEFERRY_CONFIGURATION
default configuration for 'route=' configuration pertaining to ferriesprotected OsmInfrastructureConfiguration
ferryHighwayConfiguration
configuration for 'ferry=_some_highway_type_' configuration pertaining to ferriesprotected OsmInfrastructureConfiguration
routeFerryConfiguration
-
Constructor Summary
Constructors Modifier Constructor Description OsmWaterwayTypeConfiguration()
Default constructorprotected
OsmWaterwayTypeConfiguration(OsmWaterwayTypeConfiguration toCopy)
copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate(String... osmWayTypeValues)
Choose to add a given way value to be on top of the defaults, e.g.void
activate(List<String> osmWayTypeValues)
Choose to add a given way value to be on top of the defaults, e.g.void
activateAll()
activate all types explicitlyvoid
deactivate(String osmValue)
Choose to not parse the given combination of way subtype, e.g.void
deactivateAll()
deactivate all types explicitlyOsmInfrastructureConfiguration
deepClone()
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 formboolean
isActivated(String osmValue)
Verify if the passed in OSM way type is explicitly supported.boolean
isDeactivated(String osmValue)
Verify if the passed in OSM way type is explicitly unsupported.void
logDeactivatedTypes()
-
-
-
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:
logDeactivatedTypes
in 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:
isDeactivated
in 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:
isActivated
in 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:
deactivate
in 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:
activate
in 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:
activate
in 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:
getActivatedTypes
in 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:
getDeactivatedTypes
in 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:
deactivateAll
in interfaceOsmInfrastructureConfiguration
-
activateAll
public void activateAll()
activate all types explicitly- Specified by:
activateAll
in interfaceOsmInfrastructureConfiguration
-
deepClone
public OsmInfrastructureConfiguration deepClone()
Deep clone instance- Specified by:
deepClone
in interfaceOsmInfrastructureConfiguration
- Returns:
- deep clone
-
-