Package net.sf.okapi.filters.xml
Class XMLFilter
- java.lang.Object
-
- net.sf.okapi.filters.its.ITSFilter
-
- net.sf.okapi.filters.xml.XMLFilter
-
- All Implemented Interfaces:
AutoCloseable,Iterator<Event>,IFilter
public class XMLFilter extends ITSFilter
-
-
Field Summary
-
Fields inherited from class net.sf.okapi.filters.its.ITSFilter
doc, docName, encoderManager, encoding, fcMapper, hasUTF8BOM, input, lineBreak, params, skel, srcLang
-
Fields inherited from interface net.sf.okapi.common.filters.IFilter
SUB_FILTER
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ISkeletonWritercreateSkeletonWriter()Creates a new ISkeletonWriter object that corresponds to the type of skeleton this filter uses.protected voidcreateStartDocumentSkeleton(StartDocument startDoc)List<FilterConfiguration>getConfigurations()Gets the list of all predefined configurations for this filter.StringgetDisplayName()Gets the localizable display name of this filter.EncoderManagergetEncoderManager()Gets the EncoderManager object for this filter.StringgetMimeType()Gets the MIME type of the format supported by this filter.StringgetName()Gets the name/identifier of this filter.protected voidinitializeDocument()-
Methods inherited from class net.sf.okapi.filters.its.ITSFilter
applyRules, cancel, close, createFilterWriter, getParameters, getTargetPointerEntry, hasNext, next, open, open, setFilterConfigurationMapper, setITSVariables, setParameters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
XMLFilter
public XMLFilter()
-
XMLFilter
protected XMLFilter(String mimeType)
Constructor for sub-classing with a different MIME type.Sub-classes that override
getMimeType()should call this constructor with the same MIME type as defined in theirgetMimeType()method.- Parameters:
mimeType- The same MIME type as the one provided bygetMimeType().
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:IFilterGets the name/identifier of this filter.- Returns:
- The name/identifier of the filter.
-
getDisplayName
public String getDisplayName()
Description copied from interface:IFilterGets the localizable display name of this filter.- Returns:
- the localizable display name of this filter.
-
getMimeType
public String getMimeType()
Description copied from interface:IFilterGets the MIME type of the format supported by this filter.- Specified by:
getMimeTypein interfaceIFilter- Overrides:
getMimeTypein classITSFilter- Returns:
- The MIME type of the format supported by this filter.
-
getConfigurations
public List<FilterConfiguration> getConfigurations()
Description copied from interface:IFilterGets the list of all predefined configurations for this filter.- Returns:
- a list of the all predefined configurations for this filter.
-
createSkeletonWriter
public ISkeletonWriter createSkeletonWriter()
Description copied from interface:IFilterCreates a new ISkeletonWriter object that corresponds to the type of skeleton this filter uses.- Specified by:
createSkeletonWriterin interfaceIFilter- Specified by:
createSkeletonWriterin classITSFilter- Returns:
- A new instance of ISkeletonWriter for the type of skeleton this filter uses.
-
getEncoderManager
public EncoderManager getEncoderManager()
Description copied from interface:IFilterGets the EncoderManager object for this filter. This encoder manager should provided the mappings to the different MIME types used by the filter.- Returns:
- the EncoderManager for this filter.
-
initializeDocument
protected void initializeDocument()
- Specified by:
initializeDocumentin classITSFilter
-
createStartDocumentSkeleton
protected void createStartDocumentSkeleton(StartDocument startDoc)
- Specified by:
createStartDocumentSkeletonin classITSFilter
-
-