Class AtlasFilePathResolver
- java.lang.Object
-
- org.openstreetmap.atlas.checks.distributed.AtlasFilePathResolver
-
- All Implemented Interfaces:
java.io.Serializable
public final class AtlasFilePathResolver extends java.lang.Object implements java.io.SerializableThis resolver obscures whether or not thebasePathpoints to a path containingAtlasfiles or country folders that contain theAtlasfiles. Path templates are configured through a key-value map, mappingschemato path template. The path template followsString.format(java.lang.String, java.lang.Object...)rules, given a base path and country code to determine the final path.
Sample Configuration:{ "AtlasFilePathResolver": { "schema.path.templates": { "file": "%s" "http": "%s/%s" } } }If no schema templates are found, country specific sub-folders are assumed and"%s/%s"is used.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AtlasFilePathResolver(org.openstreetmap.atlas.utilities.configuration.Configuration configuration)Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringresolvePath(java.lang.String basePath, java.lang.String country)
-
-
-
Method Detail
-
resolvePath
public java.lang.String resolvePath(java.lang.String basePath, java.lang.String country)- Parameters:
basePath- the base directory, which contains either the country directories or the atlas files themselvescountry- the atlas file country we're interested in- Returns:
- the correct path to look for Atlas files, based on the base path backend
-
-