RelationalOutputter
Keywords: uk.ac.ic.doc.automed.xmlschema.output.RelationalOutputter 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.xmlschema.output
Class RelationalOutputter

    java.lang.Object
      uk.ac.ic.doc.automed.xmlschema.output.RelationalOutputter

    public class RelationalOutputter

extends java.lang.Object

Class the materialise an SQL oriented AutoMed schema

Author:
  Andrew Smith - acs203

Constructor Summary
`RelationalOutputter(Schema source, Schema s, boolean xmlDoc)` Creates a new instance of RelationalOutputter
`RelationalOutputter(Schema source, Schema s, java.lang.String dbDriver, boolean xmlDoc, java.lang.String url, java.lang.String username, java.lang.String password)` Creates a new instance of RelationalOutputter with a given DB url, username and password

Method Summary
`void` | `connectToDB()` Connect to the local database
`java.lang.String` | `createRelationalTables()` Create the relational tables from the automed schema objects

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

Constructor Detail

### RelationalOutputter

    public RelationalOutputter(Schema source,
                               Schema s,
                               boolean xmlDoc)
                        throws AutoMedException

  Creates a new instance of RelationalOutputter

  Throws:
    `AutoMedException`

### RelationalOutputter

    public RelationalOutputter(Schema source,
                               Schema s,
                               java.lang.String dbDriver,
                               boolean xmlDoc,
                               java.lang.String url,
                               java.lang.String username,
                               java.lang.String password)
                        throws AutoMedException

  Creates a new instance of RelationalOutputter with a given DB url, username and password

  Parameters:
    `source` - The source schema
    `s` - The schema to be materialised
    `dbDriver` - The db driver string
    `xmlDoc` - Whether or not there is a XML instance document
    `url` - The url of the output database
    `username` - The username to log into the target db
    `password` - The password to log into the output db
  Throws:
    `AutoMedException` - Thrown when theres a problem

Method Detail

### createRelationalTables

    public java.lang.String createRelationalTables()
                                            throws AutoMedException,
                                                   java.lang.Exception

  Create the relational tables from the automed schema objects

  Returns:
    Return the SQL statement string
  Throws:
    `java.lang.Exception` - A SQL problem
    `AutoMedException` - A repository problem

### connectToDB

    public void connectToDB()

  Connect to the local database

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