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" ).
-
changed
- has there been a change made? It's for time measurement of
performance evaluation
-
DEBUG
-
-
esql_definition
- view definition in E-SQL
-
EXTERNAL_WHERE
- 2 for EXTERNAL clause
-
FROM_CLAUSE
- 2 for FROM clause
-
INTERNAL_WHERE
- 1 for INTERNAL clause
-
LOCAL_WHERE
- 0 for LOCAL clause
-
main
- a handle to the Main class.
-
mainVKB
- handle to the current VKB instance
used for all kinds of
stuff of Jeff's algorithm.
-
myDUR
- handle to the data update receiver in SWEEP
used for performance experiments
-
myPSWEEP
- handle to the current PSWEEP instance
used for incremental VM
-
name
- name of the view
-
negRel
- if we have negative counter, i.e.
-
oldView
-
each instance includes another instance of the same class
in order to hold one "old" version of itself.
-
SELECT_CLAUSE
- 1 for SELECT clause
-
sql_definition
- view definition in SQL
-
startPerformance
- timestamp for performance experiments
-
table
- the view can hold its own extent as a Table object.
-
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.
-
WHERE_CLAUSE
- 0 for WHERE clause
-
View(Main, String, MKB, VKB)
- Constructs a new instance of the View class
-
View(View)
- Copy Constructor.
-
addTuples(Relation)
-
the interface with the SWEEP classes
adds the incoming SWEEP.Relation-object to the extent
DISABLED FOR RE-IMPLEMENTATION
-
getChangeStatus()
-
-
getDefinition()
- getDefinition - returns the definition of this view.
-
getExtent()
- get the extent as the new table object
-
getName()
- getName - returns the name of the view
-
getOldView()
- getOldView - returns a reference to the OldView.
-
getQC(int)
- returns the QC-Object for the version at "index"
-
getVersion(int)
- returns the view definition string of the version with index "index"
as a string
-
numberOfVersions()
- returns the number of versions for this view or null if the
vector is not intialized
-
refresh()
- Refresh - refresh the current view from the VKB.
-
removeTuples(Relation)
- the interface with the SWEEP classes
removes the incoming SWEEP.Relation-object from the extent
DISABLED FOR RE-IMPLEMENTATION
-
replaceView_DefinitionBy(int)
- calls the VKB to replace this view's View_Definition by
version number i
-
saveView()
- saveView - makes a copy of the view into the oldView.
-
sendUpdate(String, String, int, String)
- This is used to send data update to the information source.
-
setExtent(Table)
- Set the new table of this View.
-
startVM()
- Used to start the View Maintenance Module
-
stopTimer()
- Stop the timer for the Data Update performance evaluation.
DEBUG
private static final boolean DEBUG
main
private Main main
- a handle to the Main class. This is used so the View class can
find the QueryEngine
name
private String name
- name of the view
esql_definition
public String esql_definition
- view definition in E-SQL
sql_definition
private String sql_definition
- view definition in SQL
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...
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.
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 :-)
myPSWEEP
private PSWEEP myPSWEEP
- handle to the current PSWEEP instance
used for incremental VM
myDUR
private DataUpdateReceiver myDUR
- handle to the data update receiver in SWEEP
used for performance experiments
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.
WHERE_CLAUSE
public static final int WHERE_CLAUSE
- 0 for WHERE clause
SELECT_CLAUSE
public static final int SELECT_CLAUSE
- 1 for SELECT clause
FROM_CLAUSE
public static final int FROM_CLAUSE
- 2 for FROM clause
changed
private boolean changed
- has there been a change made? It's for time measurement of
performance evaluation
LOCAL_WHERE
public static final int LOCAL_WHERE
- 0 for LOCAL clause
INTERNAL_WHERE
public static final int INTERNAL_WHERE
- 1 for INTERNAL clause
EXTERNAL_WHERE
public static final int EXTERNAL_WHERE
- 2 for EXTERNAL clause
startPerformance
long startPerformance
- timestamp for performance experiments
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.
View
public View(Main myMain,
String vName,
MKB mainMKB,
VKB myVKB)
- Constructs a new instance of the View class
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
getName
public String getName()
- getName - returns the name of the view
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.
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.
getExtent
public Table getExtent()
- get the extent as the new table object
setExtent
public void setExtent(Table ext)
- Set the new table of this View. Needed for incremental Updates.
getOldView
public View getOldView()
- getOldView - returns a reference to the OldView.
saveView
public void saveView()
- saveView - makes a copy of the view into the oldView.
if oldView already exists then, it overrides it.
stopTimer
public void stopTimer()
- Stop the timer for the Data Update performance evaluation.
getChangeStatus
public boolean getChangeStatus()
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
startVM
public void startVM()
- Used to start the View Maintenance Module
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
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
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
replaceView_DefinitionBy
public boolean replaceView_DefinitionBy(int version_number)
- calls the VKB to replace this view's View_Definition by
version number i
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
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