All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class EVEDemo.MW.Main

java.lang.Object
   |
   +----EVEDemo.MW.Main

public class Main
extends Object
The main class in the "middleware" layer.
Here, we initialize the object structure by loading all the views from the VKB, the ISs from the MKB. Instantiating an object of the IS class reads the appropriate information from the DB
The RMI-support has been discontinued.


Variable Index

 o AliveCounter
The Flag which will be changed by the alived user.
 o changed
has there been a change made?
 o DBManagers
a vector of DBManager objects to connect to physical databases
 o DEBUG
Debug flag
 o expTime
The Global variable to terminate the process.
 o lcount
XIN: Please explain or remove
count total local queries.
 o localDBManager
a handle (type DBManager) for the local DB-Manager
 o mainMKB
the MKB object
 o mainVKB
the VKB object
 o mainVSA
the VSA object
 o props
handle to eve.properties
 o queryEngine
a handle to the Query Engine
 o rcount
XIN: Please explain or remove.
count total remote queries.
 o Views
the vector of View objects

Constructor Index

 o Main()
Constructed for create Main object in the Start class.

Method Index

 o addAttribute(String, String, String, String)
 o addRelation(String, String, Vector, Vector)
Adds a relation by calling the appropriate method in the MKB
 o AliveMsg()
The current connect user will use this function to increase the counter.
 o changeAttributeName(String, String, String, String)
Renames an attribute by calling the appropriate method in the MKB
 o changeRelationName(String, String, String)
Renames a relation by calling the appropriate method in the MKB
 o createDBManager(String, String, String, String, String)
Constructed used by MKBParser.
 o deleteAttribute(String, String, String)
Deletes an attribute by calling the appropriate method in the MKB.
 o deleteRelation(String, String)
Deletes a relation by calling the appropriate method in the MKB
 o getAllViews()
return the collection of views.
 o getAllViewsFromVKB()
Get all view names from the VKB and create View objects for each name.
 o getChangeStatus()
Returns if there has been a capability change and resets "changed" bit to false.
 o getCorrectDefinitionx(String)
An attempt at fixing some RMI problem.
 o getCorrectOldDefinitionx(String)
An attempt at fixing some RMI problem.
 o getDBManagerFromISName(String)
searches for a DBManager from an IS name
 o getDBManagers()
this vector contains objects of class DBManager
 o getISfromName(String)
searches for an IS object by name
 o getLocalDBManager()
 o getMKB()
returns a handle to the Main MKB
 o getMyIcon(String)
 o getQueryEngine()
 o getTable(String, String)
Get extent of a single relation as a Table object.
 o getViewExtent(String, boolean)
Get Extent of a specific view.
 o getVKB()
 o incLcount()
XIN: Please explain or remove
increase the lcount
 o incRcount()
XIN: Please explain or remove.
increase the rcount
 o isISChangeRunning()
Returns if a user is currently able to make capability changes
 o reset()
Reset Middle Layer.
 o saveViews(Main)
Save all Views
 o startUpdate()
this method is used to demonstrate incremental view maintenance and is currently not used.

Variables

 o DEBUG
 public static final boolean DEBUG
Debug flag

 o rcount
 public static int rcount
XIN: Please explain or remove.
count total remote queries.

 o lcount
 public static int lcount
XIN: Please explain or remove
count total local queries.

 o Views
 private Vector Views
the vector of View objects

 o DBManagers
 Vector DBManagers
a vector of DBManager objects to connect to physical databases

 o localDBManager
 DBManager localDBManager
a handle (type DBManager) for the local DB-Manager

 o mainMKB
 private MKB mainMKB
the MKB object

 o mainVKB
 private VKB mainVKB
the VKB object

 o mainVSA
 private VSA mainVSA
the VSA object

 o queryEngine
 private QueryEngine queryEngine
a handle to the Query Engine

 o changed
 private boolean changed
has there been a change made?

 o props
 Properties props
handle to eve.properties

 o expTime
 public static double expTime
The Global variable to terminate the process. it's only used for batch mode of data update detection. It will stores the time spend on a specific experiments.

 o AliveCounter
 private static int AliveCounter
The Flag which will be changed by the alived user.

Constructors

 o Main
 public Main()
Constructed for create Main object in the Start class.

Methods

 o incRcount
 public static synchronized void incRcount()
XIN: Please explain or remove.
increase the rcount

 o incLcount
 public static synchronized void incLcount()
XIN: Please explain or remove
increase the lcount

 o getMKB
 public MKB getMKB()
returns a handle to the Main MKB

 o getAllViewsFromVKB
 private Vector getAllViewsFromVKB()
Get all view names from the VKB and create View objects for each name.
We construct a view object for each view name that we find in the VKB and then instantiate it with default parameters (the handles to InformationSources, ISs, MKB, VKB)

 o deleteAttribute
 public boolean deleteAttribute(String isName,
                                String relName,
                                String attName)
Deletes an attribute by calling the appropriate method in the MKB.

Parameters:
isName - name of the IS the attribute is in
relName - name of the relation the attribute is in
attName - name of the attribute to delete
 o addAttribute
 public boolean addAttribute(String isName,
                             String relName,
                             String attName,
                             String attType)
 o changeAttributeName
 public boolean changeAttributeName(String isName,
                                    String relName,
                                    String attName,
                                    String newName)
Renames an attribute by calling the appropriate method in the MKB

Parameters:
isName - name of the IS the attribute is in
relName - name of the relation the attribute is in
attName - name of the attribute to rename
newName - new name of the attribute
 o addRelation
 public boolean addRelation(String isName,
                            String relName,
                            Vector attNames,
                            Vector attTypes)
Adds a relation by calling the appropriate method in the MKB

Parameters:
isName - name of the IS the relation is in
relName - name of the relation to add
attNames - names of the attribute to add to relName
attTypes - types of the attributes
 o deleteRelation
 public boolean deleteRelation(String isName,
                               String relName)
Deletes a relation by calling the appropriate method in the MKB

Parameters:
isName - name of the IS the relation is in
relName - name of the relation to delete
 o changeRelationName
 public boolean changeRelationName(String isName,
                                   String relName,
                                   String newName)
Renames a relation by calling the appropriate method in the MKB

Parameters:
isName - name of the IS the relation is in
relName - name of the relation to rename
newName - new name of the relation
 o getISfromName
 public IS getISfromName(String theIS)
searches for an IS object by name

Returns:
null if IS with this name not found
 o getChangeStatus
 public boolean getChangeStatus()
Returns if there has been a capability change and resets "changed" bit to false.

 o isISChangeRunning
 public boolean isISChangeRunning()
Returns if a user is currently able to make capability changes

 o reset
 public void reset()
Reset Middle Layer.
To do: change static trade-off parameters to something more dynamic. The database is not being reset here anymore, this is done with the separate class "resetDB" from a shell script.

 o AliveMsg
 public void AliveMsg()
The current connect user will use this function to increase the counter.

 o getCorrectDefinitionx
 public String getCorrectDefinitionx(String theViewName)
An attempt at fixing some RMI problem. Not needed anymore? (koeller 030799)

 o getCorrectOldDefinitionx
 public String getCorrectOldDefinitionx(String theViewName)
An attempt at fixing some RMI problem. Not needed anymore? (koeller 030799)

 o getAllViews
 public synchronized Vector getAllViews()
return the collection of views.
if it doesn't exist yet, get it through getAllViewsFromVKB() If it does exist, refresh the views.

koeller 030799: Added support for the QC-Module. This is a new function aimed at selecting one of several view version suggested by the QC-Module. The vector Views contains views like before, but here the new "Versions" attribute (a vector of objects of class "version") is initialized.

 o saveViews
 public void saveViews(Main something)
Save all Views

 o getViewExtent
 public Table getViewExtent(String viewName,
                            boolean old_view_extent)
Get Extent of a specific view. Calls the QueryEngine class.

Parameters:
viewName - Name of the View.
 o getTable
 public Table getTable(String isName,
                       String SQL)
Get extent of a single relation as a Table object. this is for displaying a relation extent in the applet

Parameters:
isName, - SQL-query
 o startUpdate
 public void startUpdate()
this method is used to demonstrate incremental view maintenance and is currently not used. Will have to be fixed later. It's disabled now.

 o getMyIcon
 public ImageIcon getMyIcon(String filename)
 o createDBManager
 public DBManager createDBManager(String ISName,
                                  String sDBType,
                                  String sDBURL,
                                  String sUsername,
                                  String sPassword)
Constructed used by MKBParser. It used to create an IS object with associated DBManager.

 o getDBManagerFromISName
 public DBManager getDBManagerFromISName(String theIS)
searches for a DBManager from an IS name

Returns:
null if IS with this name not found
 o getDBManagers
 public Vector getDBManagers()
this vector contains objects of class DBManager

 o getLocalDBManager
 public DBManager getLocalDBManager()
 o getVKB
 public VKB getVKB()
 o getQueryEngine
 public QueryEngine getQueryEngine()

All Packages  Class Hierarchy  This Package  Previous  Next  Index