org.apache.slide.util.conf
Class Populate

java.lang.Object
  |
  +--org.apache.slide.util.conf.Populate
All Implemented Interfaces:
org.xml.sax.DocumentHandler, org.xml.sax.ErrorHandler

public class Populate
extends java.lang.Object
implements org.xml.sax.DocumentHandler, org.xml.sax.ErrorHandler

Author:
Federico Barbieri, Assaf Arkin

Constructor Summary
Populate()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Called when there is character data (text) inside an element.
 void endDocument()
           
 void endElement(java.lang.String name)
          Closing the element.
 void error(org.xml.sax.SAXParseException except)
           
 void fatalError(org.xml.sax.SAXParseException except)
           
 void ignorableWhitespace(char[] ch, int start, int length)
          Ignoreable whitespace is just space inside an element that only contains other elements.
 Element load(org.xml.sax.InputSource is, org.xml.sax.Parser parser)
           
 void processingInstruction(java.lang.String target, java.lang.String pi)
           
 void reset()
          Called to reset this object so it can be used a second time.
 void setDocumentLocator(org.xml.sax.Locator locator)
          We can store the locate just to know where an error occurs.
 void startDocument()
           
 void startElement(java.lang.String name, org.xml.sax.AttributeList attr)
           
 void warning(org.xml.sax.SAXParseException except)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Populate

public Populate()
Method Detail

load

public Element load(org.xml.sax.InputSource is,
                    org.xml.sax.Parser parser)
             throws org.xml.sax.SAXException,
                    java.io.IOException,
                    ConfigurationException

reset

public void reset()
Called to reset this object so it can be used a second time.

startDocument

public void startDocument()
                   throws org.xml.sax.SAXParseException
Specified by:
startDocument in interface org.xml.sax.DocumentHandler

endDocument

public void endDocument()
                 throws org.xml.sax.SAXParseException
Specified by:
endDocument in interface org.xml.sax.DocumentHandler

startElement

public void startElement(java.lang.String name,
                         org.xml.sax.AttributeList attr)
Specified by:
startElement in interface org.xml.sax.DocumentHandler

endElement

public void endElement(java.lang.String name)
                throws org.xml.sax.SAXParseException
Closing the element. This is the place to check special conditions about the element content. If not, just make the parent element the current element.
Specified by:
endElement in interface org.xml.sax.DocumentHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXParseException
Called when there is character data (text) inside an element. Will accumulate all the character data and store it inside the object data.
Specified by:
characters in interface org.xml.sax.DocumentHandler

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
Ignoreable whitespace is just space inside an element that only contains other elements. We can safely ignore it.
Specified by:
ignorableWhitespace in interface org.xml.sax.DocumentHandler

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String pi)
Specified by:
processingInstruction in interface org.xml.sax.DocumentHandler

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
We can store the locate just to know where an error occurs.
Specified by:
setDocumentLocator in interface org.xml.sax.DocumentHandler

error

public void error(org.xml.sax.SAXParseException except)
Specified by:
error in interface org.xml.sax.ErrorHandler

fatalError

public void fatalError(org.xml.sax.SAXParseException except)
Specified by:
fatalError in interface org.xml.sax.ErrorHandler

warning

public void warning(org.xml.sax.SAXParseException except)
Specified by:
warning in interface org.xml.sax.ErrorHandler