|
||||||||||
| 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.Schema
The Schema class
SchemaObject,
Scheme,
Construct| Field Summary | |
static int |
LIST_SCHEMA_LONG
Constant used to indicate where schemes in schemas must be listed with all details, including the OBID as returned by SchemaObject.getOBID() SchemaObject}, and the Construct
as returned by SchemaObject.getConstruct(). |
static int |
LIST_SCHEMA_NORMAL
Constant used to indicate where schemes in schemas must be listed with all the type of each SchemaObject prefixing the scheme of
each object. |
static int |
LIST_SCHEMA_SHORT
Constant used to indicate where schemes in schemas must be listed with the minimum of detail. |
| Method Summary | |
Schema |
applyAddTransformation(Construct toObjectConstructType,
java.lang.Object[] toObject,
java.lang.String function,
java.lang.String constraint)
Returns the Schema which is the result of applying an
ADD transformation. |
Schema |
applyAddTransformation(Construct toObjectConstructType,
java.lang.Object[] toObject,
java.lang.String function,
java.lang.String constraint,
java.lang.String newSchemaName)
Returns the Schema which is the result of applying an
ADD transformation. |
Schema |
applyContractTransformation(SchemaObject fromObject,
java.lang.String function,
java.lang.String constraint)
Returns the Schema which is the result of applying a
CONTRACT transformation. |
Schema |
applyContractTransformation(SchemaObject fromObject,
java.lang.String function,
java.lang.String constraint,
java.lang.String newSchemaName)
Returns the Schema which is the result of applying a
CONTRACT transformation. |
Schema |
applyDeleteTransformation(SchemaObject fromObject,
java.lang.String function,
java.lang.String constraint)
Returns the Schema which is the result of applying a
DELETE transformation. |
Schema |
applyDeleteTransformation(SchemaObject fromObject,
java.lang.String function,
java.lang.String constraint,
java.lang.String newSchemaName)
Returns the Schema which is the result of applying a
DELETE transformation. |
Schema |
applyExtendTransformation(Construct toObjectConstructType,
java.lang.Object[] toObject,
java.lang.String function,
java.lang.String constraint)
Returns the Schema which is the result of applying an
EXTEND transformation. |
Schema |
applyExtendTransformation(Construct toObjectConstructType,
java.lang.Object[] toObject,
java.lang.String function,
java.lang.String constraint,
java.lang.String newSchemaName)
Returns the Schema which is the result of applying an
EXTEND transformation. |
Schema |
applyRenameTransformation(SchemaObject fromObject,
java.lang.Object[] toObject)
Returns the Schema which is the result of applying a
RENAME transformation. |
Schema |
applyRenameTransformation(SchemaObject fromObject,
java.lang.Object[] toObject,
java.lang.String newSchemaName)
Returns the Schema which is the result of applying a
RENAME transformation. |
protected void |
checkEditable()
Checks whether a schema is editable. |
static void |
clearSchemas()
This method empties all the cached Schema, SchemaObject, Transformation, AccessMethods and Protocols that have been cached. |
static Schema |
createSchema(java.lang.String schemaName,
boolean isDataSource)
Creates a new schema. |
protected static Schema |
createSchema(java.lang.String schemaName,
boolean isExtSchema,
boolean isExtDB,
boolean isDataSource,
boolean dbOnly)
Creates a new schema. |
SchemaObject |
createSchemaObject(Construct cType,
java.lang.Object[] schemeObjects)
Creates a schema object. |
SchemaObject[] |
differenceByName(Schema s2)
Return an SchemaObject array containing the difference
by name between this schema (s1) and the schema passed as a parameter
(s2). |
static boolean |
exists(java.lang.String schemaName)
Returns true is the named schema exists |
void |
exportSchemaObjects(java.io.OutputStream os)
|
void |
exportSchemaObjects(java.io.PrintWriter pw)
|
Schema |
extendToMatch(Schema schemaToAdd)
Create a new Schema which contains the same set of constructs as the current schema, plus all those constructs of another schema, which are defined via extend operators. |
Schema[] |
findAttachedDataSources()
Returns an array of Schema's that are connected to this schema by some transformation pathway and are data sources (including this schema itself if it is a data source). |
Schema[] |
findAttachedExtDBs()
Returns an array of Schema's that are connected to this schema by some transformation pathway and have extensional data (including this schema itself if it has extensional data). |
Schema[] |
findAttachedExtSchemas()
Returns an array of Schema's that are connected to this schema by some transformation pathway and are extensional schemas (including this schema itself if it is an extensional schema). |
Schema[] |
findShortestPath(Schema target)
Returns an array of schemas such that: There is a transformation between each pair of adjacent schamas. |
AccessMethod[] |
getAccessMethods()
Find the AccessMethods that may be used to access the
physical database system that holds this Schema. |
java.lang.Object[] |
getAllSchemeNames()
Returns an Object array of schemes of all the schema objects
that belong to the schema. |
java.lang.Object[] |
getAllSchemeNames(boolean all,
int idDepth,
int typeDepth)
|
java.lang.String |
getAllSchemeNamesString()
Returns the scheme representation (of type String) of the schemes
of all the schema objects that belong to the schema. |
java.lang.String |
getAllSchemeNamesString(boolean all,
int idDepth,
int typeDepth)
|
static java.lang.String |
getCloseSchemeBracket()
find what string is used to deliminate the closing of a scheme name, such as the ">>" in "<<person>>" or "<<person,name>>". |
HDMNetwork |
getHDMNetwork()
|
java.lang.String |
getLabel()
|
int |
getLabelXPos()
|
int |
getLabelYPos()
|
java.lang.String |
getName()
Find the name of the schema. |
static java.lang.String |
getName(int SID)
Returns the name of a schema from its SID without instantiating it |
static java.lang.String |
getOpenSchemeBracket()
Find what string is used to deliminate the opening of a scheme name, such as the "<<" in "<<person>>" or "<<person,name>>". |
java.lang.Object |
getRepObject()
|
static Schema |
getSchema(int sid)
Returns the Schema object which has the given schema
identifier (SID). |
static Schema |
getSchema(java.lang.String schemaName)
Returns the Schema object with the given name. |
static int[] |
getSchemaIDs()
Returns an array of SID of all the schemas found in the STR. |
static java.lang.String[] |
getSchemaNames()
Returns an array of names of all the schemas found in the STR. |
SchemaObject |
getSchemaObject(java.lang.String name)
Return the SchemaObject that has the supplied name in
this schema. |
SchemaObject |
getSchemaObjectByName(java.lang.String name)
Return the SchemaObject that has the supplied name in
this schema. |
SchemaObject[] |
getSchemaObjects()
Returns an array of schema objects (of class SchemaObject)
that belong to the schema. |
int |
getSID()
Returns the schema identifier (SID) of the schema. |
Transformation[] |
getTransformations()
Return an array of all Transformation that go out
from a particular schema. |
protected Transformation[] |
getTransformationsFrom()
Returns an array of Transformation's that have this schema
as the fromSchema field in the transformation table of the
STR. |
protected Transformation[] |
getTransformationsTo()
Returns an array of Transformation's that have this schema
as the toSchema field in the transformation table of the
STR. |
int |
getXPos()
|
int |
getYPos()
|
protected boolean |
hasObject(SchemaObject so)
Determines if the schema contains the given schema object. |
void |
importSchemaObjects(java.io.InputStream is)
|
SchemaObject[] |
intersectionByName(Schema s2)
Return an SchemaObject array containing the intersection by
name between this schema (s1) and the schema passed as a
parameter (s2). |
boolean |
isDataSource()
Determines whether or not the schema represents an external data source. |
boolean |
isExtDB()
Determines whether or not the schema represents an extentional database. |
boolean |
isExtSchema()
Determines whether or not the schema is an extentional schema. |
void |
listSchema()
List the Schema to the current output in a form designed for human interpretation. |
void |
listSchema(java.io.PrintStream out)
Shorthand for calling listSchema(out,LIST_SCHEMA_NORMAL) |
void |
listSchema(java.io.PrintStream out,
int mode)
List the Schema to an output stream, using the specified format. |
void |
materialize(uk.ac.ic.doc.automed.reps.Path path)
Materialize the contents of an intentional schema via the given path. |
Schema |
prefixAllNodalNames(java.lang.String prefix)
Create a new Schema which contains the same set of constructs as an existing, except each has been renamed to have a common prefix if it is of Construct type Nodal. |
Transformation |
prefixSchemaObjectName(java.lang.String prefix,
SchemaObject nodeObject)
Create a new Schema if the SchemaObject is a Nodal object, where the SchemaObject has had a
prefix applied to the node name, |
static Schema |
read(java.io.InputStream is)
|
static Schema |
read(java.io.InputStream is,
java.lang.String name)
|
static void |
reloadSchemas()
|
void |
remove()
Removes the Schema from the repository. |
static void |
remove(java.lang.String schemaName)
Removes the Schema with the given schemaName. |
void |
removeAccessMethods()
Remove all AccessMethods recorded for this schema. |
void |
removeSchemaObjects()
Removes all schema objects that belong to the schema, i.e., the schema's SchemaObject list is emptied. |
void |
retract()
Removes the Schema from the repository, together with any SchemaObjects left in the schema, and any
Transformations that link to this schema. |
static void |
retract(java.lang.String schemaName)
Removes any Schema with the given name from the repository, together with any SchemaObjects left in the schema, and
any Transformations that link to this schema. |
void |
setDataSource(boolean dataSource)
Sets whether or not the schema represents an external data source. |
void |
setExtDB(boolean extDB)
Sets whether or not the schema represents an extentional database. |
void |
setExtSchema(boolean extSchema)
Sets whether or not the schema is an extentional schema. |
void |
setLabel(java.lang.String label)
|
void |
setLabelPosition(int x,
int y)
|
void |
setLabelXPos(int x)
|
void |
setLabelYPos(int y)
|
void |
setName(java.lang.String name)
Set the name of a Schema. |
static void |
setOpenCloseSchemeBracket(java.lang.String openScheme,
java.lang.String closeScheme)
Set the String |
void |
setPosition(int x,
int y)
|
void |
setXPos(int x)
|
void |
setYPos(int y)
|
Schema |
union(Schema s2)
Return an Schema (su) containing the union of
SchemaObjects in this schema (s1) and the
schema passed as a parameter (s2). |
SchemaObject[] |
unionByName(Schema s2)
Return an SchemaObject array containing the union by
name between this schema (s1) and the schema passed as a
parameter (s2). |
void |
updateSchemaObjectNameHashMap()
Update this Schema's hashmap of how each SchemaObject in
the schema is named. |
void |
write()
Write to the standard out a text representation of this Schema object, in a form suitable for human interpretation, and suitable for being used as the input to read() |
void |
write(java.io.OutputStream os)
|
void |
write(java.io.PrintWriter pw)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int LIST_SCHEMA_SHORT
public static final int LIST_SCHEMA_NORMAL
SchemaObject prefixing the scheme of
each object.
public static final int LIST_SCHEMA_LONG
SchemaObject.getOBID() SchemaObject}, and the Construct
as returned by SchemaObject.getConstruct().
| Method Detail |
public static void reloadSchemas()
public static Schema createSchema(java.lang.String schemaName,
boolean isDataSource)
throws InconsistentException
schemaName - name of the schema.isDataSource - set to true if the schema
represents an external data source; false
otherwise.
InconsistentException
protected static Schema createSchema(java.lang.String schemaName,
boolean isExtSchema,
boolean isExtDB,
boolean isDataSource,
boolean dbOnly)
throws InconsistentException
schemaName - name of the schema.isExtSchema - set to true if the schema is an
extentional schema; false otherwise.isExtDB - set to true if the schema represents an
extentional database; false otherwise.isDataSource - set to true if the schema
represents an external data source; false
otherwise.dbOnly - set to true if the instantiated Schema
object is not to be added to the HashMap of schemas, a structure
in the Schema class that stores all instantiated schemas. Note
that, for an intentional schema, its Schema is not
added to this HashMap unless its contents have been materialized.
InconsistentException
protected void checkEditable()
throws InconsistentException
InconsistentExceptionpublic static void remove(java.lang.String schemaName)
Schema.remove() of the Schema with the given name.
schemaName - the name of the schema to be removed from the
repository
public void remove()
throws IntegrityException
SchemaObjects left in this schema, nor any
Transformations that link to this schema.
IntegrityException - if the schema is an extentional schema
containing one or more SchemaObjects, or any schema that
has one or more Transformations attached.
public void retract()
throws IntegrityException
SchemaObjects left in the schema, and any
Transformations that link to this schema.
IntegrityExceptionpublic static void retract(java.lang.String schemaName)
SchemaObjects left in the schema, and
any Transformations that link to this schema. If no such
schema exists, this method does nothing.
public SchemaObject createSchemaObject(Construct cType,
java.lang.Object[] schemeObjects)
throws TypeMismatchException
cType - construct type (of class Construct) of the
schema object.schemeObjects - an array of string values and/or schema
objects contained in the scheme of the new schema object. Only one
string value is allowed in the array which represents the name/value
of the schema object.
TypeMismatchExceptionpublic int getSID()
public java.lang.String getName()
public int getXPos()
getXPos in interface Positionablepublic int getYPos()
getYPos in interface Positionable
public void setXPos(int x)
throws IntegrityException
setXPos in interface PositionableIntegrityException
public void setYPos(int y)
throws IntegrityException
setYPos in interface PositionableIntegrityException
public void setPosition(int x,
int y)
throws IntegrityException
setPosition in interface PositionableIntegrityExceptionpublic int getLabelXPos()
getLabelXPos in interface Positionablepublic int getLabelYPos()
getLabelYPos in interface Positionable
public void setLabelXPos(int x)
throws IntegrityException
setLabelXPos in interface PositionableIntegrityException
public void setLabelYPos(int y)
throws IntegrityException
setLabelYPos in interface PositionableIntegrityException
public void setLabelPosition(int x,
int y)
throws IntegrityException
setLabelPosition in interface PositionableIntegrityExceptionpublic java.lang.String getLabel()
getLabel in interface Positionablepublic void setLabel(java.lang.String label)
setLabel in interface Positionablepublic java.lang.Object getRepObject()
getRepObject in interface Positionable
public void setName(java.lang.String name)
throws IntegrityException
name - new name to give to the schema
IntegrityException - if another schema already exists with this
name in the repository
public static java.lang.String getName(int SID)
throws InconsistentException
SID - The schema id for which the name will be returned
InconsistentExceptionpublic boolean isExtSchema()
true if the schema is an extentional schema;
false if it is an intentional schema.public boolean isExtDB()
true if the schema represents an extentional
database; false otherwise.public boolean isDataSource()
true if the schema represents an external
data source; false otherwise.
public SchemaObject[] getSchemaObjects()
throws InconsistentException
SchemaObject)
that belong to the schema.
SchemaObject)
that belong to the schema.
InconsistentExceptionpublic java.lang.Object[] getAllSchemeNames()
Object array of schemes of all the schema objects
that belong to the schema.
public java.lang.Object[] getAllSchemeNames(boolean all,
int idDepth,
int typeDepth)
public java.lang.String getAllSchemeNamesString()
throws InconsistentException
String) of the schemes
of all the schema objects that belong to the schema.
InconsistentException
public java.lang.String getAllSchemeNamesString(boolean all,
int idDepth,
int typeDepth)
throws InconsistentException
InconsistentExceptionpublic void setExtSchema(boolean extSchema)
extSchema - set to true if the schema is an
extentional schema; false otherwise.public void setExtDB(boolean extDB)
extDB - set to true if the schema represents an
extentional database; false otherwise.
public void setDataSource(boolean dataSource)
throws InconsistentException
dataSource - set to true if the schema represents an
external data source; false otherwise.
InconsistentException
public void removeSchemaObjects()
throws IntegrityException
SchemaObject list is emptied.
IntegrityExceptionpublic static boolean exists(java.lang.String schemaName)
schemaName - name of the schema to check for the existance of
public static Schema getSchema(java.lang.String schemaName)
throws NotFoundException
Schema object with the given name.
schemaName - name of the schema.
Schema object with the
given name, or null if it does not exist.
NotFoundException - if no schema with the given name exists
in the repositorypublic static java.lang.String[] getSchemaNames()
public static int[] getSchemaIDs()
throws InconsistentException
InconsistentException
public static Schema getSchema(int sid)
throws NotFoundException
Schema object which has the given schema
identifier (SID).
- Parameters:
sid - the SID of the Schema to
return
- Returns:
- the
Schema object which has the SID.
- Throws:
NotFoundException - if no schema exists in the repository
with this SID
public void materialize(uk.ac.ic.doc.automed.reps.Path path)
throws NotFoundException
path - the path via which the intentional schema is to be materialized.
NotFoundExceptionprotected boolean hasObject(SchemaObject so)
true if the schema contains the given schema object;
false otherwise.
protected Transformation[] getTransformationsFrom()
throws InconsistentException
Transformation's that have this schema
as the fromSchema field in the transformation table of the
STR.
Transformation's that have this schema
as the fromSchema field in the transformation table of the
STR.
InconsistentException
protected Transformation[] getTransformationsTo()
throws InconsistentException
Transformation's that have this schema
as the toSchema field in the transformation table of the
STR.
Transformation's that have this schema
as the toSchema field in the transformation table of the
STR.
InconsistentException
public Schema applyAddTransformation(Construct toObjectConstructType,
java.lang.Object[] toObject,
java.lang.String function,
java.lang.String constraint)
throws TypeMismatchException,
IntegrityException
Schema which is the result of applying an
ADD transformation.
toObjectConstructType - the construct type (see Construct) of
the resulting transformation object.toObject - the scheme (in an Object array) that forms the
output of the transformation.function - the query that expresses the extent of the construct
being transformed.constraint - the constraint associated with the transformation
(if any).
Schema which is the result of applying an
ADD transformation.
InconsistentException
IntegrityException
TypeMismatchException
public Schema applyAddTransformation(Construct toObjectConstructType,
java.lang.Object[] toObject,
java.lang.String function,
java.lang.String constraint,
java.lang.String newSchemaName)
throws TypeMismatchException,
IntegrityException
Schema which is the result of applying an
ADD transformation.
toObjectConstructType - the construct type (see Construct) of
the resulting transformation object.toObject - the scheme (in an Object array) that forms the
output of the transformation.function - the query that expresses the extent of the construct
being transformed.constraint - the constraint associated with the transformation
(if any).newSchemaName - the name of the resultant schema.
Schema which is the result of applying an
ADD transformation.
TypeMismatchException
IntegrityException
public Schema applyDeleteTransformation(SchemaObject fromObject,
java.lang.String function,
java.lang.String constraint)
throws TypeMismatchException,
IntegrityException
Schema which is the result of applying a
DELETE transformation.
fromObject - the SchemaObject to be deleted in the
transformation. Note that this schema object must belong to the given
fromSchema.function - the query that expresses the extent of the construct
being transformed.constraint - the constraint associated with the transformation
(if any).
Schema which is the result of applying a
DELETE transformation.
TypeMismatchException
IntegrityException
public Schema applyDeleteTransformation(SchemaObject fromObject,
java.lang.String function,
java.lang.String constraint,
java.lang.String newSchemaName)
throws TypeMismatchException,
IntegrityException
Schema which is the result of applying a
DELETE transformation.
fromObject - the SchemaObject to be deleted in the
transformation. Note that this schema object must belong to the given
fromSchema.function - the query that expresses the extent of the construct
being transformed.constraint - the constraint associated with the transformation
(if any).newSchemaName - the name of the resultant schema.
Schema which is the result of applying a
DELETE transformation.
TypeMismatchException
IntegrityException
public Schema applyRenameTransformation(SchemaObject fromObject,
java.lang.Object[] toObject)
throws TypeMismatchException,
IntegrityException
Schema which is the result of applying a
RENAME transformation.
fromObject - the SchemaObject to be renamed in the
transformation. Note that this schema object must belong to the given
fromSchema.toObject - the scheme (in an Object array) that forms the
output of the transformation. (The construct type of toObject must
be the same as the fromObject).
Schema which is the result of applying a
RENAME transformation.
TypeMismatchException
IntegrityException
public Schema applyRenameTransformation(SchemaObject fromObject,
java.lang.Object[] toObject,
java.lang.String newSchemaName)
throws TypeMismatchException,
IntegrityException
Schema which is the result of applying a
RENAME transformation.
fromObject - the SchemaObject to be renamed in the
transformation. Note that this schema object must belong to the given
fromSchema.toObject - the scheme (in an Object array) that forms the
output of the transformation. (The construct type of toObject must
be the same as the fromObject).newSchemaName - the name of the resultant schema.
Schema which is the result of applying a
RENAME transformation.
TypeMismatchException
IntegrityException
public Schema applyExtendTransformation(Construct toObjectConstructType,
java.lang.Object[] toObject,
java.lang.String function,
java.lang.String constraint)
throws TypeMismatchException,
IntegrityException
Schema which is the result of applying an
EXTEND transformation.
toObjectConstructType - the construct type (see Construct) of
the resulting transformation object.toObject - the scheme (in an Object array) that forms the
output of the transformation.function - the query that expresses the extent of the construct
being transformed.constraint - the constraint associated with the transformation
(if any).
Schema which is the result of applying an
EXTEND transformation.
TypeMismatchException
IntegrityException
public Schema applyExtendTransformation(Construct toObjectConstructType,
java.lang.Object[] toObject,
java.lang.String function,
java.lang.String constraint,
java.lang.String newSchemaName)
throws TypeMismatchException,
IntegrityException
Schema which is the result of applying an
EXTEND transformation.
toObjectConstructType - the construct type (see Construct) of
the resulting transformation object.toObject - the scheme (in an Object array) that forms the
output of the transformation.function - the query that expresses the extent of the construct
being transformed.constraint - the constraint associated with the transformation
(if any).newSchemaName - the name of the resultant schema.
Schema which is the result of applying an
EXTEND transformation.
TypeMismatchException
IntegrityException
public Schema applyContractTransformation(SchemaObject fromObject,
java.lang.String function,
java.lang.String constraint)
throws TypeMismatchException,
IntegrityException
Schema which is the result of applying a
CONTRACT transformation.
fromObject - the SchemaObject to be contracted in the
transformation. Note that this schema object must belong to the given
fromSchema.function - the query that expresses the extent of the construct
being transformed.constraint - the constraint associated with the transformation
(if any).
Schema which is the result of applying a
CONTRACT transformation.
TypeMismatchException
IntegrityException
public Schema applyContractTransformation(SchemaObject fromObject,
java.lang.String function,
java.lang.String constraint,
java.lang.String newSchemaName)
throws TypeMismatchException,
IntegrityException
Schema which is the result of applying a
CONTRACT transformation.
fromObject - the SchemaObject to be contracted in the
transformation. Note that this schema object must belong to the given
fromSchema.function - the query that expresses the extent of the construct
being transformed.constraint - the constraint associated with the transformation
(if any).newSchemaName - the name of the resultant schema.
Schema which is the result of applying a
CONTRACT transformation.
TypeMismatchException
IntegrityExceptionpublic static void clearSchemas()
public SchemaObject getSchemaObjectByName(java.lang.String name)
throws InconsistentException
SchemaObject that has the supplied name in
this schema. Note that the String supplied must match exactly
the name of the SchemaObject as returned by SchemaObject.getSchemeNamesString()
InconsistentException
public SchemaObject getSchemaObject(java.lang.String name)
throws NotFoundException
SchemaObject that has the supplied name in
this schema. Note that the String supplied must match exactly
the name of the SchemaObject as returned by SchemaObject.getSchemeNamesString()
name - the String name of the SchemaObject
NotFoundException - if no SchemaObject with the
supplied named exists
public void updateSchemaObjectNameHashMap()
throws InconsistentException
SchemaObject in
the schema is named. This method should not now need to be
called by user programs since the map is supposed to be kept up
to date, but if you suspect problems (and in particular is a
object found in listSchema() is not found by getSchemaObjectByName(String)) then call this method.
InconsistentException
public static void setOpenCloseSchemeBracket(java.lang.String openScheme,
java.lang.String closeScheme)
Strings that is used to open and
close a scheme name,
such as the "<<" and ">>" in "<<person>>" or "<<person,name>>".
By default these are set to "<<" and ">>". Normally
these pairs would be set to one of "<" and ">", or
"<<" and ">>", or "«" (open double chevron) and
"»" (close double chevron)
- Parameters:
openScheme - the string to open schemes withcloseScheme - the String to close schemes with
public static java.lang.String getOpenSchemeBracket()
String used to deliminate the opening of a scheme namepublic static java.lang.String getCloseSchemeBracket()
String used to deliminate the closing of a scheme name
public SchemaObject[] differenceByName(Schema s2)
throws InconsistentException
SchemaObject array containing the difference
by name between this schema (s1) and the schema passed as a parameter
(s2). Thus the returned array will contain any SchemaObject
that appears this Schema, but which there is not object in
s2 with the same textual name. Thus the array will
not contain an object from s1 named "<<person>>" if there is
another object in s2 called "<<person>>", even if those two
objects have diffient OBIDs.
s2 - the Schema to be subtracted from this Schema s1
InconsistentException
public SchemaObject[] unionByName(Schema s2)
throws InconsistentException
SchemaObject array containing the union by
name between this schema (s1) and the schema passed as a
parameter (s2). Thus the returned array will contain any SchemaObject that appears in s1, plus those
objects in s2 with different textual names. Thus
the array will not contain an object from s2 named
"<<person>>" if there is another object in s1 called
"<<person>>", even if the two objects have different OBIDs.
s2 - the Schema to be unioned with this Schema s1
InconsistentExceptionpublic Schema union(Schema s2)
Schema (su) containing the union of
SchemaObjects in this schema (s1) and the
schema passed as a parameter (s2). SchemaObjects which
have the same name in s1,s2 will have their extent in
su be define as the union of the extents of the two
SchemaObjects in s1,s2. In effect, this produces a
similar result as the global-as-view (GAV) approach to schema
integration when it combines two schemas together.
s2 - the Schema to be unioned with this Schema s1
public SchemaObject[] intersectionByName(Schema s2)
throws InconsistentException
SchemaObject array containing the intersection by
name between this schema (s1) and the schema passed as a
parameter (s2). The returned array will contain any SchemaObject that appears in s1, and for which there is an object
with the same name in s2. Thus
the array will contain an object from s1 named
"<<person>>" only if there is an object in s2 called
"<<person>>".
s2 - the Schema to be intersected with this Schema s1
InconsistentException
public void listSchema()
throws InconsistentException
SchemaObject in the Schema is prefixed by
its Construct name as defined in the MDR.
InconsistentException
public void listSchema(java.io.PrintStream out,
int mode)
throws InconsistentException
out - the PrintStream to which the output is directedmode - sets the exact format of the output, selecting one
of the following:
LIST_SCHEMA_SHORT list only the scheme of each object
in the schema.
LIST_SCHEMA_NORMAL list the scheme of the object, prefixed
by the model name, object construct type, and object id
LIST_SCHEMA_LONG list the scheme of the each object
prefixed by the construct type (this is the default for versions
of listSchema that have no mode).
InconsistentException
public void listSchema(java.io.PrintStream out)
throws InconsistentException
InconsistentException
public Transformation[] getTransformations()
throws InconsistentException
Transformation that go out
from a particular schema.
InconsistentException
public Schema prefixAllNodalNames(java.lang.String prefix)
throws IntegrityException
Construct type Nodal.
For example, if s1>>
was a schema containing ER entities <<e1>>, <<e2>> and
relationship <<r,e1,e2>>, and we called this method
with prefix <<s1.>>, then
the new schema would contain <<s1.e1>>, <<s1.e2>>
and <<r,s1.e1,s1.e2>>
prefix - The String to prefix to all Nodal names
IntegrityException
public Transformation prefixSchemaObjectName(java.lang.String prefix,
SchemaObject nodeObject)
throws IntegrityException
SchemaObject is a Nodal object, where the SchemaObject has had a
prefix applied to the node name,
prefix - The String to prefix to Nodal namesnodeObject - The SchemaObject, which is Nodal, will have
its node names changed
IntegrityExceptionpublic Schema extendToMatch(Schema schemaToAdd)
schemaToAdd - The Schema which is to have the constructs
added to make it match this schema.
Constructs of @param schemaToAdd
public Schema[] findAttachedExtSchemas()
throws InconsistentException,
IntegrityException
InconsistentException
IntegrityException
public Schema[] findAttachedExtDBs()
throws InconsistentException,
IntegrityException
InconsistentException
IntegrityException
public Schema[] findAttachedDataSources()
throws InconsistentException,
IntegrityException
InconsistentException
IntegrityException
public Schema[] findShortestPath(Schema target)
throws InconsistentException,
IntegrityException
InconsistentException
IntegrityException
public AccessMethod[] getAccessMethods()
throws InconsistentException
AccessMethods that may be used to access the
physical database system that holds this Schema.
AccessMethods that may be used to
access a physical database containing this Schema.
InconsistentException
public void removeAccessMethods()
throws InconsistentException
AccessMethods recorded for this schema.
InconsistentExceptionpublic HDMNetwork getHDMNetwork()
public void importSchemaObjects(java.io.InputStream is)
throws java.io.IOException,
AutoRepException,
UnexpectedTokenException,
AutoMedException,
java.sql.SQLException
java.io.IOException
AutoRepException
UnexpectedTokenException
AutoMedException
java.sql.SQLExceptionpublic void exportSchemaObjects(java.io.OutputStream os)
public void exportSchemaObjects(java.io.PrintWriter pw)
public static Schema read(java.io.InputStream is)
throws java.io.IOException,
AutoRepException,
UnexpectedTokenException,
AutoMedException,
java.sql.SQLException
java.io.IOException
AutoRepException
UnexpectedTokenException
AutoMedException
java.sql.SQLException
public static Schema read(java.io.InputStream is,
java.lang.String name)
throws java.io.IOException,
AutoRepException,
UnexpectedTokenException,
AutoMedException,
java.sql.SQLException
java.io.IOException
AutoRepException
UnexpectedTokenException
AutoMedException
java.sql.SQLException
public void write()
throws IllegalOperationException
read()
IllegalOperationException
public void write(java.io.OutputStream os)
throws IllegalOperationException
IllegalOperationException
public void write(java.io.PrintWriter pw)
throws IllegalOperationException
IllegalOperationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||