|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--DSRG.VKB.View_Definition
Represents the View definition.
It has a small parser in it, so, it can generate from a string of ESQL. It contains three lists: select, from and where.
ViewDefinition Overall Function
Field Summary | |
private static boolean |
DEBUG
|
static int |
DONTCARE
VE is DONTCARE |
static int |
EQUIVALENT
VE is EQUIVALENT |
(package private) java.util.Vector |
from
Vector of FROM clause. |
static int |
FROM
FROM clause constant |
static int |
JOIN
JOIN list constant |
(package private) java.lang.String |
name
Name of this ViewDefinition. |
static int |
PROJECT
PROJECT list constant |
(package private) java.util.Vector |
select
it will keep the order of the select clause. |
static int |
SELECT
SELECT here has two meaning. |
static int |
SUBSET
VE is SUBSET. |
static int |
SUPERSET
VE is SUPERSET |
(package private) java.util.Vector |
versions
A Vector of Versions of this View-Definition. |
(package private) int |
VExtent
VE parameter of this View Definition |
(package private) Condition_index |
where
Vector of Condition clause. |
static int |
WHERE
WHERE clause constant |
Constructor Summary | |
View_Definition()
Default construction. |
|
View_Definition(java.lang.String ESQL,
MKB mkb)
Parse E-SQL/SQL String and create the View definition object. |
Method Summary | |
void |
addJCs(java.util.Vector jcs)
Add a Vector of JCs to the View Definition. |
void |
addRelFrom(Relation r)
Add Relation to from clause of the View Definition. |
java.util.Vector |
attrSelect(Relation r,
boolean di,
boolean re)
Get Attributes in Select Clause. |
java.util.Vector |
attrWhere(Relation r,
boolean di,
boolean re)
Get Attributes in Where Clause. |
void |
clean()
Clean the View Definition: 1. |
java.lang.Object |
clone()
Clone the view definition. |
boolean |
contains(Attribute attr)
Descide whether VD contains some Attribute. |
boolean |
contains(Relation rel)
Descide whether VD contains some Relation |
boolean |
contains(java.lang.String IS_name)
Descide whether VD contains some IS |
void |
dropAttrSelect(Relation r,
boolean di,
boolean re)
Drop Attributes from Select clause of this view definition. |
void |
dropAttrSelect(java.util.Vector attrs)
Drop attribute-components from Select clause for specific vector of attributes |
void |
dropComponents(java.util.Vector s)
Drop a vector of components from one view definition. |
void |
dropCondWhere(Relation r,
boolean di,
boolean re)
Drop Conditions from Where clause of this view definition. |
boolean |
evolvable(Attribute attr)
Similar to evolvable for del_relation. |
boolean |
evolvable(Relation rel)
Check if this view is evolvable or not for a specific relation. |
Relation_Component |
from_get(Relation rel)
Get a Relation Component for specific Relation. |
(package private) Attribute_Component |
get(java.util.Vector sec,
Attribute attr)
Get an Attribute Component from a vector of attribute_components clause for specific Attribute. |
Attribute_Component |
getAttrComponent(Attribute attr)
Get an Attribute_Component from select clause for specific attribute |
java.util.Vector |
getAttributes(Relation rel)
Get all attributes of one Relation of this View. |
java.util.Vector |
getClause(int type)
Get clause from this view definition. |
java.util.Vector |
getComponents(Relation rel)
Get all components of one Relation |
java.util.Vector |
getCondComponents(Attribute a)
Get Condition_Component for specific Attribute. |
java.util.Vector |
getDispensableComponent()
Get Dispensable components of one view defintion. |
java.lang.String |
getESQL()
Get E-SQL of this view definition. |
java.util.Vector |
getISs()
Return vector of ISs of this VD. |
java.lang.String |
getName()
Return view name. |
java.util.Vector |
getPSJList(int type)
Get PSJ List of this View Definition. |
(package private) Relation_Component |
getRelComponent(Relation r)
Get Relation_Component for specific Relation. |
java.lang.String |
getSQL()
Get SQL of this view definition without the IS information. |
java.util.Vector |
getVersions()
return the vector of all versions of this view after view synchronization. |
int |
getVExtent()
|
void |
makeStrongest()
|
boolean |
replaceAttrSelect(Attribute attr,
Attribute reattr)
replace Attributes in Select Clause. |
boolean |
replaceAttrSelect(Relation r,
Replacement rep,
boolean di,
boolean re)
replace Attributes in Select clause. |
void |
replaceAttrWhere(Attribute attr,
Attribute reattr)
Replace attribute in the Where clause. |
boolean |
replaceCondWhere(Relation r,
Replacement rep,
boolean di,
boolean re)
replace Attributes in the condition in the Where clause. |
void |
replaceRelFrom(Relation r,
Relation s)
Replace relation at From clause. |
void |
setFrom(java.util.Vector clause)
Set From clause |
void |
setName(java.lang.String str)
Set View Definition's Name |
void |
setSelect(java.util.Vector clause)
Set Select Clause |
void |
setVersions(java.util.Vector vs)
Set a list of versions of rewritings of this View_Definition by VSA. |
void |
setVExtent(int ext)
Set VE parameter of this View Definition |
void |
setWhere(Condition_index clause)
Set Where clause |
java.lang.String |
toString()
Debug Function show the View_Definition |
(package private) java.lang.String |
VExtentoStr(int ext)
Return string representation of VExtent parameter |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final boolean DEBUG
java.util.Vector versions
public static final int SELECT
public static final int FROM
public static final int WHERE
public static final int PROJECT
public static final int JOIN
public static final int SUBSET
public static final int SUPERSET
public static final int EQUIVALENT
public static final int DONTCARE
java.lang.String name
int VExtent
java.util.Vector select
java.util.Vector from
Condition_index where
Constructor Detail |
public View_Definition()
public View_Definition(java.lang.String ESQL, MKB mkb)
ESQL
- E-SQL/SQL of this view definition.Method Detail |
public void setVersions(java.util.Vector vs)
A
- Vector of Version.public java.util.Vector getVersions()
public void clean()
public void dropAttrSelect(Relation r, boolean di, boolean re)
r
- the attribute's relationdi
- ESQL dispensable parameterre
- ESQL replaceable parameterpublic void dropCondWhere(Relation r, boolean di, boolean re)
r
- the attribute's relationdi
- ESQL dispensable parameterre
- ESQL replaceable parameterpublic boolean replaceAttrSelect(Attribute attr, Attribute reattr)
attr
- The Attribute to be replacedreattr
- The Substitute Attributepublic boolean replaceAttrSelect(Relation r, Replacement rep, boolean di, boolean re)
r
- the attribute's relation.rep
- Replace ment of this relation with hashtable of substitute attributes.di
- ESQL dispensable parameterre
- ESQL replaceable parameterpublic boolean replaceCondWhere(Relation r, Replacement rep, boolean di, boolean re)
r
- the attribute's relation.rep
- Replace ment of this relation with hashtable of substitute attributes.di
- ESQL dispensable parameterre
- ESQL replaceable parameterpublic java.util.Vector attrSelect(Relation r, boolean di, boolean re)
r
- the attribute's relationdi
- ESQL dispensable parameterre
- ESQL replaceable parameterpublic java.util.Vector attrWhere(Relation r, boolean di, boolean re)
r
- the attribute's relationdi
- ESQL dispensable parameterre
- ESQL replaceable parameterjava.lang.String VExtentoStr(int ext)
public void setName(java.lang.String str)
public void setVExtent(int ext)
public void setSelect(java.util.Vector clause)
public void setFrom(java.util.Vector clause)
public void setWhere(Condition_index clause)
public java.lang.String getESQL()
public java.lang.String getSQL()
public int getVExtent()
public java.util.Vector getClause(int type)
type
- type of clause. SELECT for SELECT clause, FROM for
FROM clause, WHERE for WHERE clause. These are constants in this class.public java.util.Vector getPSJList(int type)
type
- type of PSJ list. PROJECT for PROJECT list, SELECT for SELECT list, JOIN for JOIN list.public java.lang.String getName()
public java.util.Vector getISs()
public boolean contains(java.lang.String IS_name)
IS_name
- Information source name.public boolean contains(Relation rel)
IS_name
- Information source name.Rel_name
- Relation name.public Relation_Component from_get(Relation rel)
rel
- the Relationpublic boolean contains(Attribute attr)
IS_name
- Information source name.Rel_name
- Relation name.Attr_name
- Attribute name.public java.lang.String toString()
public void makeStrongest()
public boolean evolvable(Relation rel)
public boolean evolvable(Attribute attr)
public java.lang.Object clone()
public void replaceRelFrom(Relation r, Relation s)
r
- relation to be replaced.s
- substitute relation.public void dropComponents(java.util.Vector s)
public java.util.Vector getDispensableComponent()
Relation_Component getRelComponent(Relation r)
r
- Reference of Relation in MKBpublic java.util.Vector getCondComponents(Attribute a)
a
- Reference of Attribute in MKBpublic Attribute_Component getAttrComponent(Attribute attr)
attr
- The reference of attribute.Attribute_Component get(java.util.Vector sec, Attribute attr)
vec
- the vector of Attribute Components.attr
- The reference of attribute.public void dropAttrSelect(java.util.Vector attrs)
attrs
- Vector of attributespublic void addRelFrom(Relation r)
r
- Reference of relation to be added.public void addJCs(java.util.Vector jcs)
jcs
- A Vector of Join Conditionspublic void replaceAttrWhere(Attribute attr, Attribute reattr)
attr
- Attribute to be replaced.reattr
- Substitute Attribute.public java.util.Vector getComponents(Relation rel)
rel
- the specific Relation.public java.util.Vector getAttributes(Relation rel)
rel
- the specific Relation.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |