|
||||||||||
| 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.Model
The Model class
Construct| Method Summary | |
Construct |
createConstruct(java.lang.String cName,
int cClass,
boolean isRoot)
Creates a new construct and add to the model. |
static Model |
createModel(java.lang.String modelName)
Creates a new model with the given name. |
static boolean |
exists(int MID)
|
static boolean |
exists(java.lang.String modelName)
|
void |
exportConstructs(java.io.OutputStream os)
|
void |
exportConstructs(java.io.PrintWriter pw)
|
Construct |
getConstruct(java.lang.String name)
Returns the named construct in the model or throws an AutoMedException if the construct name doesn't exist in the model. |
Construct[] |
getConstructs()
Returns an array of all the constructs in the model. |
static Model |
getModel(int MID)
Returns a reference to the Model with the given MID. |
static Model |
getModel(java.lang.String name)
Returns a reference to the Model with the given modelName. |
java.lang.String |
getModelDescription()
Returns a description of the model, each construct along with their schemes is listed in a way suitable for printing. |
java.lang.String |
getModelDescription(boolean full)
Returns a description of the model, each construct along with its schemes are listed in a way suitable for printing. |
static Model[] |
getModels()
Returns an array of all models. |
java.lang.String |
getName()
Returns the name of the model. |
void |
importConstructs(java.io.InputStream is)
|
static Model |
read(java.io.InputStream is)
|
static Model |
read(java.io.InputStream is,
java.lang.String name)
|
static void |
reloadModels()
This method empties the cached model data and then reloads it from the ModelDefinitionsRepository as if the class had just been loaded. |
void |
remove()
Removes the Model from the repository. |
protected void |
removeConstructFromMap(java.lang.String name)
THIS METHOD DOESN'T DO ANYTHING AT THE MOMENT Sets the content of a particular position of the model's constructs list. |
static void |
removeModel(java.lang.String modelName)
Removes the Model with the given modelName. |
void |
retract()
Removes the Model from the repository, together with all associated information --- in particular all Constructs belonging to the model are removed, and hence all SchemaObjects, and hence all Transformations on those objects. |
void |
setName(java.lang.String modelName)
Sets the model's name. |
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 |
| Method Detail |
public static void reloadModels()
public static Model createModel(java.lang.String modelName)
throws IntegrityException
modelName - name of the model.
IntegrityException - if model already exists
public static void removeModel(java.lang.String modelName)
throws IntegrityException
modelName - name of the model to be removed.
IntegrityException - if model does not exist
public void remove()
throws IntegrityException
IntegrityException
public void retract()
throws InconsistentException
InconsistentExceptionpublic static Model[] getModels()
public static boolean exists(java.lang.String modelName)
public static boolean exists(int MID)
public static Model getModel(java.lang.String name)
throws NotFoundException
Model with the given modelName.
NotFoundException
public static Model getModel(int MID)
throws NotFoundException
Model with the given MID.
MID - numeric identifier of the model.
NotFoundException
public Construct createConstruct(java.lang.String cName,
int cClass,
boolean isRoot)
throws InconsistentException
cName - name of the construct.cClass - class of the construct (one of
CONSTRUCT_CLASS_NODAL,
CONSTRUCT_CLASS_LINK,
CONSTRUCT_CLASS_LINK_NODAL, and
CONSTRUCT_CLASS_CONSTRAINT, see Constants).isRoot - set to true if the construct is a
construct type of its underlying data model; false
otherwise.
InconsistentExceptionpublic java.lang.String getName()
public Construct getConstruct(java.lang.String name)
throws NotFoundException
NotFoundException - if the named construct doesn't exist in the
model.public Construct[] getConstructs()
public void setName(java.lang.String modelName)
throws ModelDefinitionsRepositoryException,
java.sql.SQLException,
DataSourceRepositoryException,
java.io.IOException
modelName - new name of model.
ModelDefinitionsRepositoryException
java.sql.SQLException
DataSourceRepositoryException
java.io.IOException
protected void removeConstructFromMap(java.lang.String name)
throws IntegrityException
IntegrityExceptionpublic java.lang.String getModelDescription()
getModelDescription(boolean) passing it false to get the
shorter description.
public java.lang.String getModelDescription(boolean full)
full - If true, expand construct descriptions in scheme
public void importConstructs(java.io.InputStream is)
throws java.io.IOException,
AutoRepException,
UnexpectedTokenException,
AutoMedException,
java.sql.SQLException
java.io.IOException
AutoRepException
UnexpectedTokenException
AutoMedException
java.sql.SQLExceptionpublic void exportConstructs(java.io.OutputStream os)
public void exportConstructs(java.io.PrintWriter pw)
public static Model 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 Model 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.SQLExceptionpublic void write(java.io.OutputStream os)
public void write(java.io.PrintWriter pw)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||