public class StringExtractingContentTransformer extends AbstractContentTransformer2
The transformation is sensitive to the source and target string encodings.
| Modifier and Type | Field and Description |
|---|---|
static String |
PREFIX_TEXT |
transformerDebugtransformerConfig| Constructor and Description |
|---|
StringExtractingContentTransformer() |
| Modifier and Type | Method and Description |
|---|---|
String |
getComments(boolean available)
Overridden to supply a comment or String of commented out transformation properties
that specify any (hard coded or implied) supported transformations.
|
boolean |
isTransformableMimetype(String sourceMimetype,
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, getExecutorService, getRetryTransformOnDifferentMimeType, getStrictMimeTypeCheck, getTransformationTime, getTransformationTime, isTransformationLimitedInternally, recordError, recordTime, recordTime, register, setAdditionalThreadTimout, setExecutorService, setRegisterTransformer, setRegistry, setRetryTransformOnDifferentMimeType, setStrictMimeTypeCheck, setUseTimeoutThread, toString, transform, transform, transformgetLimits, getLimits, getLimits, getMaxPages, getMaxSourceSizeKBytes, getMaxSourceSizeKBytes, getPageLimit, getReadLimitKBytes, getReadLimitTimeMs, getTimeoutMs, isPageLimitSupported, isTransformable, isTransformable, isTransformableSize, setLimits, setMaxPages, setMaxSourceSizeKBytes, setMimetypeLimits, setPageLimit, setPageLimitsSupported, setReaderLimits, setReadLimitKBytes, setReadLimitTimeMs, setTimeoutMs, setTransformerDebugdeprecatedSetter, equals, getBeanName, getCommentsOnlySupports, getExtensionOrAny, getMimetype, getMimetypeService, getName, getSimpleName, hashCode, isExplicitTransformation, isSupportedTransformation, onlySupports, setBeanName, setExplicitTransformations, setMimetypeService, setSupportedTransformations, setTransformerConfig, setUnsupportedTransformationsclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetName, isExplicitTransformationpublic static final String PREFIX_TEXT
public boolean isTransformableMimetype(String sourceMimetype, 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 String getComments(boolean available)
ContentTransformerHelperAbstractContentTransformerLimits.isTransformableMimetype(String, String, TransformationOptions)
or ContentTransformerWorker.isTransformable(String, String, TransformationOptions)
have been overridden.
See ContentTransformerHelper.getCommentsOnlySupports(List, List, boolean) which may be used to help construct a comment.getComments in interface ContentTransformergetComments in class ContentTransformerHelperavailable - indicates if the transformer has been registered and is available to be selected.
false indicates that the transformer is only available as a component of a
complex transformer.public void transformInternal(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
TransformationOptions options)
throws 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.Exception - exceptions will be handled by this class - subclasses can throw anythingCopyright © 2005–2018 Alfresco Software. All rights reserved.