|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectproject35.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()
|
List |
getWarnings()
Returns the warnings created by parsed schema. |
boolean |
hasWarnings()
Returns whether the parsed schema created any warnings. |
void |
initialiseConfigurationReader(InputStream mainConfigurationStream,
URL documentDirectory,
URL resourceDirectory,
InputStream extensionLauncherStream,
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(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(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 SchemaReaderInterfacepublic Project35ConfigurationReader getConfigurationReader()
SchemaReaderInterface
getConfigurationReader in interface SchemaReaderInterfacepublic void setTopLevelElementName(String topLevelElementName)
setTopLevelElementName in interface SchemaReaderInterface
public void initialiseConfigurationReader(InputStream mainConfigurationStream,
URL documentDirectory,
URL resourceDirectory,
InputStream extensionLauncherStream,
File sessionFile)
throws Project35Exception
SchemaReaderInterface
initialiseConfigurationReader in interface SchemaReaderInterfacemainConfigurationStream - The input stream of the configuration.documentDirectory - The document directory of the desired model.resourceDirectory - The resource directory of the desired model.
Project35Exceptionpublic void setEnableClassLoader(boolean enableClassLoader)
SchemaReaderInterface
setEnableClassLoader in interface SchemaReaderInterfacepublic void setIgnoreTopLevelElement(boolean ignoreTopLevelElement)
setIgnoreTopLevelElement in interface SchemaReaderInterface
public void parseDocument(URL schemaURL)
throws ParserConfigurationException,
SAXException,
Project35Exception,
IOException
SchemaReaderInterface
parseDocument in interface SchemaReaderInterfaceschemaURL - The schema location.
ParserConfigurationException
SAXException
Project35Exception
IOExceptionpublic RecordModel getTopLevelRecord()
getTopLevelRecord in interface SchemaReaderInterfacepublic boolean hasWarnings()
hasWarnings in interface SchemaReaderInterfacepublic List getWarnings()
getWarnings in interface SchemaReaderInterfacepublic void onRef(com.sun.msv.grammar.ReferenceExp referenceExp)
onRef in interface com.sun.msv.grammar.ExpressionVisitorVoidreferenceExp - the ReferenceExp to processpublic void onChoice(com.sun.msv.grammar.ChoiceExp choiceExp)
onChoice in interface com.sun.msv.grammar.ExpressionVisitorVoidchoiceExp - public void onSequence(com.sun.msv.grammar.SequenceExp sequenceExp)
onSequence in interface com.sun.msv.grammar.ExpressionVisitorVoidsequenceExp - public void onInterleave(com.sun.msv.grammar.InterleaveExp interleaveExp)
onInterleave in interface com.sun.msv.grammar.ExpressionVisitorVoidinterleaveExp - public void onAttribute(com.sun.msv.grammar.AttributeExp attributeExp)
onAttribute in interface com.sun.msv.grammar.ExpressionVisitorVoidattributeExp - public void onElement(com.sun.msv.grammar.ElementExp elementExp)
onElement in interface com.sun.msv.grammar.ExpressionVisitorVoidelementExp - public void onOneOrMore(com.sun.msv.grammar.OneOrMoreExp oneOrMoreExp)
onOneOrMore in interface com.sun.msv.grammar.ExpressionVisitorVoidoneOrMoreExp - public void onData(com.sun.msv.grammar.DataExp dataExp)
onData in interface com.sun.msv.grammar.ExpressionVisitorVoiddataExp - public void onMixed(com.sun.msv.grammar.MixedExp mixedExp)
onMixed in interface com.sun.msv.grammar.ExpressionVisitorVoidmixedExp - public void onList(com.sun.msv.grammar.ListExp listExp)
onList in interface com.sun.msv.grammar.ExpressionVisitorVoidlistExp - public void onOther(com.sun.msv.grammar.OtherExp otherExp)
onOther in interface com.sun.msv.grammar.ExpressionVisitorVoidotherExp - public void onEpsilon()
onEpsilon in interface com.sun.msv.grammar.ExpressionVisitorVoidpublic void onNullSet()
onNullSet in interface com.sun.msv.grammar.ExpressionVisitorVoidpublic void onAnyString()
onAnyString in interface com.sun.msv.grammar.ExpressionVisitorVoidpublic void onValue(com.sun.msv.grammar.ValueExp valueExp)
onValue in interface com.sun.msv.grammar.ExpressionVisitorVoidvalueExp - public void onConcur(com.sun.msv.grammar.ConcurExp concurExp)
onConcur in interface com.sun.msv.grammar.ExpressionVisitorVoidconcurExp -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||