|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.okapi.common.filterwriter.ext.XLIFFWriter
public class XLIFFWriter
Writer for creating XLIFF document.
Field Summary | |
---|---|
static java.lang.String |
OKP_ENGINE
Name of the Okapi XLIFF extension engine. |
static java.lang.String |
OKP_MATCHTYPE
Name of the Okapi XLIFF extension matchType. |
Constructor Summary | |
---|---|
XLIFFWriter()
Creates an XLIFF writer object. |
Method Summary | |
---|---|
void |
cancel()
|
void |
close()
Writes the end of this the document and close it. |
void |
create(java.lang.String xliffPath,
java.lang.String skeletonPath,
net.sf.okapi.common.LocaleId srcLoc,
net.sf.okapi.common.LocaleId trgLoc,
java.lang.String dataType,
java.lang.String original,
java.lang.String message)
Creates a new XLIFF document. |
net.sf.okapi.common.encoder.EncoderManager |
getEncoderManager()
|
java.lang.String |
getName()
|
net.sf.okapi.common.IParameters |
getParameters()
|
net.sf.okapi.common.skeleton.ISkeletonWriter |
getSkeletonWriter()
|
net.sf.okapi.common.Event |
handleEvent(net.sf.okapi.common.Event event)
|
void |
setOptions(net.sf.okapi.common.LocaleId locale,
java.lang.String defaultEncoding)
|
void |
setOutput(java.io.OutputStream output)
|
void |
setOutput(java.lang.String path)
|
void |
setParameters(net.sf.okapi.common.IParameters params)
|
void |
writeEndFile()
Writes the end of a <file> element. |
void |
writeEndGroup()
Writes the end of a <group> element. |
void |
writeStartFile(java.lang.String original,
java.lang.String dataType,
java.lang.String skeletonPath)
Writes the start of a <file> element. |
void |
writeStartFile(java.lang.String original,
java.lang.String dataType,
java.lang.String skeletonPath,
java.lang.String extraForHeader)
Writes the start of a <file> element. |
void |
writeStartGroup(java.lang.String id,
java.lang.String resName,
java.lang.String resType)
Writes the start of a <group> element. |
void |
writeTextUnit(net.sf.okapi.common.resource.ITextUnit tu)
Writes a text unit as a <trans-unit> element. |
void |
writeTextUnit(net.sf.okapi.common.resource.ITextUnit tu,
java.lang.String phaseName)
Writes a text unit as a <trans-unit> element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OKP_MATCHTYPE
public static final java.lang.String OKP_ENGINE
Constructor Detail |
---|
public XLIFFWriter()
Method Detail |
---|
public void create(java.lang.String xliffPath, java.lang.String skeletonPath, net.sf.okapi.common.LocaleId srcLoc, net.sf.okapi.common.LocaleId trgLoc, java.lang.String dataType, java.lang.String original, java.lang.String message)
xliffPath
- the full path of the document to create.skeletonPath
- the path for the skeleton, or null for no skeleton.srcLoc
- the source locale.trgLoc
- the target locale, or null for no target.dataType
- the value for the datatype
attribute.original
- the value for the original
attribute.message
- optional comment to put at the top of the document (can be null).public void close()
close
in interface net.sf.okapi.common.filterwriter.IFilterWriter
public void writeStartFile(java.lang.String original, java.lang.String dataType, java.lang.String skeletonPath)
each call to this method must have a corresponding call to writeEndFile()
.
original
- the value for the original
attribute. If null: "unknown" is used.dataType
- the value for the datatype
attribute. If null: "x-undefined" is used.skeletonPath
- optional external skeleton information, or null.writeEndFile()
public void writeStartFile(java.lang.String original, java.lang.String dataType, java.lang.String skeletonPath, java.lang.String extraForHeader)
each call to this method must have a corresponding call to writeEndFile()
.
original
- the value for the original
attribute. If null: "unknown" is used.dataType
- the value for the datatype
attribute. If null: "x-undefined" is used.skeletonPath
- optional external skeleton information, or null.extraForHeader
- optional extra raw valid XLIFF to place in the header, or null.writeEndFile()
public void writeEndFile()
writeStartFile(String, String, String)
.
writeStartFile(String, String, String)
public void writeStartGroup(java.lang.String id, java.lang.String resName, java.lang.String resType)
id
- the value for the id
attribute of the group (must not be null).resName
- the value for the resname
attribute of the group (can be null).resType
- the value for the restype
attribute of the group (can be null).writeEndGroup()
public void writeEndGroup()
writeStartGroup(String, String, String).
public void writeTextUnit(net.sf.okapi.common.resource.ITextUnit tu)
tu
- the text unit to output.public void writeTextUnit(net.sf.okapi.common.resource.ITextUnit tu, java.lang.String phaseName)
tu
- the text unit to output.public void cancel()
cancel
in interface net.sf.okapi.common.filterwriter.IFilterWriter
public net.sf.okapi.common.encoder.EncoderManager getEncoderManager()
getEncoderManager
in interface net.sf.okapi.common.filterwriter.IFilterWriter
public net.sf.okapi.common.skeleton.ISkeletonWriter getSkeletonWriter()
getSkeletonWriter
in interface net.sf.okapi.common.filterwriter.IFilterWriter
public java.lang.String getName()
getName
in interface net.sf.okapi.common.filterwriter.IFilterWriter
public net.sf.okapi.common.IParameters getParameters()
getParameters
in interface net.sf.okapi.common.filterwriter.IFilterWriter
public net.sf.okapi.common.Event handleEvent(net.sf.okapi.common.Event event)
handleEvent
in interface net.sf.okapi.common.filterwriter.IFilterWriter
public void setOptions(net.sf.okapi.common.LocaleId locale, java.lang.String defaultEncoding)
setOptions
in interface net.sf.okapi.common.filterwriter.IFilterWriter
public void setOutput(java.lang.String path)
setOutput
in interface net.sf.okapi.common.filterwriter.IFilterWriter
public void setOutput(java.io.OutputStream output)
setOutput
in interface net.sf.okapi.common.filterwriter.IFilterWriter
public void setParameters(net.sf.okapi.common.IParameters params)
setParameters
in interface net.sf.okapi.common.filterwriter.IFilterWriter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |