uk.ac.ic.doc.automed.xmlschema.transform
Class XMLSchemaTransform

java.lang.Object
  extended by uk.ac.ic.doc.automed.xmlschema.transform.XMLSchemaTransform

public class XMLSchemaTransform
extends java.lang.Object

Author:
Andrew Charles Smith - acs203 A class to do Relational to XML Schema transformations and all sorts of other transformtions

Constructor Summary
XMLSchemaTransform(Schema s1)
          Creates a new instance of XMLSchemaTransform
 
Method Summary
 Schema addKey(XSDOMObject pk, XSDOMObject pkParent)
           
 Schema addKeyRef(XSDOMObject fk, XSDOMObject pk, XSDOMObject pkParent, XSDOMObject fkParent)
          Methods to add extra AutoMed schemes from the JTree Add an xmlSchema:keyRef construct to AutoMed from the JTree.
 Schema addNestTransform(java.lang.String parentName, java.lang.String oldParentName, XSDOMObject extentObject, XSDOMObject childNode)
          Automed transforations to nest an element inside another one, replacing an fk element in the process
 SchemaObject getKey(XSDOMObject pk, XSDOMObject pkParent)
           
 Schema hdmToRelational()
          Transform the HDM elements in this schema into XMLSchema elements
 void hdmToXML()
          Transform the HDM elements in this schema into XMLSchema elements
 Schema hdmToXMLSchema()
          Transform the HDM elements in this schema into XMLSchema elements
static boolean isBaseType(java.lang.String typeString)
           
 Schema removeNestTransform(java.lang.String parentName, java.lang.String childElementName, java.lang.String newChildName, java.lang.String newParent)
           
 void setSchema(Schema s)
          Set the schema to transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLSchemaTransform

public XMLSchemaTransform(Schema s1)
                   throws NotFoundException
Creates a new instance of XMLSchemaTransform

Throws:
NotFoundException
Method Detail

setSchema

public void setSchema(Schema s)
Set the schema to transform


isBaseType

public static boolean isBaseType(java.lang.String typeString)

hdmToXMLSchema

public Schema hdmToXMLSchema()
                      throws NotFoundException,
                             IntegrityException,
                             TypeMismatchException
Transform the HDM elements in this schema into XMLSchema elements

Throws:
NotFoundException
IntegrityException
TypeMismatchException

hdmToXML

public void hdmToXML()
              throws AutoMedException
Transform the HDM elements in this schema into XMLSchema elements

Throws:
AutoMedException

hdmToRelational

public Schema hdmToRelational()
                       throws AutoMedException
Transform the HDM elements in this schema into XMLSchema elements

Throws:
AutoMedException

addKeyRef

public Schema addKeyRef(XSDOMObject fk,
                        XSDOMObject pk,
                        XSDOMObject pkParent,
                        XSDOMObject fkParent)
                 throws IntegrityException,
                        TypeMismatchException,
                        NotFoundException
Methods to add extra AutoMed schemes from the JTree Add an xmlSchema:keyRef construct to AutoMed from the JTree. Also add a pk constraint if there isn't one already

Throws:
IntegrityException
TypeMismatchException
NotFoundException

getKey

public SchemaObject getKey(XSDOMObject pk,
                           XSDOMObject pkParent)
                    throws IntegrityException,
                           TypeMismatchException,
                           NotFoundException
Throws:
IntegrityException
TypeMismatchException
NotFoundException

addKey

public Schema addKey(XSDOMObject pk,
                     XSDOMObject pkParent)
              throws IntegrityException,
                     TypeMismatchException,
                     NotFoundException
Throws:
IntegrityException
TypeMismatchException
NotFoundException

addNestTransform

public Schema addNestTransform(java.lang.String parentName,
                               java.lang.String oldParentName,
                               XSDOMObject extentObject,
                               XSDOMObject childNode)
                        throws IntegrityException,
                               TypeMismatchException,
                               NotFoundException
Automed transforations to nest an element inside another one, replacing an fk element in the process

Throws:
IntegrityException
TypeMismatchException
NotFoundException

removeNestTransform

public Schema removeNestTransform(java.lang.String parentName,
                                  java.lang.String childElementName,
                                  java.lang.String newChildName,
                                  java.lang.String newParent)
                           throws IntegrityException,
                                  TypeMismatchException,
                                  NotFoundException
Throws:
IntegrityException
TypeMismatchException
NotFoundException