file2xliff4j
Class OdfSkeletonMerger

java.lang.Object
  extended by file2xliff4j.OdfSkeletonMerger
All Implemented Interfaces:
SkeletonMerger

public class OdfSkeletonMerger
extends java.lang.Object
implements SkeletonMerger

This class merges the following:

  1. The pseudoSkeleton stream generated as XLIFF is created from XML.
  2. The original ODF stream from which the XLIFF was created. It outputs a final Skeleton file that can be used to generate ODF from XLIFF.

    Author:
    Weldon Whipple <weldon@lingotek.com>

    Constructor Summary
    OdfSkeletonMerger()
              Constructor for the skeleton merger object
     
    Method Summary
     void merge(java.io.InputStream tSkelInStream, java.io.InputStream odfInStream, java.io.OutputStream skeletonOutStream, java.nio.charset.Charset encoding)
              Create a skeleton file from the pseudo skeleton and the original odf.
     void merge(java.io.InputStream tSkelInStream, java.io.InputStream odfInStream, java.io.OutputStream skeletonOutStream, java.nio.charset.Charset encoding, int maxTuDepth)
              Create a skeleton file from the pseudo skeleton and the original odf.
     void setProperty(java.lang.String property, java.lang.Object value)
              Set a format-specific property that might affect the way that the merger process is conducted.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    OdfSkeletonMerger

    public OdfSkeletonMerger()
    Constructor for the skeleton merger object

    Method Detail

    merge

    public void merge(java.io.InputStream tSkelInStream,
                      java.io.InputStream odfInStream,
                      java.io.OutputStream skeletonOutStream,
                      java.nio.charset.Charset encoding)
               throws java.lang.IllegalArgumentException,
                      java.io.IOException
    Create a skeleton file from the pseudo skeleton and the original odf.

    Specified by:
    merge in interface SkeletonMerger
    Parameters:
    tSkelInStream - The intermediate skeleton we will read from
    odfInStream - The original ODF to read from and merge with
    skeletonOutStream - Where I write the new skeleton
    encoding - The encoding used by the odf
    Throws:
    java.util.IllegalArgumentException - if an argument is bogus or non-existent
    java.io.IOException - if an I/O error occurs.
    java.lang.IllegalArgumentException

    merge

    public void merge(java.io.InputStream tSkelInStream,
                      java.io.InputStream odfInStream,
                      java.io.OutputStream skeletonOutStream,
                      java.nio.charset.Charset encoding,
                      int maxTuDepth)
               throws java.lang.IllegalArgumentException,
                      java.io.IOException
    Create a skeleton file from the pseudo skeleton and the original odf.

    Specified by:
    merge in interface SkeletonMerger
    Parameters:
    tSkelInStream - The intermediate skeleton we will read from
    odfInStream - The original ODF to read from and merge with
    skeletonOutStream - Where I write the new skeleton
    encoding - The encoding used by the odf
    maxTuDepth - The maximum depth to which TUs are imbedded within other TUs.
    Throws:
    java.util.IllegalArgumentException - if an argument is bogus or non-existent
    java.io.IOException - if an I/O error occurs.
    java.lang.IllegalArgumentException

    setProperty

    public void setProperty(java.lang.String property,
                            java.lang.Object value)
                     throws ConversionException
    Set a format-specific property that might affect the way that the merger process is conducted.

    Specified by:
    setProperty in interface SkeletonMerger
    Parameters:
    property - The name of the property
    value - The value of the property
    Throws:
    ConversionException - If the property or value can't be recognized.