com.gisgraphy.domain.geoloc.importer
Class ImporterConfig

java.lang.Object
  extended by com.gisgraphy.domain.geoloc.importer.ImporterConfig

public class ImporterConfig
extends java.lang.Object

Author:
David Masclet Represents a configuration for importers For more informations for this options see the User Guide

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

IMPORTER_METADATA_RELATIVE_PATH

public static final java.lang.String IMPORTER_METADATA_RELATIVE_PATH
The relative path of the directory that contains importer metadata

See Also:
Constant Field Values

ALREADY_DONE_FILE_NAME

public static final java.lang.String ALREADY_DONE_FILE_NAME
the name of the file that gives the information if the import is done or not

See Also:
Constant Field Values

DEFAULT_FEATURE_CODE

public static final java.lang.String DEFAULT_FEATURE_CODE
The default feature code if no one is specified

See Also:
Constant Field Values

DEFAULT_FEATURE_CLASS

public static final java.lang.String DEFAULT_FEATURE_CLASS
The default feature class if no one is specified

See Also:
Constant Field Values

DEFAULT_ACCEPT_REGEX

public static final java.lang.String DEFAULT_ACCEPT_REGEX
The default regexp if no one is specified in the env.properties file

See Also:
Constant Field Values

DEFAULT_ACCEPT_REGEX_CITY

public static final java.lang.String DEFAULT_ACCEPT_REGEX_CITY
The regexp to use to import all the city

See Also:
Constant Field Values

DEFAULT_ACCEPT_REGEX_OPTION

public static final java.lang.String DEFAULT_ACCEPT_REGEX_OPTION
The regexp to use to import all the feature class / code

See Also:
Constant Field Values

DEFAULT_MAX_INSERT_BEFORE_FLUSH

public static final int DEFAULT_MAX_INSERT_BEFORE_FLUSH
Default value for maxInsertsBeforeFlush

See Also:
Constant Field Values

DEFAULT_ADM1_EXTRACTER_STRATEGY_OPTION

public AdmExtracterStrategyOptions DEFAULT_ADM1_EXTRACTER_STRATEGY_OPTION
Default option if the Adm1 file has already been processed

See Also:
AdmExtracterStrategyOptions

DEFAULT_ADM2_EXTRACTER_STRATEGY_OPTION

public AdmExtracterStrategyOptions DEFAULT_ADM2_EXTRACTER_STRATEGY_OPTION
Default option if the adm2 file has already been processed

See Also:
AdmExtracterStrategyOptions

DEFAULT_ADM3_EXTRACTER_STRATEGY_OPTION

public AdmExtracterStrategyOptions DEFAULT_ADM3_EXTRACTER_STRATEGY_OPTION
Default option if the Adm3 file has already been processed

See Also:
AdmExtracterStrategyOptions

DEFAULT_ADM4_EXTRACTER_STRATEGY_OPTION

public AdmExtracterStrategyOptions DEFAULT_ADM4_EXTRACTER_STRATEGY_OPTION
Default option if the adm4 file has already been processed

See Also:
AdmExtracterStrategyOptions

logger

protected static final org.slf4j.Logger logger
The logger


OPTION_SEPARATOR

public static final java.lang.String OPTION_SEPARATOR
A list of options is separated by this. e.g : a list of regexp options

See Also:
Constant Field Values
Constructor Detail

ImporterConfig

public ImporterConfig()
Method Detail

isGeonamesImporterEnabled

public boolean isGeonamesImporterEnabled()
Returns:
true if the importer should process the import of Geonames data

setGeonamesImporterEnabled

public void setGeonamesImporterEnabled(boolean geonamesImporterEnabled)
Parameters:
geonamesImporterEnabled - enable or disable Geonames importer
See Also:
isGeonamesImporterEnabled()

isOpenstreetmapImporterEnabled

public boolean isOpenstreetmapImporterEnabled()
Returns:
true if the importer should process the import of Openstreetmap data
See Also:
isGeonamesImporterEnabled()

setOpenstreetmapImporterEnabled

public void setOpenstreetmapImporterEnabled(boolean openstreetmapImporterEnabled)
Parameters:
openstreetmapImporterEnabled - enable or disable Openstreetmap importer
See Also:
isOpenstreetmapImporterEnabled()

getGeonamesDownloadFilesListFromOption

public java.util.List<java.lang.String> getGeonamesDownloadFilesListFromOption()
Returns:
A list of string with the files to be download, processed from geonamesFilesToDownload

getOpenStreetMapDownloadFilesListFromOption

public java.util.List<java.lang.String> getOpenStreetMapDownloadFilesListFromOption()
Returns:
A list of string with the files to be download, processed from openStreetMapFilesToDownload

getAdmExtracterStrategyOptionsForAdm

public 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


getAcceptRegExString

public java.lang.String getAcceptRegExString()
Returns:
The option
See Also:
setAcceptRegExString(String)

isSyncAdmCodesWithLinkedAdmOnes

public boolean isSyncAdmCodesWithLinkedAdmOnes()
Returns:
The option
See Also:
setSyncAdmCodesWithLinkedAdmOnes(boolean)

isTryToDetectAdmIfNotFound

public boolean isTryToDetectAdmIfNotFound()
Returns:
The option
See Also:
setTryToDetectAdmIfNotFound(boolean)

setAcceptRegExString

public void setAcceptRegExString(java.lang.String acceptRegExString)
List of regular expressions for feature class and feature code to be import.

Important : The regular expressions must match featureClass.featureCode and are separated by OPTION_SEPARATOR.

The gisFeature which match "A.ADM." and "A.PCL." regex are automaticaly imported (Administrative division and country).
Examples :

Parameters:
acceptRegExString - the option

setSyncAdmCodesWithLinkedAdmOnes

public 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.

if false : the AdmXcode for a GisFeature will be the values of the CSV dump file. That means : If the option tryToDetectAdmIfNotFound is set to true : the Adm will be suggest if the AdmXcodes values of the CSV dump file doesn't correspond to an already known Adm. In that case the suggested Adm will have AdmXcodes different from the CSV dump file ones. This option allow you to set The AdmXcodes for the gisFeature with the detected Adm value instead of the CSV file ones.
In other words : AdmXcodes of the linked Adm and AdmXcodes of the gisFeature will always be the same if this option is true. it is recommended to let it to true

Parameters:
setAdmCodesWithLinkedAdmObject - The option to set

setTryToDetectAdmIfNotFound

public 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

Parameters:
tryToDetectAdmIfNotFound - The option

getAdm1ExtracterStrategyIfAlreadyExists

public AdmExtracterStrategyOptions getAdm1ExtracterStrategyIfAlreadyExists()
Returns:
The option
See Also:
setAdm1ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions)

setAdm1ExtracterStrategyIfAlreadyExists

public void setAdm1ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions adm1ExtracterStrategy)
What should we do if the Adm1 file has already been processed

Parameters:
adm1ExtracterStrategy - The option
See Also:
DEFAULT_ADM1_EXTRACTER_STRATEGY_OPTION

getAdm2ExtracterStrategyIfAlreadyExists

public AdmExtracterStrategyOptions getAdm2ExtracterStrategyIfAlreadyExists()
Returns:
The option
See Also:
setAdm2ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions)

setAdm2ExtracterStrategyIfAlreadyExists

public void setAdm2ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions adm2ExtracterStrategy)
What should we do if the Adm2 file has already been processed

Parameters:
adm2ExtracterStrategy - The option
See Also:
DEFAULT_ADM2_EXTRACTER_STRATEGY_OPTION

getAdm3ExtracterStrategyIfAlreadyExists

public AdmExtracterStrategyOptions getAdm3ExtracterStrategyIfAlreadyExists()
Returns:
The option
See Also:
setAdm3ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions)

setAdm3ExtracterStrategyIfAlreadyExists

public void setAdm3ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions adm3ExtracterStrategy)
What should we do if the Adm3 file has already been processed

Parameters:
adm3ExtracterStrategy - The option
See Also:
DEFAULT_ADM3_EXTRACTER_STRATEGY_OPTION

getAdm4ExtracterStrategyIfAlreadyExists

public AdmExtracterStrategyOptions getAdm4ExtracterStrategyIfAlreadyExists()
Returns:
the option
See Also:
setAdm4ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions)

setAdm4ExtracterStrategyIfAlreadyExists

public void setAdm4ExtracterStrategyIfAlreadyExists(AdmExtracterStrategyOptions adm4ExtracterStrategy)
What should we do if the Adm4 file has already been processed

Parameters:
adm4ExtracterStrategy - The option
See Also:
DEFAULT_ADM3_EXTRACTER_STRATEGY_OPTION

isMissingRequiredFieldThrows

public boolean isMissingRequiredFieldThrows()
Returns:
The option
See Also:
setMissingRequiredFieldThrows(boolean), MissingRequiredFieldException

setMissingRequiredFieldThrows

public void setMissingRequiredFieldThrows(boolean missingRequiredFieldThrows)
Set to true this options force the import process to stop if a required field is missing.
Set to false it ignore the error and try to continue (recommended)

Parameters:
missingRequiredFieldThrows - The option
See Also:
MissingRequiredFieldException

isWrongNumberOfFieldsThrows

public boolean isWrongNumberOfFieldsThrows()
Returns:
The option
See Also:
setWrongNumberOfFieldsThrows(boolean)

setWrongNumberOfFieldsThrows

public void setWrongNumberOfFieldsThrows(boolean wrongNumberOfFieldsThrows)
Set to true this option force the import process to stop if an error is throw.
Set to false it ignore the error and try to continue (recommended)

Parameters:
wrongNumberOfFieldsThrows - The option

isImportGisFeatureEmbededAlternateNames

public boolean isImportGisFeatureEmbededAlternateNames()
Returns:
The option
See Also:
setImportGisFeatureEmbededAlternateNames(boolean)

setImportGisFeatureEmbededAlternateNames

public void setImportGisFeatureEmbededAlternateNames(boolean importGisFeatureEmbededAlternateNames)
Set to true the alternate names of the country dump are imported. Set to false it will import the alternate names from the alternatenames dump file

Parameters:
importGisFeatureEmbededAlternateNames - The option

getOpenStreetMapDir

public java.lang.String getOpenStreetMapDir()
Returns:
The option
See Also:
setOpenStreetMapDir(String)

setOpenStreetMapDir

public void setOpenStreetMapDir(java.lang.String importeropenStreetMapDir)
The directory where the openStreetMap files will be retrieved and processed. It must ends with / or \ according to the System

Parameters:
importeropenStreetMapDir - the option

getGeonamesDir

public java.lang.String getGeonamesDir()
Returns:
The option
See Also:
setGeonamesDir(String)

setGeonamesDir

public void setGeonamesDir(java.lang.String importerGeonamesDir)
The directory where the Geonames files will be retrieved and processed. It must ends with / or \ according to the System

Parameters:
importerGeonamesDir - the option

getOpenstreetMapDownloadURL

public java.lang.String getOpenstreetMapDownloadURL()
Returns:
The option
See Also:
setOpenstreetMapDownloadURL(String)

setOpenstreetMapDownloadURL

public void setOpenstreetMapDownloadURL(java.lang.String openstreetMapDownloadURL)
The HTTP URL of the directory Where openstreetmap files are to be download from

Parameters:
openstreetMapDownloadURL - The option

getGeonamesDownloadURL

public java.lang.String getGeonamesDownloadURL()
Returns:
The option
See Also:
setGeonamesDownloadURL(String)

setGeonamesDownloadURL

public void setGeonamesDownloadURL(java.lang.String importerGeonamesDownloadURL)
The HTTP URL of the directory Where Geonames files are to be download from

Parameters:
importerGeonamesDownloadURL - The option

isRetrieveFiles

public boolean isRetrieveFiles()
Returns:
The option
See Also:
setRetrieveFiles(boolean)

setRetrieveFiles

public void setRetrieveFiles(boolean retrieveFiles)
Whether we should download the geonames file or use the one already present in the geonamesDir

Parameters:
retrieveFiles - The options

getOpenStreetMapFilesToDownload

public java.lang.String getOpenStreetMapFilesToDownload()
Returns:
The option
See Also:
setOpenStreetMapFilesToDownload(String)

setOpenStreetMapFilesToDownload

public 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

Parameters:
openStreetMapFilesToDownload - The openstreetmap filesToDownload to set

getGeonamesFilesToDownload

public java.lang.String getGeonamesFilesToDownload()
Returns:
The option
See Also:
setGeonamesFilesToDownload(String)

setGeonamesFilesToDownload

public 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

Parameters:
geonamesFilesToDownload - the filesToDownload to set

getAdm1FileName

public java.lang.String getAdm1FileName()
Returns:
the option
See Also:
getAdm1FileName()

setAdm1FileName

public void setAdm1FileName(java.lang.String adm1FileName)
The name of the Geonames dump file containing the ADM with level 1

Parameters:
adm1FileName - The option

getAdm2FileName

public java.lang.String getAdm2FileName()
Returns:
The option
See Also:
getAdm2FileName()

setAdm2FileName

public void setAdm2FileName(java.lang.String adm2FileName)
The name of the Geonames dump file containing the ADM with level 2

Parameters:
adm2FileName - The option

getAdm3FileName

public java.lang.String getAdm3FileName()
Returns:
The option
See Also:
getAdm3FileName()

setAdm3FileName

public void setAdm3FileName(java.lang.String adm3FileName)
The name of the Geonames dump file containing the ADM with level 3

Parameters:
adm3FileName - the adm3FileName to set

getAdm4FileName

public java.lang.String getAdm4FileName()
Returns:
The option
See Also:
getAdm4FileName()

setAdm4FileName

public void setAdm4FileName(java.lang.String adm4FileName)
The name of the Geonames dump file containing the ADM with level 4

Parameters:
adm4FileName - The option

getCountriesFileName

public java.lang.String getCountriesFileName()
Returns:
The Option
See Also:
getCountriesFileName()

setCountriesFileName

public void setCountriesFileName(java.lang.String countryFileName)
The name of the Geonames dump file containing the countries informations

Parameters:
countryFileName - The option

getLanguageFileName

public java.lang.String getLanguageFileName()
Returns:
The option
See Also:
setLanguageFileName(String)

setLanguageFileName

public void setLanguageFileName(java.lang.String languageFileName)
The name of the Geonames dump file containing the language informations

Parameters:
languageFileName - The option

getAlternateNamesFileName

public java.lang.String getAlternateNamesFileName()
Returns:
The option
See Also:
getAlternateNamesFileName()

setAlternateNamesFileName

public void setAlternateNamesFileName(java.lang.String alternateNamesFileName)
The name of the Geonames dump file containing the alternate names

Parameters:
alternateNamesFileName - The option

setMaxInsertsBeforeFlush

public void setMaxInsertsBeforeFlush(int maxInsertsBeforeFlush)
Optional setting that allows to specify the number of inserts that can be done before flushing. This is useful since most ORM technologies use a so-called Level-2 cache that will store all the persisted data until they are either comitted or flushed...default value is DEFAULT_MAX_INSERT_BEFORE_FLUSH

Parameters:
maxInsertsBeforeFlush - The option

getMaxInsertsBeforeFlush

public int getMaxInsertsBeforeFlush()
Returns:
The option
See Also:
setMaxInsertsBeforeFlush(int)

isGeonamesDownloadDirectoryAccessible

public boolean isGeonamesDownloadDirectoryAccessible()
Returns:
true if the directory with the file to import exists and is accessible

isOpenStreetMapDownloadDirectoryAccessible

public boolean isOpenStreetMapDownloadDirectoryAccessible()
Returns:
true if the directory with the file to import exists and is accessible

isRegexpCorrects

public boolean isRegexpCorrects()
Returns:
true if the regexp of the feature class/ code are correct

isConfigCorrectForImport

public boolean isConfigCorrectForImport()
Returns:
true if the config is Ok to process the import

getAlreadyDoneFilePath

public java.lang.String getAlreadyDoneFilePath()
Returns:
the path to the file that give the information if the import is done or not

getImporterMetadataDirectoryPath

public java.lang.String getImporterMetadataDirectoryPath()
Returns:
the path to the file that give the information if the import is done or not

createImporterMetadataDirIfItDoesnTExist

public java.lang.String createImporterMetadataDirIfItDoesnTExist()
Create the importerMetadataDirectory

Returns:
the path to the importerMetadataDirectory

getAlternateNameFeaturesFileName

public java.lang.String getAlternateNameFeaturesFileName()
Get the name of the file where the alternate names of features that are not adm1, adm2, or country are

Returns:
The name of the file
See Also:
setAlternateNameFeaturesFileName(String)

setAlternateNameFeaturesFileName

public 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

Parameters:
alternateNameFeaturesFileName - The name of the file to set
See Also:
getAlternateNameFeaturesFileName()

getAlternateNameAdm1FileName

public java.lang.String getAlternateNameAdm1FileName()
Get the name of the file where the alternate names of adm with level 1 are

Returns:
The name of the file
See Also:
setAlternateNameAdm1FileName(String)

setAlternateNameAdm1FileName

public void setAlternateNameAdm1FileName(java.lang.String alternateNameAdm1FileName)
Set the name of the file where the alternate names of adm with level 1 are

Parameters:
alternateNameAdm1FileName - The name of the file to set
See Also:
getAlternateNameAdm1FileName()

getAlternateNameAdm2FileName

public java.lang.String getAlternateNameAdm2FileName()
Get the name of the file where the alternate names of adm with level 2 are

Returns:
The name of the file
See Also:
setAlternateNameAdm2FileName(String)

setAlternateNameAdm2FileName

public void setAlternateNameAdm2FileName(java.lang.String alternateNameAdm2FileName)
Set the name of the file where the alternate names of adm with level 2 are

Parameters:
alternateNameAdm2FileName - The name of the file to set
See Also:
getAlternateNameAdm2FileName()

getAlternateNameCountryFileName

public java.lang.String getAlternateNameCountryFileName()
Get the name of the file where the alternate names of countries are

Returns:
The name of the file
See Also:
setAlternateNameCountryFileName(String)

setAlternateNameCountryFileName

public void setAlternateNameCountryFileName(java.lang.String alternateNameCountryFileName)
Set the name of the file where the alternate names of countries are

Parameters:
alternateNameCountryFileName - The name of the file to set
See Also:
getAlternateNameCountryFileName()


Copyright © 2010. All Rights Reserved.