public abstract class AbstractDocumentTransformer extends AbstractImporterHandler implements IDocumentTransformer
Base class for transformers.
Subclasses inherit this IXMLConfigurable
configuration:
<!-- multiple "restrictTo" tags allowed (only one needs to match) -->
<restrictTo>
<fieldMatcher
method="[basic|csv|wildcard|regex]"
ignoreCase="[false|true]"
ignoreDiacritic="[false|true]"
partial="[false|true]">
(field-matching expression)
</fieldMatcher>
<valueMatcher
method="[basic|csv|wildcard|regex]"
ignoreCase="[false|true]"
ignoreDiacritic="[false|true]"
partial="[false|true]">
(value-matching expression)
</valueMatcher>
</restrictTo>
Constructor and Description |
---|
AbstractDocumentTransformer() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
transformApplicableDocument(HandlerDoc doc,
InputStream input,
OutputStream output,
ParseState parseState) |
void |
transformDocument(HandlerDoc doc,
InputStream input,
OutputStream output,
ParseState parseState)
Transforms document content and metadata.
|
addRestriction, addRestriction, addRestrictions, clearRestrictions, detectCharsetIfBlank, equals, getRestrictions, hashCode, isApplicable, loadFromXML, loadHandlerFromXML, removeRestriction, removeRestriction, saveHandlerToXML, saveToXML, toString
public final void transformDocument(HandlerDoc doc, InputStream input, OutputStream output, ParseState parseState) throws ImporterHandlerException
IDocumentTransformer
transformDocument
in interface IDocumentTransformer
doc
- documentinput
- document content to transformoutput
- transformed document contentparseState
- whether the document has been parsed already or not (a
parsed document should normally be text-based)ImporterHandlerException
- could not transform the documentprotected abstract void transformApplicableDocument(HandlerDoc doc, InputStream input, OutputStream output, ParseState parseState) throws ImporterHandlerException
ImporterHandlerException
Copyright © 2009–2023 Norconex Inc.. All rights reserved.