public abstract class AbstractConverter extends Object implements ITikaToXMPConverter
| Modifier and Type | Field and Description |
|---|---|
protected com.adobe.xmp.XMPMeta |
meta |
| Constructor and Description |
|---|
AbstractConverter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createArrayProperty(org.apache.tika.metadata.Property metadataProperty,
String nsDc,
String arrayProperty,
int arrayType) |
protected void |
createArrayProperty(String tikaKey,
String ns,
String propertyName,
int arrayType)
Creates an array property from a list of values.
|
protected void |
createCommaSeparatedArray(org.apache.tika.metadata.Property metadataProperty,
String nsDc,
String arrayProperty,
int arrayType) |
protected void |
createCommaSeparatedArray(String tikaKey,
String ns,
String propertyName,
int arrayType)
Creates an array property from a comma separated list.
|
protected void |
createLangAltProperty(org.apache.tika.metadata.Property metadataProperty,
String ns,
String propertyName) |
protected void |
createLangAltProperty(String tikaKey,
String ns,
String propertyName)
Creates a language alternative property in the x-default language
|
protected void |
createProperty(org.apache.tika.metadata.Property metadataProperty,
String ns,
String propertyName) |
protected void |
createProperty(String tikaKey,
String ns,
String propertyName)
Creates a simple property.
|
protected abstract Set<Namespace> |
getAdditionalNamespaces()
Every Converter has to provide information about namespaces that are used additionally to the
core set of XMP namespaces.
|
com.adobe.xmp.XMPMeta |
getXMPMeta() |
abstract com.adobe.xmp.XMPMeta |
process(org.apache.tika.metadata.Metadata metadata)
Converts a Tika
Metadata-object into an XMPMeta containing the useful
properties. |
protected void |
registerNamespaces(Set<Namespace> namespaces)
Registers a number
Namespace information with XMPCore. |
void |
setMetadata(org.apache.tika.metadata.Metadata metadata) |
public AbstractConverter()
throws org.apache.tika.exception.TikaException
org.apache.tika.exception.TikaExceptionpublic abstract com.adobe.xmp.XMPMeta process(org.apache.tika.metadata.Metadata metadata)
throws com.adobe.xmp.XMPException
ITikaToXMPConverterMetadata-object into an XMPMeta containing the useful
properties.process in interface ITikaToXMPConvertermetadata - a Tika Metadata objectcom.adobe.xmp.XMPException - If an error occurs during the creation of the XMP object.protected abstract Set<Namespace> getAdditionalNamespaces()
public void setMetadata(org.apache.tika.metadata.Metadata metadata)
public com.adobe.xmp.XMPMeta getXMPMeta()
protected void registerNamespaces(Set<Namespace> namespaces) throws org.apache.tika.exception.TikaException
Namespace information with XMPCore. Any already registered
namespace is not registered again.namespaces - the list of namespaces to be registeredorg.apache.tika.exception.TikaException - in case a namespace oculd not be registeredprotected void createProperty(org.apache.tika.metadata.Property metadataProperty,
String ns,
String propertyName)
throws com.adobe.xmp.XMPException
com.adobe.xmp.XMPExceptioncreateProperty(String, String, String)protected void createProperty(String tikaKey, String ns, String propertyName) throws com.adobe.xmp.XMPException
tikaKey - Key in the Tika metadata mapns - namespace the property should be created inpropertyName - name of the propertycom.adobe.xmp.XMPException - if the property could not be createdprotected void createLangAltProperty(org.apache.tika.metadata.Property metadataProperty,
String ns,
String propertyName)
throws com.adobe.xmp.XMPException
com.adobe.xmp.XMPExceptioncreateLangAltProperty(String, String, String)protected void createLangAltProperty(String tikaKey, String ns, String propertyName) throws com.adobe.xmp.XMPException
tikaKey - Key in the Tika metadata mapns - namespace the property should be created inpropertyName - name of the propertycom.adobe.xmp.XMPException - if the property could not be createdprotected void createArrayProperty(org.apache.tika.metadata.Property metadataProperty,
String nsDc,
String arrayProperty,
int arrayType)
throws com.adobe.xmp.XMPException
com.adobe.xmp.XMPExceptionprotected void createArrayProperty(String tikaKey, String ns, String propertyName, int arrayType) throws com.adobe.xmp.XMPException
tikaKey - Key in the Tika metadata mapns - namespace the property should be created inpropertyName - name of the propertyarrayType - depicts which kind of array shall be createdcom.adobe.xmp.XMPException - if the property could not be createdprotected void createCommaSeparatedArray(org.apache.tika.metadata.Property metadataProperty,
String nsDc,
String arrayProperty,
int arrayType)
throws com.adobe.xmp.XMPException
com.adobe.xmp.XMPExceptionprotected void createCommaSeparatedArray(String tikaKey, String ns, String propertyName, int arrayType) throws com.adobe.xmp.XMPException
tikaKey - Key in the Tika metadata mapns - namespace the property should be created inpropertyName - name of the propertyarrayType - depicts which kind of array shall be createdcom.adobe.xmp.XMPException - if the property could not be createdCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.