Class AtlasMutatorConfiguration

  • All Implemented Interfaces:
    java.io.Serializable

    public class AtlasMutatorConfiguration
    extends java.lang.Object
    implements java.io.Serializable
    Class that holds global configuration for an AtlasMutator
    See Also:
    Serialized Form
    • Field Detail

      • 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 this AtlasMutatorConfiguration as a Tuple. The first element is another Tuple containing the group info and the constituent countries (e.g. {GROUP0, [DMA, USA]} or {DMA, [DMA]}). The second element is a List containing all the levels for the given country or group.
        Parameters:
        countryOrGroup - the country or group for which to fetch the levels
        Returns:
        the Tuple containing the levels, null if 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 this AtlasMutatorConfiguration as a Map. The Map keys are Tuples containing the group info and the constituent countries (e.g. {GROUP0, [DMA, USA]} or {DMA, [DMA]}). The Map values are Lists containing the all levels for the country or group key.
        Returns:
        the Map containing 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 this AtlasMutatorConfiguration as a Map. The Map keys are Tuples containing the group info and the constituent countries (e.g. {GROUP0, [DMA, USA]} or {DMA, [DMA]}). The Map values are Strings containing the level details (e.g. GROUP0 level 0 might look like "GROUP0_0: FS,AtlasChangeGeneratorAddTurnRestrictions").
        Returns:
        the Map containing 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 this AtlasMutatorConfiguration as a Tuple. The first element is another Tuple containing the group info and the constituent countries (e.g. {GROUP0, [DMA, USA]} or {DMA, [DMA]}). The second element is a String containing 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 Tuple containing the details, null if the countryOrGroup is not found
      • detailsString

        public java.lang.String detailsString​(java.lang.String countryOrGroup)
        Get a string-ified version of the details Tuple returned by details(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. null if the countryOrGroup is not found
      • detailsString

        public java.lang.String detailsString()
        Get a string-ified version of the details Map returned by details(). 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()
      • 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.
      • 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()
      • toJson

        public com.google.gson.JsonObject toJson()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object