public abstract class AbstractDocumentTransformer extends AbstractImporterHandler implements IDocumentTransformer
IXMLConfigurable
configuration:
<restrictTo caseSensitive="[false|true]" field="(name of header/metadata field name to match)"> (regular expression of value to match) </restrictTo> <!-- multiple "restrictTo" tags allowed (only one needs to match) -->
Constructor and Description |
---|
AbstractDocumentTransformer() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
transformApplicableDocument(String reference,
InputStream input,
OutputStream output,
ImporterMetadata metadata,
boolean parsed) |
void |
transformDocument(String reference,
InputStream input,
OutputStream output,
ImporterMetadata metadata,
boolean parsed)
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(String reference, InputStream input, OutputStream output, ImporterMetadata metadata, boolean parsed) throws ImporterHandlerException
IDocumentTransformer
transformDocument
in interface IDocumentTransformer
reference
- document reference (e.g. URL)input
- document to transformoutput
- transformed documentmetadata
- document metadataparsed
- 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(String reference, InputStream input, OutputStream output, ImporterMetadata metadata, boolean parsed) throws ImporterHandlerException
ImporterHandlerException
Copyright © 2009–2021 Norconex Inc.. All rights reserved.