DSRG.MKB
Class IS

java.lang.Object
  |
  +--DSRG.MKB.IS

public class IS
extends java.lang.Object

One Information Source (consists of relations)
This holds info about the IS. DBManagers are no longer accessible from here, rather the Middleware (MW) package is responsible for getting a list of IS objects and generating DBManagers from it. So this is only meta-data


Field Summary
 java.lang.String DBType
          Database connection type.
 java.lang.String DBURL
          JDBC URL.
(package private)  int iBF
          Block Size of that DBMS.
 java.lang.String ISName
          the name of this IS
 java.lang.String password
          JDBC Password.
private  java.util.Vector relations
          this is a vector of objects of type DSRG.MKB.Relation
 java.lang.String username
          JDBC Username.
 
Constructor Summary
IS(MKB mkb, java.lang.String ISName, java.lang.String sDBType, java.lang.String sDBURL, java.lang.String sUsername, java.lang.String sPassword, int iBF, boolean localIS)
          Constructed used by MKBParser.
 
Method Summary
 boolean addRelation(Relation rel)
          this is for adding empty relation objects during system initialization.
 boolean addRelation(java.lang.String relName, java.util.Vector attNames, java.util.Vector attTypes)
          Add a Relation Object to this IS.
 boolean deleteRelation(Relation R)
          deletes a relation from the relations-Vector.
 void displayAll()
          this method displays a string-representation of this IS.
 Attribute findAttribute(java.lang.String RName, java.lang.String AttName)
          returns an attribute object after passing relation and attribute names.
 Relation findRelation(java.lang.String Name)
          returns a relation object that matches the name in the parameter.
 java.util.Vector getAttributes(java.lang.String relName)
          returns a vector of attributes that belong to the relation named in the parameter (in this IS)
 java.lang.String getName()
          returns the name of this IS
 java.util.Vector getRelations()
          returns a vector of the relations in this IS
 java.lang.String toString()
          Returns a string representation of the entire (MKB) IS object
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

ISName

public java.lang.String ISName
the name of this IS

relations

private java.util.Vector relations
this is a vector of objects of type DSRG.MKB.Relation

DBType

public java.lang.String DBType
Database connection type. For easier initialization of the system. Now, it could be "ORACLE", and "MS_ACCESS".

DBURL

public java.lang.String DBURL
JDBC URL. For easier initialization of the system.

username

public java.lang.String username
JDBC Username. For easier initialization of the system.

password

public java.lang.String password
JDBC Password. For easier initialization of the system.

iBF

int iBF
Block Size of that DBMS. Used for QC model.
Constructor Detail

IS

public IS(MKB mkb,
          java.lang.String ISName,
          java.lang.String sDBType,
          java.lang.String sDBURL,
          java.lang.String sUsername,
          java.lang.String sPassword,
          int iBF,
          boolean localIS)
Constructed used by MKBParser. It used to create an IS object with associated DBManager.
Method Detail

getRelations

public java.util.Vector getRelations()
returns a vector of the relations in this IS

getAttributes

public java.util.Vector getAttributes(java.lang.String relName)
returns a vector of attributes that belong to the relation named in the parameter (in this IS)

getName

public java.lang.String getName()
returns the name of this IS

displayAll

public void displayAll()
this method displays a string-representation of this IS. Used for testing purposes. It calls the respective Relation.displayAll-methods recursively

toString

public java.lang.String toString()
Returns a string representation of the entire (MKB) IS object
Overrides:
toString in class java.lang.Object

findRelation

public Relation findRelation(java.lang.String Name)
returns a relation object that matches the name in the parameter. Replaces getRelation(String).
Returns:
null if relation with this name does not exist

findAttribute

public Attribute findAttribute(java.lang.String RName,
                               java.lang.String AttName)
returns an attribute object after passing relation and attribute names.
Returns:
null if nothing found

addRelation

public boolean addRelation(Relation rel)
this is for adding empty relation objects during system initialization. It's called from the MKB parser.


addRelation

public boolean addRelation(java.lang.String relName,
                           java.util.Vector attNames,
                           java.util.Vector attTypes)
Add a Relation Object to this IS. Also creates the attribute objects.

deleteRelation

public boolean deleteRelation(Relation R)
deletes a relation from the relations-Vector. Does nothing else. This should also free the attributes connected to this relation and make them ready for garbage collection. (?)