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, supportedDateFormats| 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.
|
checkIsSupported, extract, extract, filterSystemProperties, getExtractionTime, getMapping, getMimetypeService, getReliability, isSupported, makeDate, newRawMap, putRawValue, readMappingProperties, readMappingProperties, register, setDictionaryService, setFailOnTypeConversion, setInheritDefaultMapping, setMapping, setMappingProperties, setMimetypeService, setOverwritePolicy, setOverwritePolicy, setRegistry, setSupportedDateFormats, 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 - 2010 Alfresco Software, Inc. All Rights Reserved.