Package org.drip.param.config
Class ConfigLoader
java.lang.Object
org.drip.param.config.ConfigLoader
public class ConfigLoader
extends java.lang.Object
ConfigLoader implements the configuration functionality. It exposes the following:
Depending on the configuration setting, ConfigLoader loads the above from either a file or the specified database.
- Parses the XML configuration file and extract the tag pairs information.
- Retrieve the logger.
- Load the holiday calendars and retrieve the location holidays.
- Connect to analytics server and the database server.
Depending on the configuration setting, ConfigLoader loads the above from either a file or the specified database.
- Module = Product Core Module
- Library = Fixed Income Analytics
- Project = Product Cash Flow, Valuation, Market, Pricing, and Quoting Parameters
- Package = Library Level Configuration Parameters Setting
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description ConfigLoader()
-
Method Summary
Modifier and Type Method Description static java.net.Socket
ConnectToAnalServer(java.lang.String strConfigFile)
Connect to the analytics server from the connection parameters set in the XML Configuration filestatic java.net.ServerSocket
InitAnalServer(java.lang.String strConfigFile)
Initialize the analytics server from the connection parameters set in the XML Configuration filestatic CaseInsensitiveTreeMap<Locale>
LoadHolidayCalendars(java.lang.String strConfigFile)
Load the map of the holiday calendars from the entries set in the XML Configuration filestatic CaseInsensitiveTreeMap<Locale>
LoadHolidayCalendarsFromDB(java.lang.String strConfigFile)
Load the map of the holiday calendars from the database settings set in the XML Configuration filestatic Locale
LocationHolidays(org.w3c.dom.Document doc, java.lang.String strLoc)
Create a LocHolidays object from the XML Document and the Location Tagstatic java.lang.String
LoggerLocation(java.lang.String strConfigFile)
Get the logger location from the XML Configuration filestatic java.sql.Statement
OracleInit(java.lang.String strConfigFile)
Initialize the Oracle database from the connection parameters set in the XML Configuration fileMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ConfigLoader
public ConfigLoader()
-
-
Method Details
-
LocationHolidays
Create a LocHolidays object from the XML Document and the Location Tag- Parameters:
doc
- XML DocumentstrLoc
- Location Tag- Returns:
- LocHolidays
-
LoggerLocation
public static java.lang.String LoggerLocation(java.lang.String strConfigFile)Get the logger location from the XML Configuration file- Parameters:
strConfigFile
- XML Configuration file- Returns:
- String representing the logger location's full path
-
ConnectToAnalServer
public static java.net.Socket ConnectToAnalServer(java.lang.String strConfigFile)Connect to the analytics server from the connection parameters set in the XML Configuration file- Parameters:
strConfigFile
- XML Configuration file- Returns:
- java.net.Socket
-
InitAnalServer
public static java.net.ServerSocket InitAnalServer(java.lang.String strConfigFile)Initialize the analytics server from the connection parameters set in the XML Configuration file- Parameters:
strConfigFile
- XML Configuration file- Returns:
- java.net.ServerSocket
-
LoadHolidayCalendars
Load the map of the holiday calendars from the entries set in the XML Configuration file- Parameters:
strConfigFile
- XML Configuration file- Returns:
- Map of the holiday calendars
-
OracleInit
public static java.sql.Statement OracleInit(java.lang.String strConfigFile)Initialize the Oracle database from the connection parameters set in the XML Configuration file- Parameters:
strConfigFile
- XML Configuration file- Returns:
- Connection Statement object
-
LoadHolidayCalendarsFromDB
public static final CaseInsensitiveTreeMap<Locale> LoadHolidayCalendarsFromDB(java.lang.String strConfigFile)Load the map of the holiday calendars from the database settings set in the XML Configuration file- Parameters:
strConfigFile
- XML Configuration file- Returns:
- Map of the holiday calendars
-