|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gisgraphy.domain.geoloc.importer.ImporterConfig
public class ImporterConfig
Field Summary | |
---|---|
static java.lang.String |
ALREADY_DONE_FILE_NAME
the name of the file that gives the information if the import is done or not |
static java.lang.String |
DEFAULT_ACCEPT_REGEX
The default regexp if no one is specified in the env.properties file |
static java.lang.String |
DEFAULT_ACCEPT_REGEX_CITY
The regexp to use to import all the city |
static java.lang.String |
DEFAULT_ACCEPT_REGEX_OPTION
The regexp to use to import all the feature class / code |
AdmExtracterStrategyOptions |
DEFAULT_ADM1_EXTRACTER_STRATEGY_OPTION
Default option if the Adm1 file has already been processed |
AdmExtracterStrategyOptions |
DEFAULT_ADM2_EXTRACTER_STRATEGY_OPTION
Default option if the adm2 file has already been processed |
AdmExtracterStrategyOptions |
DEFAULT_ADM3_EXTRACTER_STRATEGY_OPTION
Default option if the Adm3 file has already been processed |
AdmExtracterStrategyOptions |
DEFAULT_ADM4_EXTRACTER_STRATEGY_OPTION
Default option if the adm4 file has already been processed |
static java.lang.String |
DEFAULT_FEATURE_CLASS
The default feature class if no one is specified |
static java.lang.String |
DEFAULT_FEATURE_CODE
The default feature code if no one is specified |
static int |
DEFAULT_MAX_INSERT_BEFORE_FLUSH
Default value for maxInsertsBeforeFlush |
static java.lang.String |
IMPORTER_METADATA_RELATIVE_PATH
The relative path of the directory that contains importer metadata |
protected static org.slf4j.Logger |
logger
The logger |
static java.lang.String |
OPTION_SEPARATOR
A list of options is separated by this. e.g : a list of regexp options |
Constructor Summary | |
---|---|
ImporterConfig()
|
Method Summary | |
---|---|
java.lang.String |
createImporterMetadataDirIfItDoesnTExist()
Create the importerMetadataDirectory |
java.lang.String |
getAcceptRegExString()
|
AdmExtracterStrategyOptions |
getAdm1ExtracterStrategyIfAlreadyExists()
|
java.lang.String |
getAdm1FileName()
|
AdmExtracterStrategyOptions |
getAdm2ExtracterStrategyIfAlreadyExists()
|
java.lang.String |
getAdm2FileName()
|
AdmExtracterStrategyOptions |
getAdm3ExtracterStrategyIfAlreadyExists()
|
java.lang.String |
getAdm3FileName()
|
AdmExtracterStrategyOptions |
getAdm4ExtracterStrategyIfAlreadyExists()
|
java.lang.String |
getAdm4FileName()
|
AdmExtracterStrategyOptions |
getAdmExtracterStrategyOptionsForAdm(int admLevel)
What should we do if the Adm file for the specified level has already been processed It is a wrapper method around DEFAULT_ADM3_EXTRACTER_STRATEGY_OPTION and
DEFAULT_ADM4_EXTRACTER_STRATEGY_OPTION |
java.lang.String |
getAlreadyDoneFilePath()
|
java.lang.String |
getAlternateNameAdm1FileName()
Get the name of the file where the alternate names of adm with level 1 are |
java.lang.String |
getAlternateNameAdm2FileName()
Get the name of the file where the alternate names of adm with level 2 are |
java.lang.String |
getAlternateNameCountryFileName()
Get the name of the file where the alternate names of countries are |
java.lang.String |
getAlternateNameFeaturesFileName()
Get the name of the file where the alternate names of features that are not adm1, adm2, or country are |
java.lang.String |
getAlternateNamesFileName()
|
java.lang.String |
getCountriesFileName()
|
java.lang.String |
getGeonamesDir()
|
java.util.List<java.lang.String> |
getGeonamesDownloadFilesListFromOption()
|
java.lang.String |
getGeonamesDownloadURL()
|
java.lang.String |
getGeonamesFilesToDownload()
|
java.lang.String |
getImporterMetadataDirectoryPath()
|
java.lang.String |
getLanguageFileName()
|
int |
getMaxInsertsBeforeFlush()
|
java.lang.String |
getOpenStreetMapDir()
|
java.util.List<java.lang.String> |
getOpenStreetMapDownloadFilesListFromOption()
|
java.lang.String |
getOpenstreetMapDownloadURL()
|
java.lang.String |
getOpenStreetMapFilesToDownload()
|
boolean |
isConfigCorrectForImport()
|
boolean |
isGeonamesDownloadDirectoryAccessible()
|
boolean |
isGeonamesImporterEnabled()
|
boolean |
isImportGisFeatureEmbededAlternateNames()
|
boolean |
isMissingRequiredFieldThrows()
|
boolean |
isOpenStreetMapDownloadDirectoryAccessible()
|
boolean |
isOpenstreetmapImporterEnabled()
|
boolean |
isRegexpCorrects()
|
boolean |
isRetrieveFiles()
|
boolean |
isSyncAdmCodesWithLinkedAdmOnes()
|
boolean |
isTryToDetectAdmIfNotFound()
|
boolean |
isWrongNumberOfFieldsThrows()
|
void |
setAcceptRegExString(java.lang.String acceptRegExString)
List of regular expressions for feature class and feature code to be import. |
void |
setAdm1ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions adm1ExtracterStrategy)
What should we do if the Adm1 file has already been processed |
void |
setAdm1FileName(java.lang.String adm1FileName)
The name of the Geonames dump file containing the ADM with level 1 |
void |
setAdm2ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions adm2ExtracterStrategy)
What should we do if the Adm2 file has already been processed |
void |
setAdm2FileName(java.lang.String adm2FileName)
The name of the Geonames dump file containing the ADM with level 2 |
void |
setAdm3ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions adm3ExtracterStrategy)
What should we do if the Adm3 file has already been processed |
void |
setAdm3FileName(java.lang.String adm3FileName)
The name of the Geonames dump file containing the ADM with level 3 |
void |
setAdm4ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions adm4ExtracterStrategy)
What should we do if the Adm4 file has already been processed |
void |
setAdm4FileName(java.lang.String adm4FileName)
The name of the Geonames dump file containing the ADM with level 4 |
void |
setAlternateNameAdm1FileName(java.lang.String alternateNameAdm1FileName)
Set the name of the file where the alternate names of adm with level 1 are |
void |
setAlternateNameAdm2FileName(java.lang.String alternateNameAdm2FileName)
Set the name of the file where the alternate names of adm with level 2 are |
void |
setAlternateNameCountryFileName(java.lang.String alternateNameCountryFileName)
Set the name of the file where the alternate names of countries are |
void |
setAlternateNameFeaturesFileName(java.lang.String alternateNameFeaturesFileName)
Set the name of the file where the alternate names of features that are not adm1, adm2, or country are |
void |
setAlternateNamesFileName(java.lang.String alternateNamesFileName)
The name of the Geonames dump file containing the alternate names |
void |
setCountriesFileName(java.lang.String countryFileName)
The name of the Geonames dump file containing the countries informations |
void |
setGeonamesDir(java.lang.String importerGeonamesDir)
The directory where the Geonames files will be retrieved and processed. |
void |
setGeonamesDownloadURL(java.lang.String importerGeonamesDownloadURL)
The HTTP URL of the directory Where Geonames files are to be download from |
void |
setGeonamesFilesToDownload(java.lang.String geonamesFilesToDownload)
The list of the Geonames files to be download from the geonamesDownloadURL . the several files will be separated by
OPTION_SEPARATOR |
void |
setGeonamesImporterEnabled(boolean geonamesImporterEnabled)
|
void |
setImportGisFeatureEmbededAlternateNames(boolean importGisFeatureEmbededAlternateNames)
Set to true the alternate names of the country dump are imported. |
void |
setLanguageFileName(java.lang.String languageFileName)
The name of the Geonames dump file containing the language informations |
void |
setMaxInsertsBeforeFlush(int maxInsertsBeforeFlush)
Optional setting that allows to specify the number of inserts that can be done before flushing. |
void |
setMissingRequiredFieldThrows(boolean missingRequiredFieldThrows)
Set to true this options force the import process to stop if a required field is missing. |
void |
setOpenStreetMapDir(java.lang.String importeropenStreetMapDir)
The directory where the openStreetMap files will be retrieved and processed. |
void |
setOpenstreetMapDownloadURL(java.lang.String openstreetMapDownloadURL)
The HTTP URL of the directory Where openstreetmap files are to be download from |
void |
setOpenStreetMapFilesToDownload(java.lang.String openStreetMapFilesToDownload)
The list of the Openstreetmap to be download from the geonamesDownloadURL . the several files will be separated by
OPTION_SEPARATOR |
void |
setOpenstreetmapImporterEnabled(boolean openstreetmapImporterEnabled)
|
void |
setRetrieveFiles(boolean retrieveFiles)
Whether we should download the geonames file or use the one already present in the geonamesDir |
void |
setSyncAdmCodesWithLinkedAdmOnes(boolean setAdmCodesWithLinkedAdmObject)
The linked Adm may not be the same as the one which would be found with the ADMcodes from the csv file if TryToDetectAdmIfNotFound is set to true. in this case error corecting is done. tis option determine if the ADMXcode must be equals to the linked ADM or if they must be equals to the value in the CSVFile note that the admXnames are always sync with the Linked Adm if true : the AdmXcodes of the imported GisFeature will be the gisFeature.getAdm.getAdmXcode. |
void |
setTryToDetectAdmIfNotFound(boolean tryToDetectAdmIfNotFound)
If this option is set to true : The importer will try to detect Adm for features if the AdmXcodes values does not correspond to a known Adm. it is a process of error correction if set to false error correction is disabled |
void |
setWrongNumberOfFieldsThrows(boolean wrongNumberOfFieldsThrows)
Set to true this option force the import process to stop if an error is throw. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String IMPORTER_METADATA_RELATIVE_PATH
public static final java.lang.String ALREADY_DONE_FILE_NAME
public static final java.lang.String DEFAULT_FEATURE_CODE
public static final java.lang.String DEFAULT_FEATURE_CLASS
public static final java.lang.String DEFAULT_ACCEPT_REGEX
public static final java.lang.String DEFAULT_ACCEPT_REGEX_CITY
public static final java.lang.String DEFAULT_ACCEPT_REGEX_OPTION
public static final int DEFAULT_MAX_INSERT_BEFORE_FLUSH
maxInsertsBeforeFlush
public AdmExtracterStrategyOptions DEFAULT_ADM1_EXTRACTER_STRATEGY_OPTION
AdmExtracterStrategyOptions
public AdmExtracterStrategyOptions DEFAULT_ADM2_EXTRACTER_STRATEGY_OPTION
AdmExtracterStrategyOptions
public AdmExtracterStrategyOptions DEFAULT_ADM3_EXTRACTER_STRATEGY_OPTION
AdmExtracterStrategyOptions
public AdmExtracterStrategyOptions DEFAULT_ADM4_EXTRACTER_STRATEGY_OPTION
AdmExtracterStrategyOptions
protected static final org.slf4j.Logger logger
public static final java.lang.String OPTION_SEPARATOR
Constructor Detail |
---|
public ImporterConfig()
Method Detail |
---|
public boolean isGeonamesImporterEnabled()
public void setGeonamesImporterEnabled(boolean geonamesImporterEnabled)
geonamesImporterEnabled
- enable or disable Geonames importerisGeonamesImporterEnabled()
public boolean isOpenstreetmapImporterEnabled()
isGeonamesImporterEnabled()
public void setOpenstreetmapImporterEnabled(boolean openstreetmapImporterEnabled)
openstreetmapImporterEnabled
- enable or disable Openstreetmap importerisOpenstreetmapImporterEnabled()
public java.util.List<java.lang.String> getGeonamesDownloadFilesListFromOption()
geonamesFilesToDownload
public java.util.List<java.lang.String> getOpenStreetMapDownloadFilesListFromOption()
openStreetMapFilesToDownload
public AdmExtracterStrategyOptions getAdmExtracterStrategyOptionsForAdm(int admLevel)
DEFAULT_ADM3_EXTRACTER_STRATEGY_OPTION
and
DEFAULT_ADM4_EXTRACTER_STRATEGY_OPTION
public java.lang.String getAcceptRegExString()
setAcceptRegExString(String)
public boolean isSyncAdmCodesWithLinkedAdmOnes()
setSyncAdmCodesWithLinkedAdmOnes(boolean)
public boolean isTryToDetectAdmIfNotFound()
setTryToDetectAdmIfNotFound(boolean)
public void setAcceptRegExString(java.lang.String acceptRegExString)
OPTION_SEPARATOR
.DEFAULT_ACCEPT_REGEX_CITY
: import Israeli settlements and
all the cities except destroyed and abandoned city
acceptRegExString
- the optionpublic void setSyncAdmCodesWithLinkedAdmOnes(boolean setAdmCodesWithLinkedAdmObject)
setAdmCodesWithLinkedAdmObject
- The option to setpublic void setTryToDetectAdmIfNotFound(boolean tryToDetectAdmIfNotFound)
tryToDetectAdmIfNotFound
- The optionpublic AdmExtracterStrategyOptions getAdm1ExtracterStrategyIfAlreadyExists()
setAdm1ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions)
public void setAdm1ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions adm1ExtracterStrategy)
adm1ExtracterStrategy
- The optionDEFAULT_ADM1_EXTRACTER_STRATEGY_OPTION
public AdmExtracterStrategyOptions getAdm2ExtracterStrategyIfAlreadyExists()
setAdm2ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions)
public void setAdm2ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions adm2ExtracterStrategy)
adm2ExtracterStrategy
- The optionDEFAULT_ADM2_EXTRACTER_STRATEGY_OPTION
public AdmExtracterStrategyOptions getAdm3ExtracterStrategyIfAlreadyExists()
setAdm3ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions)
public void setAdm3ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions adm3ExtracterStrategy)
adm3ExtracterStrategy
- The optionDEFAULT_ADM3_EXTRACTER_STRATEGY_OPTION
public AdmExtracterStrategyOptions getAdm4ExtracterStrategyIfAlreadyExists()
setAdm4ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions)
public void setAdm4ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions adm4ExtracterStrategy)
adm4ExtracterStrategy
- The optionDEFAULT_ADM3_EXTRACTER_STRATEGY_OPTION
public boolean isMissingRequiredFieldThrows()
setMissingRequiredFieldThrows(boolean)
,
MissingRequiredFieldException
public void setMissingRequiredFieldThrows(boolean missingRequiredFieldThrows)
missingRequiredFieldThrows
- The optionMissingRequiredFieldException
public boolean isWrongNumberOfFieldsThrows()
setWrongNumberOfFieldsThrows(boolean)
public void setWrongNumberOfFieldsThrows(boolean wrongNumberOfFieldsThrows)
wrongNumberOfFieldsThrows
- The optionpublic boolean isImportGisFeatureEmbededAlternateNames()
setImportGisFeatureEmbededAlternateNames(boolean)
public void setImportGisFeatureEmbededAlternateNames(boolean importGisFeatureEmbededAlternateNames)
importGisFeatureEmbededAlternateNames
- The optionpublic java.lang.String getOpenStreetMapDir()
setOpenStreetMapDir(String)
public void setOpenStreetMapDir(java.lang.String importeropenStreetMapDir)
importeropenStreetMapDir
- the optionpublic java.lang.String getGeonamesDir()
setGeonamesDir(String)
public void setGeonamesDir(java.lang.String importerGeonamesDir)
importerGeonamesDir
- the optionpublic java.lang.String getOpenstreetMapDownloadURL()
setOpenstreetMapDownloadURL(String)
public void setOpenstreetMapDownloadURL(java.lang.String openstreetMapDownloadURL)
openstreetMapDownloadURL
- The optionpublic java.lang.String getGeonamesDownloadURL()
setGeonamesDownloadURL(String)
public void setGeonamesDownloadURL(java.lang.String importerGeonamesDownloadURL)
importerGeonamesDownloadURL
- The optionpublic boolean isRetrieveFiles()
setRetrieveFiles(boolean)
public void setRetrieveFiles(boolean retrieveFiles)
geonamesDir
retrieveFiles
- The optionspublic java.lang.String getOpenStreetMapFilesToDownload()
setOpenStreetMapFilesToDownload(String)
public void setOpenStreetMapFilesToDownload(java.lang.String openStreetMapFilesToDownload)
geonamesDownloadURL
. the several files will be separated by
OPTION_SEPARATOR
openStreetMapFilesToDownload
- The openstreetmap filesToDownload to setpublic java.lang.String getGeonamesFilesToDownload()
setGeonamesFilesToDownload(String)
public void setGeonamesFilesToDownload(java.lang.String geonamesFilesToDownload)
geonamesDownloadURL
. the several files will be separated by
OPTION_SEPARATOR
geonamesFilesToDownload
- the filesToDownload to setpublic java.lang.String getAdm1FileName()
getAdm1FileName()
public void setAdm1FileName(java.lang.String adm1FileName)
adm1FileName
- The optionpublic java.lang.String getAdm2FileName()
getAdm2FileName()
public void setAdm2FileName(java.lang.String adm2FileName)
adm2FileName
- The optionpublic java.lang.String getAdm3FileName()
getAdm3FileName()
public void setAdm3FileName(java.lang.String adm3FileName)
adm3FileName
- the adm3FileName to setpublic java.lang.String getAdm4FileName()
getAdm4FileName()
public void setAdm4FileName(java.lang.String adm4FileName)
adm4FileName
- The optionpublic java.lang.String getCountriesFileName()
getCountriesFileName()
public void setCountriesFileName(java.lang.String countryFileName)
countryFileName
- The optionpublic java.lang.String getLanguageFileName()
setLanguageFileName(String)
public void setLanguageFileName(java.lang.String languageFileName)
languageFileName
- The optionpublic java.lang.String getAlternateNamesFileName()
getAlternateNamesFileName()
public void setAlternateNamesFileName(java.lang.String alternateNamesFileName)
alternateNamesFileName
- The optionpublic void setMaxInsertsBeforeFlush(int maxInsertsBeforeFlush)
DEFAULT_MAX_INSERT_BEFORE_FLUSH
maxInsertsBeforeFlush
- The optionpublic int getMaxInsertsBeforeFlush()
setMaxInsertsBeforeFlush(int)
public boolean isGeonamesDownloadDirectoryAccessible()
public boolean isOpenStreetMapDownloadDirectoryAccessible()
public boolean isRegexpCorrects()
public boolean isConfigCorrectForImport()
public java.lang.String getAlreadyDoneFilePath()
public java.lang.String getImporterMetadataDirectoryPath()
public java.lang.String createImporterMetadataDirIfItDoesnTExist()
public java.lang.String getAlternateNameFeaturesFileName()
setAlternateNameFeaturesFileName(String)
public void setAlternateNameFeaturesFileName(java.lang.String alternateNameFeaturesFileName)
alternateNameFeaturesFileName
- The name of the file to setgetAlternateNameFeaturesFileName()
public java.lang.String getAlternateNameAdm1FileName()
setAlternateNameAdm1FileName(String)
public void setAlternateNameAdm1FileName(java.lang.String alternateNameAdm1FileName)
alternateNameAdm1FileName
- The name of the file to setgetAlternateNameAdm1FileName()
public java.lang.String getAlternateNameAdm2FileName()
setAlternateNameAdm2FileName(String)
public void setAlternateNameAdm2FileName(java.lang.String alternateNameAdm2FileName)
alternateNameAdm2FileName
- The name of the file to setgetAlternateNameAdm2FileName()
public java.lang.String getAlternateNameCountryFileName()
setAlternateNameCountryFileName(String)
public void setAlternateNameCountryFileName(java.lang.String alternateNameCountryFileName)
alternateNameCountryFileName
- The name of the file to setgetAlternateNameCountryFileName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |