public abstract class ITSFilter extends Object implements IFilter
| Modifier and Type | Field and Description |
|---|---|
protected Document |
doc |
protected String |
docName |
protected EncoderManager |
encoderManager |
protected String |
encoding |
protected IFilterConfigurationMapper |
fcMapper |
protected boolean |
hasUTF8BOM |
protected RawDocument |
input |
protected String |
lineBreak |
protected Parameters |
params |
protected GenericSkeleton |
skel |
protected LocaleId |
srcLang |
SUB_FILTER| Constructor and Description |
|---|
ITSFilter(boolean isHTML5,
String mimeType,
long dataCategoriesToApply) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyRules(ITSEngine itsEng) |
void |
cancel()
Cancels the current process.
|
void |
close()
Closes the input document.
|
IFilterWriter |
createFilterWriter()
Creates a new IFilterWriter object from the most appropriate class to
use with this filter.
|
abstract ISkeletonWriter |
createSkeletonWriter()
Creates a new ISkeletonWriter object that corresponds to the type of skeleton
this filter uses.
|
protected abstract void |
createStartDocumentSkeleton(StartDocument startDoc) |
String |
getMimeType()
Gets the MIME type of the format supported by this filter.
|
Parameters |
getParameters()
Gets the current parameters for this filter.
|
net.sf.okapi.filters.its.TargetPointerEntry |
getTargetPointerEntry(Node node)
Gets the target pointer entry for a given node.
|
boolean |
hasNext()
Indicates if there is an event to process.
|
protected abstract void |
initializeDocument() |
Event |
next()
Gets the next event available.
|
void |
open(RawDocument input)
Opens the input document described in a give RawDocument object.
|
void |
open(RawDocument input,
boolean generateSkeleton)
Opens the input document described in a give RawDocument object, and
optionally creates skeleton information.
|
void |
setFilterConfigurationMapper(IFilterConfigurationMapper fcMapper)
Sets the filter configuration mapper for this filter.
|
void |
setITSVariables(Map<String,String> map)
Sets the ITS variables to pass to the ITS parameters feature.
|
void |
setParameters(IParameters params)
Sets new parameters for this filter.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfigurations, getDisplayName, getEncoderManager, getName, streamforEachRemaining, removeprotected Parameters params
protected EncoderManager encoderManager
protected Document doc
protected RawDocument input
protected String encoding
protected String docName
protected LocaleId srcLang
protected String lineBreak
protected boolean hasUTF8BOM
protected GenericSkeleton skel
protected IFilterConfigurationMapper fcMapper
public ITSFilter(boolean isHTML5,
String mimeType,
long dataCategoriesToApply)
public void setITSVariables(Map<String,String> map)
open(RawDocument, boolean).
Those variables overwrite the default values set in the its;params elements.map - the map of variables to pass. Can be null or empty.public void cancel()
IFilterpublic void close()
IFilterclose in interface AutoCloseableclose in interface IFilterpublic abstract ISkeletonWriter createSkeletonWriter()
IFiltercreateSkeletonWriter in interface IFilterpublic IFilterWriter createFilterWriter()
IFiltercreateFilterWriter in interface IFilterpublic String getMimeType()
IFiltergetMimeType in interface IFilterpublic Parameters getParameters()
IFiltergetParameters in interface IFilterpublic boolean hasNext()
IFilterImplementer Note: The caller must be able to call this method several times without changing state.
public Event next()
IFilterpublic void open(RawDocument input)
IFilterpublic void setFilterConfigurationMapper(IFilterConfigurationMapper fcMapper)
IFiltersetFilterConfigurationMapper in interface IFilterfcMapper - the mapper to set.public void setParameters(IParameters params)
IFiltersetParameters in interface IFilterparams - The new parameters to use.protected abstract void initializeDocument()
protected void applyRules(ITSEngine itsEng)
protected abstract void createStartDocumentSkeleton(StartDocument startDoc)
public void open(RawDocument input, boolean generateSkeleton)
IFilterpublic net.sf.okapi.filters.its.TargetPointerEntry getTargetPointerEntry(Node node)
node - the node to examine.Copyright © 2021. All rights reserved.