|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.automed.modelmanagement.modeldef.ModelDef
public abstract class ModelDef
Construct
s needed
for each AutoMed Model
as well as any special features that
model may have.Field Summary | |
---|---|
protected java.lang.String |
automedModelName
|
protected java.lang.String |
baseName
|
protected boolean |
distinctModels
|
protected static java.lang.String[] |
empty
|
(package private) int |
featureSet
|
protected boolean |
modelInUse
|
protected java.lang.String |
modelName
|
static java.lang.String |
SOURCE_PREFIX
String prefixed to AutoMed oriented Model names in order to obtain source oriented Model names. |
Constructor Summary | |
---|---|
ModelDef()
|
Method Summary | |
---|---|
void |
clearFeatures()
Clear all the features for this factory. |
abstract void |
createAutoMedModel()
Create the automed oriented Model used to represent the
Schema of the datasource. |
abstract void |
createModel()
Create the source oriented Model used to represent the
Schema of the datasource. |
Model |
getAutoMedModel()
|
java.lang.String |
getAutoMedModelName()
Find the name of the Model that will be used to
represent an AutoMed oriented view of the data source. |
abstract java.lang.String[] |
getFeatureNames()
Return the list of feature names provided by the model definition. |
int |
getFeatures()
Return the bitwise or of all the features in use for a wrapper. |
Model |
getModel()
|
java.lang.String |
getModelBaseName()
Return text used as basis for generating Model names |
java.lang.String |
getModelName()
Find the name of the Model that will be used when a new
wrapper is generated |
boolean |
isFeatureInUse(int features)
Test if a certain group of features is being implemented in the representation of the datasource model in the AutoMed repository |
void |
setFeatures(int features)
Allows certain features of the Model used for Schema s
generated by this wrapper factory. |
void |
setFeatures(int[] features)
Allows certain features of the Model used for Schema s
generated by this model definition to be set. |
void |
setModelBaseName(java.lang.String baseName)
Each implementing class gives a name for the Model s that
will be generated for Schema s. |
private void |
setModelNames()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SOURCE_PREFIX
protected boolean modelInUse
int featureSet
protected boolean distinctModels
protected java.lang.String baseName
protected java.lang.String modelName
protected java.lang.String automedModelName
protected static final java.lang.String[] empty
Constructor Detail |
---|
public ModelDef()
Method Detail |
---|
public void setModelBaseName(java.lang.String baseName)
Model
s that
will be generated for Schema
s. This same will be suffixed
by the value of getFeatures()
(unless that is zero). Thus
one may create different models with different features set,
and they obtain distinct Model
names. Also
for source oriented Model
s that differ from AutoMed oriented
Model
s, it will be prefixed by SOURCE_PREFIX
.
baseName
- text that appears in the Model
namepublic java.lang.String getModelBaseName()
Model
names
public final boolean isFeatureInUse(int features)
features
- is the bitwise `or' of feature flags to be
tested
public final java.lang.String getAutoMedModelName()
Model
that will be used to
represent an AutoMed oriented view of the data source.
Model
used for the Schema
of new
wrappers.public final java.lang.String getModelName()
Model
that will be used when a new
wrapper is generated
Model
used for the Schema
of new
wrappers.public final int getFeatures()
public final void clearFeatures()
public void setFeatures(int features) throws IntegrityException
Model
used for Schema
s
generated by this wrapper factory.
features
- a bitwise `or' of the feature flags.
By default no features are used.
IntegrityException
- if a Model
with the given
features already existspublic abstract java.lang.String[] getFeatureNames()
#setFeature
methods. In particular you may use the list
on javax.swing.JList#setListData()
public void setFeatures(int[] features) throws IntegrityException
Model
used for Schema
s
generated by this model definition to be set.
features
- an array of integers containing the bit position
of the feature to set. Note that is you create a JList
from the featureNames
of the factory, then you may called this
method with the value of javax.swing.JList.getSelectedIndices()
IntegrityException
- if a Model
with the given
features already existsprivate void setModelNames()
public abstract void createModel() throws InconsistentException
Model
used to represent the
Schema
of the datasource.
InconsistentException
public abstract void createAutoMedModel() throws InconsistentException
Model
used to represent the
Schema
of the datasource.
InconsistentException
public Model getModel() throws AutoMedException
AutoMedException
public Model getAutoMedModel() throws AutoMedException
AutoMedException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |