Class AtlasMutatorConfiguration
- java.lang.Object
-
- org.openstreetmap.atlas.mutator.configuration.AtlasMutatorConfiguration
-
- All Implemented Interfaces:
java.io.Serializable
public class AtlasMutatorConfiguration extends java.lang.Object implements java.io.SerializableClass that holds global configuration for anAtlasMutator- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBROADCASTABLES_JSON_PROPERTYstatic java.lang.StringDYNAMIC_ATLAS_POLICIES_JSON_PROPERTYstatic java.lang.StringFETCHERS_JSON_PROPERTYstatic java.lang.StringFILTERS_JSON_PROPERTYstatic java.lang.StringGROUP_PREFIXstatic java.lang.StringINPUT_DEPENDENCIES_JSON_PROPERTYstatic java.lang.StringLEVELS_JSON_PROPERTYstatic java.lang.StringMERGE_FORGIVENESS_POLICIES_JSON_PROPERTYstatic java.lang.StringMUTATORS_JSON_PROPERTYstatic java.lang.StringSUB_ATLASES_JSON_PROPERTYstatic java.lang.StringTYPE_JSON_PROPERTY
-
Constructor Summary
Constructors Constructor Description AtlasMutatorConfiguration(java.util.Set<java.lang.String> countries, org.openstreetmap.atlas.geography.sharding.Sharding sharding, org.openstreetmap.atlas.geography.boundary.CountryBoundaryMap boundaries, java.lang.String input, java.lang.String output, java.util.Map<java.lang.String,java.lang.String> sparkConfiguration, org.openstreetmap.atlas.utilities.configuration.Configuration mutatorsConfiguration, boolean groupCountries, boolean allowRDD, boolean preloadRDD)AtlasMutatorConfiguration(java.util.Set<java.lang.String> countries, org.openstreetmap.atlas.geography.sharding.Sharding sharding, org.openstreetmap.atlas.geography.boundary.CountryBoundaryMap boundaries, java.lang.String input, java.lang.String output, java.util.Map<java.lang.String,java.lang.String> sparkConfiguration, org.openstreetmap.atlas.utilities.configuration.Configuration mutatorsConfiguration, boolean groupCountries, boolean allowRDD, boolean preloadRDD, boolean validateBoundaries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.openstreetmap.atlas.geography.MultiPolygonboundary(java.lang.String country)org.openstreetmap.atlas.utilities.tuples.Tuple<org.openstreetmap.atlas.utilities.tuples.Tuple<java.lang.String,java.util.Set<java.lang.String>>,java.util.List<AtlasMutationLevel>>countryOrGroupAndLevelList(java.lang.String countryOrGroup)Get a detailed country or group summary from thisAtlasMutatorConfigurationas aTuple.java.util.Map<org.openstreetmap.atlas.utilities.tuples.Tuple<java.lang.String,java.util.Set<java.lang.String>>,java.util.List<AtlasMutationLevel>>countryOrGroupsToLevelLists()Get a detailed summary of thisAtlasMutatorConfigurationas aMap.java.util.Map<org.openstreetmap.atlas.utilities.tuples.Tuple<java.lang.String,java.util.Set<java.lang.String>>,java.lang.String>details()Get a detailed summary of thisAtlasMutatorConfigurationas aMap.org.openstreetmap.atlas.utilities.tuples.Tuple<org.openstreetmap.atlas.utilities.tuples.Tuple<java.lang.String,java.util.Set<java.lang.String>>,java.lang.String>details(java.lang.String countryOrGroup)Get a detailed country or group summary from thisAtlasMutatorConfigurationas aTuple.java.lang.StringdetailsString()Get a string-ified version of the detailsMapreturned bydetails().java.lang.StringdetailsString(java.lang.String countryOrGroup)Get a string-ified version of the detailsTuplereturned bydetails(String).org.openstreetmap.atlas.geography.boundary.CountryBoundaryMapgetBoundaries()AtlasMutatorConfigurationDetailsgetConfigurationDetails()java.util.Map<java.lang.String,java.util.List<AtlasMutationLevel>>getCountryToMutationLevels()ConfiguredMergeForgivenessPolicygetGlobalMergeForgivenessPolicy()java.lang.StringgetInput()java.lang.StringgetOutput()org.openstreetmap.atlas.geography.sharding.ShardinggetSharding()java.util.Map<java.lang.String,java.lang.String>getSparkConfiguration()booleanisEmpty()Check if thisAtlasMutatorConfigurationis empty.com.google.gson.JsonObjecttoJson()java.lang.StringtoString()
-
-
-
Field Detail
-
GROUP_PREFIX
public static final java.lang.String GROUP_PREFIX
- See Also:
- Constant Field Values
-
TYPE_JSON_PROPERTY
public static final java.lang.String TYPE_JSON_PROPERTY
- See Also:
- Constant Field Values
-
MUTATORS_JSON_PROPERTY
public static final java.lang.String MUTATORS_JSON_PROPERTY
- See Also:
- Constant Field Values
-
LEVELS_JSON_PROPERTY
public static final java.lang.String LEVELS_JSON_PROPERTY
- See Also:
- Constant Field Values
-
DYNAMIC_ATLAS_POLICIES_JSON_PROPERTY
public static final java.lang.String DYNAMIC_ATLAS_POLICIES_JSON_PROPERTY
- See Also:
- Constant Field Values
-
FILTERS_JSON_PROPERTY
public static final java.lang.String FILTERS_JSON_PROPERTY
- See Also:
- Constant Field Values
-
INPUT_DEPENDENCIES_JSON_PROPERTY
public static final java.lang.String INPUT_DEPENDENCIES_JSON_PROPERTY
- See Also:
- Constant Field Values
-
FETCHERS_JSON_PROPERTY
public static final java.lang.String FETCHERS_JSON_PROPERTY
- See Also:
- Constant Field Values
-
SUB_ATLASES_JSON_PROPERTY
public static final java.lang.String SUB_ATLASES_JSON_PROPERTY
- See Also:
- Constant Field Values
-
MERGE_FORGIVENESS_POLICIES_JSON_PROPERTY
public static final java.lang.String MERGE_FORGIVENESS_POLICIES_JSON_PROPERTY
- See Also:
- Constant Field Values
-
BROADCASTABLES_JSON_PROPERTY
public static final java.lang.String BROADCASTABLES_JSON_PROPERTY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AtlasMutatorConfiguration
public AtlasMutatorConfiguration(java.util.Set<java.lang.String> countries, org.openstreetmap.atlas.geography.sharding.Sharding sharding, org.openstreetmap.atlas.geography.boundary.CountryBoundaryMap boundaries, java.lang.String input, java.lang.String output, java.util.Map<java.lang.String,java.lang.String> sparkConfiguration, org.openstreetmap.atlas.utilities.configuration.Configuration mutatorsConfiguration, boolean groupCountries, boolean allowRDD, boolean preloadRDD, boolean validateBoundaries)
-
AtlasMutatorConfiguration
public AtlasMutatorConfiguration(java.util.Set<java.lang.String> countries, org.openstreetmap.atlas.geography.sharding.Sharding sharding, org.openstreetmap.atlas.geography.boundary.CountryBoundaryMap boundaries, java.lang.String input, java.lang.String output, java.util.Map<java.lang.String,java.lang.String> sparkConfiguration, org.openstreetmap.atlas.utilities.configuration.Configuration mutatorsConfiguration, boolean groupCountries, boolean allowRDD, boolean preloadRDD)
-
-
Method Detail
-
boundary
public org.openstreetmap.atlas.geography.MultiPolygon boundary(java.lang.String country)
-
countryOrGroupAndLevelList
public org.openstreetmap.atlas.utilities.tuples.Tuple<org.openstreetmap.atlas.utilities.tuples.Tuple<java.lang.String,java.util.Set<java.lang.String>>,java.util.List<AtlasMutationLevel>> countryOrGroupAndLevelList(java.lang.String countryOrGroup)
Get a detailed country or group summary from thisAtlasMutatorConfigurationas aTuple. The first element is anotherTuplecontaining the group info and the constituent countries (e.g. {GROUP0, [DMA, USA]} or {DMA, [DMA]}). The second element is aListcontaining all the levels for the given country or group.- Parameters:
countryOrGroup- the country or group for which to fetch the levels- Returns:
- the
Tuplecontaining the levels,nullif the countryOrGroup is not found
-
countryOrGroupsToLevelLists
public java.util.Map<org.openstreetmap.atlas.utilities.tuples.Tuple<java.lang.String,java.util.Set<java.lang.String>>,java.util.List<AtlasMutationLevel>> countryOrGroupsToLevelLists()
Get a detailed summary of thisAtlasMutatorConfigurationas aMap. TheMapkeys areTuples containing the group info and the constituent countries (e.g. {GROUP0, [DMA, USA]} or {DMA, [DMA]}). TheMapvalues areLists containing the all levels for the country or group key.- Returns:
- the
Mapcontaining the levels
-
details
public java.util.Map<org.openstreetmap.atlas.utilities.tuples.Tuple<java.lang.String,java.util.Set<java.lang.String>>,java.lang.String> details()
Get a detailed summary of thisAtlasMutatorConfigurationas aMap. TheMapkeys areTuples containing the group info and the constituent countries (e.g. {GROUP0, [DMA, USA]} or {DMA, [DMA]}). TheMapvalues areStrings containing the level details (e.g. GROUP0 level 0 might look like "GROUP0_0: FS,AtlasChangeGeneratorAddTurnRestrictions").- Returns:
- the
Mapcontaining the details
-
details
public org.openstreetmap.atlas.utilities.tuples.Tuple<org.openstreetmap.atlas.utilities.tuples.Tuple<java.lang.String,java.util.Set<java.lang.String>>,java.lang.String> details(java.lang.String countryOrGroup)
Get a detailed country or group summary from thisAtlasMutatorConfigurationas aTuple. The first element is anotherTuplecontaining the group info and the constituent countries (e.g. {GROUP0, [DMA, USA]} or {DMA, [DMA]}). The second element is aStringcontaining the level details (e.g. GROUP0 level 0 might look like "GROUP0_0: FS,AtlasChangeGeneratorAddTurnRestrictions").- Parameters:
countryOrGroup- the country or group for which to fetch the details- Returns:
- the
Tuplecontaining the details,nullif the countryOrGroup is not found
-
detailsString
public java.lang.String detailsString(java.lang.String countryOrGroup)
Get a string-ified version of the detailsTuplereturned bydetails(String).- Parameters:
countryOrGroup- the country or group for which to fetch the details string- Returns:
- the details for a given country or group in this configuration, as a string.
nullif the countryOrGroup is not found
-
detailsString
public java.lang.String detailsString()
Get a string-ified version of the detailsMapreturned bydetails(). The details will be lexicographically sorted by the country or group name.- Returns:
- the details of this configuration, as a string
-
getBoundaries
public org.openstreetmap.atlas.geography.boundary.CountryBoundaryMap getBoundaries()
-
getConfigurationDetails
public AtlasMutatorConfigurationDetails getConfigurationDetails()
-
getCountryToMutationLevels
public java.util.Map<java.lang.String,java.util.List<AtlasMutationLevel>> getCountryToMutationLevels()
- Returns:
- A map from country code to ordered list of mutation levels.
-
getGlobalMergeForgivenessPolicy
public ConfiguredMergeForgivenessPolicy getGlobalMergeForgivenessPolicy()
-
getInput
public java.lang.String getInput()
-
getOutput
public java.lang.String getOutput()
-
getSharding
public org.openstreetmap.atlas.geography.sharding.Sharding getSharding()
-
getSparkConfiguration
public java.util.Map<java.lang.String,java.lang.String> getSparkConfiguration()
-
isEmpty
public boolean isEmpty()
Check if thisAtlasMutatorConfigurationis empty. An empty configuration is one that contains an empty country to levels map.- Returns:
- if this
AtlasMutatorConfigurationis empty.
-
toJson
public com.google.gson.JsonObject toJson()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-