|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IFilter
Common set of methods to extract translatable text and its associated data.
The following example shows a typical use of IFilter:
MyUtlity myUtility = new MyUtility(); // Some object that do things with filter events IFilter filter = new MyFilter(); // A filter implementation filter.open(new RawDocument(URI("myFile.ext"), "UTF-8", "en"); while ( filter.hasNext() ) { myUtility.handleEvent(filter.next()); } filter.close();
Field Summary | |
---|---|
static java.lang.String |
SUB_FILTER
Prefix marker indicating a sub-filter in the name of a StartDocument object created
when processing content with sub-filters. |
Method Summary | |
---|---|
void |
cancel()
Cancels the current process. |
void |
close()
Closes the input document. |
net.sf.okapi.common.filterwriter.IFilterWriter |
createFilterWriter()
Creates a new IFilterWriter object from the most appropriate class to use with this filter. |
net.sf.okapi.common.skeleton.ISkeletonWriter |
createSkeletonWriter()
Creates a new ISkeletonWriter object that corresponds to the type of skeleton this filter uses. |
java.util.List<net.sf.okapi.common.filters.FilterConfiguration> |
getConfigurations()
Gets the list of all predefined configurations for this filter. |
java.lang.String |
getDisplayName()
Gets the localizable display name of this filter. |
net.sf.okapi.common.encoder.EncoderManager |
getEncoderManager()
Gets the EncoderManager object for this filter. |
java.lang.String |
getMimeType()
Gets the MIME type of the format supported by this filter. |
java.lang.String |
getName()
Gets the name/identifier of this filter. |
net.sf.okapi.common.IParameters |
getParameters()
Gets the current parameters for this filter. |
boolean |
hasNext()
Indicates if there is an event to process. |
net.sf.okapi.common.Event |
next()
Gets the next event available. |
void |
open(net.sf.okapi.common.resource.RawDocument input)
Opens the input document described in a give RawDocument object. |
void |
open(net.sf.okapi.common.resource.RawDocument input,
boolean generateSkeleton)
Opens the input document described in a give RawDocument object, and optionally creates skeleton information. |
void |
setFilterConfigurationMapper(net.sf.okapi.common.filters.IFilterConfigurationMapper fcMapper)
Sets the filter configuration mapper for this filter. |
void |
setParameters(net.sf.okapi.common.IParameters params)
Sets new parameters for this filter. |
Field Detail |
---|
static final java.lang.String SUB_FILTER
StartDocument
object created
when processing content with sub-filters.
Method Detail |
---|
java.lang.String getName()
java.lang.String getDisplayName()
void open(net.sf.okapi.common.resource.RawDocument input)
input
- The RawDocument object to use to open the document.void open(net.sf.okapi.common.resource.RawDocument input, boolean generateSkeleton)
input
- The RawDocument object to use to open the document.void close()
boolean hasNext()
Implementer Note: The caller must be able to call this method several times without changing state.
net.sf.okapi.common.Event next()
void cancel()
net.sf.okapi.common.IParameters getParameters()
void setParameters(net.sf.okapi.common.IParameters params)
params
- The new parameters to use.void setFilterConfigurationMapper(net.sf.okapi.common.filters.IFilterConfigurationMapper fcMapper)
fcMapper
- the mapper to set.net.sf.okapi.common.skeleton.ISkeletonWriter createSkeletonWriter()
net.sf.okapi.common.filterwriter.IFilterWriter createFilterWriter()
net.sf.okapi.common.encoder.EncoderManager getEncoderManager()
java.lang.String getMimeType()
java.util.List<net.sf.okapi.common.filters.FilterConfiguration> getConfigurations()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |