public abstract static class XmlIO.Read<T> extends PTransform<PBegin,PCollection<T>>
XmlIO.read().| Modifier and Type | Class and Description |
|---|---|
static class |
XmlIO.Read.CompressionType
Deprecated.
Use
Compression instead. |
name| Constructor and Description |
|---|
Read() |
| Modifier and Type | Method and Description |
|---|---|
PCollection<T> |
expand(PBegin input) |
XmlIO.Read<T> |
from(String fileOrPatternSpec)
Reads a single XML file or a set of XML files defined by a Java "glob" file pattern.
|
void |
populateDisplayData(DisplayData.Builder builder) |
XmlIO.Read<T> |
withCharset(Charset charset)
Sets the XML file charset.
|
XmlIO.Read<T> |
withCompression(Compression compression)
Decompresses all input files using the specified compression type.
|
XmlIO.Read<T> |
withCompressionType(XmlIO.Read.CompressionType compressionType)
Deprecated.
|
XmlIO.Read<T> |
withMinBundleSize(long minBundleSize)
Sets a parameter
minBundleSize for the minimum bundle size of the source. |
XmlIO.Read<T> |
withRecordClass(Class<T> recordClass)
Sets a JAXB annotated class that can be populated using a record of the provided XML file.
|
XmlIO.Read<T> |
withRecordElement(String recordElement)
Sets name of the record element of the XML document.
|
XmlIO.Read<T> |
withRootElement(String rootElement)
Sets name of the root element of the XML document.
|
XmlIO.Read<T> |
withValidationEventHandler(ValidationEventHandler validationEventHandler)
Sets the
ValidationEventHandler to use with JAXB. |
getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, toString, validatepublic XmlIO.Read<T> from(String fileOrPatternSpec)
XmlIO.read().public XmlIO.Read<T> withRootElement(String rootElement)
public XmlIO.Read<T> withRecordElement(String recordElement)
public XmlIO.Read<T> withRecordClass(Class<T> recordClass)
public XmlIO.Read<T> withMinBundleSize(long minBundleSize)
minBundleSize for the minimum bundle size of the source. Please
refer to OffsetBasedSource for the definition of minBundleSize. This is an optional
parameter.@Deprecated public XmlIO.Read<T> withCompressionType(XmlIO.Read.CompressionType compressionType)
withCompression(org.apache.beam.sdk.io.Compression).public XmlIO.Read<T> withCompression(Compression compression)
public XmlIO.Read<T> withCharset(Charset charset)
public XmlIO.Read<T> withValidationEventHandler(ValidationEventHandler validationEventHandler)
ValidationEventHandler to use with JAXB. Calling this with a null
parameter will cause the JAXB unmarshaller event handler to be unspecified.public void populateDisplayData(DisplayData.Builder builder)
populateDisplayData in interface HasDisplayDatapopulateDisplayData in class PTransform<PBegin,PCollection<T>>public PCollection<T> expand(PBegin input)
expand in class PTransform<PBegin,PCollection<T>>Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.