Package ch.galinet.xml.xmlmerge.merge
Class DefaultXmlMerge
java.lang.Object
ch.galinet.xml.xmlmerge.merge.DefaultXmlMerge
- All Implemented Interfaces:
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)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmerge(InputStream[] sources) Merges the given InputStream sources.Merges the given String sources.Merges the given Document sources.voidsetRootMapper(Mapper rootMapper) Sets the Mapper which will be applied to the root element.voidsetRootMergeAction(MergeAction rootMergeAction) Sets the MergeAction which will be applied to the root element.
-
Constructor Details
-
DefaultXmlMerge
public DefaultXmlMerge()Creates a new DefaultXmlMerge instance.
-
-
Method Details
-
setRootMapper
Sets the Mapper which will be applied to the root element.- Specified by:
setRootMapperin interfaceXmlMerge- Parameters:
rootMapper- The Mapper which will be applied to the root element
-
setRootMergeAction
Sets the MergeAction which will be applied to the root element.- Specified by:
setRootMergeActionin interfaceXmlMerge- Parameters:
rootMergeAction- The MergeAction which will be applied to the root element
-
merge
Merges the given String sources.- Specified by:
mergein interfaceXmlMerge- 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
Merges the given Document sources.- Specified by:
mergein interfaceXmlMerge- 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
Merges the given InputStream sources.- Specified by:
mergein interfaceXmlMerge- Parameters:
sources- Array of InputStream sources to merge- Returns:
- InputStream corresponding to the merged sources
- Throws:
AbstractXmlMergeException- If an error occurred during the merge
-