# DelegatorHandler (Crawler-commons 0.8 API)
Date: 2017-06-07

crawlercommons.sitemaps.sax

## Class DelegatorHandler

- java.lang.Object
- - org.xml.sax.helpers.DefaultHandler
  - - crawlercommons.sitemaps.sax.DelegatorHandler

All Implemented Interfaces:
  ContentHandler, DTDHandler, EntityResolver, ErrorHandler

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

Provides a base SAX handler for parsing of XML documents representing sub-classes of AbstractSiteMap.

### Constructor Summary

Constructors
`protected` `DelegatorHandler(LinkedList<String> elementStack, boolean strict)`
`` `DelegatorHandler(URL url, boolean strict)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `characters(char[] ch, int start, int length)`
`protected String` `currentElement()`
`protected String` `currentElementParent()`
`void` `endElement(String uri, String localName, String qName)`
`void` `error(SAXParseException e)`
`void` `fatalError(SAXParseException e)`
`protected UnknownFormatException` `getException()`
`AbstractSiteMap` `getSiteMap()`
`protected URL` `getUrl()`
`protected boolean` `isStrict()`
`protected void` `setException(UnknownFormatException exception)`
`void` `startElement(String uri, String localName, String qName, Attributes attributes)`

### Methods inherited from class org.xml.sax.helpers.DefaultHandler

`endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, 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

#### DelegatorHandler

    protected DelegatorHandler(LinkedList<String> elementStack,
                               boolean strict)

#### DelegatorHandler

    public DelegatorHandler(URL url,
                            boolean strict)

### Method Detail

#### getUrl

    protected URL getUrl()

#### isStrict

    protected boolean isStrict()

#### setException

    protected void setException(UnknownFormatException exception)

#### getException

    protected UnknownFormatException getException()

#### startElement

    public void startElement(String uri,
                             String localName,
                             String qName,
                             Attributes attributes)
                      throws SAXException

Specified by:
  `startElement` in interface `ContentHandler`
Overrides:
  `startElement` in class `org.xml.sax.helpers.DefaultHandler`
Throws:
  `SAXException`

#### 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)
                    throws SAXException

Specified by:
  `characters` in interface `ContentHandler`
Overrides:
  `characters` in class `org.xml.sax.helpers.DefaultHandler`
Throws:
  `SAXException`

#### currentElement

    protected String currentElement()

#### currentElementParent

    protected String currentElementParent()

#### getSiteMap

    public AbstractSiteMap getSiteMap()

#### error

    public void error(SAXParseException e)
               throws SAXException

Specified by:
  `error` in interface `ErrorHandler`
Overrides:
  `error` in class `org.xml.sax.helpers.DefaultHandler`
Throws:
  `SAXException`

#### fatalError

    public void fatalError(SAXParseException e)
                    throws SAXException

Specified by:
  `fatalError` in interface `ErrorHandler`
Overrides:
  `fatalError` in class `org.xml.sax.helpers.DefaultHandler`
Throws:
  `SAXException`