|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EVEDemo.SWEEP.RelationSchema
Schema will be empty.
Field Summary | |
(package private) java.util.Vector |
labels
|
Constructor Summary | |
RelationSchema()
This is for View and Clone functions. |
|
RelationSchema(java.io.DataInputStream din)
|
|
RelationSchema(java.sql.ResultSet rs)
Here we generate each name as "R_A". |
|
RelationSchema(java.sql.ResultSet rs,
Relation rel,
java.lang.String sign)
Should erase SWEEPSIGN field from the Schema. |
|
RelationSchema(java.sql.ResultSet rs,
java.lang.String sign)
Should erase SWEEPSIGN field from the Schema. |
|
RelationSchema(java.lang.String[] newSchema)
|
Method Summary | |
private void |
addCol(java.lang.String colName)
|
void |
changeAttrName(java.lang.String newName,
int index)
Change specific Attribute Name in this schema. |
java.lang.Object |
clone()
|
java.lang.String |
createSQL()
this function will return SQL, for create table. |
java.lang.String |
createSQL(java.lang.String sign)
this function will return SQL, for create table. |
void |
doProject(int[] flags)
This function will decrease the Schema based on the flags. |
boolean |
equals(RelationSchema rs)
Check if two Schemas are quivaluent. |
private boolean |
find(java.lang.String colName)
Check if such column name stored in such schema. |
java.lang.String |
getAttrName(int index)
Get one specific Attribute 's name. |
java.lang.String |
getColName(int index)
Return column Name of specific Column Number. |
java.lang.String |
getCommon(RelationSchema theSchema)
get the only one common Attribute of two schemas |
int[] |
getFlags(RelationSchema schema)
Return a set of flags to show which column is projected. |
int[] |
getFlags(java.lang.String colName)
This will return flags for projection. |
(package private) int |
getIndex(java.lang.String colName)
Get Index of one labels in the schema. |
java.lang.String |
getSQL()
Get SQL from this Schema List. |
boolean |
isSubsetOf(RelationSchema theSchema)
Check is current Schema is a subset of other Schema. |
int |
size()
this function return the Number of labels in the schema |
java.lang.String |
toString()
Convert to String. |
private int |
whereIs(java.lang.String colName)
Find where is such column name stored in this schema. |
void |
write(java.io.DataOutputStream dout)
write the schema to the file |
Methods inherited from class java.lang.Object |
|
Field Detail |
java.util.Vector labels
Constructor Detail |
public RelationSchema()
public RelationSchema(java.lang.String[] newSchema)
public RelationSchema(java.io.DataInputStream din)
public RelationSchema(java.sql.ResultSet rs) throws java.lang.Exception
public RelationSchema(java.sql.ResultSet rs, java.lang.String sign) throws java.lang.Exception
public RelationSchema(java.sql.ResultSet rs, Relation rel, java.lang.String sign) throws java.lang.Exception
Method Detail |
public java.lang.Object clone()
r
- is the new cloned relation.private void addCol(java.lang.String colName)
public int size()
public java.lang.String createSQL()
public java.lang.String createSQL(java.lang.String sign)
public java.lang.String getCommon(RelationSchema theSchema)
public void write(java.io.DataOutputStream dout)
public java.lang.String getSQL()
public java.lang.String toString()
public java.lang.String getColName(int index)
int getIndex(java.lang.String colName)
colname
- name of label.public int[] getFlags(RelationSchema schema)
public int[] getFlags(java.lang.String colName)
private boolean find(java.lang.String colName)
private int whereIs(java.lang.String colName) throws NotFoundException
public boolean isSubsetOf(RelationSchema theSchema)
public void doProject(int[] flags) throws java.lang.Exception
public boolean equals(RelationSchema rs) throws java.lang.Exception
public void changeAttrName(java.lang.String newName, int index)
public java.lang.String getAttrName(int index)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |