public class XmlMerger extends Object implements SplitProcessor
Constructor and Description |
---|
XmlMerger()
Create XML merge.
|
XmlMerger(String path,
OutputStream out,
boolean includeHeader)
Create XML merge object with the given repeating path and output stream
|
XmlMerger(String path,
String outputFile,
boolean includeHeader)
Create XML merge object with the given repeating path and output file
path
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Finishes XML merge by closing all open elements and streams.
|
void |
configureSplit(Properties properties,
String toFilename)
Configure split.
|
String |
getAction()
Gets the action.
|
void |
merge(InputStream stream)
Merge given input stream repeating elements into global output
|
void |
merge(String filePath)
Merge given file repeating elements into global output
|
IoStatus |
split(IoProcessor source,
IoProcessor destination,
String fromFolder,
String toFolder,
String filename)
Split the input stream into multiple files.
|
boolean |
supportsParallel()
Supports parallel.
|
public XmlMerger()
public XmlMerger(String path, String outputFile, boolean includeHeader) throws Exception
path
- the XPath like path to repeating elementoutputFile
- the full path to the output file, including file name and
extensionincludeHeader
- if true, will include all elements preceding repeating elementException
- in case of any errorpublic XmlMerger(String path, OutputStream out, boolean includeHeader) throws IllegalArgumentException
path
- the XPath like path to repeating elementout
- the output streamincludeHeader
- if true, will include all elements preceding repeating elementIllegalArgumentException
- in case of malformed pathpublic void merge(String filePath) throws Exception
filePath
- the full path to the input file, including file name and
extensionException
- in case of any errorpublic void merge(InputStream stream) throws Exception
stream
- the input streamException
- in case of any errorpublic void close() throws Exception
close
in interface SplitProcessor
Exception
- in case of any errorpublic void configureSplit(Properties properties, String toFilename) throws IllegalArgumentException
SplitProcessor
configureSplit
in interface SplitProcessor
properties
- the propertiestoFilename
- the to filenameIllegalArgumentException
- the illegal argument exceptionpublic IoStatus split(IoProcessor source, IoProcessor destination, String fromFolder, String toFolder, String filename) throws Exception
SplitProcessor
split
in interface SplitProcessor
source
- IoProcessor, the source IoProcessordestination
- IoProcessor, the destination IoProcessorfromFolder
- the from foldertoFolder
- the to folderfilename
- the filenameException
- in case of any errorpublic String getAction()
SplitProcessor
getAction
in interface SplitProcessor
public boolean supportsParallel()
SplitProcessor
supportsParallel
in interface SplitProcessor
Copyright © 2010-2020 Toolsverse. All Rights Reserved.