CSVWrapperFactory
Keywords: uk.ac.ic.doc.automed.wrappers.CSVWrapperFactory 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 CSVWrapperFactory

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

    public class CSVWrapperFactory

extends AutoMedWrapperFactory

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

Field Summary
`static java.awt.Color` | `CSV_COLOUR`
`static java.lang.String` | `CSV_MODEL_ELEMENT`
`static java.lang.String` | `CSV_MODEL_LINK`
`static java.lang.String` | `CSV_MODEL_NAME` Constants
`static java.lang.String` | `CSV_MODEL_PREFIX`
`static java.lang.String` | `CSV_MODEL_ROOT`
`char` | `separator` The separator for this file

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

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

Method Summary
`Schema` | `createAutoMedSchema(AutoMedWrapper autoMedWrapper, java.lang.String str)` Create the AutoMed schema for the CSV document
`void` | `createModel()` Define the CSV model in the Automed MDR database
`Model` | `getAutoMedModel()` Return the XML Schema model from the Automed MDR database
`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)` Create an AutoMed schema from the CSV file
`void` | `setFeatures(int features)` Set the features for this instance of the factory

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

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

Field Detail

### CSV_MODEL_NAME

    public static final java.lang.String CSV_MODEL_NAME

  Constants

  See Also:
    Constant Field Values

### CSV_MODEL_ROOT

    public static final java.lang.String CSV_MODEL_ROOT

See Also:
  Constant Field Values

### CSV_MODEL_ELEMENT

    public static final java.lang.String CSV_MODEL_ELEMENT

See Also:
  Constant Field Values

### CSV_MODEL_LINK

    public static final java.lang.String CSV_MODEL_LINK

See Also:
  Constant Field Values

### CSV_MODEL_PREFIX

    public static final java.lang.String CSV_MODEL_PREFIX

See Also:
  Constant Field Values

### CSV_COLOUR

    public static final java.awt.Color CSV_COLOUR

### separator

    public char separator

  The separator for this file

Constructor Detail

### CSVWrapperFactory

    public CSVWrapperFactory()

  Creates a new instance of CSVWrapperFactory

Method Detail

### 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 CSV 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 for the CSV document

  Specified by:
    `createAutoMedSchema` in class `AutoMedWrapperFactory`
  Parameters:
    `autoMedWrapper` -
    `str` -
  Returns:
  Throws:
    `IntegrityException`
    `NotFoundException`

### populateSchema

    protected void populateSchema(AutoMedWrapper wrapper)
                           throws DataSourceException

  Create an AutoMed schema from the CSV file

  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