|
|||||||||
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(ContentReader reader)
Deprecated. Checks if the mimetype is supported. |
java.util.Map |
extract(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(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(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(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 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(MimetypeService mimetypeService)
Deprecated. Helper setter of the mimetype service. |
void |
setRegistry(MetadataExtracterRegistry registry)
Deprecated. Set the registry to register with |
protected boolean |
trimPut(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(MimetypeService mimetypeService)
mimetypeService
- protected MimetypeService getMimetypeService()
public void register()
AbstractMetadataExtracter.setRegistry(MetadataExtracterRegistry)
public double getReliability(java.lang.String mimetype)
getReliability
in interface MetadataExtracter
mimetype
- the mimetype to check
public boolean isSupported(java.lang.String mimetype)
isSupported
in interface MetadataExtracter
mimetype
- the document mimetype
reliability
is greater than 0public long getExtractionTime()
MetadataExtracter
This 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 MetadataExtracter
protected void checkReliability(ContentReader reader)
reader
- the reader to check
org.alfresco.error.AlfrescoRuntimeException
- if the mimetype is not supportedpublic java.util.Map extract(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 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 java.util.Map extract(ContentReader reader, MetadataExtracter.OverwritePolicy overwritePolicy, java.util.Map destination) throws 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 MetadataExtracter
propertyMapping
- ignored
ContentIOException
- if a detectable error occursAbstractMetadataExtracter.extract(ContentReader, Map)
public final java.util.Map extract(ContentReader reader, MetadataExtracter.OverwritePolicy overwritePolicy, java.util.Map destination, java.util.Map propertyMapping) throws 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 MetadataExtracter
overwritePolicy
- ignoredpropertyMapping
- ignoredreader
- the source of the contentdestination
- the map of properties to populate (essentially a return value)
ContentIOException
- if a detectable error occursAbstractMetadataExtracter.extract(ContentReader, Map)
protected abstract void extractInternal(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 exceptionprotected boolean trimPut(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 |