public abstract class AbstractConverter extends Object implements ITikaToXMPConverter
| Modifier and Type | Field and Description |
|---|---|
protected com.adobe.internal.xmp.XMPMeta |
meta |
| Constructor and Description |
|---|
AbstractConverter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createArrayProperty(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(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(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(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.internal.xmp.XMPMeta |
getXMPMeta() |
abstract com.adobe.internal.xmp.XMPMeta |
process(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(Metadata metadata) |
public AbstractConverter()
throws TikaException
TikaExceptionpublic abstract com.adobe.internal.xmp.XMPMeta process(Metadata metadata) throws com.adobe.internal.xmp.XMPException
ITikaToXMPConverterMetadata-object into an XMPMeta containing the useful
properties.process in interface ITikaToXMPConvertermetadata - a Tika Metadata objectcom.adobe.internal.xmp.XMPException - If an error occurs during the creation of the XMP object.protected abstract Set<Namespace> getAdditionalNamespaces()
public void setMetadata(Metadata metadata)
public com.adobe.internal.xmp.XMPMeta getXMPMeta()
protected void registerNamespaces(Set<Namespace> namespaces) throws TikaException
Namespace information with XMPCore. Any already registered
namespace is not registered again.namespaces - the list of namespaces to be registeredTikaException - in case a namespace oculd not be registeredprotected void createProperty(Property metadataProperty, String ns, String propertyName) throws com.adobe.internal.xmp.XMPException
com.adobe.internal.xmp.XMPExceptioncreateProperty(String, String, String)protected void createProperty(String tikaKey, String ns, String propertyName) throws com.adobe.internal.xmp.XMPException
tikaKey - Key in the Tika metadata mapns - namespace the property should be created inpropertyName - name of the propertycom.adobe.internal.xmp.XMPException - if the property could not be createdprotected void createLangAltProperty(Property metadataProperty, String ns, String propertyName) throws com.adobe.internal.xmp.XMPException
com.adobe.internal.xmp.XMPExceptioncreateLangAltProperty(String, String, String)protected void createLangAltProperty(String tikaKey, String ns, String propertyName) throws com.adobe.internal.xmp.XMPException
tikaKey - Key in the Tika metadata mapns - namespace the property should be created inpropertyName - name of the propertycom.adobe.internal.xmp.XMPException - if the property could not be createdprotected void createArrayProperty(Property metadataProperty, String nsDc, String arrayProperty, int arrayType) throws com.adobe.internal.xmp.XMPException
com.adobe.internal.xmp.XMPExceptionprotected void createArrayProperty(String tikaKey, String ns, String propertyName, int arrayType) throws com.adobe.internal.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.internal.xmp.XMPException - if the property could not be createdprotected void createCommaSeparatedArray(Property metadataProperty, String nsDc, String arrayProperty, int arrayType) throws com.adobe.internal.xmp.XMPException
com.adobe.internal.xmp.XMPExceptionprotected void createCommaSeparatedArray(String tikaKey, String ns, String propertyName, int arrayType) throws com.adobe.internal.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.internal.xmp.XMPException - if the property could not be createdCopyright © 2007–2023 The Apache Software Foundation. All rights reserved.