com.g11ntoolkit.xliffutil
Class mergeXliff

java.lang.Object
  |
  +--com.g11ntoolkit.xliffutil.mergeXliff
Direct Known Subclasses:
applyXliff

public class mergeXliff
extends java.lang.Object

Merge NXL and XL xliff files

Version:
$Revision: 1.9 $ $Date: 2005/08/05 00:49:01 $
Copyright © 2005, webMethods, Inc. All rights reserved.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

See License Agreement.

Author:
Masahiko Mori
See Also:
DOMCloner, org.w3c.dom

Field Summary
protected  boolean _DBG
           
protected  statusListener _listener
           
protected  boolean _turnOnApproved
           
 
Constructor Summary
mergeXliff()
          Create a new XLIFFFile.
 
Method Summary
protected  org.w3c.dom.Node addNote(org.w3c.dom.Node node, java.lang.String note)
          Add note element.
 boolean getDebugmode()
          Get debug mode
protected  org.w3c.dom.Node getDestFile(org.w3c.dom.Document doc, org.w3c.dom.Node file, boolean note)
          Get dest body node from file element..
protected  org.w3c.dom.Node getDestFile(java.util.List docs, org.w3c.dom.Element file, boolean note)
          Get dest body node from file element..
static void main(java.lang.String[] args)
          Main
 void merge(org.w3c.dom.Document in1, org.w3c.dom.Document in2)
          Merge 2nd document into 1st document.
 void merge(org.w3c.dom.Document out, org.w3c.dom.Document in1, org.w3c.dom.Document in2)
          Merge two document into 1st document.
 void merge(java.util.List in1, java.util.List in2)
          Merge 2nd document into 1st document.
 void setDebugmode(boolean flag)
          Set debug mode
 void setStatusListener(statusListener listener)
          Set Status listener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_DBG

protected boolean _DBG

_turnOnApproved

protected boolean _turnOnApproved

_listener

protected statusListener _listener
Constructor Detail

mergeXliff

public mergeXliff()
Create a new XLIFFFile.

Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main

Parameters:
args - XML File name
java.lang.Exception

setDebugmode

public void setDebugmode(boolean flag)
Set debug mode

Parameters:
flag - Debug flag

setStatusListener

public void setStatusListener(statusListener listener)
Set Status listener

Parameters:
listener - Status listener class

getDebugmode

public boolean getDebugmode()
Get debug mode


merge

public void merge(org.w3c.dom.Document out,
                  org.w3c.dom.Document in1,
                  org.w3c.dom.Document in2)
Merge two document into 1st document.

Parameters:
out - Output Document class
in1 - master Document class
in2 - slave Document class

merge

public void merge(org.w3c.dom.Document in1,
                  org.w3c.dom.Document in2)
Merge 2nd document into 1st document.

Parameters:
in1 - master Document class (XL XLIFF file)
in2 - slave Document class (NXL XLIFF file)

merge

public void merge(java.util.List in1,
                  java.util.List in2)
Merge 2nd document into 1st document.

Parameters:
in1 - master Document class (XL XLIFF file)
in2 - slave Document class (NXL XLIFF file)

getDestFile

protected org.w3c.dom.Node getDestFile(org.w3c.dom.Document doc,
                                       org.w3c.dom.Node file,
                                       boolean note)
Get dest body node from file element..

Parameters:
doc - Dest Document class
file - source file element
note - flag for adding note
Returns:
file element of Dest Document

getDestFile

protected org.w3c.dom.Node getDestFile(java.util.List docs,
                                       org.w3c.dom.Element file,
                                       boolean note)
Get dest body node from file element..

Parameters:
docs - Dest Document class
file - source file element
note - flag for adding note
Returns:
file element of Dest Document

addNote

protected org.w3c.dom.Node addNote(org.w3c.dom.Node node,
                                   java.lang.String note)
Add note element.

Parameters:
node - Dest node
note - Note string
Returns:
New note element