Package 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
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.
-
Constructor Summary
ConstructorDescriptionAttributeDependantMetadataHandler
(Metadata metadata, String nameHoldingAttribute, String namePrefix) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMetadata
(String value) void
characters
(char[] ch, int start, int length) void
endElement
(String uri, String localName, String name) void
startElement
(String uri, String localName, String name, Attributes attributes) Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
Constructor Details
-
AttributeDependantMetadataHandler
-
-
Method Details
-
addMetadata
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
-
startElement
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
-
characters
public void characters(char[] ch, int start, int length) - Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
-