org.apache.jackrabbit.commons.xml
Class DefaultContentHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.apache.jackrabbit.commons.xml.DefaultContentHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
Direct Known Subclasses:
ParsingContentHandler, SerializingContentHandler

public class DefaultContentHandler
extends DefaultHandler

Adapter class for exposing a ContentHandler instance as DefaultHandler object.

Since:
Jackrabbit JCR Commons 1.5

Constructor Summary
DefaultContentHandler(ContentHandler handler)
          Creates a DefaultHandler adapter for the given content handler.
 
Method Summary
 void characters(char[] ch, int start, int length)
          Delegated to handler.
 void endDocument()
          Delegated to handler.
 void endElement(String namespaceURI, String localName, String qName)
          Delegated to handler.
 void endPrefixMapping(String prefix)
          Delegated to handler.
 void ignorableWhitespace(char[] ch, int start, int length)
          Delegated to handler.
 void processingInstruction(String target, String data)
          Delegated to handler.
 void setDocumentLocator(Locator locator)
          Delegated to handler.
 void skippedEntity(String name)
          Delegated to handler.
 void startDocument()
          Delegated to handler.
 void startElement(String namespaceURI, String localName, String qName, Attributes atts)
          Delegated to handler.
 void startPrefixMapping(String prefix, String uri)
          Delegated to handler.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContentHandler

public DefaultContentHandler(ContentHandler handler)
Creates a DefaultHandler adapter for the given content handler.

Parameters:
handler - content handler
Method Detail

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Delegated to handler.

Specified by:
characters in interface ContentHandler
Overrides:
characters in class DefaultHandler
Parameters:
ch - passed through
start - passed through
length - passed through
Throws:
SAXException - if an error occurs

endDocument

public void endDocument()
                 throws SAXException
Delegated to handler.

Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class DefaultHandler
Throws:
SAXException - if an error occurs

endElement

public void endElement(String namespaceURI,
                       String localName,
                       String qName)
                throws SAXException
Delegated to handler.

Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Parameters:
namespaceURI - passed through
localName - passed through
qName - passed through
Throws:
SAXException - if an error occurs

endPrefixMapping

public void endPrefixMapping(String prefix)
                      throws SAXException
Delegated to handler.

Specified by:
endPrefixMapping in interface ContentHandler
Overrides:
endPrefixMapping in class DefaultHandler
Parameters:
prefix - passed through
Throws:
SAXException - if an error occurs

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
Delegated to handler.

Specified by:
ignorableWhitespace in interface ContentHandler
Overrides:
ignorableWhitespace in class DefaultHandler
Parameters:
ch - passed through
start - passed through
length - passed through
Throws:
SAXException - if an error occurs

processingInstruction

public void processingInstruction(String target,
                                  String data)
                           throws SAXException
Delegated to handler.

Specified by:
processingInstruction in interface ContentHandler
Overrides:
processingInstruction in class DefaultHandler
Parameters:
target - passed through
data - passed through
Throws:
SAXException - if an error occurs

setDocumentLocator

public void setDocumentLocator(Locator locator)
Delegated to handler.

Specified by:
setDocumentLocator in interface ContentHandler
Overrides:
setDocumentLocator in class DefaultHandler
Parameters:
locator - passed through

skippedEntity

public void skippedEntity(String name)
                   throws SAXException
Delegated to handler.

Specified by:
skippedEntity in interface ContentHandler
Overrides:
skippedEntity in class DefaultHandler
Parameters:
name - passed through
Throws:
SAXException - if an error occurs

startDocument

public void startDocument()
                   throws SAXException
Delegated to handler.

Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class DefaultHandler
Throws:
SAXException - if an error occurs

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
Delegated to handler.

Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Parameters:
namespaceURI - passed through
localName - passed through
qName - passed through
atts - passed through
Throws:
SAXException - if an error occurs

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
Delegated to handler.

Specified by:
startPrefixMapping in interface ContentHandler
Overrides:
startPrefixMapping in class DefaultHandler
Parameters:
prefix - passed through
uri - passed through
Throws:
SAXException - if an error occurs


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.