|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--uk.ac.ic.doc.automed.reps.SchemaObject
The SchemaObject class
Schema,
Scheme,
Construct| Method Summary | |
protected boolean |
appearsInSchemeOf(SchemaObject so)
Determines whether or not the schema object appears anywhere in the scheme of another schema object. |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
|
int |
compareTo(java.lang.Object o)
|
protected static SchemaObject |
createSchemaObject(Schema ownerSchema,
Construct cType,
java.lang.Object[] schemeObjects)
Creates a new schema object. |
protected static SchemaObject |
createSchemaObjectFromDB(int obid,
Schema schema)
Instantiates a SchemaObject whose record already
exists in the STR. |
boolean |
equals(java.lang.Object o)
|
Construct |
getConstruct()
Returns the construct type of the schema object. |
Construct |
getConstructType()
|
int |
getOBID()
Returns the schema object identifier (OBID) of a schema object. |
SchemaObject[] |
getReferencedSchemaObjects()
Returns the set of SchemaObjects that are referenced by this SchemaObject. |
Schema |
getSchema()
Returns the schema to which the schema object belongs. |
static SchemaObject |
getSchemaObjectByOBID(int objectID)
Returns the SchemaObject reference that has the given
schema object identifier (OBID). |
java.lang.Object[] |
getSchemeDefinition()
All SchemaObjects when they are created by methods such as Schema.createSchemaObject, Schema.applyAddTransformation
and Transformation.createAddTransformation require that an Object
array be supplied that defines the scheme of the new SchemaObject. |
java.lang.Object[] |
getSchemeNames()
|
java.lang.Object[] |
getSchemeNames(int idDepth,
int typeDepth)
|
java.lang.String |
getSchemeNamesString()
Returns the scheme representation (of type String) of the
name of all the elements in a schema object's scheme. |
java.lang.String |
getSchemeNamesString(int idDepth,
int typeDepth)
|
Scheme[] |
getSchemeObjects()
|
java.lang.String |
getSchemeString()
|
java.lang.String |
getSchemeString(Schema context)
|
protected static SchemaObject |
getTransformationObject(int objectID)
|
protected static SchemaObject |
getTransformationObject(int objectID,
Schema schema)
Instantiates a transformation object. |
Transformation[] |
getTransformations()
Find the set of Transformations that involve this SchemaObject. |
java.lang.String |
getValue()
Returns the name/value of the schema object. |
void |
remove()
|
protected static void |
removeSchemaObjectFromMap(SchemaObject so)
Deprecated. use @link remove() to remove SchemaObjects Removes a SchemaObject object from the schema object
HashMap. |
void |
retract()
Removes the SchemaObject from the repository, and all other objects which depend upon it. |
protected boolean |
sameScheme(SchemaObject so)
Determines whether or not the scheme is the same as that of the given SchemaObject. |
void |
setConstructType(Construct cType)
Sets the construct type of the schema object. |
void |
setSchema(Schema s)
Sets the schema to which the schema object belongs. |
void |
setValue(java.lang.String v)
Sets the name/value of the schema object. |
java.lang.String |
toString()
|
void |
write(java.io.OutputStream os)
|
void |
write(java.io.PrintWriter pw)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
protected static SchemaObject createSchemaObject(Schema ownerSchema,
Construct cType,
java.lang.Object[] schemeObjects)
throws InconsistentException,
TypeMismatchException
ownerSchema - the schema in whose context the SchemaObject
is being created. Set to null if the schema object being
created does not exist in the context of a schema, i.e., it is a
transformation object.cType - construct type (of class Construct) of the
schema object. Set to null if the construct being
constructed is not a proper Construct of its
underlying model (e.g. cardinality constraints for ER relationships).schemeObjects - array of String and/or schema
objects contained in the scheme of the new schema object. The first
String value is used as the name/value of this object.
InconsistentException
TypeMismatchException
protected static SchemaObject createSchemaObjectFromDB(int obid,
Schema schema)
throws InconsistentException,
IntegrityException
SchemaObject whose record already
exists in the STR.
obid - the schema object identifier (OBID) found in the STR.schema - the schema in whose context the SchemaObject
is being created. Set to null if the schema object being
created does not exist in the context of a schema, i.e., it is a
transformation object.
InconsistentException
IntegrityExceptionprotected static void removeSchemaObjectFromMap(SchemaObject so)
SchemaObject object from the schema object
HashMap.
public Construct getConstruct()
public Construct getConstructType()
public Schema getSchema()
public java.lang.String getValue()
public java.lang.Object[] getSchemeNames()
public java.lang.Object[] getSchemeNames(int idDepth,
int typeDepth)
public Scheme[] getSchemeObjects()
public java.lang.Object[] getSchemeDefinition()
Schema.createSchemaObject, Schema.applyAddTransformation
and Transformation.createAddTransformation require that an Object
array be supplied that defines the scheme of the new SchemaObject. This
method reconstructs this Object array.
public java.lang.String getSchemeNamesString()
throws InconsistentException
String) of the
name of all the elements in a schema object's scheme.
STRException, - with brackets
as set by @see STR.setOpenSchemeBracket
and @see STR.setCloseSchemeBracket
InconsistentException
public java.lang.String getSchemeNamesString(int idDepth,
int typeDepth)
throws InconsistentException
InconsistentExceptionpublic java.lang.String toString()
toString in class java.lang.Object
public void setConstructType(Construct cType)
throws InconsistentException
cType - the construct type of the schema object.
InconsistentExceptionConstruct
public void setSchema(Schema s)
throws IntegrityException
NotFoundException
IntegrityException
public void setValue(java.lang.String v)
throws InconsistentException
v - the string that is to be the name/value of the schema object.
InconsistentExceptionpublic int getOBID()
public static SchemaObject getSchemaObjectByOBID(int objectID)
throws InconsistentException
SchemaObject reference that has the given
schema object identifier (OBID).
objectID - the object identifier (OBID) of the schema object.
SchemaObject reference that has the given
schema object identifier (OBID).
InconsistentException
IntegrityException
protected static SchemaObject getTransformationObject(int objectID,
Schema schema)
throws InconsistentException,
IntegrityException
objectID - the schema object identifier (OBID) found in the STR (from the
transformation table).schema - the schema to which the transformation object belongs.
SchemaObject reference of the transformation object.
InconsistentException
IntegrityException
protected static SchemaObject getTransformationObject(int objectID)
throws InconsistentException,
IntegrityException
InconsistentException
IntegrityExceptionprotected boolean sameScheme(SchemaObject so)
SchemaObject.
so - the SchemaObject whose scheme is to be compared.
true if the scheme is the same as that of the
given SchemaObject; false otherwise.
protected boolean appearsInSchemeOf(SchemaObject so)
throws InconsistentException
so - the SchemaObject whose scheme is to be compared.
true if the schema object appears anywhere in the
scheme of the given SchemaObject; false otherwise.
InconsistentException
public void remove()
throws IntegrityException
IntegrityExceptionpublic void retract()
public Transformation[] getTransformations()
throws InconsistentException
Transformations that involve this SchemaObject.
InconsistentException - if there is some unexpected
inconsistency in the repository.
public SchemaObject[] getReferencedSchemaObjects()
throws InconsistentException
InconsistentException - if there is some unexpected
inconsistency in the repository.public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparable
public int compare(java.lang.Object o1,
java.lang.Object o2)
compare in interface java.util.Comparatorpublic boolean equals(java.lang.Object o)
equals in interface java.util.Comparatorequals in class java.lang.Objectpublic void write(java.io.OutputStream os)
public void write(java.io.PrintWriter pw)
public java.lang.String getSchemeString()
public java.lang.String getSchemeString(Schema context)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||