class FeatureTransformerHtml implements FeatureTransformer2 {

    protected void writeField(FeatureProperty featureProperty, String value) {

        if (featureProperty.isId()) {
          currentFeature.id = new PropertyDTO();
          currentFeature.id.addValue(value);
          currentFeature.id.itemProp = "url";
        }

        PropertyDTO property = new PropertyDTO();
        property.name = featureProperty.getName();
        property.addValue(value);

        if (currentFeature.name != null) {
            int pos = currentFeature.name.indexOf("{{" + property.name + "}}");
            if (pos > -1) {
                currentFeature.name = currentFeature.name.substring(0, pos) + value + currentFeature.name.substring(pos);
            }
        }

        String tkey = featureProperty.getName()
                                     .replaceAll("\\[[^\\]]+?\\]", "[]");
        if (transformations.containsKey(tkey)) {

            Optional<ValueDTO> transformedProperty = property.values.size()>0 ?
                    transformations.get(tkey)
                                   .transform(property.values.get(0), featureProperty) :
                    Optional.empty();

            if (transformedProperty.isPresent()) {
                if (transformedProperty.get().property.name.equals(featureProperty.getName()) && featureSchema.isPresent()) {
                    String propertyName = featureProperty.getName().replace("[]", "");
                    FeatureSchema schema = featureSchema.get()
                                                        .getProperties()
                                                        .stream()
                                                        .filter(prop -> prop.getName().equals(propertyName))
                                                        .findAny()
                                                        .orElse(null);
                    if (schema!=null) {
                        transformedProperty.get().property.name = schema.getLabel().orElse(schema.getName());
                    }
                }

                property.values.set(0,transformedProperty.get());
                currentFeature.addChild(property);
            }
        } else {
            if (featureSchema.isPresent()) {
                String propertyName = featureProperty.getName().replace("[]", "");
                FeatureSchema schema = featureSchema.get()
                                                    .getProperties()
                                                    .stream()
                                                    .filter(prop -> prop.getName().equals(propertyName))
                                                    .findAny()
                                                    .orElse(null);
                if (schema!=null) {
                    property.name = schema.getLabel().orElse(schema.getName());
                }
            }

            currentFeature.addChild(property);
        }
    }

}

class FeatureTransformerHtmlTest {

    private static final Logger LOGGER;

    @Test
    public void testWriteField() {

    String input = "Abc|\n---|\n1|";
    String actual = StringTemplateFilters.applyFilterMarkdown(input);

    LOGGER.info(actual);
    }

}