All Packages Class Hierarchy This Package Previous Next Index
Class DSRG.MKB.Attribute
java.lang.Object
|
+----DSRG.MKB.Attribute
- public class Attribute
- extends Object
represents an attribute in some relation.
This is
meta-knowledge, so the attribute knows only its name, type, and
some performance parameters for the QC-Model (size).
-
attName
- the name of this attribute
-
attSize
- this is the WIDTH of the column, to go with the type.
-
attType
- the type of this attribute (as a String)
-
parent
- my parent relation object
-
Attribute(Relation, String, int)
- Construct an Attribute Object.
-
Attribute(Relation, String, String, int)
- These should eventually be the only remaining
constructors.
-
changeName(String)
- renames attribute in MKB only
-
displayAll()
- returns a string representation of this attribute
-
getFullName()
- get name in the form "ISName.RelName.AttName"
-
getIS()
- returns the IS object that is this attribute's parent relation's IS
-
getName()
- get name.
-
getNoIS()
- Return Attribute Name in the form RelName.AttName.
-
getRelation()
- return the relation object that is this attribute's parent
-
getSize()
- return size (which is just a number passed in the constructor)
of this attribute
-
getType()
- return attribute's type as String
-
getTypeConstraint()
- return a TypeConstraint Object.
-
getTypeConstraintAsString()
- return a string of the form "attType(attName)".
-
setSize(int)
- set size of this attribute
-
setType(String)
- set attribute's type as String
-
toString()
- Dump the Attribute Object.
attName
private String attName
- the name of this attribute
attType
private String attType
- the type of this attribute (as a String)
attSize
private int attSize
- this is the WIDTH of the column, to go with the type. It is not
the number of tuples in the attribute. Currently (051999) this
is mixed with the physical size of the attribute that we need
for QC-computation. We should sort it out later since the
logical size could be different from the stored size :(
parent
private Relation parent
- my parent relation object
Attribute
public Attribute(Relation rel,
String name,
int size)
- Construct an Attribute Object. Called from parser. With "size"
parameter for QC purpose. The "type" is not assigned here since
this would have made the MKBParser too complicated (since Type
Constraints are defined later than attributes).
Attribute
public Attribute(Relation myRel,
String myName,
String myType,
int mySize)
- These should eventually be the only remaining
constructors. One assumes that the attribute has the relation
name of its parent, the other allows to overwrite the table
name (for query breakdown)
displayAll
public String displayAll()
- returns a string representation of this attribute
toString
public String toString()
- Dump the Attribute Object.
- Overrides:
- toString in class Object
getTypeConstraintAsString
public String getTypeConstraintAsString()
- return a string of the form "attType(attName)". For user
interfaces.
getTypeConstraint
public TypeConstraint getTypeConstraint()
- return a TypeConstraint Object. Used for user interface
getName
public String getName()
- get name.
getFullName
public String getFullName()
- get name in the form "ISName.RelName.AttName"
getNoIS
public String getNoIS()
- Return Attribute Name in the form RelName.AttName. Function
should be renamed - the name is misleading
getType
public String getType()
- return attribute's type as String
setType
public void setType(String myType)
- set attribute's type as String
getSize
public int getSize()
- return size (which is just a number passed in the constructor)
of this attribute
setSize
public void setSize(int newSize)
- set size of this attribute
getRelation
public Relation getRelation()
- return the relation object that is this attribute's parent
getIS
public IS getIS()
- returns the IS object that is this attribute's parent relation's IS
changeName
public boolean changeName(String newName)
- renames attribute in MKB only
All Packages Class Hierarchy This Package Previous Next Index