XMLSchemaWrapperFactory
Keywords: uk.ac.ic.doc.automed.wrappers.XMLSchemaWrapperFactory class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.ic.doc.automed.wrappers
Class XMLSchemaWrapperFactory

    java.lang.Object
      uk.ac.ic.doc.automed.wrappers.AutoMedWrapperFactory
          uk.ac.ic.doc.automed.wrappers.XMLSchemaWrapperFactory

    public class XMLSchemaWrapperFactory

extends AutoMedWrapperFactory

Author:
  Andrew Charles Smith - acs203 For the moment this is where the constants will go

Field Summary
`static int` | `MAX_OCCURS` A feature option to model max occurs in any `Schema` the factory generates
`static int` | `PI` A feature option to model SQL Indexes in any `Schema` the factory generates
`static java.awt.Color` | `XML_COLOUR`
`static java.lang.String` | `XML_MODEL_ATTRIBUTE`
`static java.lang.String` | `XML_MODEL_CONS`
`static java.lang.String` | `XML_MODEL_ELEMENT`
`static java.lang.String` | `XML_MODEL_NEST`
`static java.lang.String` | `XML_MODEL_PREFIX`
`static java.lang.String` | `XML_SCHEMA_ICON_ATTRIBUTE`
`static java.lang.String` | `XML_SCHEMA_ICON_COLLAPSED`
`static java.lang.String` | `XML_SCHEMA_ICON_DERIVED_TYPE`
`static java.lang.String` | `XML_SCHEMA_ICON_DIRECTORY` Icon filenames
`static java.lang.String` | `XML_SCHEMA_ICON_ELEMENT`
`static java.lang.String` | `XML_SCHEMA_ICON_EXPANDED`
`static java.lang.String` | `XML_SCHEMA_ICON_KEYREF`
`static java.lang.String` | `XML_SCHEMA_ICON_PRIMARY_KEY`
`static java.lang.String` | `XML_SCHEMA_INTEGER`
`static java.lang.String` | `XML_SCHEMA_MODEL_ATTRIBUTE`
`static java.lang.String` | `XML_SCHEMA_MODEL_COMPLEX_TYPE_NEST`
`static java.lang.String` | `XML_SCHEMA_MODEL_CONS_SUFFIX`
`static java.lang.String` | `XML_SCHEMA_MODEL_DEFAULT_KEY`
`static java.lang.String` | `XML_SCHEMA_MODEL_ELEMENT` Constants
`static java.lang.String` | `XML_SCHEMA_MODEL_FK_SUFFIX`
`static java.lang.String` | `XML_SCHEMA_MODEL_KEYREF`
`static java.lang.String` | `XML_SCHEMA_MODEL_LIST`
`static java.lang.String` | `XML_SCHEMA_MODEL_NAME`
`static java.lang.String` | `XML_SCHEMA_MODEL_NEST`
`static java.lang.String` | `XML_SCHEMA_MODEL_PK_SUFFIX`
`static java.lang.String` | `XML_SCHEMA_MODEL_PREFIX`
`static java.lang.String` | `XML_SCHEMA_MODEL_PRIMARY_KEY`
`static java.lang.String` | `XML_SCHEMA_MODEL_SIMPLE_TYPE`
`static java.lang.String` | `XML_SCHEMA_MODEL_TYPE`
`static java.lang.String` | `XML_SCHEMA_MODEL_TYPE_SUFFIX`
`static java.lang.String` | `XML_SCHEMA_PI`
`static java.lang.String` | `XML_SCHEMA_UNBOUNDED`

Fields inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapperFactory
`automedModelName, baseName, empty, factoryInUse, SOURCE_PREFIX`

Constructor Summary
`XMLSchemaWrapperFactory()` Creates a new instance of XMLSchemaWrapperFactory

Method Summary
`Schema` | `createAutoMedSchema(AutoMedWrapper autoMedWrapper, java.lang.String str)` Create the AutoMed schema from the XSDOM representation of the XML Schema document This will involve transforming the XML Schema oriented model into an XML one.
`void` | `createModel()` Define the xmlschema model in the Automed MDR database
`Model` | `getAutoMedModel()` Return the XML Schema model from the Automed MDR database
`Document` | `getDoc()` Return the global doc for this factory
`java.lang.String[]` | `getFeatureNames()` Return a string list of features supported by this wrapper, where the first one is bit zero in the feature bit map, second bit one, etc
`Model` | `getModel()` Return the XML Schema model from the Automed MDR database
`protected AutoMedWrapper` | `newAutoMedWrapper()` Create a new empty wrapper instance that this wrapper factory is then able to populate.
`protected void` | `populateSchema(AutoMedWrapper wrapper)` Translate the XSDOM representation of the XML Schema document into an XML Schema oriented AutoMed schema
`void` | `setFeatures(int features)` Set the features for this instance of the factory
`Schema` | `xmlSchemaToXML(Schema s, java.lang.String str)`

Methods inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapperFactory
`clearFeatures, getAutoMedModelName, getFeatures, getModelBaseName, getModelName, isFeatureInUse, safeIQL, setFeatures, setModelBaseName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### XML_SCHEMA_MODEL_ELEMENT

    public static final java.lang.String XML_SCHEMA_MODEL_ELEMENT

  Constants

  See Also:
    Constant Field Values

### XML_MODEL_ELEMENT

    public static final java.lang.String XML_MODEL_ELEMENT

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_TYPE

    public static final java.lang.String XML_SCHEMA_MODEL_TYPE

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_SIMPLE_TYPE

    public static final java.lang.String XML_SCHEMA_MODEL_SIMPLE_TYPE

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_NAME

    public static final java.lang.String XML_SCHEMA_MODEL_NAME

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_ATTRIBUTE

    public static final java.lang.String XML_SCHEMA_MODEL_ATTRIBUTE

See Also:
  Constant Field Values

### XML_MODEL_ATTRIBUTE

    public static final java.lang.String XML_MODEL_ATTRIBUTE

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_KEYREF

    public static final java.lang.String XML_SCHEMA_MODEL_KEYREF

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_PRIMARY_KEY

    public static final java.lang.String XML_SCHEMA_MODEL_PRIMARY_KEY

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_COMPLEX_TYPE_NEST

    public static final java.lang.String XML_SCHEMA_MODEL_COMPLEX_TYPE_NEST

See Also:
  Constant Field Values

### XML_MODEL_NEST

    public static final java.lang.String XML_MODEL_NEST

See Also:
  Constant Field Values

### XML_MODEL_CONS

    public static final java.lang.String XML_MODEL_CONS

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_NEST

    public static final java.lang.String XML_SCHEMA_MODEL_NEST

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_LIST

    public static final java.lang.String XML_SCHEMA_MODEL_LIST

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_PREFIX

    public static final java.lang.String XML_SCHEMA_MODEL_PREFIX

See Also:
  Constant Field Values

### XML_MODEL_PREFIX

    public static final java.lang.String XML_MODEL_PREFIX

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_TYPE_SUFFIX

    public static final java.lang.String XML_SCHEMA_MODEL_TYPE_SUFFIX

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_CONS_SUFFIX

    public static final java.lang.String XML_SCHEMA_MODEL_CONS_SUFFIX

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_PK_SUFFIX

    public static final java.lang.String XML_SCHEMA_MODEL_PK_SUFFIX

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_FK_SUFFIX

    public static final java.lang.String XML_SCHEMA_MODEL_FK_SUFFIX

See Also:
  Constant Field Values

### XML_SCHEMA_MODEL_DEFAULT_KEY

    public static final java.lang.String XML_SCHEMA_MODEL_DEFAULT_KEY

See Also:
  Constant Field Values

### XML_SCHEMA_UNBOUNDED

    public static final java.lang.String XML_SCHEMA_UNBOUNDED

See Also:
  Constant Field Values

### XML_SCHEMA_INTEGER

    public static final java.lang.String XML_SCHEMA_INTEGER

See Also:
  Constant Field Values

### XML_SCHEMA_PI

    public static final java.lang.String XML_SCHEMA_PI

See Also:
  Constant Field Values

### XML_SCHEMA_ICON_DIRECTORY

    public static final java.lang.String XML_SCHEMA_ICON_DIRECTORY

  Icon filenames

  See Also:
    Constant Field Values

### XML_SCHEMA_ICON_ATTRIBUTE

    public static final java.lang.String XML_SCHEMA_ICON_ATTRIBUTE

See Also:
  Constant Field Values

### XML_SCHEMA_ICON_ELEMENT

    public static final java.lang.String XML_SCHEMA_ICON_ELEMENT

See Also:
  Constant Field Values

### XML_SCHEMA_ICON_KEYREF

    public static final java.lang.String XML_SCHEMA_ICON_KEYREF

See Also:
  Constant Field Values

### XML_SCHEMA_ICON_EXPANDED

    public static final java.lang.String XML_SCHEMA_ICON_EXPANDED

See Also:
  Constant Field Values

### XML_SCHEMA_ICON_COLLAPSED

    public static final java.lang.String XML_SCHEMA_ICON_COLLAPSED

See Also:
  Constant Field Values

### XML_SCHEMA_ICON_PRIMARY_KEY

    public static final java.lang.String XML_SCHEMA_ICON_PRIMARY_KEY

See Also:
  Constant Field Values

### XML_SCHEMA_ICON_DERIVED_TYPE

    public static final java.lang.String XML_SCHEMA_ICON_DERIVED_TYPE

See Also:
  Constant Field Values

### XML_COLOUR

    public static final java.awt.Color XML_COLOUR

### MAX_OCCURS

    public static final int MAX_OCCURS

  A feature option to model max occurs in any `Schema` the factory generates

  See Also:
    Constant Field Values

### PI

    public static final int PI

  A feature option to model SQL Indexes in any `Schema` the factory generates

  See Also:
    Constant Field Values

Constructor Detail

### XMLSchemaWrapperFactory

    public XMLSchemaWrapperFactory()

  Creates a new instance of XMLSchemaWrapperFactory

Method Detail

### getDoc

    public Document getDoc()

  Return the global doc for this factory

### setFeatures

    public void setFeatures(int features)
                     throws IntegrityException

  Set the features for this instance of the factory

  Overrides:
    `setFeatures` in class `AutoMedWrapperFactory`
  Parameters:
    `features` - a bitwise `or' of the feature flags. By default no features are used.
  Throws:
    `IntegrityException` - if the factory is already being used for producing wrappers. You should create a new wrapper factory for your settings.

### getFeatureNames

    public java.lang.String[] getFeatureNames()

  Return a string list of features supported by this wrapper, where the first one is bit zero in the feature bit map, second bit one, etc

  Specified by:
    `getFeatureNames` in class `AutoMedWrapperFactory`

### createModel

    public void createModel()
                     throws InconsistentException

  Define the xmlschema model in the Automed MDR database

  Throws:
    `InconsistentException`

### getModel

    public Model getModel()
                   throws InconsistentException

  Return the XML Schema model from the Automed MDR database

  Specified by:
    `getModel` in class `AutoMedWrapperFactory`
  Throws:
    `InconsistentException`

### getAutoMedModel

    public Model getAutoMedModel()

  Return the XML Schema model from the Automed MDR database

  Specified by:
    `getAutoMedModel` in class `AutoMedWrapperFactory`

### createAutoMedSchema

    public Schema createAutoMedSchema(AutoMedWrapper autoMedWrapper,
                                      java.lang.String str)
                               throws IntegrityException,
                                      NotFoundException

  Create the AutoMed schema from the XSDOM representation of the XML Schema document This will involve transforming the XML Schema oriented model into an XML one. Complextype constructs are removed and attributes are linked to elements

  Specified by:
    `createAutoMedSchema` in class `AutoMedWrapperFactory`
  Parameters:
    `autoMedWrapper` - A wrapper containing the source oriented `Schema` from which the AutoMed oriented Schema should be produced.
    `str` - name of the new AutoMed construct oriented schema that is to be created from the source oriented schema. This schema must not yet exist.
  Throws:
    `IntegrityException` - if schemaName already exists.
    `NotFoundException` - if you have not previously wrapped the datasource as a source oriented schema, using either `#AutoMedWrapper.getSchema(String)` or `#AutoMedWrapper.selectNewAutoMedWrapper`

### xmlSchemaToXML

    public Schema xmlSchemaToXML(Schema s,
                                 java.lang.String str)
                          throws IntegrityException,
                                 NotFoundException

  Throws:
    `IntegrityException`
    `NotFoundException`

### populateSchema

    protected void populateSchema(AutoMedWrapper wrapper)
                           throws DataSourceException

  Translate the XSDOM representation of the XML Schema document into an XML Schema oriented AutoMed schema

  Specified by:
    `populateSchema` in class `AutoMedWrapperFactory`
  Throws:
    `DataSourceException`

### newAutoMedWrapper

    protected AutoMedWrapper newAutoMedWrapper()

  Description copied from class: `AutoMedWrapperFactory`
  Create a new empty wrapper instance that this wrapper factory is then able to populate.

  Specified by:
    `newAutoMedWrapper` in class `AutoMedWrapperFactory`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD