Class XmlMetadataExtracter
java.lang.Object
org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter
org.alfresco.repo.content.metadata.xml.XmlMetadataExtracter
- All Implemented Interfaces:
ContentWorker,MetadataEmbedder,MetadataExtracter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.context.ApplicationContextAware
Deprecated.
A metadata extractor that selects an appropiate workder for the extraction.
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
MetadataExtracter.OverwritePolicy as
AbstractMappingMetadataExtracter.setOverwritePolicy(org.alfresco.repo.content.metadata.MetadataExtracter.OverwritePolicy) on this instance. The overwrite
policy of the embedded extracters is not relevant unless they are used
separately in another context.
- Since:
- 2.1
- Author:
- Derek Hulley
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.alfresco.repo.content.metadata.MetadataExtracter
MetadataExtracter.OverwritePolicy -
Field Summary
FieldsFields inherited from class org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter
dictionaryService, MEGABYTE_SIZE, NAMESPACE_PROPERTY_PREFIX, PROPERTY_COMPONENT_EMBED, PROPERTY_COMPONENT_EXTRACT, PROPERTY_PREFIX_METADATA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextract(ContentReader reader, MetadataExtracter.OverwritePolicy overwritePolicy, Map<QName, Serializable> destination, Map<String, Set<QName>> mapping) Deprecated.Selects and extracter to perform the work and redirects to it.protected Map<String,Serializable> extractRaw(ContentReader reader) Deprecated.This is not required as theDeprecated.It is not possible to have any default mappings, but something has to be returned.protected voidinit()Deprecated.Provides a hook point for implementations to perform initialization.voidsetSelectors(List<ContentWorkerSelector<MetadataExtracter>> selectors) Deprecated.Sets the list of metadata selectors to use to find the extracter to use, given some content.Methods inherited from class org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter
checkIsEmbedSupported, checkIsSupported, convertSystemPropertyValues, embed, embed, embedInternal, embedInternal, extract, extract, extract, extract, extractRawInThread, extractRawThreadFinished, filterSystemProperties, getBeanName, getDefaultEmbedMapping, getEmbedMapping, getExecutorService, getLimits, getMapping, getMimetypeService, getSupportedMimetypes, isEmbeddingSupported, isEnabled, isSupported, makeDate, mapSystemToRaw, newRawMap, putRawValue, readEmbedMappingProperties, readEmbedMappingProperties, readGlobalEmbedMappingProperties, readGlobalExtractMappingProperties, readMappingProperties, readMappingProperties, register, setApplicationContext, setBeanName, setDictionaryService, setEmbedMapping, setEmbedMappingProperties, setEnableStringTagging, setExecutorService, setFailOnTypeConversion, setInheritDefaultEmbedMapping, setInheritDefaultMapping, setMapping, setMappingProperties, setMimetypeLimits, setMimetypeService, setOverwritePolicy, setProperties, setRegistry, setSupportedDateFormats, setSupportedEmbedMimetypes, setSupportedMimetypes
-
Field Details
-
SUPPORTED_MIMETYPES
Deprecated.
-
-
Constructor Details
-
XmlMetadataExtracter
public XmlMetadataExtracter()Deprecated.Default constructor
-
-
Method Details
-
setSelectors
Deprecated.Sets the list of metadata selectors to use to find the extracter to use, given some content. The evaluations are done in the order that they occur in the list.- Parameters:
selectors- A list of selectors
-
init
protected void init()Deprecated.Description copied from class:AbstractMappingMetadataExtracterProvides a hook point for implementations to perform initialization. The base implementation must be invoked or the extracter will fail during extraction. Thedefault mappingswill be requested during initialization.- Overrides:
initin classAbstractMappingMetadataExtracter
-
getDefaultMapping
Deprecated.It is not possible to have any default mappings, but something has to be returned.- Overrides:
getDefaultMappingin classAbstractMappingMetadataExtracter- Returns:
- Returns an empty map
- See Also:
-
extract
public Map<QName,Serializable> extract(ContentReader reader, MetadataExtracter.OverwritePolicy overwritePolicy, Map<QName, Serializable> destination, Map<String, Set<QName>> mapping) Deprecated.Selects and extracter to perform the work and redirects to it.- Specified by:
extractin interfaceMetadataExtracter- Overrides:
extractin classAbstractMappingMetadataExtracter- Parameters:
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.- Returns:
- Returns a map of all properties on the destination map that were added or modified. If the return map is empty, then no properties were modified.
- See Also:
-
extractRaw
Deprecated.This is not required as the- Specified by:
extractRawin classAbstractMappingMetadataExtracter- Parameters:
reader- the document to extract the values from. This stream provided by the reader must be closed if accessed directly.- Returns:
- Returns a map of document property values keyed by property name.
- Throws:
Throwable- All exception conditions can be handled.- See Also:
-