Package org.scictrl.mp.orbitcorrect
Class DBInitializer
java.lang.Object
org.scictrl.mp.orbitcorrect.DBInitializer
Initializes DataBush object
- Author:
- igor@scictrl.com
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
ConstantAPPLY_MODEL="dbinit.databush.apply_model"
static final String
ConstantBEAM_SIMULATOR="dbinit.databush.beam_simulator"
static final String
ConstantBPM_POSITION_PRECISION="dbinit.databush.bpm_position_precision"
static final String
ConstantCALCULATOR_FACTORY="dbinit.databush.calculator_factory"
static final String
ConstantCONTROL_SYSTEM="dbinit.databush.control_system"
static final String
ConstantCURRENT_PRECISION="dbinit.databush.current_precision"
static final String
ConstantDB_READER="dbinit.dbreader"
static final String
ConstantDBINIT_DATA_FILE="DBinit.data"
static final String
ConstantMIN_UPDATE_INTERVAL="dbinit.databush.minupdateinterval"
static final String
ConstantPOSITION_PRECISION="dbinit.databush.position_precision"
static final String
ConstantR_BASE_URL="dbinit.base_url"
static final String
ConstantR_INPUT_FILE_URL="dbinit.inputfile_url"
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearDB()
clearDB.getBaseURL.org.apache.commons.configuration.Configuration
Returns current configuration.Getter for the fieldconfigurationFile
.Getter for the fielddataBush
.getInputFileURL.getProperty
(String key) getProperty.void
initDB()
initDB.static void
main entrypoint - starts the part when it is run as an applicationnewDBReader.static final DBInitializer
newInstance
(File file) newInstance.readInputFile.
-
Field Details
-
DBINIT_DATA_FILE
ConstantDBINIT_DATA_FILE="DBinit.data"
- See Also:
-
R_INPUT_FILE_URL
ConstantR_INPUT_FILE_URL="dbinit.inputfile_url"
- See Also:
-
DB_READER
ConstantDB_READER="dbinit.dbreader"
- See Also:
-
R_BASE_URL
ConstantR_BASE_URL="dbinit.base_url"
- See Also:
-
MIN_UPDATE_INTERVAL
ConstantMIN_UPDATE_INTERVAL="dbinit.databush.minupdateinterval"
- See Also:
-
POSITION_PRECISION
ConstantPOSITION_PRECISION="dbinit.databush.position_precision"
- See Also:
-
BPM_POSITION_PRECISION
ConstantBPM_POSITION_PRECISION="dbinit.databush.bpm_position_precision"
- See Also:
-
CURRENT_PRECISION
ConstantCURRENT_PRECISION="dbinit.databush.current_precision"
- See Also:
-
BEAM_SIMULATOR
ConstantBEAM_SIMULATOR="dbinit.databush.beam_simulator"
- See Also:
-
APPLY_MODEL
ConstantAPPLY_MODEL="dbinit.databush.apply_model"
- See Also:
-
CONTROL_SYSTEM
ConstantCONTROL_SYSTEM="dbinit.databush.control_system"
- See Also:
-
CALCULATOR_FACTORY
ConstantCALCULATOR_FACTORY="dbinit.databush.calculator_factory"
- See Also:
-
-
Method Details
-
newInstance
newInstance.
- Parameters:
file
- aFile
object- Returns:
- a
DBInitializer
object - Throws:
IOException
- if any.DataBushException
- if any.
-
getBaseURL
getBaseURL.
- Returns:
- java.net.URL
- Throws:
MalformedURLException
- if any.
-
clearDB
public void clearDB()clearDB.
-
getConfigurationFile
Getter for the field
configurationFile
.- Returns:
- java.io.File
-
getDataBush
Getter for the field
dataBush
.- Returns:
- DataBush
-
getConfiguration
public org.apache.commons.configuration.Configuration getConfiguration()Returns current configuration.- Returns:
- configuration
-
getProperty
getProperty.
- Parameters:
key
- java.lang.String- Returns:
- java.lang.String
-
initDB
initDB.
- Throws:
DataBushException
- if any.MalformedURLException
- if any.
-
getInputFileURL
getInputFileURL.
- Returns:
- java.net.URL
- Throws:
MalformedURLException
- if any.
-
main
main entrypoint - starts the part when it is run as an application- Parameters:
args
- java.lang.String[]
-
newDBReader
public IDataBushReader newDBReader() throws ClassNotFoundException, InstantiationException, IllegalAccessException, ClassCastException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityExceptionnewDBReader.
- Returns:
- IDataBushReader
- Throws:
ClassNotFoundException
- if read failsInstantiationException
- if read failsIllegalAccessException
- if read failsClassCastException
- if read failsIllegalArgumentException
- if read failsInvocationTargetException
- if read failsNoSuchMethodException
- if read failsSecurityException
- if read fails
-
readInputFile
public ElementList<AbstractDataBushElement> readInputFile() throws DataBushException, MalformedURLExceptionreadInputFile.
- Returns:
- a
ElementList
object - Throws:
DataBushException
- if any.MalformedURLException
- if any.
-