|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object project35.mda.schema.MsvSchemaReader
public class MsvSchemaReader
Implementation of the SchemaReaderInterface based upon Sun's Multi Schema Validator (MSV). This class was written by Kai Runte, who helped vastly improve the old schema reader originally used by Project35.
Copyright (c) Kai Runte 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.
Constructor Summary | |
---|---|
MsvSchemaReader(Project35ApplicationContext project35ApplicationContext)
Constructor. |
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 sessionFile)
Initialises the configuration of the schema reader. |
void |
onAnyString()
|
void |
onAttribute(com.sun.msv.grammar.AttributeExp attributeExp)
|
void |
onChoice(com.sun.msv.grammar.ChoiceExp choiceExp)
|
void |
onConcur(com.sun.msv.grammar.ConcurExp concurExp)
|
void |
onData(com.sun.msv.grammar.DataExp dataExp)
|
void |
onElement(com.sun.msv.grammar.ElementExp elementExp)
|
void |
onEpsilon()
|
void |
onInterleave(com.sun.msv.grammar.InterleaveExp interleaveExp)
|
void |
onList(com.sun.msv.grammar.ListExp listExp)
|
void |
onMixed(com.sun.msv.grammar.MixedExp mixedExp)
|
void |
onNullSet()
|
void |
onOneOrMore(com.sun.msv.grammar.OneOrMoreExp oneOrMoreExp)
|
void |
onOther(com.sun.msv.grammar.OtherExp otherExp)
|
void |
onRef(com.sun.msv.grammar.ReferenceExp referenceExp)
|
void |
onSequence(com.sun.msv.grammar.SequenceExp sequenceExp)
|
void |
onValue(com.sun.msv.grammar.ValueExp valueExp)
|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MsvSchemaReader(Project35ApplicationContext project35ApplicationContext)
Method Detail |
---|
public RecordModelFactory getRecordModelFactory()
SchemaReaderInterface
getRecordModelFactory
in interface SchemaReaderInterface
public Project35ConfigurationReader getConfigurationReader()
SchemaReaderInterface
getConfigurationReader
in interface SchemaReaderInterface
public void setTopLevelElementName(java.lang.String topLevelElementName)
setTopLevelElementName
in interface SchemaReaderInterface
public void initialiseConfigurationReader(java.io.InputStream mainConfigurationStream, java.net.URL documentDirectory, java.net.URL resourceDirectory, java.io.InputStream extensionLauncherStream, java.io.File sessionFile) throws Project35Exception
SchemaReaderInterface
initialiseConfigurationReader
in interface SchemaReaderInterface
mainConfigurationStream
- The input stream of the configuration.documentDirectory
- The document directory of the desired model.resourceDirectory
- The resource directory of the desired model.
Project35Exception
public void setEnableClassLoader(boolean enableClassLoader)
SchemaReaderInterface
setEnableClassLoader
in interface SchemaReaderInterface
public void setIgnoreTopLevelElement(boolean ignoreTopLevelElement)
setIgnoreTopLevelElement
in interface SchemaReaderInterface
public void parseDocument(java.net.URL schemaURL) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, Project35Exception, java.io.IOException
SchemaReaderInterface
parseDocument
in interface SchemaReaderInterface
schemaURL
- The schema location.
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
Project35Exception
java.io.IOException
public RecordModel getTopLevelRecord()
getTopLevelRecord
in interface SchemaReaderInterface
public boolean hasWarnings()
hasWarnings
in interface SchemaReaderInterface
public java.util.List getWarnings()
getWarnings
in interface SchemaReaderInterface
public void onRef(com.sun.msv.grammar.ReferenceExp referenceExp)
onRef
in interface com.sun.msv.grammar.ExpressionVisitorVoid
referenceExp
- the ReferenceExp to processpublic void onChoice(com.sun.msv.grammar.ChoiceExp choiceExp)
onChoice
in interface com.sun.msv.grammar.ExpressionVisitorVoid
choiceExp
- public void onSequence(com.sun.msv.grammar.SequenceExp sequenceExp)
onSequence
in interface com.sun.msv.grammar.ExpressionVisitorVoid
sequenceExp
- public void onInterleave(com.sun.msv.grammar.InterleaveExp interleaveExp)
onInterleave
in interface com.sun.msv.grammar.ExpressionVisitorVoid
interleaveExp
- public void onAttribute(com.sun.msv.grammar.AttributeExp attributeExp)
onAttribute
in interface com.sun.msv.grammar.ExpressionVisitorVoid
attributeExp
- public void onElement(com.sun.msv.grammar.ElementExp elementExp)
onElement
in interface com.sun.msv.grammar.ExpressionVisitorVoid
elementExp
- public void onOneOrMore(com.sun.msv.grammar.OneOrMoreExp oneOrMoreExp)
onOneOrMore
in interface com.sun.msv.grammar.ExpressionVisitorVoid
oneOrMoreExp
- public void onData(com.sun.msv.grammar.DataExp dataExp)
onData
in interface com.sun.msv.grammar.ExpressionVisitorVoid
dataExp
- public void onMixed(com.sun.msv.grammar.MixedExp mixedExp)
onMixed
in interface com.sun.msv.grammar.ExpressionVisitorVoid
mixedExp
- public void onList(com.sun.msv.grammar.ListExp listExp)
onList
in interface com.sun.msv.grammar.ExpressionVisitorVoid
listExp
- public void onOther(com.sun.msv.grammar.OtherExp otherExp)
onOther
in interface com.sun.msv.grammar.ExpressionVisitorVoid
otherExp
- public void onEpsilon()
onEpsilon
in interface com.sun.msv.grammar.ExpressionVisitorVoid
public void onNullSet()
onNullSet
in interface com.sun.msv.grammar.ExpressionVisitorVoid
public void onAnyString()
onAnyString
in interface com.sun.msv.grammar.ExpressionVisitorVoid
public void onValue(com.sun.msv.grammar.ValueExp valueExp)
onValue
in interface com.sun.msv.grammar.ExpressionVisitorVoid
valueExp
- public void onConcur(com.sun.msv.grammar.ConcurExp concurExp)
onConcur
in interface com.sun.msv.grammar.ExpressionVisitorVoid
concurExp
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |