|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.content.metadata.AbstractMetadataExtracter
AbstractMappingMetadataExtracter
public abstract class AbstractMetadataExtracter
Support class for metadata extracters.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.alfresco.repo.content.metadata.MetadataExtracter |
|---|
MetadataExtracter.OverwritePolicy |
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
logger
Deprecated. |
| Constructor Summary | |
|---|---|
protected |
AbstractMetadataExtracter(java.util.Set supportedMimetypes,
double reliability,
long extractionTime)
Deprecated. |
protected |
AbstractMetadataExtracter(java.lang.String supportedMimetype,
double reliability,
long extractionTime)
Deprecated. |
| Method Summary | |
|---|---|
protected void |
checkReliability(org.alfresco.service.cmr.repository.ContentReader reader)
Deprecated. Checks if the mimetype is supported. |
java.util.Map |
extract(org.alfresco.service.cmr.repository.ContentReader reader,
java.util.Map destination)
Deprecated. Extracts the metadata values from the content provided by the reader and source mimetype to the supplied map. |
java.util.Map |
extract(org.alfresco.service.cmr.repository.ContentReader reader,
MetadataExtracter.OverwritePolicy overwritePolicy,
java.util.Map destination)
Deprecated. Extracts the metadata values from the content provided by the reader and source mimetype to the supplied map. |
java.util.Map |
extract(org.alfresco.service.cmr.repository.ContentReader reader,
MetadataExtracter.OverwritePolicy overwritePolicy,
java.util.Map destination,
java.util.Map propertyMapping)
Deprecated. Extracts the metadata from the content provided by the reader and source mimetype to the supplied map. |
protected abstract void |
extractInternal(org.alfresco.service.cmr.repository.ContentReader reader,
java.util.Map destination)
Deprecated. Consider deriving from the more configurable AbstractMappingMetadataExtracter |
long |
getExtractionTime()
Deprecated. Provides an estimate, usually a worst case guess, of how long an extraction will take. |
protected org.alfresco.service.cmr.repository.MimetypeService |
getMimetypeService()
Deprecated. |
double |
getReliability(java.lang.String mimetype)
Deprecated. Default reliability check that returns the reliability as configured by the contstructor if the mimetype is in the list of supported mimetypes. |
boolean |
isSupported(java.lang.String mimetype)
Deprecated. Determines if the extracter works against the given mimetype. |
void |
register()
Deprecated. Registers this instance of the extracter with the registry. |
void |
setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
Deprecated. Helper setter of the mimetype service. |
void |
setRegistry(MetadataExtracterRegistry registry)
Deprecated. Set the registry to register with |
protected boolean |
trimPut(org.alfresco.service.namespace.QName prop,
java.lang.Object value,
java.util.Map destination)
Deprecated. Examines a value or string for nulls and adds it to the map (if non-empty) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.commons.logging.Log logger
| Constructor Detail |
|---|
protected AbstractMetadataExtracter(java.lang.String supportedMimetype,
double reliability,
long extractionTime)
protected AbstractMetadataExtracter(java.util.Set supportedMimetypes,
double reliability,
long extractionTime)
| Method Detail |
|---|
public void setRegistry(MetadataExtracterRegistry registry)
registry - a metadata extracter registrypublic void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
mimetypeService - protected org.alfresco.service.cmr.repository.MimetypeService getMimetypeService()
public void register()
AbstractMetadataExtracter.setRegistry(MetadataExtracterRegistry)public double getReliability(java.lang.String mimetype)
getReliability in interface MetadataExtractermimetype - the mimetype to check
public boolean isSupported(java.lang.String mimetype)
isSupported in interface MetadataExtractermimetype - the document mimetype
reliability
is greater than 0public long getExtractionTime()
MetadataExtracterThis method is used to determine, up front, which of a set of equally reliant transformers will be used for a specific extraction.
getExtractionTime in interface MetadataExtracterprotected void checkReliability(org.alfresco.service.cmr.repository.ContentReader reader)
reader - the reader to check
org.alfresco.error.AlfrescoRuntimeException - if the mimetype is not supported
public java.util.Map extract(org.alfresco.service.cmr.repository.ContentReader reader,
java.util.Map 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.
A pragmatic overwrite policy will be applied.
extract in interface MetadataExtracterreader - the source of the contentdestination - the map of properties to populate (essentially a return value)
MetadataExtracter.extract(ContentReader, OverwritePolicy, Map, Map)
public final java.util.Map extract(org.alfresco.service.cmr.repository.ContentReader reader,
MetadataExtracter.OverwritePolicy overwritePolicy,
java.util.Map destination)
throws org.alfresco.service.cmr.repository.ContentIOException
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 MetadataExtracterpropertyMapping - ignored
org.alfresco.service.cmr.repository.ContentIOException - if a detectable error occursAbstractMetadataExtracter.extract(ContentReader, Map)
public final java.util.Map extract(org.alfresco.service.cmr.repository.ContentReader reader,
MetadataExtracter.OverwritePolicy overwritePolicy,
java.util.Map destination,
java.util.Map propertyMapping)
throws org.alfresco.service.cmr.repository.ContentIOException
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 MetadataExtracteroverwritePolicy - ignoredpropertyMapping - ignoredreader - the source of the contentdestination - the map of properties to populate (essentially a return value)
org.alfresco.service.cmr.repository.ContentIOException - if a detectable error occursAbstractMetadataExtracter.extract(ContentReader, Map)
protected abstract void extractInternal(org.alfresco.service.cmr.repository.ContentReader reader,
java.util.Map destination)
throws java.lang.Throwable
AbstractMappingMetadataExtracter
reader - the source of the contentdestination - the property map to fill
java.lang.Throwable - an exception
protected boolean trimPut(org.alfresco.service.namespace.QName prop,
java.lang.Object value,
java.util.Map destination)
prop - Alfresco's ContentModel.PROP_ to set.value - Value to set it todestination - Map into which to set it
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||