file2xliff4j
Interface SkeletonMerger

All Known Implementing Classes:
HtmlSkeletonMerger, MifSkeletonMerger, OdfSkeletonMerger, XliffSkeletonMerger, XMLSkeletonMerger

public interface SkeletonMerger

Interface for implementations that merge temporary skeleton files with original native files and create the final skeleton file. (Substitute stream for file in the above to describe the Java implementation.)

Author:
Weldon Whipple <weldon@lingotek.com>

Method Summary
 void merge(java.io.InputStream tSkelInStream, java.io.InputStream nativeInStream, java.io.OutputStream skeletonOutStream, java.nio.charset.Charset encoding)
          Merge a temporary skeleton input stream with the original native input stream to yield the final skeleton that can be used to export XLIFF documents and yield a document in the original native format, but in a different language.
 void merge(java.io.InputStream tSkelInStream, java.io.InputStream nativeInStream, java.io.OutputStream skeletonOutStream, java.nio.charset.Charset encoding, int maxTuDepth)
          Variant of the merge method above that adds an argument that receives the maximum TU depth.
 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.
 

Method Detail

merge

void merge(java.io.InputStream tSkelInStream,
           java.io.InputStream nativeInStream,
           java.io.OutputStream skeletonOutStream,
           java.nio.charset.Charset encoding)
           throws java.lang.IllegalArgumentException,
                  java.io.IOException
Merge a temporary skeleton input stream with the original native input stream to yield the final skeleton that can be used to export XLIFF documents and yield a document in the original native format, but in a different language.

Note: Depending on the native format, the meaning of temporary skeleton (if one exists) may vary. In fact, it is possible that for some native formats, there is no temporary skeleton.

Parameters:
tSkelInStream - The temporary or intermediate skeleton
nativeInStream - The original-format file's input stream (or a substitute)
skeletonOutStream - Where the final skeleton is written to
encoding - The character encoding of the native input stream, if applicable.
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

void merge(java.io.InputStream tSkelInStream,
           java.io.InputStream nativeInStream,
           java.io.OutputStream skeletonOutStream,
           java.nio.charset.Charset encoding,
           int maxTuDepth)
           throws java.lang.IllegalArgumentException,
                  java.io.IOException
Variant of the merge method above that adds an argument that receives the maximum TU depth.

Parameters:
tSkelInStream - The temporary or intermediate skeleton
nativeInStream - The original-format file's input stream (or a substitute)
skeletonOutStream - Where the final skeleton is written to
encoding - The character encoding of the native input stream, if applicable.
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

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.

Parameters:
property - The name of the property
value - The value of the property
Throws:
ConversionException - If the property or value can't be recognized.