org.foray.font.config
Class ConfigParser

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.foray.font.config.ConfigParser
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class ConfigParser
extends org.xml.sax.helpers.DefaultHandler

SAX2 Handler which retrieves the font configuration information and stores it in FontServer. Normally this class doesn't need to be accessed directly.


Constructor Summary
ConfigParser(FontServer4a server, InputSource filename)
          Constructor.
 
Method Summary
 void endElement(String uri, String localName, String qName)
           Wraps up parsing for elements that need to be finalized.
 void setDocumentLocator(Locator locator)
          Sets the document locator for this parser.
 void start()
          Parses the configuration file.
 void startElement(String uri, String localName, String qName, Attributes attributes)
           Recognizes each valid element and parses its attributes.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigParser

public ConfigParser(FontServer4a server,
                    InputSource filename)
Constructor.

Parameters:
server - The parent font server.
filename - The file which contains the configuration information to be parsed.
Method Detail

start

public void start()
           throws org.axsl.font.FontException
Parses the configuration file.

Throws:
org.axsl.font.FontException - For errors during parsing.

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attributes)
Recognizes each valid element and parses its 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)
Wraps up parsing for elements that need to be finalized.

Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

setDocumentLocator

public void setDocumentLocator(Locator locator)
Sets the document locator for this parser.

Specified by:
setDocumentLocator in interface ContentHandler
Overrides:
setDocumentLocator in class org.xml.sax.helpers.DefaultHandler
Parameters:
locator - The new locator.


Copyright © 2017. All rights reserved.