JCas
v0.3.1

cas.config
Class JCasInstanceTag

java.lang.Object
  extended bycas.xml.AbstractCasSaxTagHandler
      extended bycas.config.JCasInstanceTag
All Implemented Interfaces:
CasSaxTagHandler

public class JCasInstanceTag
extends AbstractCasSaxTagHandler

Configuration object for a database instance.

Version:
1.0
Author:
Ralph Schuster

Field Summary
protected  String adminRole
          The admin role
protected  Connection con
          The static database connection for custom authorization.
protected static String DEFAULT_DUMMY_TABLE
          Default dummy table
protected  String driver
          The driver
protected  String dummyTable
          A dummy table on the instance
protected  String instanceName
          The instance name
protected static String NAME
          The tag name
protected static String[] parents
          The parents
protected  String password
          The password
protected  String path
          The path
protected  String roleSelect
          The role select statement
protected  String user
          The user
 
Constructor Summary
JCasInstanceTag()
          Creates a new instance of JCasInstanceTag
 
Method Summary
protected  AbstractCasSaxTagHandler createHandler(String tagName, Attributes attributes)
          Returns a new instance of the handler for the specified sub tag.
 String getAdminRole()
          Returns the DBA role.
 Connection getConnection()
          Returns a connection to the database.
 Connection getConnection(String uid, String pwd)
          Returns a new connection.
 String getDriver()
          Returns the driver.
 String getDummyTable()
          Returns the dummy table.
 String getInstanceName()
          Returns the name of the instance.
 String[] getParentTagNames()
          Returns the tag names of all possible parents.
 String getPassword()
          Returns the password.
 String getPath()
          Returns the path.
 String getRoleSelect()
          Returns the role select statement.
protected  String[] getSubTagNames()
          Returns the tag names that can appear within this handler but actually do not contain other tags.
 String getTagName()
          Returns the tag name this handler will take care of.
 String getUser()
          Returns the user.
 void tagCompleted()
          Validates the configuration.
 
Methods inherited from class cas.xml.AbstractCasSaxTagHandler
characters, clear, endElement, getHandler, getSubHandler, getSubHandlerCount, getSubHandlers, getSubTag, getSubTag, getSubTagCount, getSubTags, ignoresUnknownTags, setAttributes, setIgnoreUnknownTags, startElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

protected static String NAME
The tag name


parents

protected static String[] parents
The parents


DEFAULT_DUMMY_TABLE

protected static String DEFAULT_DUMMY_TABLE
Default dummy table


instanceName

protected String instanceName
The instance name


driver

protected String driver
The driver


path

protected String path
The path


user

protected String user
The user


password

protected String password
The password


roleSelect

protected String roleSelect
The role select statement


adminRole

protected String adminRole
The admin role


con

protected Connection con
The static database connection for custom authorization.


dummyTable

protected String dummyTable
A dummy table on the instance

Constructor Detail

JCasInstanceTag

public JCasInstanceTag()
Creates a new instance of JCasInstanceTag

Method Detail

createHandler

protected AbstractCasSaxTagHandler createHandler(String tagName,
                                                 Attributes attributes)
Description copied from class: AbstractCasSaxTagHandler
Returns a new instance of the handler for the specified sub tag.

Specified by:
createHandler in class AbstractCasSaxTagHandler
Parameters:
tagName - - name of the sub tag
Returns:
new instance of sub tag handler or null

getParentTagNames

public String[] getParentTagNames()
Description copied from class: AbstractCasSaxTagHandler
Returns the tag names of all possible parents.

Specified by:
getParentTagNames in class AbstractCasSaxTagHandler
Returns:
- the tag names of possible parents

getSubTagNames

protected String[] getSubTagNames()
Description copied from class: AbstractCasSaxTagHandler
Returns the tag names that can appear within this handler but actually do not contain other tags.

Overrides:
getSubTagNames in class AbstractCasSaxTagHandler
Returns:
- all tag names that represent simple tags.

getTagName

public String getTagName()
Description copied from interface: CasSaxTagHandler
Returns the tag name this handler will take care of.

Returns:
- a tag name.

tagCompleted

public void tagCompleted()
                  throws SAXException
Description copied from class: AbstractCasSaxTagHandler
Validates the configuration. By default this method does nothing but handlers should override to check the values.

Specified by:
tagCompleted in interface CasSaxTagHandler
Overrides:
tagCompleted in class AbstractCasSaxTagHandler
Throws:
SAXException

getInstanceName

public String getInstanceName()
Returns the name of the instance.


getDriver

public String getDriver()
Returns the driver.


getPath

public String getPath()
Returns the path.


getUser

public String getUser()
Returns the user.


getPassword

public String getPassword()
Returns the password.


getRoleSelect

public String getRoleSelect()
Returns the role select statement.


getAdminRole

public String getAdminRole()
Returns the DBA role.


getDummyTable

public String getDummyTable()
Returns the dummy table.


getConnection

public Connection getConnection()
                         throws SQLException
Returns a connection to the database.

Throws:
SQLException

getConnection

public Connection getConnection(String uid,
                                String pwd)
                         throws SQLException
Returns a new connection.

Throws:
SQLException

JCas
v0.3.1