Class PropertiesMapper
- java.lang.Object
-
- net.sf.okapi.filters.xliff2.util.PropertiesMapper
-
public class PropertiesMapper extends Object
Saves parameters and other data from the XLIFF Toolkit into Okapi Core and back. These properties are all saved as read only.Since the mapping operation to and from should be equivalent, we put both operations in here to make it easier to compare them. All the methods in here have at least 2 parameters. The first parameter is where the data is being read from, and the second parameter is where the data is being written to.
-
-
Constructor Summary
Constructors Constructor Description PropertiesMapper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidsetCodeProperties(Code okapiCode, CTag xliff2Ctag)Transfers properties from the Okapi Core Code Tag to the XLIFF Toolkit Code Tagstatic voidsetCodeProperties(Code okapiCode, MTag xliff2Mtag)Transfers properties from the Okapi Core Code Tag to the XLIFF Toolkit Code Tagstatic voidsetCodeProperties(CTag xliff2Ctag, Code okapiCode)Transfers properties from the XLIFF Toolkit Code Tag to the Okapi Core Code Tag.static voidsetCodeProperties(MTag xliff2Mtag, Code okapiCode)static voidsetGroupProperties(StartGroup okapiStartGroup, StartGroupData xliffStartGroupData)Transfers properties from the Okapi Core Start Group to the XLIFF 2.0 Start Group Datastatic voidsetGroupProperties(StartGroupData xliffStartGroupData, StartGroup okapiStartGroup)Transfers properties from the XLIFF 2.0 Start Group Data to the Okapi Core Start Groupstatic voidsetPartProperties(TextPart okapiPart, Part xliffPart)Transfers properties from the Okapi Core TextPart to the XLIFF Toolkit Partstatic voidsetPartProperties(Part xliffPart, TextPart okapiPart)Transfers properties from the XLIFF Toolkit Part to the Okapi Core TextPartstatic voidsetStartFileProperties(StartSubDocument okapiStartSubDoc, StartFileData xliffStartFileData)Transfers properties from the Okapi Core StartSubDocument to the XLIFF Toolkit StartFileDatastatic voidsetStartFileProperties(StartFileData xliffStartFileData, StartSubDocument okapiStartSubDoc)Transfers properties from the XLIFF Toolkit StartFileData to the Okapi Core StartSubDocumentstatic voidsetStartXliffProperties(StartDocument okapiStartDocument, StartXliffData xliffStartXliff)Transfers properties from the Okapi Core StartDocument to the XLIFF Toolkit StartXliffDatastatic voidsetStartXliffProperties(StartXliffData xliffStartXliff, StartDocument okapiStartDocument)Transfers properties from the XLIFF Toolkit StartXliffData to the Okapi Core StartDocumentstatic voidsetStateProperty(TextContainer okapiContainer, Part xliffPart)static voidsetTextUnitProperties(ITextUnit okapiTextUnit, Unit xliffTextUnit)Transfers properties from the Okapi Core TextUnit to the XLIFF Toolkit TextUnitstatic voidsetTextUnitProperties(Unit unit, ITextUnit tu)Transfers properties from the XLIFF Toolkit TextUnit to the Okapi Core TextUnit
-
-
-
Method Detail
-
setStartXliffProperties
public static void setStartXliffProperties(StartXliffData xliffStartXliff, StartDocument okapiStartDocument)
Transfers properties from the XLIFF Toolkit StartXliffData to the Okapi Core StartDocumentRelates to <xliff> elements in XLIFF 2.0 file
- Parameters:
xliffStartXliff- The properties to read fromokapiStartDocument- The properties to write to
-
setStartXliffProperties
public static void setStartXliffProperties(StartDocument okapiStartDocument, StartXliffData xliffStartXliff)
Transfers properties from the Okapi Core StartDocument to the XLIFF Toolkit StartXliffDataRelates to <xliff> elements in XLIFF 2.0 file
- Parameters:
okapiStartDocument- The properties to read fromxliffStartXliff- The properties to write to
-
setStartFileProperties
public static void setStartFileProperties(StartFileData xliffStartFileData, StartSubDocument okapiStartSubDoc)
Transfers properties from the XLIFF Toolkit StartFileData to the Okapi Core StartSubDocumentRelates to <file> elements in XLIFF 2.0 file
- Parameters:
xliffStartFileData- The properties to read fromokapiStartSubDoc- The properties to write to
-
setStartFileProperties
public static void setStartFileProperties(StartSubDocument okapiStartSubDoc, StartFileData xliffStartFileData)
Transfers properties from the Okapi Core StartSubDocument to the XLIFF Toolkit StartFileDataRelates to <file> elements in XLIFF 2.0 file
- Parameters:
xliffStartFileData- The properties to read fromokapiStartSubDoc- The properties to write to
-
setGroupProperties
public static void setGroupProperties(StartGroupData xliffStartGroupData, StartGroup okapiStartGroup)
Transfers properties from the XLIFF 2.0 Start Group Data to the Okapi Core Start Group- Parameters:
xliffStartGroupData- The properties to read fromokapiStartGroup- The properties to write to
-
setGroupProperties
public static void setGroupProperties(StartGroup okapiStartGroup, StartGroupData xliffStartGroupData)
Transfers properties from the Okapi Core Start Group to the XLIFF 2.0 Start Group Data- Parameters:
xliffStartGroupData- The properties to write tookapiStartGroup- The properties to read from
-
setTextUnitProperties
public static void setTextUnitProperties(Unit unit, ITextUnit tu)
Transfers properties from the XLIFF Toolkit TextUnit to the Okapi Core TextUnitRelates to <unit> elements in XLIFF 2.0 file
- Parameters:
unit- The properties to read fromtu- The properties to write to
-
setTextUnitProperties
public static void setTextUnitProperties(ITextUnit okapiTextUnit, Unit xliffTextUnit)
Transfers properties from the Okapi Core TextUnit to the XLIFF Toolkit TextUnitRelates to <unit> elements in XLIFF 2.0 file
- Parameters:
okapiTextUnit- The properties to read fromxliffTextUnit- The properties to write to
-
setPartProperties
public static void setPartProperties(Part xliffPart, TextPart okapiPart)
Transfers properties from the XLIFF Toolkit Part to the Okapi Core TextPartRelates to <segment> and <ignorable> elements in XLIFF 2.0 file
- Parameters:
xliffPart- The properties to write tookapiPart- The properties to read from
-
setPartProperties
public static void setPartProperties(TextPart okapiPart, Part xliffPart)
Transfers properties from the Okapi Core TextPart to the XLIFF Toolkit PartRelates to <segment> and <ignorable> elements in XLIFF 2.0 file
- Parameters:
okapiPart- The properties to read fromxliffPart- The properties to write to
-
setStateProperty
public static void setStateProperty(TextContainer okapiContainer, Part xliffPart)
-
setCodeProperties
public static void setCodeProperties(Code okapiCode, CTag xliff2Ctag)
Transfers properties from the Okapi Core Code Tag to the XLIFF Toolkit Code TagRelates to <ph>, <pc>, and <sc> elements in XLIFF 2.0 file
- Parameters:
okapiCode- The properties to read fromxliff2Ctag- The properties to write to
-
setCodeProperties
public static void setCodeProperties(Code okapiCode, MTag xliff2Mtag)
Transfers properties from the Okapi Core Code Tag to the XLIFF Toolkit Code TagRelates to <ph>, <pc>, and <sc> elements in XLIFF 2.0 file
- Parameters:
okapiCode- The properties to read fromxliff2Mtag- The properties to write to
-
setCodeProperties
public static void setCodeProperties(CTag xliff2Ctag, Code okapiCode)
Transfers properties from the XLIFF Toolkit Code Tag to the Okapi Core Code Tag.Relates to <ph>, <pc>, and <sc> elements in XLIFF 2.0 file
- Parameters:
okapiCode- The properties to read fromxliff2Ctag- The properties to write to
-
-