uk.ac.ic.doc.automed.wrappers
Class YattaWrapperFactory

java.lang.Object
  extended by uk.ac.ic.doc.automed.wrappers.AutoMedWrapperFactory
      extended by uk.ac.ic.doc.automed.wrappers.YattaWrapperFactory

public class YattaWrapperFactory
extends AutoMedWrapperFactory

A YattaWrapperFactory class able to produce YattaWrapper instances, together with any data (schema, ssdformat, etc.) that the wrapper requires to be present in the repository.

Author:
Sasivimol Kittivoravitkul (sk297@doc.ic.ac.uk)

Field Summary
(package private)  Construct rootNode
           
(package private)  Construct rootOrYatta
           
(package private)  Construct sequence
           
(package private)  Model yatta
           
(package private)  Construct yattaNode
           
 
Fields inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapperFactory
modelDef
 
Constructor Summary
YattaWrapperFactory()
           
 
Method Summary
 Schema createAutoMedSchema(AutoMedWrapper wrapper, java.lang.String schemaName)
          Create an AutoMed oriented schema from the source oriented schema.
 void createTypeHierarchy()
           
private  void createYattaSchemaObjects(Schema s)
          Create schemaObects using information from a file "schemaName_schema" or GUI (Leave out the former case for now)
 Model getAutoMedModel()
          Return the AutoMed oriented Model, which is the same as the source oriented Model for the semistructured datasource
 Model getModel()
          Return the source oriented Model, YATTA Model, used to represent the semistructured datasource.
protected  AutoMedWrapper newAutoMedWrapper()
          Create a new empty wrapper instance that this wrapper factory is then able to populate.
 void populateSchema(AutoMedWrapper wrapper)
          Read the metadata from the wrapper connection, and store in the Schema and SSDFormat within the wrapper.
 
Methods inherited from class uk.ac.ic.doc.automed.wrappers.AutoMedWrapperFactory
createSchema, getAttributeDomains, getModelDefinition, safeIQL, setAttributeDomains, setModelDefinition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

yatta

Model yatta

rootNode

Construct rootNode

yattaNode

Construct yattaNode

sequence

Construct sequence

rootOrYatta

Construct rootOrYatta
Constructor Detail

YattaWrapperFactory

public YattaWrapperFactory()
Method Detail

getModel

public Model getModel()
Return the source oriented Model, YATTA Model, used to represent the semistructured datasource.

Specified by:
getModel in class AutoMedWrapperFactory

getAutoMedModel

public Model getAutoMedModel()
Return the AutoMed oriented Model, which is the same as the source oriented Model for the semistructured datasource

Specified by:
getAutoMedModel in class AutoMedWrapperFactory

populateSchema

public void populateSchema(AutoMedWrapper wrapper)
                    throws DataSourceException
Read the metadata from the wrapper connection, and store in the Schema and SSDFormat within the wrapper. To be called by YattaWrapper instancees as part of the wrapper creation process.

Specified by:
populateSchema in class AutoMedWrapperFactory
Throws:
DataSourceException

createAutoMedSchema

public Schema createAutoMedSchema(AutoMedWrapper wrapper,
                                  java.lang.String schemaName)
                           throws IntegrityException,
                                  NotFoundException
Create an AutoMed oriented schema from the source oriented schema.

Specified by:
createAutoMedSchema in class AutoMedWrapperFactory
Parameters:
wrapper - A wrapper containing the source oriented Schema from which the AutoMed oriented Schema should be produced.
schemaName - 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

createYattaSchemaObjects

private void createYattaSchemaObjects(Schema s)
Create schemaObects using information from a file "schemaName_schema" or GUI (Leave out the former case for now)

Parameters:
s - A schema of the datasource which will contain schemaObjects.

createTypeHierarchy

public void createTypeHierarchy()
                         throws AutoMedException
Throws:
AutoMedException

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