class RuleSchemaMetaDataYamlSwapper implements YamlSwapper<YamlRuleSchemaMetaData, RuleSchemaMetaData> {

    @Override
    public RuleSchemaMetaData swapToObject(final YamlRuleSchemaMetaData yamlConfig) {
        SchemaMetaData configured = Optional.ofNullable(yamlConfig.getConfiguredSchemaMetaData()).map(this::convertSchema).orElse(new SchemaMetaData());
        Map<String, Collection<String>> unconfigured = Optional.ofNullable(yamlConfig.getUnconfiguredSchemaMetaDataMap()).orElse(new HashMap<>());
        return new RuleSchemaMetaData(configured, unconfigured);
    }

}