All Downloads are FREE. Search and download functionalities are using the official Maven repository.

be.vlaanderen.informatievlaanderen.ldes.ldio.config.LdioGeoJsonToWktAutoConfig Maven / Gradle / Ivy

The newest version!
package be.vlaanderen.informatievlaanderen.ldes.ldio.config;

import be.vlaanderen.informatievlaanderen.ldes.ldio.LdioGeoJsonToWkt;
import be.vlaanderen.informatievlaanderen.ldes.ldio.pipeline.creation.valueobjects.ComponentProperties;
import be.vlaanderen.informatievlaanderen.ldes.ldio.pipeline.creation.LdioTransformer;
import be.vlaanderen.informatievlaanderen.ldes.ldio.pipeline.creation.LdioTransformerConfigurator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import static be.vlaanderen.informatievlaanderen.ldes.ldio.LdioGeoJsonToWkt.NAME;

@Configuration
public class LdioGeoJsonToWktAutoConfig {

	@Bean(NAME)
	public LdioTransformerConfigurator geoJsonToWktConfigurator() {
        return new LdioGeoJsonToWktConfigurator();
	}

    public static class LdioGeoJsonToWktConfigurator implements LdioTransformerConfigurator {
        public static final String TRANSFORM_TO_RDF_WKT = "transform-to-rdf+wkt-enabled";

        @Override
        public LdioTransformer configure(ComponentProperties config) {
            boolean transformToRdfWkt = config.getOptionalBoolean(TRANSFORM_TO_RDF_WKT).orElse(false);
            return new LdioGeoJsonToWkt(transformToRdfWkt);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy