All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class EVEDemo.MW.View

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

public class View
extends Object
This holds views. Mainly used for the EVE-Demo. It holds a view extent, a view definition, and can hold another instance of this same class (as an old view; used for the demo to show "extent differences" ).


Variable Index

 o changed
has there been a change made? It's for time measurement of performance evaluation
 o DEBUG
 o esql_definition
view definition in E-SQL
 o EXTERNAL_WHERE
2 for EXTERNAL clause
 o FROM_CLAUSE
2 for FROM clause
 o INTERNAL_WHERE
1 for INTERNAL clause
 o LOCAL_WHERE
0 for LOCAL clause
 o main
a handle to the Main class.
 o mainVKB
handle to the current VKB instance
used for all kinds of stuff of Jeff's algorithm.
 o myDUR
handle to the data update receiver in SWEEP
used for performance experiments
 o myPSWEEP
handle to the current PSWEEP instance
used for incremental VM
 o name
name of the view
 o negRel
if we have negative counter, i.e.
 o oldView
each instance includes another instance of the same class in order to hold one "old" version of itself.
 o SELECT_CLAUSE
1 for SELECT clause
 o sql_definition
view definition in SQL
 o startPerformance
timestamp for performance experiments
 o table
the view can hold its own extent as a Table object.
 o versions
with the advent of the QC-model, each view has to be capable of temporarily holding a number of "versions", i.e., objects of class "Version" which are needed for selecting a good view after a schema change with the QC-Model.
 o WHERE_CLAUSE
0 for WHERE clause

Constructor Index

 o View(Main, String, MKB, VKB)
Constructs a new instance of the View class
 o View(View)
Copy Constructor.

Method Index

 o addTuples(Relation)
the interface with the SWEEP classes
adds the incoming SWEEP.Relation-object to the extent
DISABLED FOR RE-IMPLEMENTATION
 o getChangeStatus()
 o getDefinition()
getDefinition - returns the definition of this view.
 o getExtent()
get the extent as the new table object
 o getName()
getName - returns the name of the view
 o getOldView()
getOldView - returns a reference to the OldView.
 o getQC(int)
returns the QC-Object for the version at "index"
 o getVersion(int)
returns the view definition string of the version with index "index" as a string
 o numberOfVersions()
returns the number of versions for this view or null if the vector is not intialized
 o refresh()
Refresh - refresh the current view from the VKB.
 o removeTuples(Relation)
the interface with the SWEEP classes
removes the incoming SWEEP.Relation-object from the extent
DISABLED FOR RE-IMPLEMENTATION
 o replaceView_DefinitionBy(int)
calls the VKB to replace this view's View_Definition by version number i
 o saveView()
saveView - makes a copy of the view into the oldView.
 o sendUpdate(String, String, int, String)
This is used to send data update to the information source.
 o setExtent(Table)
Set the new table of this View.
 o startVM()
Used to start the View Maintenance Module
 o stopTimer()
Stop the timer for the Data Update performance evaluation.

Variables

 o DEBUG
 private static final boolean DEBUG
 o main
 private Main main
a handle to the Main class. This is used so the View class can find the QueryEngine

 o name
 private String name
name of the view

 o esql_definition
 public String esql_definition
view definition in E-SQL

 o sql_definition
 private String sql_definition
view definition in SQL

 o oldView
 private View oldView
each instance includes another instance of the same class in order to hold one "old" version of itself.
I'm still amazed that this is not recursive...

 o versions
 private Vector versions
with the advent of the QC-model, each view has to be capable of temporarily holding a number of "versions", i.e., objects of class "Version" which are needed for selecting a good view after a schema change with the QC-Model. The Version-class sits in the MW package.

 o table
 private Table table
the view can hold its own extent as a Table object.
this is not feasible when view extents are large, but this is only a demo :-)

 o myPSWEEP
 private PSWEEP myPSWEEP
handle to the current PSWEEP instance
used for incremental VM

 o myDUR
 private DataUpdateReceiver myDUR
handle to the data update receiver in SWEEP
used for performance experiments

 o mainVKB
 private static VKB mainVKB
handle to the current VKB instance
used for all kinds of stuff of Jeff's algorithm. All the view instance must use same VKB object.

 o WHERE_CLAUSE
 public static final int WHERE_CLAUSE
0 for WHERE clause

 o SELECT_CLAUSE
 public static final int SELECT_CLAUSE
1 for SELECT clause

 o FROM_CLAUSE
 public static final int FROM_CLAUSE
2 for FROM clause

 o changed
 private boolean changed
has there been a change made? It's for time measurement of performance evaluation

 o LOCAL_WHERE
 public static final int LOCAL_WHERE
0 for LOCAL clause

 o INTERNAL_WHERE
 public static final int INTERNAL_WHERE
1 for INTERNAL clause

 o EXTERNAL_WHERE
 public static final int EXTERNAL_WHERE
2 for EXTERNAL clause

 o startPerformance
 long startPerformance
timestamp for performance experiments

 o negRel
 Relation negRel
if we have negative counter, i.e. fail to delete something, we store those in this relation. then, after each addition, we try to apply this delete relation again to view, if that is successful, then, we remove the tuple from it, otherwise, we still keep the tuple.

Constructors

 o View
 public View(Main myMain,
             String vName,
             MKB mainMKB,
             VKB myVKB)
Constructs a new instance of the View class

 o View
 public View(View oldView)
Copy Constructor. Makes a copy of the view to a second identical variable structure in this instance.
For comparing old and new view extents in the demo

Methods

 o getName
 public String getName()
getName - returns the name of the view

 o refresh
 public void refresh()
Refresh - refresh the current view from the VKB.
Hacked 030799 by koeller. This function should (ideally) be called only after a view synchronization. So we can retrieve a vector of versions from the VKB so the GUI can query it.

 o getDefinition
 public String getDefinition()
getDefinition - returns the definition of this view. This defaults to returning the esql definition since that is what is needed by the GUI.

 o getExtent
 public Table getExtent()
get the extent as the new table object

 o setExtent
 public void setExtent(Table ext)
Set the new table of this View. Needed for incremental Updates.

 o getOldView
 public View getOldView()
getOldView - returns a reference to the OldView.

 o saveView
 public void saveView()
saveView - makes a copy of the view into the oldView. if oldView already exists then, it overrides it.

 o stopTimer
 public void stopTimer()
Stop the timer for the Data Update performance evaluation.

 o getChangeStatus
 public boolean getChangeStatus()
 o sendUpdate
 public void sendUpdate(String isName,
                        String relName,
                        int count,
                        String update)
This is used to send data update to the information source. It's used for SWEEP

 o startVM
 public void startVM()
Used to start the View Maintenance Module

 o addTuples
 public void addTuples(Relation sweepRelation)
the interface with the SWEEP classes
adds the incoming SWEEP.Relation-object to the extent
DISABLED FOR RE-IMPLEMENTATION

 o removeTuples
 public void removeTuples(Relation sweepRelation)
the interface with the SWEEP classes
removes the incoming SWEEP.Relation-object from the extent
DISABLED FOR RE-IMPLEMENTATION

 o getVersion
 public String getVersion(int index)
returns the view definition string of the version with index "index" as a string

Parameters:
index - the index of the version to return
Returns:
null if index is wrong
 o replaceView_DefinitionBy
 public boolean replaceView_DefinitionBy(int version_number)
calls the VKB to replace this view's View_Definition by version number i

 o numberOfVersions
 public int numberOfVersions()
returns the number of versions for this view or null if the vector is not intialized

Returns:
-1 is the versions vector is not initialized
 o getQC
 public QC getQC(int index)
returns the QC-Object for the version at "index"

Parameters:
index - the index of the version for which to return the QC-Object
Returns:
null if index is wrong

All Packages  Class Hierarchy  This Package  Previous  Next  Index