# ExtensionHandler (Crawler-commons 1.1 API)
Date: 2020-06-25

crawlercommons.sitemaps.sax.extension

## Class ExtensionHandler

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

All Implemented Interfaces:
  ContentHandler, DTDHandler, EntityResolver, ErrorHandler

Direct Known Subclasses:
  ImageHandler, LinksHandler, MobileHandler, NewsHandler, VideoHandler

    public abstract class ExtensionHandler
    extends org.xml.sax.helpers.DefaultHandler

Handler to be called for elements in the namespace of a sitemap extension. Parses the extension elements and creates extension-specific attributes to be assigned to a `SiteMapURL`.

### Field Summary

Fields
`protected List<ExtensionMetadata>` `attributes`
`protected static Pattern` `commaSeparated`

### Constructor Summary

Constructors
Constructor and Description
`ExtensionHandler()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static ExtensionHandler` `create(Extension extension)`
`ExtensionMetadata[]` `getAttributes()`
`protected static java.time.ZonedDateTime` `getDateValue(String value)`
`protected static Float` `getFloatValue(String value)`
`protected static Integer` `getIntegerValue(String value)`
`protected static URL` `getURLValue(String value)`
`protected static Boolean` `getYesNoBooleanValue(String value, String elemName)`
`void` `reset()`

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

`characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### commaSeparated

    protected static Pattern commaSeparated

#### attributes

    protected List<ExtensionMetadata> attributes

### Constructor Detail

#### ExtensionHandler

    public ExtensionHandler()

### Method Detail

#### create

    public static ExtensionHandler create(Extension extension)

#### getAttributes

    public ExtensionMetadata[] getAttributes()

#### reset

    public void reset()

#### getDateValue

    protected static java.time.ZonedDateTime getDateValue(String value)

#### getURLValue

    protected static URL getURLValue(String value)

#### getIntegerValue

    protected static Integer getIntegerValue(String value)

#### getFloatValue

    protected static Float getFloatValue(String value)

#### getYesNoBooleanValue

    protected static Boolean getYesNoBooleanValue(String value,
                                                  String elemName)