|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tika.xmp.convert.AbstractConverter
public abstract class AbstractConverter
Base class for Tika Metadata to XMP converter which provides some needed common functionality.
Field Summary | |
---|---|
protected com.adobe.xmp.XMPMeta |
meta
|
Constructor Summary | |
---|---|
AbstractConverter()
|
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected com.adobe.xmp.XMPMeta meta
Constructor Detail |
---|
public AbstractConverter() throws TikaException
TikaException
Method Detail |
---|
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 object
com.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 registered
TikaException
- 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 property
com.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 property
com.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 created
com.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 created
com.adobe.xmp.XMPException
- if the property could not be created
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |