Package org.apache.nifi.xml
Class XMLReader
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.controller.AbstractControllerService
org.apache.nifi.serialization.SchemaRegistryService
org.apache.nifi.xml.XMLReader
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent
,org.apache.nifi.controller.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 org.apache.nifi.components.PropertyDescriptor
static final org.apache.nifi.components.PropertyDescriptor
private String
static final org.apache.nifi.components.PropertyDescriptor
private boolean
static final org.apache.nifi.components.AllowableValue
static final org.apache.nifi.components.AllowableValue
static final org.apache.nifi.components.PropertyDescriptor
static final org.apache.nifi.components.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, org.apache.nifi.logging.ComponentLog logger) protected org.apache.nifi.components.AllowableValue
protected SchemaAccessStrategy
getSchemaAccessStrategy
(String strategy, SchemaRegistry schemaRegistry, org.apache.nifi.context.PropertyContext context) protected List
<org.apache.nifi.components.AllowableValue> protected List
<org.apache.nifi.components.PropertyDescriptor> private boolean
isMultipleRecords
(org.apache.nifi.context.PropertyContext context, Map<String, String> variables) void
onEnabled
(org.apache.nifi.controller.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
public static final org.apache.nifi.components.AllowableValue RECORD_SINGLE -
RECORD_ARRAY
public static final org.apache.nifi.components.AllowableValue RECORD_ARRAY -
RECORD_EVALUATE
public static final org.apache.nifi.components.AllowableValue RECORD_EVALUATE -
RECORD_FORMAT
public static final org.apache.nifi.components.PropertyDescriptor RECORD_FORMAT -
ATTRIBUTE_PREFIX
public static final org.apache.nifi.components.PropertyDescriptor ATTRIBUTE_PREFIX -
CONTENT_FIELD_NAME
public static final org.apache.nifi.components.PropertyDescriptor CONTENT_FIELD_NAME -
PARSE_XML_ATTRIBUTES
public static final org.apache.nifi.components.PropertyDescriptor PARSE_XML_ATTRIBUTES -
parseXmlAttributes
private volatile boolean parseXmlAttributes -
dateFormat
-
timeFormat
-
timestampFormat
-
-
Constructor Details
-
XMLReader
public XMLReader()
-
-
Method Details
-
onEnabled
@OnEnabled public void onEnabled(org.apache.nifi.controller.ConfigurationContext context) -
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptors
in classSchemaRegistryService
-
getSchemaAccessStrategyValues
- Overrides:
getSchemaAccessStrategyValues
in classSchemaRegistryService
-
getSchemaAccessStrategy
protected SchemaAccessStrategy getSchemaAccessStrategy(String strategy, SchemaRegistry schemaRegistry, org.apache.nifi.context.PropertyContext context) - Overrides:
getSchemaAccessStrategy
in classSchemaRegistryService
-
isMultipleRecords
-
getDefaultSchemaAccessStrategy
protected org.apache.nifi.components.AllowableValue getDefaultSchemaAccessStrategy()- Overrides:
getDefaultSchemaAccessStrategy
in classSchemaRegistryService
-
createRecordReader
public RecordReader createRecordReader(Map<String, String> variables, InputStream in, long inputLength, org.apache.nifi.logging.ComponentLog logger) throws IOException, SchemaNotFoundException, MalformedRecordException- Specified by:
createRecordReader
in interfaceRecordReaderFactory
- Throws:
IOException
SchemaNotFoundException
MalformedRecordException
-
trim
-