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(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.xmp.XMPMeta |
getXMPMeta() |
abstract com.adobe.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
TikaException
public abstract com.adobe.xmp.XMPMeta process(Metadata metadata) throws com.adobe.xmp.XMPException
ITikaToXMPConverter
Metadata
-object into an XMPMeta
containing the useful
properties.process
in interface ITikaToXMPConverter
metadata
- 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(Metadata metadata)
public com.adobe.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.xmp.XMPException
com.adobe.xmp.XMPException
createProperty(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(Property metadataProperty, String ns, String propertyName) throws com.adobe.xmp.XMPException
com.adobe.xmp.XMPException
createLangAltProperty(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(Property metadataProperty, String nsDc, String arrayProperty, int arrayType) throws com.adobe.xmp.XMPException
com.adobe.xmp.XMPException
protected 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(Property metadataProperty, String nsDc, String arrayProperty, int arrayType) throws com.adobe.xmp.XMPException
com.adobe.xmp.XMPException
protected 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–2022 The Apache Software Foundation. All rights reserved.