project35.mda.schema
Interface SchemaReaderInterface

All Known Implementing Classes:
MsvSchemaReader

public interface SchemaReaderInterface

This interface defines methods for reading an XML schema and creating a collection of RecordModels, which can be retrieved from the RecordModelFactory. Each RecordModel contains a ListModel which in turn contains other RecordModels and EditFieldModels. An implementation should map from a schema to the RecordModel as follows:


Copyright (c) 2008 Kevin Garwood for Project35. The original code was developed by Kevin Garwood for the University of Manchester. Revisions have been made for Project35, a project that is independent of that institution. This code is licensed under the Academic Free License version 3.0. The code attribution for the original code is included here:

Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.


Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Method Summary
 Project35ConfigurationReader getConfigurationReader()
          gets the configuration file reader
 RecordModelFactory getRecordModelFactory()
          Returns the record structures created from reading the schema
 RecordModel getTopLevelRecord()
           
 java.util.List getWarnings()
          Returns the warnings created by parsed schema.
 boolean hasWarnings()
          Returns whether the parsed schema created any warnings.
 void initialiseConfigurationReader(java.io.InputStream mainConfigurationStream, java.net.URL documentDirectory, java.net.URL resourceDirectory, java.io.InputStream extensionLauncherStream, java.io.File favouritesFile)
          Initialises the configuration of the schema reader.
 void parseDocument(java.net.URL schemaURL)
          Parses the schema at the given URL.
 void setEnableClassLoader(boolean enableClassLoader)
          determines whether class loader should be enabled; this is important when Project35 is deployed within another application or not
 void setIgnoreTopLevelElement(boolean ignoreTopLevelElement)
           
 void setTopLevelElementName(java.lang.String topLevelElementName)
           
 

Method Detail

initialiseConfigurationReader

void initialiseConfigurationReader(java.io.InputStream mainConfigurationStream,
                                   java.net.URL documentDirectory,
                                   java.net.URL resourceDirectory,
                                   java.io.InputStream extensionLauncherStream,
                                   java.io.File favouritesFile)
                                   throws Project35Exception
Initialises the configuration of the schema reader.

Parameters:
mainConfigurationStream - The input stream of the configuration.
documentDirectory - The document directory of the desired model.
resourceDirectory - The resource directory of the desired model.
extensionLauncherStream -
favouritesFile -
Throws:
Project35Exception

parseDocument

void parseDocument(java.net.URL schemaURL)
                   throws javax.xml.parsers.ParserConfigurationException,
                          org.xml.sax.SAXException,
                          Project35Exception,
                          java.io.IOException
Parses the schema at the given URL.

Parameters:
schemaURL - The schema location.
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
Project35Exception
java.io.IOException

getTopLevelRecord

RecordModel getTopLevelRecord()
Returns:
the top level record model.

hasWarnings

boolean hasWarnings()
Returns whether the parsed schema created any warnings.

Returns:
whether the parsed schema created any warnings.

getWarnings

java.util.List getWarnings()
Returns the warnings created by parsed schema.

Returns:
the warnings created by parsed schema.

getRecordModelFactory

RecordModelFactory getRecordModelFactory()
Returns the record structures created from reading the schema


getConfigurationReader

Project35ConfigurationReader getConfigurationReader()
gets the configuration file reader


setEnableClassLoader

void setEnableClassLoader(boolean enableClassLoader)
determines whether class loader should be enabled; this is important when Project35 is deployed within another application or not


setIgnoreTopLevelElement

void setIgnoreTopLevelElement(boolean ignoreTopLevelElement)

setTopLevelElementName

void setTopLevelElementName(java.lang.String topLevelElementName)