|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.okapi.common.filterwriter.ext.TMXContent
public class TMXContent
Handles the conversion between a coded text object and TMX.
Field Summary | |
---|---|
static int |
CODEMODE_EMPTY
Indicates that the inline codes should contain nothing. |
static int |
CODEMODE_GENERIC
Indicates that the inline codes should contain generic codes (e.g. <1>,1>,<2/>) |
static int |
CODEMODE_LETTERCODED
Indicates that the inline codes should contain letter-codes generic inline code (like OmegaT (e.g. |
static int |
CODEMODE_ORIGINAL
Indicates that the inline codes should contain the original code. |
Constructor Summary | |
---|---|
TMXContent()
Creates a new TMXContent object without any content. |
|
TMXContent(net.sf.okapi.common.resource.TextFragment content)
Creates a new TMXContent object and set its content to the given fragment. |
Method Summary | |
---|---|
int |
getCodeMode()
Gets the flag for the code mode currently set. |
boolean |
getLetterCodedMode()
Indicates if this formatter is set to output letter-coded content. |
void |
setCodeMode(int codeMode)
Sets the type of content the inline codes should be output. |
TMXContent |
setContent(net.sf.okapi.common.resource.TextFragment content)
Sets the fragment to format. |
void |
setLetterCodedMode(boolean value,
boolean zeroBased)
Sets the flag that indicates if the TMX generated should use letter-coded inline content. |
void |
setQuoteMode(int quoteMode)
Sets the default quote mode. |
void |
setTradosWorkarounds(boolean value)
Sets the flag that indicates if the TMX generated should use workarounds so the output can be read in some versions of Trados Translators' Workbench that have bugs leading to the lose of data. |
java.lang.String |
toString()
Generates a TMX string from the content. |
java.lang.String |
toString(int quoteMode,
boolean escapeGT)
Generates a TMX string from the content. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int CODEMODE_ORIGINAL
public static final int CODEMODE_EMPTY
public static final int CODEMODE_GENERIC
public static final int CODEMODE_LETTERCODED
Constructor Detail |
---|
public TMXContent()
public TMXContent(net.sf.okapi.common.resource.TextFragment content)
content
- The TextFragment object to format.Method Detail |
---|
public void setTradosWorkarounds(boolean value)
value
- true to use workarounds, false to not use workarounds.public void setLetterCodedMode(boolean value, boolean zeroBased)
creationtool
must be set to "OmegaT".
value
- true to use workarounds, false to not use workarounds.zeroBased
- true to have 0-based code, false for unaltered IDs.public boolean getLetterCodedMode()
public void setQuoteMode(int quoteMode)
toString()
instead of toString(int, boolean)
.
quoteMode
- 0=no quote escaped, 1=apos and quot, 2=#39 and quot,
and 3=quot only.public void setCodeMode(int codeMode)
codeMode
- the code for the inline code mode: one of the CODEMODE_...
codes.public int getCodeMode()
CODEMODE_...
codes.public TMXContent setContent(net.sf.okapi.common.resource.TextFragment content)
content
- The TextFragment object to format.
public java.lang.String toString()
setQuoteMode(int)
or 1 by default.
toString
in class java.lang.Object
public java.lang.String toString(int quoteMode, boolean escapeGT)
quoteMode
- 0=no quote escaped, 1=apos and quot, 2=#39 and quot,
and 3=quot only.escapeGT
- True to always escape '>' to gt.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |