samples.javaclient.analyzer
Class AbstractConnection

java.lang.Object
  extended bysamples.javaclient.analyzer.AbstractConnection
Direct Known Subclasses:
OLAPConnection, PersistenceConnection

abstract class AbstractConnection
extends java.lang.Object

Base class for PersistenceConnection and OLAPConnection.


Field Summary
protected  oracle.xml.parser.v2.XMLElement _root
          Root XML element.
private  DADFile m_dadFile
          DAD file.
 
Constructor Summary
(package private) AbstractConnection(oracle.xml.parser.v2.XMLElement root)
          Constructor.
 
Method Summary
 DADFile getDADFile()
          Gets the DADFile that has the username and password.
private  oracle.xml.parser.v2.XMLElement getDADFileElem()
          Gets the <DADFile> element from the configuration file.
 java.lang.String getDADFileName()
          Gets the name of the DAD file.
 java.lang.String getHostName()
          Gets the HostName attribute of the connection.
abstract  java.lang.String getID()
          Gets the ID attribute for the connection.
 java.lang.String getPortNumber()
          Gets the PortNumber attribute of the connection.
 java.lang.String getSID()
          Gets the SID attribute of the connection.
 boolean isObfuscated()
          Indicates whether the DAD file is obfuscated.
 void setDADFileName(java.lang.String dad)
          Sets the name of the DAD file.
 void setHostName(java.lang.String host)
          Sets the HostName attribute.
 void setObfuscated(boolean obfuscated)
          Sets the Obfuscated attribute of the <DADFile> element.
 void setPortNumber(java.lang.String port)
          Sets the PortNumber attribute of the connection.
 void setSID(java.lang.String sid)
          Sets the SID attribute of the connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_root

protected oracle.xml.parser.v2.XMLElement _root
Root XML element.


m_dadFile

private DADFile m_dadFile
DAD file.

Constructor Detail

AbstractConnection

AbstractConnection(oracle.xml.parser.v2.XMLElement root)
Constructor.

Parameters:
root - The root element in the configuration file (<BIConfig>).
Method Detail

getID

public abstract java.lang.String getID()
Gets the ID attribute for the connection.

Returns:
The value of the appropriate ID attribute.

getHostName

public java.lang.String getHostName()
Gets the HostName attribute of the connection.

Returns:
The value of the HostName attribute.

setHostName

public void setHostName(java.lang.String host)
Sets the HostName attribute.


getPortNumber

public java.lang.String getPortNumber()
Gets the PortNumber attribute of the connection.

Returns:
The value of the PortNumber attribute.

setPortNumber

public void setPortNumber(java.lang.String port)
Sets the PortNumber attribute of the connection.


getSID

public java.lang.String getSID()
Gets the SID attribute of the connection.

Returns:
The value of the SID attribute.

setSID

public void setSID(java.lang.String sid)
Sets the SID attribute of the connection.

Parameters:
sid - The SID to set as the SID attribute value.

getDADFileElem

private oracle.xml.parser.v2.XMLElement getDADFileElem()
Gets the <DADFile> element from the configuration file.

Returns:
The DADFile element.

getDADFileName

public java.lang.String getDADFileName()
Gets the name of the DAD file. This method gets the Filename attribute of the <DADFile> element.

Returns:
The name of the DAD file.

setDADFileName

public void setDADFileName(java.lang.String dad)
Sets the name of the DAD file. This method sets the Filename attribute of the <DADFile> element.

Parameters:
dad - The name of the DAD file, including path information.

isObfuscated

public boolean isObfuscated()
Indicates whether the DAD file is obfuscated.

Returns:
true if the Obfuscated attribute of the <DADFile> element is true, false if the Obfuscated attribute is false.

setObfuscated

public void setObfuscated(boolean obfuscated)
Sets the Obfuscated attribute of the <DADFile> element.

Parameters:
obfuscated - true to set the attribute to true, false to set it to false.

getDADFile

public DADFile getDADFile()
                   throws java.io.IOException
Gets the DADFile that has the username and password.

Returns:
The DADFile.
Throws:
java.io.IOException - If there is a problem opening the DAD file.