|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.init.its.process.re.XLIFFProcessor
public class XLIFFProcessor
Service class to write and read XLIFF Files from and to ITS ODT files This class makes heavy use of the filtering mechanisms of the OKAPI Framework to access all TEXT_UNITS.
Constructor Summary | |
---|---|
XLIFFProcessor()
|
Method Summary | |
---|---|
ItsTree<Element> |
backward(java.net.URI resource,
java.net.URI target,
net.sf.okapi.common.LocaleId sourceLocale,
net.sf.okapi.common.LocaleId targetLocale)
Implements the backward process to generate ITS ODT Files from xliff files without loss of content information. |
protected ItsTree<Element> |
findByName(ItsTree<Element> t,
java.lang.String name)
Returns an element by name |
IOResult |
forward(java.net.URI resource,
java.net.URI target,
net.sf.okapi.common.LocaleId sourceLocale,
net.sf.okapi.common.LocaleId targetLocale)
Implements the forward process to create an XLIFF file from an ITS ODT resource |
boolean |
hasDataCategory(ItsTree<Element> child)
returns true, if this subtree contains its to xliff mapping |
boolean |
isLeafGroup(java.lang.String id,
ItsTree<Element> group)
Returns true, if XLIFF group element contains no more groups and is considered a leaf |
protected Element |
mkSpanElement(java.util.Map<ItsAttributes,java.util.List<java.lang.String>> mapping)
Creates a spanning Element |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XLIFFProcessor()
Method Detail |
---|
public IOResult forward(java.net.URI resource, java.net.URI target, net.sf.okapi.common.LocaleId sourceLocale, net.sf.okapi.common.LocaleId targetLocale)
resource
- the resource its odt filetarget
- the target file uri for writing the xliff filesourceLocale
- the source locale. use the static accessor methods to create a
new onetargetLocale
- the target locale
public ItsTree<Element> backward(java.net.URI resource, java.net.URI target, net.sf.okapi.common.LocaleId sourceLocale, net.sf.okapi.common.LocaleId targetLocale)
resource
- the xliff resourcetarget
- the target to generate the odt file
protected ItsTree<Element> findByName(ItsTree<Element> t, java.lang.String name)
t
- name
-
public boolean isLeafGroup(java.lang.String id, ItsTree<Element> group)
id
- the id to look forgroup
- the group element
public boolean hasDataCategory(ItsTree<Element> child)
child
- the child to check for its data category
protected Element mkSpanElement(java.util.Map<ItsAttributes,java.util.List<java.lang.String>> mapping)
mapping
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |