|
||||||||||
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 |
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 |
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 |
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 |
getAlternateNamesFileName()
|
java.lang.String |
getCountriesFileName()
|
java.util.List<java.lang.String> |
getDownloadFilesListFromOption()
|
java.lang.String |
getFilesToDownload()
|
java.lang.String |
getGeonamesDir()
|
java.lang.String |
getGeonamesDownloadURL()
|
java.lang.String |
getLanguageFileName()
|
int |
getMaxInsertsBeforeFlush()
|
boolean |
isImportGisFeatureEmbededAlternateNames()
|
boolean |
isMissingRequiredFieldThrows()
|
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 |
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 |
setFilesToDownload(java.lang.String filesToDownload)
The list of the files to be downloaded from the geonamesDownloadURL . the several files will be separated by
OPTION_SEPARATOR |
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 file are to be download from |
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 |
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 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 java.util.List<java.lang.String> getDownloadFilesListFromOption()
filesToDownload
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 getGeonamesDir()
setGeonamesDir(String)
public void setGeonamesDir(java.lang.String importerGeonamesDir)
importerGeonamesDir
- 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 getFilesToDownload()
setFilesToDownload(String)
public void setFilesToDownload(java.lang.String filesToDownload)
geonamesDownloadURL
. the several files will be separated by
OPTION_SEPARATOR
filesToDownload
- 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |