edu.wpi.cs.DSRG.xmldb.restructuring
Class Catalog

java.lang.Object
  |
  +--edu.wpi.cs.DSRG.xmldb.restructuring.Catalog

public class Catalog
extends java.lang.Object

Catalog.java provides methods for accessing the latest views on the data tables. This class provides the encapsulation of setting and getting the latest data view names for each data table.


Field Summary
(package private)  JDBCClient jdbc
           
(package private)  java.sql.ResultSet rs
           
 
Constructor Summary
Catalog(JDBCClient jdbc)
          This constructor is used when a connection has already been established.
 
Method Summary
 java.lang.String getViewTableName(java.lang.String item_name, int DTD_ID)
          The method getViewTableName() retrieves the latest view name for a given DTD's item.
 void init()
          The method init() initializes the view attribute of every data relation of every dtd stored in the database specified by the connection.
 void setItemName(java.lang.String item_name, int DTD_ID, java.lang.String new_item_name)
          The method setItemName() allows for the changing of the item names for a given DTD.
 void setViewTableName(java.lang.String item_name, int DTD_ID, java.lang.String new_view_table_name)
          The method setViewTableName() sets the latest view name for a given DTD's item to a new view name.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

jdbc

JDBCClient jdbc

rs

java.sql.ResultSet rs
Constructor Detail

Catalog

public Catalog(JDBCClient jdbc)
This constructor is used when a connection has already been established. Sets the instance variable 'jdbc' to the passed in connection object.
Parameters:
jdbc - JDBCClient the connection object passed in
Method Detail

init

public void init()
The method init() initializes the view attribute of every data relation of every dtd stored in the database specified by the connection.

getViewTableName

public java.lang.String getViewTableName(java.lang.String item_name,
                                         int DTD_ID)
                                  throws java.lang.Exception
The method getViewTableName() retrieves the latest view name for a given DTD's item.
Parameters:
item_name - String Name of the item retrieving view for
DTD_ID - int The internal id of the DTD that contains the item

setViewTableName

public void setViewTableName(java.lang.String item_name,
                             int DTD_ID,
                             java.lang.String new_view_table_name)
                      throws java.lang.Exception
The method setViewTableName() sets the latest view name for a given DTD's item to a new view name.
Parameters:
item_name - String Name of the item setting view for
DTD_ID - int The internal id of the DTD that contains the item
new_view_table_name - String The new view name for the item specified

setItemName

public void setItemName(java.lang.String item_name,
                        int DTD_ID,
                        java.lang.String new_item_name)
                 throws java.lang.Exception
The method setItemName() allows for the changing of the item names for a given DTD.
Parameters:
item_name - String Name of the item changing name
DTD_ID - int The internal id for the item
new_item_name - String New name for the item changing name