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 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 aSiteMapURL
.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<ExtensionMetadata>
attributes
protected static Pattern
commaSeparated
-
Constructor Summary
Constructors Constructor Description ExtensionHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExtensionHandler
create(Extension extension)
ExtensionMetadata[]
getAttributes()
protected static 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
-
-
-
-
Field Detail
-
commaSeparated
protected static Pattern commaSeparated
-
attributes
protected List<ExtensionMetadata> attributes
-
-
Method Detail
-
create
public static ExtensionHandler create(Extension extension)
-
getAttributes
public ExtensionMetadata[] getAttributes()
-
reset
public void reset()
-
getDateValue
protected static ZonedDateTime getDateValue(String value)
-
-