public class XmlSplitProcessor extends BaseSplitProcessor
SplitProcessor
for XML files. This class is not
thread safe.Constructor and Description |
---|
XmlSplitProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
configureSplit(Properties properties,
String toFilename)
Configure split.
|
TypedKeyValue<Long,Long> |
split(IoProcessor destination,
File file,
Map<String,String> paths,
String destinationDir,
int max,
boolean includeHeader)
Split the XML file to files on specified repeating elements.
|
TypedKeyValue<Long,Long> |
split(IoProcessor destination,
InputStream stream,
Map<String,com.toolsverse.etl.connector.xml.XmlSplitProcessor.RepeatedElement> paths,
int max,
boolean includeHeader)
Split the XML input stream to files on specified repeating elements.
|
TypedKeyValue<Long,Long> |
split(IoProcessor destination,
InputStream stream,
String fileName,
Map<String,String> paths,
String destinationDir,
int max,
boolean includeHeader)
Split the XML input stream to files on specified repeating elements
|
IoStatus |
split(IoProcessor source,
IoProcessor destination,
String fromFolder,
String toFolder,
String filename)
Split the input stream into multiple files.
|
TypedKeyValue<Long,Long> |
split(IoProcessor destination,
String file,
Map<String,String> paths,
String destinationDir,
int max,
boolean includeHeader)
Split the XML file to files on specified repeating elements
|
close, getAction, getMaxNumberOfRows, supportsParallel
public void configureSplit(Properties properties, String toFilename) throws IllegalArgumentException
SplitProcessor
configureSplit
in interface SplitProcessor
configureSplit
in class BaseSplitProcessor
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
source
- IoProcessor, the source IoProcessordestination
- IoProcessor, the destination IoProcessorfromFolder
- the from foldertoFolder
- the to folderfilename
- the filenameException
- in case of any errorpublic TypedKeyValue<Long,Long> split(IoProcessor destination, String file, Map<String,String> paths, String destinationDir, int max, boolean includeHeader) throws Exception
file
- the XML file pathpaths
- the map of paths to repeating elements, where key is an XPath
like path to repeating element and value is a suffix that
should be used for this element filesdestinationDir
- the output files directory pathmax
- the maximum number of repeating elements to be included into
each fileincludeHeader
- if true, collect everything until repeating element and
include to each split file as a headerException
- in case of any errorpublic TypedKeyValue<Long,Long> split(IoProcessor destination, File file, Map<String,String> paths, String destinationDir, int max, boolean includeHeader) throws Exception
destination
- the destinationfile
- the XML filepaths
- the map of paths to repeating elements, where key is an XPath
like path to repeating element and value is a suffix that
should be used for this element filesdestinationDir
- the output files directory pathmax
- the maximum number of repeating elements to be included into
each fileincludeHeader
- if true, collect everything until repeating element and
include to each split file as a headerException
- in case of any errorpublic TypedKeyValue<Long,Long> split(IoProcessor destination, InputStream stream, String fileName, Map<String,String> paths, String destinationDir, int max, boolean includeHeader) throws Exception
stream
- the input stream with xml datafileName
- the name of the output file (no extension)paths
- the map of paths to repeating elements, where key is an XPath
like path to repeating element and value is a suffix that
should be used for this element filesdestinationDir
- the output files directory pathmax
- the maximum number of repeating elements to be included into
each fileincludeHeader
- if true, collect everything until repeating element and
include to each split file as a headerException
- in case of any errorpublic TypedKeyValue<Long,Long> split(IoProcessor destination, InputStream stream, Map<String,com.toolsverse.etl.connector.xml.XmlSplitProcessor.RepeatedElement> paths, int max, boolean includeHeader) throws Exception
destination
- the destinationstream
- the input stream with xml datapaths
- the map of paths to repeating elements, where key is a
wrapping element path and value is repeating element objectmax
- the maximum number of repeating elements to be included into
each fileincludeHeader
- if true, collect everything until repeating element and
include to each split file as a headerException
- in case of any errorCopyright © 2010-2020 Toolsverse. All Rights Reserved.