de.init.its.process.re
Class ItsProcessor

java.lang.Object
  extended by de.init.its.process.re.ItsProcessor

public class ItsProcessor
extends java.lang.Object

Service class to convert between plain ODT documents and ITS annotated ODT Documents. The transformation process retains all available data.

Author:
m.kandora

Nested Class Summary
static class ItsProcessor.BackwardHandler
          Content handler to transform ODT Documents with ITS annotated content back to plain ODT Documents with bookmarks as placeholders for its data
static class ItsProcessor.ForwardHandler
          Content handler class for transform plain ODT Documents to ITS enriched documents by rewriting flat bookmark structures into possibly deep nested its annotated hierarchies
 
Constructor Summary
ItsProcessor()
           
 
Method Summary
 IOResult backward(ItsTree<Element> odtsource, java.net.URI odtstub, java.net.URI target)
          backward operation. transforms ITS annotated content to flat enclosing ODT Document bookmarks using a preconfigured ITSTree (see also XLIFFProcessor.backward(URI, URI, net.sf.okapi.common.LocaleId, net.sf.okapi.common.LocaleId)
 IOResult backward(java.net.URI source, java.net.URI target)
          backward operation. transforms ITS annotated content to flat enclosing ODT Document bookmarks.
 IOResult forward(java.net.URI source, java.net.URI target, ItsElementManager manager)
          forward operation to convert odt file from plain to its format
 ItsTree<Element> getTree()
          Returns the XML parse tree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItsProcessor

public ItsProcessor()
Method Detail

forward

public IOResult forward(java.net.URI source,
                        java.net.URI target,
                        ItsElementManager manager)
forward operation to convert odt file from plain to its format

Parameters:
source - the source uri of the odt file
target - the target to be written
manager - the (deserialized) manager
Returns:
an IOResult to have a reference to the file

backward

public IOResult backward(java.net.URI source,
                         java.net.URI target)
backward operation. transforms ITS annotated content to flat enclosing ODT Document bookmarks.

Parameters:
source - the its annotated source document
target - the target to write the output to
Returns:

backward

public IOResult backward(ItsTree<Element> odtsource,
                         java.net.URI odtstub,
                         java.net.URI target)
backward operation. transforms ITS annotated content to flat enclosing ODT Document bookmarks using a preconfigured ITSTree (see also XLIFFProcessor.backward(URI, URI, net.sf.okapi.common.LocaleId, net.sf.okapi.common.LocaleId)

Parameters:
source - the its annotated source document
target - the target to write the output to
Returns:
the written odt

getTree

public ItsTree<Element> getTree()
Returns the XML parse tree

Returns: