org.foray.core
Class ConfigurationParser
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.foray.core.ConfigurationParser
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class ConfigurationParser
- extends org.xml.sax.helpers.DefaultHandler
SAX2 Handler which retrieves the configuration information and stores them
in Configuration.
Normally this class doesn't need to be accessed directly.
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FORAY_CONFIG_DTD_PUBLIC_ID
public static final String FORAY_CONFIG_DTD_PUBLIC_ID
- Public ID of the FOray configuration DTD.
- See Also:
- Constant Field Values
ConfigurationParser
public ConfigurationParser(SessionConfig sessionConfig,
Configuration outputConfig,
InputSource source)
throws FOrayException
- Constructor.
- Parameters:
sessionConfig
- The SessionConfig instance which should be updated
with general options found in the configuration file.outputConfig
- The RenderConfig instance which should be updated
with renderer-specific options found in the configuration file.source
- the SAX InputSource which encapsulates the configuration
file XML that should be parsed.
- Throws:
FOrayException
- For null sessionConfig
or null
outputConfig
.
parseDocument
public void parseDocument()
throws FOrayException
- Parses the encapsulated SAX InputSource and updates the encapsulated
Configuration instances accordingly.
- Throws:
FOrayException
- If there are errors parsing the input.
startDocument
public void startDocument()
- Specified by:
startDocument
in interface ContentHandler
- Overrides:
startDocument
in class org.xml.sax.helpers.DefaultHandler
startElement
public void startElement(String uri,
String localName,
String qName,
Attributes attributes)
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class org.xml.sax.helpers.DefaultHandler
endElement
public void endElement(String uri,
String localName,
String qName)
throws SAXException
- Specified by:
endElement
in interface ContentHandler
- Overrides:
endElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
SAXException
characters
public void characters(char[] ch,
int start,
int length)
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class org.xml.sax.helpers.DefaultHandler
Copyright © 2017. All rights reserved.