net.smartlab.config
Class XMLConfiguration.XMLHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by net.smartlab.config.XMLConfiguration.XMLHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
Enclosing class:
XMLConfiguration

protected static class XMLConfiguration.XMLHandler
extends org.xml.sax.helpers.DefaultHandler

SAX Handler implementation to provide the in-memory representation of an XML configuration file.

Author:
Roberto Lo Giacco

Field Summary
protected  org.xml.sax.Locator locator
          The document locator.
protected  Element owner
          The owning element also known as the parent element.
protected  org.xml.sax.XMLReader reader
          The XML stream reader.
 
Constructor Summary
XMLConfiguration.XMLHandler(Configuration owner)
          Constructs the handler starting from the configuration root element.
 
Method Summary
 void characters(char[] chars, int start, int length)
           
 void endElement(java.lang.String namespace, java.lang.String prefix, java.lang.String name)
           
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          Blocks external entity resolution failures.
 void setDocumentLocator(org.xml.sax.Locator locator)
           
 void startElement(java.lang.String namespace, java.lang.String prefix, java.lang.String name, org.xml.sax.Attributes attributes)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

protected Element owner
The owning element also known as the parent element.


locator

protected org.xml.sax.Locator locator
The document locator.


reader

protected org.xml.sax.XMLReader reader
The XML stream reader.

Constructor Detail

XMLConfiguration.XMLHandler

public XMLConfiguration.XMLHandler(Configuration owner)
Constructs the handler starting from the configuration root element.

Parameters:
owner -
Method Detail

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
Overrides:
setDocumentLocator in class org.xml.sax.helpers.DefaultHandler
See Also:
ContentHandler.setDocumentLocator(org.xml.sax.Locator)

startElement

public void startElement(java.lang.String namespace,
                         java.lang.String prefix,
                         java.lang.String name,
                         org.xml.sax.Attributes attributes)
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
See Also:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)

characters

public void characters(char[] chars,
                       int start,
                       int length)
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
See Also:
ContentHandler.characters(char[], int, int)

endElement

public void endElement(java.lang.String namespace,
                       java.lang.String prefix,
                       java.lang.String name)
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
See Also:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
                                      throws org.xml.sax.SAXException
Blocks external entity resolution failures.

Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Overrides:
resolveEntity in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException
See Also:
EntityResolver.resolveEntity(java.lang.String, java.lang.String)


Copyright © 2002-2008 SmartLab s.r.l.. All Rights Reserved.