@Tags(value={"xml","record","reader","parser"}) @CapabilityDescription(value="Reads XML content and creates Record objects. Records are expected in the second level of XML data, embedded in an enclosing root tag.") public class XMLReader extends SchemaRegistryService implements RecordReaderFactory
Modifier and Type | Field and Description |
---|---|
static PropertyDescriptor |
ATTRIBUTE_PREFIX |
static PropertyDescriptor |
CONTENT_FIELD_NAME |
private String |
dateFormat |
static PropertyDescriptor |
PARSE_XML_ATTRIBUTES |
private boolean |
parseXmlAttributes |
static AllowableValue |
RECORD_ARRAY |
static AllowableValue |
RECORD_EVALUATE |
static PropertyDescriptor |
RECORD_FORMAT |
static AllowableValue |
RECORD_SINGLE |
private String |
timeFormat |
private String |
timestampFormat |
schemaAccessStrategy
Constructor and Description |
---|
XMLReader() |
Modifier and Type | Method and Description |
---|---|
RecordReader |
createRecordReader(Map<String,String> variables,
InputStream in,
long inputLength,
ComponentLog logger) |
protected AllowableValue |
getDefaultSchemaAccessStrategy() |
protected SchemaAccessStrategy |
getSchemaAccessStrategy(String strategy,
SchemaRegistry schemaRegistry,
PropertyContext context) |
protected List<AllowableValue> |
getSchemaAccessStrategyValues() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
private boolean |
isMultipleRecords(PropertyContext context,
Map<String,String> variables) |
void |
onEnabled(ConfigurationContext context) |
private String |
trim(String value) |
buildStrategyProperty, customValidate, getConfigurationContext, getSchema, getSchema, getSchemaAccessStrategy, getSchemaAcessStrategyDescriptor, getSuppliedSchemaFields, storeSchemaAccessStrategy
abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabled
equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
createRecordReader
initialize, isStateful
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
public static final AllowableValue RECORD_SINGLE
public static final AllowableValue RECORD_ARRAY
public static final AllowableValue RECORD_EVALUATE
public static final PropertyDescriptor RECORD_FORMAT
public static final PropertyDescriptor ATTRIBUTE_PREFIX
public static final PropertyDescriptor CONTENT_FIELD_NAME
public static final PropertyDescriptor PARSE_XML_ATTRIBUTES
private volatile boolean parseXmlAttributes
private volatile String dateFormat
private volatile String timeFormat
private volatile String timestampFormat
@OnEnabled public void onEnabled(ConfigurationContext context)
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class SchemaRegistryService
protected List<AllowableValue> getSchemaAccessStrategyValues()
getSchemaAccessStrategyValues
in class SchemaRegistryService
protected SchemaAccessStrategy getSchemaAccessStrategy(String strategy, SchemaRegistry schemaRegistry, PropertyContext context)
getSchemaAccessStrategy
in class SchemaRegistryService
private boolean isMultipleRecords(PropertyContext context, Map<String,String> variables)
protected AllowableValue getDefaultSchemaAccessStrategy()
getDefaultSchemaAccessStrategy
in class SchemaRegistryService
public RecordReader createRecordReader(Map<String,String> variables, InputStream in, long inputLength, ComponentLog logger) throws IOException, SchemaNotFoundException, MalformedRecordException
createRecordReader
in interface RecordReaderFactory
IOException
SchemaNotFoundException
MalformedRecordException
Copyright © 2023 Apache NiFi Project. All rights reserved.