org.apache.tika.parser.xml
Class AttributeDependantMetadataHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.tika.parser.xml.AttributeDependantMetadataHandler
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class AttributeDependantMetadataHandler
- extends org.xml.sax.helpers.DefaultHandler
This adds a Metadata entry for a given node.
The textual content of the node is used as the
value, and the Metadata name is taken from
an attribute, with a prefix if required.
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, 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 |
AttributeDependantMetadataHandler
public AttributeDependantMetadataHandler(Metadata metadata,
String nameHoldingAttribute,
String namePrefix)
addMetadata
public void addMetadata(String value)
endElement
public void endElement(String uri,
String localName,
String name)
- Specified by:
endElement
in interface ContentHandler
- Overrides:
endElement
in class org.xml.sax.helpers.DefaultHandler
startElement
public void startElement(String uri,
String localName,
String name,
Attributes attributes)
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class org.xml.sax.helpers.DefaultHandler
characters
public void characters(char[] ch,
int start,
int length)
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class org.xml.sax.helpers.DefaultHandler
Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.