Class XINIRainbowkitWriter
- java.lang.Object
-
- net.sf.okapi.filters.xini.rainbowkit.FilterEventToXiniTransformer
-
- net.sf.okapi.filters.xini.rainbowkit.XINIRainbowkitWriter
-
- All Implemented Interfaces:
AutoCloseable
,IFilterWriter
public class XINIRainbowkitWriter extends FilterEventToXiniTransformer implements IFilterWriter
-
-
Field Summary
-
Fields inherited from class net.sf.okapi.filters.xini.rainbowkit.FilterEventToXiniTransformer
FIELD_LABEL_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description XINIRainbowkitWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Cancels the current process.void
close()
Closes the output.EncoderManager
getEncoderManager()
Gets the current encoder manager for this writer.String
getName()
Gets the name of this writer.IParameters
getParameters()
Gets the current parameters for this writer.ISkeletonWriter
getSkeletonWriter()
Gets the skeleton writer associated with this writer.Event
handleEvent(Event event)
Handles the filter events.void
setNextPageName(String nextPageName)
void
setOptions(LocaleId locale, String defaultEncoding)
Sets the options for this writer.void
setOutput(OutputStream output)
Sets the output through its output stream.void
setOutput(String path)
Sets the output through the path of the output file.void
setOutputPath(String path)
void
setParameters(IParameters params)
Sets new parameters for this writer.void
writeXINI()
-
Methods inherited from class net.sf.okapi.filters.xini.rainbowkit.FilterEventToXiniTransformer
getAdditionalWordsCount, init, marshall, popGroupFromStack, pushGroupToStack, startPage, transformTextUnit
-
-
-
-
Method Detail
-
cancel
public void cancel()
Description copied from interface:IFilterWriter
Cancels the current process.- Specified by:
cancel
in interfaceIFilterWriter
-
close
public void close()
Description copied from interface:IFilterWriter
Closes the output. Developers must make sure this method is safe to call even if there is nothing to close.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceIFilterWriter
-
getName
public String getName()
Description copied from interface:IFilterWriter
Gets the name of this writer.- Specified by:
getName
in interfaceIFilterWriter
- Returns:
- The name of the writer.
-
setOptions
public void setOptions(LocaleId locale, String defaultEncoding)
Description copied from interface:IFilterWriter
Sets the options for this writer.- Specified by:
setOptions
in interfaceIFilterWriter
- Parameters:
locale
- the output locale.defaultEncoding
- Name of the character set encoding for the output.
-
setOutput
public void setOutput(String path)
Description copied from interface:IFilterWriter
Sets the output through the path of the output file.- Specified by:
setOutput
in interfaceIFilterWriter
- Parameters:
path
- Full path of the output file.
-
setOutput
public void setOutput(OutputStream output)
Description copied from interface:IFilterWriter
Sets the output through its output stream.- Specified by:
setOutput
in interfaceIFilterWriter
- Parameters:
output
- Output stream to use for the output.
-
handleEvent
public Event handleEvent(Event event)
Description copied from interface:IFilterWriter
Handles the filter events.- Specified by:
handleEvent
in interfaceIFilterWriter
- Parameters:
event
- The event to process.- Returns:
- The event that was processed.
-
writeXINI
public void writeXINI()
-
getParameters
public IParameters getParameters()
Description copied from interface:IFilterWriter
Gets the current parameters for this writer.- Specified by:
getParameters
in interfaceIFilterWriter
- Returns:
- The current parameters for this writer.
-
setParameters
public void setParameters(IParameters params)
Description copied from interface:IFilterWriter
Sets new parameters for this writer.- Specified by:
setParameters
in interfaceIFilterWriter
- Parameters:
params
- The new parameters to use.
-
getEncoderManager
public EncoderManager getEncoderManager()
Description copied from interface:IFilterWriter
Gets the current encoder manager for this writer. Some special implementation of IFilterWriter may not use an encoder manager (for example writers that do not use skeleton).- Specified by:
getEncoderManager
in interfaceIFilterWriter
- Returns:
- the current encoder manager for this writer, or null if none exists for this writer.
-
setOutputPath
public void setOutputPath(String path)
-
getSkeletonWriter
public ISkeletonWriter getSkeletonWriter()
Description copied from interface:IFilterWriter
Gets the skeleton writer associated with this writer. Some implementation of IFilterWriter may not use a skeleton writer.- Specified by:
getSkeletonWriter
in interfaceIFilterWriter
- Returns:
- the skeleton writer associated with this writer or null if none is associated.
-
setNextPageName
public void setNextPageName(String nextPageName)
-
-