|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--uk.ac.ic.doc.automed.wrappers.AutoMedWrapperFactory
|
+--uk.ac.ic.doc.automed.wrappers.SQLWrapperFactory
An AutoMed high wrapper factory for creating SQLWrapper instances.
| Field Summary | |
static java.lang.String |
AUTOMED_SQL_MODEL_FIELD
|
static java.lang.String |
AUTOMED_SQL_MODEL_FOREIGN_KEY
|
static java.lang.String |
AUTOMED_SQL_MODEL_INDEX
|
static java.lang.String |
AUTOMED_SQL_MODEL_PRIMARY_KEY
|
static java.lang.String |
AUTOMED_SQL_MODEL_TABLE
|
static int |
DATA_SIZE
|
static int |
DATA_TYPE
|
static int |
FIELD_POSITION
|
static int |
FOREIGN_KEY
|
static int |
INDEX
|
static int |
NULL_CONSTRAINT
|
static int |
PRIMARY_KEY
|
static java.lang.String |
SQL_MODEL_FOREIGN_KEY
|
static java.lang.String |
SQL_MODEL_INDEX
|
static java.lang.String |
SQL_MODEL_PRIMARY_KEY
|
static java.lang.String |
SQL_MODEL_TABLE
The name of the Construct used to represent SQL tables. |
| Constructor Summary | |
SQLWrapperFactory()
|
|
| Method Summary | |
abstract SQLWrapper |
build(java.lang.String username,
java.lang.String password,
java.lang.String driver,
java.lang.String url,
java.lang.String schemaName)
|
void |
createAutoMedModel()
Define a relational modelling language for the SQL standard which is an "AutoMed" oriented modelling language.. |
Schema |
createAutoMedSchema(java.lang.String schemaName)
Create an AutoMed standard relational schema from the source oriented schema. |
void |
createSQLModel()
Define a relational modelling language for the SQL standard, together with the JDBC protocol for accessing SQL compliant databases. |
Model |
getAutoMedModel()
Return the AutoMed relational Model used to represent the
Schema for the SQL datasource wrapper. |
java.lang.String |
getAutoMedModelName()
Find the name of the Model that will be used to
represent an AutoMed oriented view of the data source. |
int |
getFeatures()
|
Model |
getModel()
Return the `raw' relational Model used to represent the
Schema for the SQL datasource wrapper. |
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 SQL92 data model in the AutoMed repository |
void |
setBaseName(java.lang.String baseName)
Set what name is used in the AutoMed repository for the Model in which SQL is to be represented. |
void |
setFeatures(int features)
Allows certain features of the SQL92 data model to be represented in the AutoMed repository. |
| 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 SQL_MODEL_TABLE
Construct used to represent SQL tables. This
is a HDM node, where the node name is that of the SQL table, and the
labels that follow it represent field names of the table.
public static final java.lang.String SQL_MODEL_PRIMARY_KEY
public static final java.lang.String SQL_MODEL_FOREIGN_KEY
public static final java.lang.String SQL_MODEL_INDEX
public static final java.lang.String AUTOMED_SQL_MODEL_TABLE
public static final java.lang.String AUTOMED_SQL_MODEL_FIELD
public static final java.lang.String AUTOMED_SQL_MODEL_PRIMARY_KEY
public static final java.lang.String AUTOMED_SQL_MODEL_FOREIGN_KEY
public static final java.lang.String AUTOMED_SQL_MODEL_INDEX
public static final int INDEX
public static final int PRIMARY_KEY
public static final int FOREIGN_KEY
public static final int NULL_CONSTRAINT
public static final int DATA_TYPE
public static final int DATA_SIZE
public static final int FIELD_POSITION
| Constructor Detail |
public SQLWrapperFactory()
| Method Detail |
public final Model getModel()
Model used to represent the
Schema for the SQL datasource wrapper.
public final Model getAutoMedModel()
Model used to represent the
Schema for the SQL datasource wrapper.
public void setFeatures(int features)
features - a bit wise `or' of the feature flags INDEX,
PRIMARY_KEY, FOREIGN_KEY, NULL_CONSTRAINT, DATA_TYPE, DATA_SIZE,
FIELD_POSITION, indicating which features are to be used in addition.
By default no features are used, maaning that the AutoMed comprises
of tables with untyped fieldspublic 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 java.lang.String getModelName()
Model that will be used when a new
wrapper is generated
Model used for the Schema of new
wrappers.public int getFeatures()
public boolean isFeatureInUse(int features)
features - is the bitwise `or' of feature ignore flags to be
tested
public void setBaseName(java.lang.String baseName)
Model in which SQL is to be represented. Note that if any
features are set, then the actual name created with be suffixed
with an underscore and the numeric value returned by getFeatures(). Hence one may set different features for
different wrappers of the relational model, and have them stored
under different model names.
baseName - text that appears at the start of Model namepublic void createAutoMedModel()
public void createSQLModel()
getModel() if
the SQL model for this factory does not already exist, and
thus only needs to called by user appications if there is the need
to create the SQL model indenpendently of wrapping a data source.
public Schema createAutoMedSchema(java.lang.String schemaName)
throws IntegrityException,
NotFoundException
schemaName - name of the new AutoMed construct oriented schema
that is to be created from the source oriented schema.
IntegrityException
NotFoundException
public abstract SQLWrapper build(java.lang.String username,
java.lang.String password,
java.lang.String driver,
java.lang.String url,
java.lang.String schemaName)
throws IntegrityException,
DataSourceException
IntegrityException
DataSourceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||