com.cysols.iodef
Class DBConfigParser

java.lang.Object
  extended by com.cysols.iodef.DBConfigParser

public class DBConfigParser
extends Object

Class which parses the configuration and loads the the values as properties.

Author:
cysol

Method Summary
 String getCollection()
          Returns the collection name.
 String getDBName()
          Returns the table name of database
 String getDBPort()
          the port number of database.
 String getDriver()
          Returns the driver name from proprities.
 String getHostIP()
          Returns the host ipAddress of database.
 String getURL()
          Returns the url.
 boolean load()
          Loads the configuration for database by default file as "config/db.proprities".
 boolean load(String fileName)
          Loads the configuration for database by specified file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

load

public boolean load(String fileName)
Loads the configuration for database by specified file.

Parameters:
fileName - - file path of configuration
Returns:
true if loading is successfuly.

load

public boolean load()
Loads the configuration for database by default file as "config/db.proprities".

Returns:
true if loading is successfuly.

getDriver

public String getDriver()
Returns the driver name from proprities.

Returns:
driver name.

getURL

public String getURL()
Returns the url. creats url by some parameters if url doesn't exist in prorities. "xmldb:xindice:///db/iodef";

Returns:
url name

getHostIP

public String getHostIP()
Returns the host ipAddress of database.

Returns:
ip address

getDBPort

public String getDBPort()
the port number of database.

Returns:
port number

getDBName

public String getDBName()
Returns the table name of database

Returns:
table name.

getCollection

public String getCollection()
Returns the collection name.

Returns:
the collection name