|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.apache.tika.parser.xml.ElementMetadataHandler
public class ElementMetadataHandler
SAX event handler that maps the contents of an XML element into a metadata field.
| Constructor Summary | |
|---|---|
ElementMetadataHandler(String uri,
String localName,
org.apache.tika.metadata.Metadata metadata,
org.apache.tika.metadata.Property targetProperty)
Constructor for Property metadata keys. |
|
ElementMetadataHandler(String uri,
String localName,
org.apache.tika.metadata.Metadata metadata,
org.apache.tika.metadata.Property targetProperty,
boolean allowDuplicateValues,
boolean allowEmptyValues)
Constructor for Property metadata keys which allows change of behavior for duplicate and empty entry values. |
|
ElementMetadataHandler(String uri,
String localName,
org.apache.tika.metadata.Metadata metadata,
String name)
Constructor for string metadata keys. |
|
ElementMetadataHandler(String uri,
String localName,
org.apache.tika.metadata.Metadata metadata,
String name,
boolean allowDuplicateValues,
boolean allowEmptyValues)
Constructor for string metadata keys which allows change of behavior for duplicate and empty entry values. |
|
| Method Summary | |
|---|---|
protected void |
addMetadata(String value)
Adds the given metadata value. |
void |
characters(char[] ch,
int start,
int length)
|
void |
endElement(String uri,
String localName,
String name)
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
protected boolean |
isMatchingElement(String uri,
String localName)
|
protected boolean |
isMatchingParentElement(String uri,
String localName)
|
void |
startElement(String uri,
String localName,
String name,
Attributes attributes)
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endDocument, endPrefixMapping, error, fatalError, 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 |
| Constructor Detail |
|---|
public ElementMetadataHandler(String uri,
String localName,
org.apache.tika.metadata.Metadata metadata,
String name)
uri - the uri of the namespace of the elementlocalName - the local name of the elementmetadata - the Tika metadata object to populatename - the Tika metadata field key
public ElementMetadataHandler(String uri,
String localName,
org.apache.tika.metadata.Metadata metadata,
String name,
boolean allowDuplicateValues,
boolean allowEmptyValues)
uri - the uri of the namespace of the elementlocalName - the local name of the elementmetadata - the Tika metadata object to populatename - the Tika metadata field keyallowDuplicateValues - add duplicate values to the Tika metadataallowEmptyValues - add empty values to the Tika metadata
public ElementMetadataHandler(String uri,
String localName,
org.apache.tika.metadata.Metadata metadata,
org.apache.tika.metadata.Property targetProperty)
uri - the uri of the namespace of the elementlocalName - the local name of the elementmetadata - the Tika metadata object to populatetargetProperty - the Tika metadata Property key
public ElementMetadataHandler(String uri,
String localName,
org.apache.tika.metadata.Metadata metadata,
org.apache.tika.metadata.Property targetProperty,
boolean allowDuplicateValues,
boolean allowEmptyValues)
uri - the uri of the namespace of the elementlocalName - the local name of the elementmetadata - the Tika metadata object to populatetargetProperty - the Tika metadata Property keyallowDuplicateValues - add duplicate values to the Tika metadataallowEmptyValues - add empty values to the Tika metadata| Method Detail |
|---|
protected boolean isMatchingParentElement(String uri,
String localName)
protected boolean isMatchingElement(String uri,
String localName)
public void startElement(String uri,
String localName,
String name,
Attributes attributes)
startElement in interface ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandler
public void endElement(String uri,
String localName,
String name)
endElement in interface ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandler
public void characters(char[] ch,
int start,
int length)
characters in interface ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandler
public void ignorableWhitespace(char[] ch,
int start,
int length)
ignorableWhitespace in interface ContentHandlerignorableWhitespace in class org.xml.sax.helpers.DefaultHandlerprotected void addMetadata(String value)
null or empty. If the metadata entry already exists,
then the given value is appended to it with a comma as the separator.
value - metadata value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||