Open SiteSearch 4.1.1
Final

ORG.oclc.access.api
Class MetaData

java.lang.Object
  |
  +--ORG.oclc.access.api.MetaData

public class MetaData
extends Object
implements IDataDir

The MetaData class contains information about MetaData about the database retrieved from the AccessServer.


Field Summary
static String AUTHORIZATION
           
static String DATABASE
           
static String GROUPS
           
static String INSTITUTION
           
static String MEMBERS
           
static String OBJECTS
           
static String PERSISTENTPROFILE
           
static String RESOURCE
           
static String SYSTEM
           
static String USERDB
           
 
Constructor Summary
MetaData()
          Constructs a new MetaData class.
 
Method Summary
 void addColumn(String tableName, String colName, String colType, int colLength, String colPurpose, String colLink)
          Adds information about a table column to the MetaData
 void addTable(String tblName, String tblPurpose)
          Adds a table to the MetaData
 String getColNameByPurpose(String tableName, String colPurpose)
          Returns a String containing the column name associated with this purpose.
 int getColumnCount(String tableName)
          Returns an Integer data type containing the number of columns in a table.
 String getColumnName(String tableName, int colNum)
          Returns a String containing the name of the nth column in a table.
 String getColumnType(String tableName, int colNum)
          Returns a String containing the type of the nth column in a table.
 Vector getLinks(String tableName)
          Returns a Vector containing all the links associated with this table.
 String getTableName(String purpose)
          Returns a String containing the table name for a particular table purpose.
 void init(DataDir dir)
          Initializes the MetaData object from a DataDir directory tree.
 String linkDest(String tableName, String colName)
          Returns a String containing the link associated with a column in a table.
 DataDir toDataDir()
          Returns a DataDir containing the BER-encoding of this object.
 String toString()
          Returns a String containing the string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTHORIZATION

public static final String AUTHORIZATION

USERDB

public static final String USERDB

DATABASE

public static final String DATABASE

GROUPS

public static final String GROUPS

MEMBERS

public static final String MEMBERS

OBJECTS

public static final String OBJECTS

RESOURCE

public static final String RESOURCE

INSTITUTION

public static final String INSTITUTION

SYSTEM

public static final String SYSTEM

PERSISTENTPROFILE

public static final String PERSISTENTPROFILE
Constructor Detail

MetaData

public MetaData()
Constructs a new MetaData class.
Method Detail

init

public void init(DataDir dir)
Initializes the MetaData object from a DataDir directory tree.
Specified by:
init in interface IDataDir
Parameters:
dir - the DataDir directory tree
See Also:
DataDir

toDataDir

public DataDir toDataDir()
Returns a DataDir containing the BER-encoding of this object.
Specified by:
toDataDir in interface IDataDir
Returns:
a directory tree containing the BER-encoded MetaData.
See Also:
DataDir

getTableName

public String getTableName(String purpose)
Returns a String containing the table name for a particular table purpose.
Parameters:
purpose - the purpose of a table
Returns:
tableName the name of the table with this purpose

linkDest

public String linkDest(String tableName,
                       String colName)
Returns a String containing the link associated with a column in a table.
Parameters:
tableName - the name of the table.
colName - the name of the column
Returns:
the link associated with this column

getColNameByPurpose

public String getColNameByPurpose(String tableName,
                                  String colPurpose)
Returns a String containing the column name associated with this purpose.
Parameters:
tableName - the name of the table
colPurpose - the purpose to look for
Returns:
the name of the column with this purpose

getLinks

public Vector getLinks(String tableName)
Returns a Vector containing all the links associated with this table.
Parameters:
tableName - the name of the table
Returns:
links a Vector of Strings of links

addTable

public void addTable(String tblName,
                     String tblPurpose)
Adds a table to the MetaData
Parameters:
tblName - the name of the table
tblPurpose - the purpose of the table.

addColumn

public void addColumn(String tableName,
                      String colName,
                      String colType,
                      int colLength,
                      String colPurpose,
                      String colLink)
Adds information about a table column to the MetaData
Parameters:
tablename - the name of the table
colName - the name of the column
colType - the type of the column
colLength - the length of the column
colPurpose - the purpose of the column
colLink - links to other tables

getColumnCount

public int getColumnCount(String tableName)
Returns an Integer data type containing the number of columns in a table.
Parameters:
tableName - the name of the table
Returns:
the number of columns

getColumnName

public String getColumnName(String tableName,
                            int colNum)
Returns a String containing the name of the nth column in a table.
Parameters:
tableName - the name of the table
colNum - the number of the column to look for (1-based)
Returns:
the name of the column

getColumnType

public String getColumnType(String tableName,
                            int colNum)
Returns a String containing the type of the nth column in a table.
Parameters:
tableName - the name of the table
colNum - the number of the column to look for (1-based)
Returns:
the name of the column

toString

public String toString()
Returns a String containing the string representation of this object.
Returns:
the printable dump of the object.
Overrides:
toString in class Object

Open SiteSearch 4.1.1
Final