uk.org.ogsadai.activity.relational
Class PhysicalSchemaFileActivityConfiguration

java.lang.Object
  |
  +--uk.org.ogsadai.activity.relational.PhysicalSchemaFileActivityConfiguration
All Implemented Interfaces:
ActivityConfiguration

public class PhysicalSchemaFileActivityConfiguration
extends java.lang.Object
implements ActivityConfiguration

Reads a configuration document and retrieves the physical schema information.

Author:
The OGSA-DAI Project Team.

Field Summary
static java.lang.String ATTR_AVG_ROW_SIZE
           
static java.lang.String ATTR_DATA_LENGTH
           
static java.lang.String ATTR_INDEX_LENGTH
           
static java.lang.String ATTR_NAME
           
static java.lang.String ATTR_ROW_COUNT
          XML element and attribute names
static java.lang.String ATTR_ROW_FORMAT
           
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private  java.util.Map mAvgRowLength
          Average row length in a table
private  java.lang.String mDatabase
          Name of the database
private  java.util.Map mDataLength
          Size of a table
private  java.util.Map mIndexLength
          Size of an index
private  java.lang.String mJoinBufferSize
          Size of join buffer in a database
private  java.lang.String mMaxJoinSize
          Maximum join size in a database
private  java.lang.String mName
          Activity name
private  java.util.Map mRowCounts
          Number of rows in a table, mapped by table name
private  java.util.Map mRowFormat
          Table name mapped to row format
private  java.util.Set mTableNames
          Table names
 
Constructor Summary
PhysicalSchemaFileActivityConfiguration(java.lang.String name)
          Constructor
 
Method Summary
 java.lang.String getAverageRowLength(java.lang.String table)
          Get the average length of a row in a particular table
 java.lang.String getDatabaseName()
          Get the name of the database
 java.lang.String getDataLength(java.lang.String table)
          Get the size of a table
 java.lang.String getIndexLength(java.lang.String table)
          Get the size of the index of a particular table
 java.lang.String getJoinBufferSize()
          Get the join buffer size for this database
 java.lang.String getMaxJoinSize()
          Get the max join size for this database
 java.lang.String getRowCount(java.lang.String table)
          Get the row count for a particular table.
 java.lang.String getRowFormat(java.lang.String table)
          Get the row format for a particular table.
 java.util.Set getTableNames()
          Get names of all tables.
 void initialise(org.w3c.dom.Document document)
          Parses the configuration document, initialising any fields that are necessary for the accessor methods to operate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

ATTR_ROW_COUNT

public static final java.lang.String ATTR_ROW_COUNT
XML element and attribute names

See Also:
Constant Field Values

ATTR_ROW_FORMAT

public static final java.lang.String ATTR_ROW_FORMAT
See Also:
Constant Field Values

ATTR_AVG_ROW_SIZE

public static final java.lang.String ATTR_AVG_ROW_SIZE
See Also:
Constant Field Values

ATTR_DATA_LENGTH

public static final java.lang.String ATTR_DATA_LENGTH
See Also:
Constant Field Values

ATTR_INDEX_LENGTH

public static final java.lang.String ATTR_INDEX_LENGTH
See Also:
Constant Field Values

ATTR_NAME

public static final java.lang.String ATTR_NAME
See Also:
Constant Field Values

mTableNames

private java.util.Set mTableNames
Table names


mRowCounts

private java.util.Map mRowCounts
Number of rows in a table, mapped by table name


mRowFormat

private java.util.Map mRowFormat
Table name mapped to row format


mDataLength

private java.util.Map mDataLength
Size of a table


mIndexLength

private java.util.Map mIndexLength
Size of an index


mAvgRowLength

private java.util.Map mAvgRowLength
Average row length in a table


mMaxJoinSize

private java.lang.String mMaxJoinSize
Maximum join size in a database


mJoinBufferSize

private java.lang.String mJoinBufferSize
Size of join buffer in a database


mDatabase

private java.lang.String mDatabase
Name of the database


mName

private java.lang.String mName
Activity name

Constructor Detail

PhysicalSchemaFileActivityConfiguration

public PhysicalSchemaFileActivityConfiguration(java.lang.String name)
Constructor

Parameters:
name - Activity name
Method Detail

initialise

public void initialise(org.w3c.dom.Document document)
                throws ActivityConfigurationException
Description copied from interface: ActivityConfiguration
Parses the configuration document, initialising any fields that are necessary for the accessor methods to operate. This method is called by the ActivityCreator class.

Specified by:
initialise in interface ActivityConfiguration
Parameters:
document - The Document containing the activity configuration information.
Throws:
ActivityConfigurationException - If there is a problem initialising the ActivityConfiguration object. This may be caused by the document containing invalid information, or perhaps by a system problem within the initialisation code.

getTableNames

public java.util.Set getTableNames()
Get names of all tables.

Returns:
list of table names

getRowCount

public java.lang.String getRowCount(java.lang.String table)
Get the row count for a particular table.

Parameters:
table - Table name
Returns:
table row count or null if the table cannot be found or no information is available.

getRowFormat

public java.lang.String getRowFormat(java.lang.String table)
Get the row format for a particular table.

Parameters:
table - Table name
Returns:
table row format or null if the table cannot be found or the information is not available

getAverageRowLength

public java.lang.String getAverageRowLength(java.lang.String table)
Get the average length of a row in a particular table

Parameters:
table - Table name
Returns:
average row size or null if the table cannot be found or the information is not available

getDataLength

public java.lang.String getDataLength(java.lang.String table)
Get the size of a table

Parameters:
table - Table name
Returns:
table size or null if the table cannot be found or the information is not available

getIndexLength

public java.lang.String getIndexLength(java.lang.String table)
Get the size of the index of a particular table

Parameters:
table - Table name
Returns:
index size or null if the table cannot be found or the information is not available

getDatabaseName

public java.lang.String getDatabaseName()
Get the name of the database

Returns:
database name

getMaxJoinSize

public java.lang.String getMaxJoinSize()
Get the max join size for this database

Returns:
max join size

getJoinBufferSize

public java.lang.String getJoinBufferSize()
Get the join buffer size for this database

Returns:
join buffer size