project35.io
Class XMLSubmissionFileReader
java.lang.Object
org.xml.sax.helpers.DefaultHandler
project35.io.XMLSubmissionFileReader
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
public class XMLSubmissionFileReader
- extends org.xml.sax.helpers.DefaultHandler
This class is used to read Unicode XML text files that will conform to the schema that generated them.
This is the format many people will use to generate a final submission format for their
data files.
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)
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLSubmissionFileReader
public XMLSubmissionFileReader(Project35FormContext project35FormContext,
boolean readTemplate)
getRootModel
public RecordModel getRootModel()
- Returns:
- root record model for the document
ignoreTopLevelElementCheck
public void ignoreTopLevelElementCheck()
readFile
public void readFile(java.io.InputStream inputStream)
throws Project35Exception,
java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
- Throws:
Project35Exception
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
readFile
public void readFile(java.io.File xmlFile)
throws Project35Exception,
java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
- Throws:
Project35Exception
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
readFile
public void readFile(java.net.URL url)
throws Project35Exception,
java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
- Throws:
Project35Exception
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
omitModelStamp
public void omitModelStamp()
- means Project35 will ignore whether the model stamp in the file matches the model
stamp supported in the application
setIDGeneratorService
public void setIDGeneratorService(IDGeneratorService _idGeneratorService)
- sets an id generator service that generates values for identifier fields