class HortonworksAttributeSchemaReferenceWriter implements SchemaAccessWriter {

    @Override
    public void validateSchema(final RecordSchema schema) throws SchemaNotFoundException {
        final SchemaIdentifier id = schema.getIdentifier();
        if (!id.getIdentifier().isPresent()) {
            throw new SchemaNotFoundException("Cannot write Schema Reference as Attributes because it does not contain a Schema Identifier");
        }
        if (!id.getVersion().isPresent()) {
            throw new SchemaNotFoundException("Cannot write Schema Reference as Attributes because it does not contain a Schema Version");
        }
    }

}