Package org.apache.tika.parser.odf
Class NSNormalizerContentHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.tika.sax.ContentHandlerDecorator
org.apache.tika.parser.odf.NSNormalizerContentHandler
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
Content handler decorator that:
- Maps old OpenOffice 1.0 Namespaces to the OpenDocument ones
- Returns a fake DTD when parser requests OpenOffice DTD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
endElement
(String namespaceURI, String localName, String qName) resolveEntity
(String publicId, String systemId) do not load any DTDs (may be requested by parser).void
startElement
(String namespaceURI, String localName, String qName, Attributes atts) void
startPrefixMapping
(String prefix, String uri) Methods inherited from class org.apache.tika.sax.ContentHandlerDecorator
characters, endDocument, endPrefixMapping, error, fatalError, handleException, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startDocument, toString, warning
Methods inherited from class org.xml.sax.helpers.DefaultHandler
notationDecl, unparsedEntityDecl
-
Constructor Details
-
NSNormalizerContentHandler
-
-
Method Details
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classContentHandlerDecorator
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classContentHandlerDecorator
- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Overrides:
startPrefixMapping
in classContentHandlerDecorator
- Throws:
SAXException
-
resolveEntity
do not load any DTDs (may be requested by parser). Fake the DTD by returning a empty string as InputSource- Specified by:
resolveEntity
in interfaceEntityResolver
- Overrides:
resolveEntity
in classDefaultHandler
- Throws:
IOException
SAXException
-