samples.javaclient.analyzer
Class BIConfigReader

java.lang.Object
  extended bysamples.javaclient.analyzer.BIConfigReader

public class BIConfigReader
extends java.lang.Object

Reads the configuration file. This class uses java.io classes, to read the configuration file, and oracle.xml.parser.v2 classes, to parse the xml.

The AnalyzerConnection uses this class for access to the configuration file.


Field Summary
private  OLAPConnection m_olapConn
          The OLAPConnection element in the BIConfig file.
private  PersistenceConnection m_perConn
          The PersistenceConnection element in the BIConfig file.
private  oracle.xml.parser.v2.XMLElement m_root
          The root element in the BIConfig file (<BIConfig>).
 
Constructor Summary
BIConfigReader(java.lang.String configXML)
          Constructor.
 
Method Summary
 OLAPConnection getOLAPConnection()
          Gets connection information that is in the <OLAPConnection> element.
 PersistenceConnection getPersistenceConnection()
          Gets connection information that is in the <PersistenceConnection> element.
static void main(java.lang.String[] args)
          Test this class.
 void writeToLocalFile(java.lang.String configFile, java.lang.String catalogFile)
          Writes both the config file and the Catalog DAD file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_root

private oracle.xml.parser.v2.XMLElement m_root
The root element in the BIConfig file (<BIConfig>).


m_perConn

private PersistenceConnection m_perConn
The PersistenceConnection element in the BIConfig file.


m_olapConn

private OLAPConnection m_olapConn
The OLAPConnection element in the BIConfig file.

Constructor Detail

BIConfigReader

public BIConfigReader(java.lang.String configXML)
               throws java.io.IOException,
                      org.xml.sax.SAXException
Constructor.

Parameters:
configXML - The configuration file.
Throws:
java.io.IOException - If there is a problem opening the configuration file.
org.xml.sax.SAXException - If a general SAX exception occurs in parsing the XML.
Method Detail

getPersistenceConnection

public PersistenceConnection getPersistenceConnection()
Gets connection information that is in the <PersistenceConnection> element.

Returns:
Information about the connection to the BI Beans Catalog.

getOLAPConnection

public OLAPConnection getOLAPConnection()
Gets connection information that is in the <OLAPConnection> element.

Returns:
Information about the connection to the OLAP Catalog.

writeToLocalFile

public void writeToLocalFile(java.lang.String configFile,
                             java.lang.String catalogFile)
                      throws java.io.IOException
Writes both the config file and the Catalog DAD file.

Parameters:
configFile - The full path name of the configuration file.
catalogFile - The full path name of the DAD file.
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
Test this class.