Search in sources :

Example 1 with SchemaAccessWriter

use of org.apache.nifi.schema.access.SchemaAccessWriter in project nifi by apache.

the class SchemaRegistryRecordSetWriter method getRequiredSchemaFields.

protected Set<SchemaField> getRequiredSchemaFields(final ValidationContext validationContext) {
    final String writeStrategyValue = validationContext.getProperty(getSchemaWriteStrategyDescriptor()).getValue();
    final SchemaAccessWriter writer = getSchemaWriteStrategy(writeStrategyValue);
    if (writer == null) {
        return EnumSet.noneOf(SchemaField.class);
    }
    final Set<SchemaField> requiredFields = writer.getRequiredSchemaFields();
    return requiredFields;
}
Also used : SchemaAccessWriter(org.apache.nifi.schema.access.SchemaAccessWriter) NopSchemaAccessWriter(org.apache.nifi.schema.access.NopSchemaAccessWriter) SchemaField(org.apache.nifi.schema.access.SchemaField)

Aggregations

NopSchemaAccessWriter (org.apache.nifi.schema.access.NopSchemaAccessWriter)1 SchemaAccessWriter (org.apache.nifi.schema.access.SchemaAccessWriter)1 SchemaField (org.apache.nifi.schema.access.SchemaField)1