public class StringExtractingContentTransformer extends AbstractContentTransformer2
The transformation is sensitive to the source and target string encodings.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PREFIX_TEXT |
transformerDebug| Constructor and Description |
|---|
StringExtractingContentTransformer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isTransformableMimetype(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Gives a high reliability for all translations from text/sometype to
text/plain.
|
void |
transformInternal(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
TransformationOptions options)
Text to text conversions are done directly using the content reader and writer string
manipulation methods.
|
checkTransformable, getTransformationTime, recordTime, register, setProperties, setRegistry, toString, transform, transform, transformgetBeanName, getLimits, getLimits, getLimits, getMaxPages, getMaxSourceSizeKBytes, getMaxSourceSizeKBytes, getMimetypeLimits, getPageLimit, getReadLimitKBytes, getReadLimitTimeMs, getTimeoutMs, isPageLimitSupported, isTransformable, isTransformable, isTransformableSize, setBeanName, setLimits, setMaxPages, setMaxSourceSizeKBytes, setMimetypeLimits, setPageLimit, setPageLimitsSuported, setReaderLimits, setReadLimitKBytes, setReadLimitTimeMs, setTimeoutMs, setTransformerDebuggetMimetype, getMimetypeService, isExplicitTransformation, isSupportedTransformation, setExplicitTransformations, setMimetypeService, setSupportedTransformationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisExplicitTransformationpublic static final java.lang.String PREFIX_TEXT
public boolean isTransformableMimetype(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Extraction of text from binary data is wholly unreliable.
isTransformableMimetype in interface ContentTransformerisTransformableMimetype in class AbstractContentTransformerLimitssourceMimetype - the source mimetypetargetMimetype - the target mimetypeoptions - the transformation optionspublic void transformInternal(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
TransformationOptions options)
throws java.lang.Exception
Extraction of text from binary content attempts to take the possible character encoding into account. The text produced from this will, if the encoding was correct, be unformatted but valid.
transformInternal in class AbstractContentTransformer2reader - the source of the content to transformwriter - the target to which to write the transformed contentoptions - a map of options to use when performing the transformation. The map
will never be null.java.lang.Exception - exceptions will be handled by this class - subclasses can throw anythingCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.