public class XmlMetadataExtracter extends AbstractMappingMetadataExtracter
The selectors are used to find an extracter most appropriate of a given XML document. The chosen extracter is then asked to extract the values, passing through the overwrite policy as AbstractMappingMetadataExtracter.setOverwritePolicy(String) on this instance. The overwrite policy of the embedded extracters is not relevant unless they are used separately in another context.
ContentWorkerSelector,
MetadataExtracterMetadataExtracter.OverwritePolicy| Modifier and Type | Field and Description |
|---|---|
static java.lang.String[] |
SUPPORTED_MIMETYPES |
NAMESPACE_PROPERTY_PREFIX, PROPERTY_COMPONENT_EMBED, PROPERTY_COMPONENT_EXTRACT, PROPERTY_PREFIX_METADATA| Constructor and Description |
|---|
XmlMetadataExtracter()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map |
extract(org.alfresco.service.cmr.repository.ContentReader reader,
MetadataExtracter.OverwritePolicy overwritePolicy,
java.util.Map destination,
java.util.Map mapping)
Selects and extracter to perform the work and redirects to it.
|
protected java.util.Map |
extractRaw(org.alfresco.service.cmr.repository.ContentReader reader)
This is not required as the
|
protected java.util.Map |
getDefaultMapping()
It is not possible to have any default mappings, but something has to be
returned.
|
protected void |
init()
Provides a hook point for implementations to perform initialization.
|
void |
setSelectors(java.util.List selectors)
Sets the list of metadata selectors to use to find the extracter to use,
given some content.
|
checkIsEmbedSupported, checkIsSupported, embed, embedInternal, extract, extract, filterSystemProperties, getBeanName, getDefaultEmbedMapping, getEmbedMapping, getExecutorService, getExtractionTime, getLimits, getMapping, getMimetypeService, getReliability, isEmbeddingSupported, isSupported, makeDate, newRawMap, putRawValue, readEmbedMappingProperties, readEmbedMappingProperties, readGlobalEmbedMappingProperties, readGlobalExtractMappingProperties, readMappingProperties, readMappingProperties, register, setApplicationContext, setBeanName, setDictionaryService, setEmbedMapping, setEmbedMappingProperties, setEnableStringTagging, setExecutorService, setFailOnTypeConversion, setInheritDefaultEmbedMapping, setInheritDefaultMapping, setMapping, setMappingProperties, setMimetypeLimits, setMimetypeService, setOverwritePolicy, setOverwritePolicy, setProperties, setRegistry, setSupportedDateFormats, setSupportedEmbedMimetypes, setSupportedMimetypespublic void setSelectors(java.util.List selectors)
selectors - A list of selectorsprotected void init()
AbstractMappingMetadataExtracterdefault mappings will be requested during
initialization.init in class AbstractMappingMetadataExtracterprotected java.util.Map getDefaultMapping()
getDefaultMapping in class AbstractMappingMetadataExtracterAbstractMappingMetadataExtracter.setInheritDefaultMapping(boolean inherit)public java.util.Map extract(org.alfresco.service.cmr.repository.ContentReader reader,
MetadataExtracter.OverwritePolicy overwritePolicy,
java.util.Map destination,
java.util.Map mapping)
extract in interface MetadataExtracterextract in class AbstractMappingMetadataExtracterreader - 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)protected java.util.Map extractRaw(org.alfresco.service.cmr.repository.ContentReader reader)
throws java.lang.Throwable
extractRaw in class AbstractMappingMetadataExtracterreader - the document to extract the values from. This stream provided by
the reader must be closed if accessed directly.java.lang.ThrowableAbstractMappingMetadataExtracter.getDefaultMapping()Copyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.