|
|||||||||
| 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. |
IFilterWriter |
createFilterWriter()
Creates a new IFilterWriter object from the most appropriate class to use with this filter. |
ISkeletonWriter |
createSkeletonWriter()
Creates a new ISkeletonWriter object that corresponds to the type of skeleton this filter uses. |
java.util.List<FilterConfiguration> |
getConfigurations()
Gets the list of all predefined configurations for this filter. |
java.lang.String |
getDisplayName()
Gets the localizable display name of this filter. |
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. |
IParameters |
getParameters()
Gets the current parameters for this filter. |
boolean |
hasNext()
Indicates if there is an event to process. |
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 |
setParameters(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(RawDocument input)
input - The RawDocument object to use to open the document.
void open(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.
Event next()
void cancel()
IParameters getParameters()
void setParameters(IParameters params)
params - The new parameters to use.void setFilterConfigurationMapper(IFilterConfigurationMapper fcMapper)
fcMapper - the mapper to set.ISkeletonWriter createSkeletonWriter()
IFilterWriter createFilterWriter()
EncoderManager getEncoderManager()
java.lang.String getMimeType()
java.util.List<FilterConfiguration> getConfigurations()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||