file2xliff4j
Class MifSkeletonMerger

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

public class MifSkeletonMerger
extends java.lang.Object
implements SkeletonMerger

This class merges the following:

  1. The pseudoSkeleton stream generated while XLIFF was created from the original Maker Interchange File input.
  2. The original MIF stream from which the XLIFF was created. It outputs a final Skeleton file that can be used (in combination with the format and XLIFF files) to generate a new MIF file in a target language.

    Author:
    Weldon Whipple <weldon@lingotek.com>

    Constructor Summary
    MifSkeletonMerger()
              Constructor for the skeleton merger object
     
    Method Summary
     void merge(java.io.InputStream tSkelInStream, java.io.InputStream mifInStream, java.io.OutputStream skeletonOutStream, java.nio.charset.Charset encoding)
              Create a skeleton file from the pseudo skeleton and the original MIF file.
     void merge(java.io.InputStream tSkelInStream, java.io.InputStream mifInStream, java.io.OutputStream skeletonOutStream, java.nio.charset.Charset encoding, int maxTuDepth)
              Create a skeleton file from the pseudo skeleton and the original MIF file.
     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

    MifSkeletonMerger

    public MifSkeletonMerger()
    Constructor for the skeleton merger object

    Method Detail

    merge

    public void merge(java.io.InputStream tSkelInStream,
                      java.io.InputStream mifInStream,
                      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 MIF file.

    Specified by:
    merge in interface SkeletonMerger
    Parameters:
    tSkelInStream - The intermediate skeleton we will read from
    mifInStream - The original MIF to read from and merge with
    skeletonOutStream - Where I write the new skeleton
    encoding - The encoding used by the MIF. (Question: Does this really matter for the skeleton?)
    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 mifInStream,
                      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 MIF file.

    Specified by:
    merge in interface SkeletonMerger
    Parameters:
    tSkelInStream - The intermediate skeleton we will read from
    mifInStream - The original MIF to read from and merge with
    skeletonOutStream - Where I write the new skeleton
    encoding - The encoding used by the MIF. (Question: Does this really matter for the skeleton?)
    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.