@AlfrescoPublicApi public abstract class AbstractMappingMetadataExtracter extends Object implements MetadataExtracter, MetadataEmbedder, org.springframework.beans.factory.BeanNameAware, org.springframework.context.ApplicationContextAware
Migrating an existing extracter to use this class is straightforward:
extract(org.alfresco.service.cmr.repository.ContentReader, java.util.Map<org.alfresco.service.namespace.QName, java.io.Serializable>)
method. This now returns a raw map of extracted
values keyed by document-specific property names. The trimPut method has
been replaced with an equivalent putRawValue(String, Serializable, Map)
.
getDefaultMapping()
method. The simplest
is to provide the default mapping in a correlated .properties file.
getDefaultMapping()
,
extractRaw(ContentReader)
,
setMapping(Map)
MetadataExtracter.OverwritePolicy
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
logger |
static int |
MEGABYTE_SIZE |
protected MetadataExtracterConfig |
metadataExtracterConfig |
static String |
NAMESPACE_PROPERTY_PREFIX |
static String |
PROPERTY_COMPONENT_EMBED |
static String |
PROPERTY_COMPONENT_EXTRACT |
static String |
PROPERTY_PREFIX_METADATA |
Modifier | Constructor and Description |
---|---|
protected |
AbstractMappingMetadataExtracter()
Default constructor.
|
protected |
AbstractMappingMetadataExtracter(Set<String> supportedMimetypes)
Constructor that can be used when the list of supported mimetypes is known up front.
|
protected |
AbstractMappingMetadataExtracter(Set<String> supportedMimetypes,
Set<String> supportedEmbedMimetypes)
Constructor that can be used when the list of supported extract and embed mimetypes is known up front.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkIsEmbedSupported(org.alfresco.service.cmr.repository.ContentWriter writer)
Checks if embedding for the mimetype is supported.
|
protected void |
checkIsSupported(org.alfresco.service.cmr.repository.ContentReader reader)
Checks if the mimetype is supported.
|
void |
embed(Map<org.alfresco.service.namespace.QName,Serializable> properties,
org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer)
Embeds the given properties into the file specified by the given content writer.
|
protected void |
embedInternal(Map<String,Serializable> metadata,
org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer)
Override to embed metadata values.
|
Map<org.alfresco.service.namespace.QName,Serializable> |
extract(org.alfresco.service.cmr.repository.ContentReader reader,
Map<org.alfresco.service.namespace.QName,Serializable> destination)
Extracts the metadata values from the content provided by the reader and source
mimetype to the supplied map.
|
Map<org.alfresco.service.namespace.QName,Serializable> |
extract(org.alfresco.service.cmr.repository.ContentReader reader,
MetadataExtracter.OverwritePolicy overwritePolicy,
Map<org.alfresco.service.namespace.QName,Serializable> destination)
Extracts the metadata values from the content provided by the reader and source
mimetype to the supplied map.
|
Map<org.alfresco.service.namespace.QName,Serializable> |
extract(org.alfresco.service.cmr.repository.ContentReader reader,
MetadataExtracter.OverwritePolicy overwritePolicy,
Map<org.alfresco.service.namespace.QName,Serializable> destination,
Map<String,Set<org.alfresco.service.namespace.QName>> mapping)
Extracts the metadata from the content provided by the reader and source
mimetype to the supplied map.
|
protected abstract Map<String,Serializable> |
extractRaw(org.alfresco.service.cmr.repository.ContentReader reader)
Override to provide the raw extracted metadata values.
|
protected void |
filterSystemProperties(Map<org.alfresco.service.namespace.QName,Serializable> systemProperties,
Map<org.alfresco.service.namespace.QName,Serializable> targetProperties)
Filters the system properties that are going to be applied.
|
String |
getBeanName() |
protected Map<org.alfresco.service.namespace.QName,Set<String>> |
getDefaultEmbedMapping()
This method provides a best guess of what model properties should be embedded
in content.
|
protected Map<String,Set<org.alfresco.service.namespace.QName>> |
getDefaultMapping()
This method provides a best guess of where to store the values extracted
from the documents.
|
protected Map<org.alfresco.service.namespace.QName,Set<String>> |
getEmbedMapping()
Helper method for derived classes to obtain the embed mappings.
|
protected ExecutorService |
getExecutorService()
Gets the
ExecutorService to be used for timeout-aware
extraction. |
protected MetadataExtracterLimits |
getLimits(String mimetype)
Gets the metadata extracter limits for the given mimetype.
|
protected Map<String,Set<org.alfresco.service.namespace.QName>> |
getMapping()
Helper method for derived classes to obtain the mappings that will be applied to raw
values.
|
protected org.alfresco.service.cmr.repository.MimetypeService |
getMimetypeService() |
protected void |
init()
Provides a hook point for implementations to perform initialization.
|
boolean |
isEmbeddingSupported(String sourceMimetype)
Determines if the extracter works against the given mimetype.
|
boolean |
isSupported(String sourceMimetype)
Determines if the extracter works against the given mimetype.
|
protected Date |
makeDate(String dateStr)
Convert a date String to a Date object
|
protected Map<String,Serializable> |
newRawMap()
Helper method to fetch a clean map into which raw values can be dumped.
|
protected boolean |
putRawValue(String key,
Serializable value,
Map<String,Serializable> destination)
Adds a value to the map, conserving null values.
|
protected Map<org.alfresco.service.namespace.QName,Set<String>> |
readEmbedMappingProperties(Properties mappingProperties)
A utility method to convert mapping properties to the Map form.
|
protected Map<org.alfresco.service.namespace.QName,Set<String>> |
readEmbedMappingProperties(String propertiesUrl)
A utility method to read embed mapping properties from a resource file and convert to the map form.
|
protected Map<org.alfresco.service.namespace.QName,Set<String>> |
readGlobalEmbedMappingProperties()
A utility method to convert global mapping properties to the Map form.
|
protected Map<String,Set<org.alfresco.service.namespace.QName>> |
readGlobalExtractMappingProperties()
A utility method to convert global properties to the Map form for the given
propertyComponent.
|
protected Map<String,Set<org.alfresco.service.namespace.QName>> |
readMappingProperties(Properties mappingProperties)
A utility method to convert mapping properties to the Map form.
|
protected Map<String,Set<org.alfresco.service.namespace.QName>> |
readMappingProperties(String propertiesUrl)
A utility method to read mapping properties from a resource file and convert to the map form.
|
void |
register()
Registers this instance of the extracter with the registry.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setBeanName(String beanName) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setEmbedMapping(Map<org.alfresco.service.namespace.QName,Set<String>> embedMapping)
Set the embed mapping from document metadata to system metadata.
|
void |
setEmbedMappingProperties(Properties embedMappingProperties)
Set the properties that contain the embed mapping from model properties to content file metadata.
|
void |
setEnableStringTagging(boolean enableStringTagging)
Whether or not to enable the pass through of simple strings to cm:taggable tags
|
void |
setExecutorService(ExecutorService executorService)
Sets the
ExecutorService to be used for timeout-aware
extraction. |
void |
setFailOnTypeConversion(boolean failOnTypeConversion)
Set whether the extractor should discard metadata that fails to convert to the target type
defined in the data dictionary model.
|
void |
setInheritDefaultEmbedMapping(boolean inheritDefaultEmbedMapping)
Set if the embed property mappings augment or override the mapping generically provided by the
extracter implementation.
|
void |
setInheritDefaultMapping(boolean inheritDefaultMapping)
Set if the property mappings augment or override the mapping generically provided by the
extracter implementation.
|
void |
setMapping(Map<String,Set<org.alfresco.service.namespace.QName>> mapping)
Set the mapping from document metadata to system metadata.
|
void |
setMappingProperties(Properties mappingProperties)
Set the properties that contain the mapping from document metadata to system metadata.
|
void |
setMetadataExtracterConfig(MetadataExtracterConfig metadataExtracterConfig)
The metadata extracter config.
|
void |
setMimetypeLimits(Map<String,MetadataExtracterLimits> mimetypeLimits)
Sets the map of source mimetypes to metadata extracter limits.
|
void |
setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService) |
void |
setOverwritePolicy(MetadataExtracter.OverwritePolicy overwritePolicy)
Set the policy to use when existing values are encountered.
|
void |
setProperties(Properties properties)
The Alfresco global properties.
|
void |
setRegistry(MetadataExtracterRegistry registry)
Set the registry to register with.
|
void |
setSupportedDateFormats(List<String> supportedDateFormats)
Set the date formats, over and above the
ISO8601 format , that will
be supported for string to date conversions. |
void |
setSupportedEmbedMimetypes(Collection<String> supportedEmbedMimetypes)
Set the mimetypes that are supported for embedding.
|
void |
setSupportedMimetypes(Collection<String> supportedMimetypes)
Set the mimetypes that are supported by the extracter.
|
public static final String NAMESPACE_PROPERTY_PREFIX
public static final String PROPERTY_PREFIX_METADATA
public static final String PROPERTY_COMPONENT_EXTRACT
public static final String PROPERTY_COMPONENT_EMBED
public static final int MEGABYTE_SIZE
protected static org.apache.commons.logging.Log logger
protected MetadataExtracterConfig metadataExtracterConfig
protected AbstractMappingMetadataExtracter()
isSupported(String)
should
be implemented. This is useful when the list of supported mimetypes is not known
when the instance is constructed. Alternatively, once the set becomes known, call
setSupportedMimetypes(Collection)
.protected AbstractMappingMetadataExtracter(Set<String> supportedMimetypes)
supportedMimetypes
- the set of mimetypes supported by defaultprotected AbstractMappingMetadataExtracter(Set<String> supportedMimetypes, Set<String> supportedEmbedMimetypes)
supportedMimetypes
- the set of mimetypes supported for extraction by defaultsupportedEmbedMimetypes
- the set of mimetypes supported for embedding by defaultpublic void setRegistry(MetadataExtracterRegistry registry)
registry
- a metadata extracter registrypublic void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
mimetypeService
- the mimetype service. Set this if required.protected org.alfresco.service.cmr.repository.MimetypeService getMimetypeService()
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService
- the dictionary service to determine which data conversions are necessarypublic void setSupportedMimetypes(Collection<String> supportedMimetypes)
public void setSupportedEmbedMimetypes(Collection<String> supportedEmbedMimetypes)
public boolean isSupported(String sourceMimetype)
isSupported
in interface MetadataExtracter
sourceMimetype
- the document mimetypesetSupportedMimetypes(Collection)
public boolean isEmbeddingSupported(String sourceMimetype)
isEmbeddingSupported
in interface MetadataEmbedder
sourceMimetype
- the document mimetypesetSupportedEmbedMimetypes(Collection)
public void setOverwritePolicy(MetadataExtracter.OverwritePolicy overwritePolicy)
overwritePolicy
- the policy to apply when there are existing system propertiespublic void setFailOnTypeConversion(boolean failOnTypeConversion)
failOnTypeConversion
- false to discard properties that can't get converted
to the dictionary-defined type, or true (default)
to fail the extraction if the type doesn't convertpublic void setSupportedDateFormats(List<String> supportedDateFormats)
ISO8601 format
, that will
be supported for string to date conversions. The supported syntax is described by the
SimpleDateFormat Javadocs.supportedDateFormats
- a list of supported date formats.public void setInheritDefaultMapping(boolean inheritDefaultMapping)
default mappings
.
Note that even when set to true an individual property mapping entry replaces the entry provided by the extracter implementation.
inheritDefaultMapping
- true to add the configured mapping
to the list of default mappings.getDefaultMapping()
,
setMapping(Map)
,
setMappingProperties(Properties)
public void setBeanName(String beanName)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
public String getBeanName()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
public void setProperties(Properties properties)
public void setMetadataExtracterConfig(MetadataExtracterConfig metadataExtracterConfig)
public void setEnableStringTagging(boolean enableStringTagging)
enableStringTagging
- true find or create tags for each string
mapped to cm:taggable. false (default)
ignore mapping strings to tags.public void setInheritDefaultEmbedMapping(boolean inheritDefaultEmbedMapping)
default mappings
.
Note that even when set to true an individual property mapping entry replaces the entry provided by the extracter implementation.
inheritDefaultEmbedMapping
- true to add the configured embed mapping
to the list of default embed mappings.getDefaultEmbedMapping()
,
setEmbedMapping(Map)
,
setEmbedMappingProperties(Properties)
public void setMimetypeLimits(Map<String,MetadataExtracterLimits> mimetypeLimits)
protected ExecutorService getExecutorService()
ExecutorService
to be used for timeout-aware
extraction.
If no ExecutorService
has been defined a default
of Executors.newCachedThreadPool()
is used during
init()
.
ExecutorService
public void setExecutorService(ExecutorService executorService)
ExecutorService
to be used for timeout-aware
extraction.executorService
- the ExecutorService
for timeoutspublic void setMapping(Map<String,Set<org.alfresco.service.namespace.QName>> mapping)
default converter
.mapping
- a mapping from document metadata to system metadatapublic void setEmbedMapping(Map<org.alfresco.service.namespace.QName,Set<String>> embedMapping)
default converter
.embedMapping
- an embed mapping from model properties to content file metadata keyspublic void setMappingProperties(Properties mappingProperties)
setMapping(Map)
method. Any mappings already
present will be cleared out.
The property mapping is of the form:
# Namespaces prefixes namespace.prefix.cm=http://www.alfresco.org/model/content/1.0 namespace.prefix.my=http://www....com/alfresco/1.0 # Mapping editor=cm:author, my:editor title=cm:title user1=cm:summary user2=cm:descriptionThe mapping can therefore be from a single document property onto several system properties.
mappingProperties
- the properties that map document properties to system propertiespublic void setEmbedMappingProperties(Properties embedMappingProperties)
setEmbedMapping(Map)
method. Any mappings already
present will be cleared out.
The property mapping is of the form:
# Namespaces prefixes namespace.prefix.cm=http://www.alfresco.org/model/content/1.0 namespace.prefix.my=http://www....com/alfresco/1.0 # Mapping cm\:author=editor cm\:title=title cm\:summary=user1 cm\:description=description,user2The embed mapping can therefore be from a model property onto several content file metadata properties.
embedMappingProperties
- the properties that map model properties to content file metadata propertiesprotected final Map<String,Set<org.alfresco.service.namespace.QName>> getMapping()
Normally, the list of properties that can be extracted from a document is fixed and well-known - in that case, just extract everything. But Some implementations may have an extra, indeterminate set of values available for extraction. If the extraction of these runtime parameters is expensive, then the keys provided by the return value can be used to extract values from the documents. The metadata extraction becomes fully configuration-driven, i.e. declaring further mappings will result in more values being extracted from the documents.
Most extractors will not be using this method. For an example of its use, see the OpenDocument extractor, which uses the mapping to select specific user properties from a document.
protected final Map<org.alfresco.service.namespace.QName,Set<String>> getEmbedMapping()
Normally, the list of properties that can be embedded in a document is fixed and well-known.. But some implementations may have an extra, indeterminate set of values available for embedding. If the embedding of these runtime parameters is expensive, then the keys provided by the return value can be used to embed values in the documents. The metadata embedding becomes fully configuration-driven, i.e. declaring further mappings will result in more values being embedded in the documents.
protected Map<String,Set<org.alfresco.service.namespace.QName>> readMappingProperties(String propertiesUrl)
propertiesUrl
- A standard Properties file URL locationsetMappingProperties(Properties)
protected Map<String,Set<org.alfresco.service.namespace.QName>> readGlobalExtractMappingProperties()
Mappings can be specified using the same method defined for
normal mapping properties files but with a prefix of
metadata.extracter
, the extracter bean name, and the extract component.
For example:
metadata.extracter.TikaAuto.extract.namespace.prefix.my=http://DummyMappingMetadataExtracter
metadata.extracter.TikaAuto.extract.namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
metadata.extracter.TikaAuto.extract.dc\:description=cm:description, my:customDescription
protected Map<String,Set<org.alfresco.service.namespace.QName>> readMappingProperties(Properties mappingProperties)
setMappingProperties(Properties)
protected Map<org.alfresco.service.namespace.QName,Set<String>> readEmbedMappingProperties(String propertiesUrl)
propertiesUrl
- A standard Properties file URL locationsetEmbedMappingProperties(Properties)
protected Map<org.alfresco.service.namespace.QName,Set<String>> readGlobalEmbedMappingProperties()
Different from readGlobalExtractMappingProperties in that keys are the Alfresco QNames and values are file metadata properties.
Mappings can be specified using the same method defined for
normal embed mapping properties files but with a prefix of
metadata.extracter
, the extracter bean name, and the embed component.
For example:
metadata.extracter.TikaAuto.embed.namespace.prefix.cm=http://www.alfresco.org/model/content/1.0
metadata.extracter.TikaAuto.embed.cm\:description=description
setMappingProperties(Properties)
protected Map<org.alfresco.service.namespace.QName,Set<String>> readEmbedMappingProperties(Properties mappingProperties)
Different from readMappingProperties in that keys are the Alfresco QNames and values are file metadata properties.
setMappingProperties(Properties)
public final void register()
init()
method and then register if the registry is available.setRegistry(MetadataExtracterRegistry)
,
init()
protected void init()
default mappings
will be requested during
initialization.protected void checkIsSupported(org.alfresco.service.cmr.repository.ContentReader reader)
reader
- the reader to checkorg.alfresco.error.AlfrescoRuntimeException
- if the mimetype is not supportedprotected void checkIsEmbedSupported(org.alfresco.service.cmr.repository.ContentWriter writer)
writer
- the writer to checkorg.alfresco.error.AlfrescoRuntimeException
- if embedding for the mimetype is not supportedpublic final Map<org.alfresco.service.namespace.QName,Serializable> extract(org.alfresco.service.cmr.repository.ContentReader reader, Map<org.alfresco.service.namespace.QName,Serializable> destination)
overwrite policy
between document metadata and system metadata will be used.
The extraction viability can be determined by an up front call to MetadataExtracter.isSupported(String)
.
The source mimetype must be available on the
ContentAccessor.getMimetype()
method
of the reader.
extract
in interface MetadataExtracter
reader
- the source of the contentdestination
- the map of properties to populate (essentially a return value)MetadataExtracter.extract(ContentReader, OverwritePolicy, Map, Map)
public final Map<org.alfresco.service.namespace.QName,Serializable> extract(org.alfresco.service.cmr.repository.ContentReader reader, MetadataExtracter.OverwritePolicy overwritePolicy, Map<org.alfresco.service.namespace.QName,Serializable> destination)
The extraction viability can be determined by an up front call to MetadataExtracter.isSupported(String)
.
The source mimetype must be available on the
ContentAccessor.getMimetype()
method
of the reader.
extract
in interface MetadataExtracter
reader
- the source of the contentoverwritePolicy
- the policy stipulating how the system properties must be
overwritten if presentdestination
- the map of properties to populate (essentially a return value)MetadataExtracter.extract(ContentReader, OverwritePolicy, Map, Map)
public Map<org.alfresco.service.namespace.QName,Serializable> extract(org.alfresco.service.cmr.repository.ContentReader reader, MetadataExtracter.OverwritePolicy overwritePolicy, Map<org.alfresco.service.namespace.QName,Serializable> destination, Map<String,Set<org.alfresco.service.namespace.QName>> mapping)
overwrite policy
is also explictly
set.
The extraction viability can be determined by an up front call to
MetadataExtracter.isSupported(String)
.
The source mimetype must be available on the
ContentAccessor.getMimetype()
method
of the reader.
extract
in interface MetadataExtracter
reader
- the source of the contentoverwritePolicy
- the policy stipulating how the system properties must be
overwritten if presentdestination
- the map of properties to populate (essentially a return value)mapping
- a mapping of document-specific properties to system properties.MetadataExtracter.extract(ContentReader, Map)
public final void embed(Map<org.alfresco.service.namespace.QName,Serializable> properties, org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer)
The embedding viability can be determined by an up front call to
MetadataEmbedder.isEmbeddingSupported(String)
.
The source mimetype must be available on the
ContentAccessor.getMimetype()
method
of the writer.
embed
in interface MetadataEmbedder
properties
- the model properties to embedreader
- the reader for the original source content filewriter
- the writer for the content after metadata has been embeddedprotected void filterSystemProperties(Map<org.alfresco.service.namespace.QName,Serializable> systemProperties, Map<org.alfresco.service.namespace.QName,Serializable> targetProperties)
systemProperties
- map of system properties to be appliedtargetProperties
- map of target properties, may be used to provide to the context requriedprotected boolean putRawValue(String key, Serializable value, Map<String,Serializable> destination)
key
- the destination keyvalue
- the serializable valuedestination
- the map to put values intoprotected final Map<String,Serializable> newRawMap()
protected Map<String,Set<org.alfresco.service.namespace.QName>> getDefaultMapping()
The default implementation looks for the default mapping file in the location given by the class name and .properties. If the extracter's class is x.y.z.MyExtracter then the default properties will be picked up at classpath:/alfresco/metadata/MyExtracter.properties. The previous location of classpath:/x/y/z/MyExtracter.properties is still supported but may be removed in a future release. Inner classes are supported, but the '$' in the class name is replaced with '-', so default properties for x.y.z.MyStuff$MyExtracter will be located using classpath:/alfresco/metadata/MyStuff-MyExtracter.properties.
The default mapping implementation should include thorough Javadocs so that the system administrators can accurately determine how to best enhance or override the default mapping.
If the default mapping is declared in a properties file other than the one named after
the class, then the readMappingProperties(String)
method can be used to quickly
generate the return value:
{
return readMappingProperties(DEFAULT_MAPPING);
}
The map can also be created in code either statically or during the call.setInheritDefaultMapping(boolean inherit)
protected Map<org.alfresco.service.namespace.QName,Set<String>> getDefaultEmbedMapping()
The default implementation looks for the default mapping file in the location given by the class name and .embed.properties. If the extracter's class is x.y.z.MyExtracter then the default properties will be picked up at classpath:/x/y/z/MyExtracter.embed.properties. Inner classes are supported, but the '$' in the class name is replaced with '-', so default properties for x.y.z.MyStuff$MyExtracter will be located using x.y.z.MyStuff-MyExtracter.embed.properties.
The default mapping implementation should include thorough Javadocs so that the system administrators can accurately determine how to best enhance or override the default mapping.
If the default mapping is declared in a properties file other than the one named after
the class, then the readEmbedMappingProperties(String)
method can be used to quickly
generate the return value:
protected Map<> getDefaultMapping()
{
return readEmbedMappingProperties(DEFAULT_MAPPING);
}
The map can also be created in code either statically or during the call.
If no embed mapping properties file is found a reverse of the extract
mapping in getDefaultMapping()
will be assumed with the first QName in each
value used as the key for this mapping and a last win approach for duplicates.
setInheritDefaultMapping(boolean inherit)
protected MetadataExtracterLimits getLimits(String mimetype)
A specific match for the given mimetype is tried first and if none is found a wildcard of "*" is tried, if still not found defaults value will be used
mimetype
- Stringprotected abstract Map<String,Serializable> extractRaw(org.alfresco.service.cmr.repository.ContentReader reader) throws Throwable
default mapping
doesn't handle all properties, it is
possible for each instance of the extracter to be configured differently and more or
less of the properties may be used in different installations.
Raw values must not be trimmed or removed for any reason. Null values and empty strings are
Properties extracted and their meanings and types should be thoroughly described in the class-level javadocs of the extracter implementation, for example:
editor: - the document editor --> cm:author title: - the document title --> cm:title user1: - the document summary user2: - the document description --> cm:description user3: - user4: -
reader
- the document to extract the values from. This stream provided by
the reader must be closed if accessed directly.Throwable
- All exception conditions can be handled.getDefaultMapping()
protected void embedInternal(Map<String,Serializable> metadata, org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer) throws Throwable
default mapping
doesn't handle all properties, it is
possible for each instance of the extracter to be configured differently and more or
less of the properties may be used in different installations.metadata
- the metadata keys and values to embed in the content filereader
- the reader for the original document. This stream provided by
the reader must be closed if accessed directly.writer
- the writer for the document to embed the values in. This stream provided by
the writer must be closed if accessed directly.Throwable
- All exception conditions can be handled.getDefaultEmbedMapping()
Copyright © 2005–2017 Alfresco Software. All rights reserved.