ch.elca.el4j.services.xmlmerge.merge
Class DefaultXmlMerge

java.lang.Object
  extended by ch.elca.el4j.services.xmlmerge.merge.DefaultXmlMerge
All Implemented Interfaces:
XmlMerge

public class DefaultXmlMerge
extends Object
implements XmlMerge

Default implementation of XmlMerge. Create all JDOM documents, then perform the merge into a new JDOM document.

Author:
Laurent Bovet (LBO), Alex Mathey (AMA)
File-location:
DefaultXmlMerge
Last check-in date:
2009-08-04 14:25:40 +0200 (Di, 04. Aug 2009) by swismer for revision 3874

Constructor Summary
DefaultXmlMerge()
          Creates a new DefaultXmlMerge instance.
 
Method Summary
 Document merge(Document[] sources)
          Merges the given Document sources.
 InputStream merge(InputStream[] sources)
          Merges the given InputStream sources.
 String merge(String[] sources)
          Merges the given String sources.
 void setRootMapper(Mapper rootMapper)
          Sets the Mapper which will be applied to the root element.
 void setRootMergeAction(MergeAction rootMergeAction)
          Sets the MergeAction which will be applied to the root element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultXmlMerge

public DefaultXmlMerge()
Creates a new DefaultXmlMerge instance.

Method Detail

setRootMapper

public void setRootMapper(Mapper rootMapper)
Sets the Mapper which will be applied to the root element.

Specified by:
setRootMapper in interface XmlMerge
Parameters:
rootMapper - The Mapper which will be applied to the root element

setRootMergeAction

public void setRootMergeAction(MergeAction rootMergeAction)
Sets the MergeAction which will be applied to the root element.

Specified by:
setRootMergeAction in interface XmlMerge
Parameters:
rootMergeAction - The MergeAction which will be applied to the root element

merge

public String merge(String[] sources)
             throws AbstractXmlMergeException
Merges the given String sources.

Specified by:
merge in interface XmlMerge
Parameters:
sources - Array of String sources to merge
Returns:
String corresponding to the merged sources
Throws:
AbstractXmlMergeException - If an error occurred during the merge

merge

public Document merge(Document[] sources)
               throws AbstractXmlMergeException
Merges the given Document sources.

Specified by:
merge in interface XmlMerge
Parameters:
sources - Array of Document sources to merge
Returns:
Document corresponding to the merged sources
Throws:
AbstractXmlMergeException - If an error occurred during the merge

merge

public InputStream merge(InputStream[] sources)
                  throws AbstractXmlMergeException
Merges the given InputStream sources.

Specified by:
merge in interface XmlMerge
Parameters:
sources - Array of InputStream sources to merge
Returns:
InputStream corresponding to the merged sources
Throws:
AbstractXmlMergeException - If an error occurred during the merge


Copyright © 2005-2011 ELCA. All Rights Reserved.