Package org.apache.nifi.xml
Class XMLReader
- All Implemented Interfaces:
ConfigurableComponent
,ControllerService
,RecordReaderFactory
@Tags({"xml","record","reader","parser"})
@CapabilityDescription("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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyDescriptor
static final PropertyDescriptor
private String
static final PropertyDescriptor
private boolean
static final AllowableValue
static final AllowableValue
static final PropertyDescriptor
static final AllowableValue
private String
private String
Fields inherited from class org.apache.nifi.serialization.SchemaRegistryService
schemaAccessStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateRecordReader
(Map<String, String> variables, InputStream in, long inputLength, ComponentLog logger) protected AllowableValue
protected SchemaAccessStrategy
getSchemaAccessStrategy
(String strategy, SchemaRegistry schemaRegistry, PropertyContext context) protected List
<AllowableValue> protected List
<PropertyDescriptor> private boolean
isMultipleRecords
(PropertyContext context, Map<String, String> variables) void
onEnabled
(ConfigurationContext context) private String
Methods inherited from class org.apache.nifi.serialization.SchemaRegistryService
buildStrategyProperty, customValidate, getConfigurationContext, getSchema, getSchema, getSchemaAccessStrategy, getSchemaAccessStrategyDescriptor, getSuppliedSchemaFields, migrateProperties, storeSchemaAccessStrategy
Methods inherited from class org.apache.nifi.controller.AbstractControllerService
abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabled
Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validate
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.nifi.components.ConfigurableComponent
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
Methods inherited from interface org.apache.nifi.controller.ControllerService
initialize, isStateful, migrateProperties
Methods inherited from interface org.apache.nifi.serialization.RecordReaderFactory
createRecordReader
-
Field Details
-
RECORD_SINGLE
-
RECORD_ARRAY
-
RECORD_EVALUATE
-
RECORD_FORMAT
-
ATTRIBUTE_PREFIX
-
CONTENT_FIELD_NAME
-
PARSE_XML_ATTRIBUTES
-
parseXmlAttributes
private volatile boolean parseXmlAttributes -
dateFormat
-
timeFormat
-
timestampFormat
-
-
Constructor Details
-
XMLReader
public XMLReader()
-
-
Method Details
-
onEnabled
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptors
in classSchemaRegistryService
-
getSchemaAccessStrategyValues
- Overrides:
getSchemaAccessStrategyValues
in classSchemaRegistryService
-
getSchemaAccessStrategy
protected SchemaAccessStrategy getSchemaAccessStrategy(String strategy, SchemaRegistry schemaRegistry, PropertyContext context) - Overrides:
getSchemaAccessStrategy
in classSchemaRegistryService
-
isMultipleRecords
-
getDefaultSchemaAccessStrategy
- Overrides:
getDefaultSchemaAccessStrategy
in classSchemaRegistryService
-
createRecordReader
public RecordReader createRecordReader(Map<String, String> variables, InputStream in, long inputLength, ComponentLog logger) throws IOException, SchemaNotFoundException, MalformedRecordException- Specified by:
createRecordReader
in interfaceRecordReaderFactory
- Throws:
IOException
SchemaNotFoundException
MalformedRecordException
-
trim
-