Search in sources :

Example 1 with MODE

use of de.ii.xtraplatform.store.domain.entities.ValidationResult.MODE in project ldproxy by interactive-instruments.

the class FeaturesFormatHtml method onStartup.

@Override
public ValidationResult onStartup(OgcApi api, MODE apiValidation) {
    // no additional operational checks for now, only validation; we can stop, if no validation is requested
    if (apiValidation == MODE.NONE)
        return ValidationResult.of();
    ImmutableValidationResult.Builder builder = ImmutableValidationResult.builder().mode(apiValidation);
    Map<String, FeatureSchema> featureSchemas = providers.getFeatureSchemas(api.getData());
    // get HTML configurations to process
    Map<String, FeaturesHtmlConfiguration> htmlConfigurationMap = api.getData().getCollections().entrySet().stream().map(entry -> {
        final FeatureTypeConfigurationOgcApi collectionData = entry.getValue();
        final FeaturesHtmlConfiguration config = collectionData.getExtension(FeaturesHtmlConfiguration.class).orElse(null);
        if (Objects.isNull(config))
            return null;
        return new AbstractMap.SimpleImmutableEntry<>(entry.getKey(), config);
    }).filter(Objects::nonNull).collect(ImmutableMap.toImmutableMap(Map.Entry::getKey, Map.Entry::getValue));
    Map<String, Collection<String>> keyMap = htmlConfigurationMap.entrySet().stream().map(entry -> new AbstractMap.SimpleImmutableEntry<>(entry.getKey(), entry.getValue().getTransformations().keySet())).collect(ImmutableMap.toImmutableMap(Map.Entry::getKey, Map.Entry::getValue));
    for (Map.Entry<String, Collection<String>> stringCollectionEntry : featuresCoreValidator.getInvalidPropertyKeys(keyMap, featureSchemas).entrySet()) {
        for (String property : stringCollectionEntry.getValue()) {
            builder.addStrictErrors(MessageFormat.format("A transformation for property ''{0}'' in collection ''{1}'' is invalid, because the property was not found in the provider schema.", property, stringCollectionEntry.getKey()));
        }
    }
    Set<String> codelists = entityRegistry.getEntitiesForType(Codelist.class).stream().map(Codelist::getId).collect(Collectors.toUnmodifiableSet());
    for (Map.Entry<String, FeaturesHtmlConfiguration> entry : htmlConfigurationMap.entrySet()) {
        String collectionId = entry.getKey();
        for (Map.Entry<String, List<PropertyTransformation>> entry2 : entry.getValue().getTransformations().entrySet()) {
            String property = entry2.getKey();
            for (PropertyTransformation transformation : entry2.getValue()) {
                builder = transformation.validate(builder, collectionId, property, codelists);
            }
        }
    }
    return builder.build();
}
Also used : ImmutableApiMediaTypeContent(de.ii.ogcapi.foundation.domain.ImmutableApiMediaTypeContent) MustacheRenderer(de.ii.xtraplatform.web.domain.MustacheRenderer) URISyntaxException(java.net.URISyntaxException) Link(de.ii.ogcapi.foundation.domain.Link) ImmutableValidationResult(de.ii.xtraplatform.store.domain.entities.ImmutableValidationResult) MODE(de.ii.xtraplatform.store.domain.entities.ValidationResult.MODE) ApiMediaType(de.ii.ogcapi.foundation.domain.ApiMediaType) ImmutableApiMediaType(de.ii.ogcapi.foundation.domain.ImmutableApiMediaType) MediaType(javax.ws.rs.core.MediaType) Builder(de.ii.xtraplatform.features.domain.transform.ImmutablePropertyTransformation.Builder) Locale(java.util.Locale) Map(java.util.Map) URI(java.net.URI) FeatureSchema(de.ii.xtraplatform.features.domain.FeatureSchema) HtmlConfiguration(de.ii.ogcapi.html.domain.HtmlConfiguration) WithTransformationsApplied(de.ii.xtraplatform.features.domain.transform.WithTransformationsApplied) ApiMediaTypeContent(de.ii.ogcapi.foundation.domain.ApiMediaTypeContent) FeaturesCoreProviders(de.ii.ogcapi.features.core.domain.FeaturesCoreProviders) ImmutableMap(com.google.common.collect.ImmutableMap) FeatureTokenEncoder(de.ii.xtraplatform.features.domain.FeatureTokenEncoder) Collection(java.util.Collection) OgcApi(de.ii.ogcapi.foundation.domain.OgcApi) Codelist(de.ii.xtraplatform.codelists.domain.Codelist) Set(java.util.Set) Collectors(java.util.stream.Collectors) PropertyTransformation(de.ii.xtraplatform.features.domain.transform.PropertyTransformation) Objects(java.util.Objects) MapClient(de.ii.ogcapi.html.domain.MapClient) List(java.util.List) StringTemplateFilters(de.ii.xtraplatform.strings.domain.StringTemplateFilters) StringSchema(io.swagger.v3.oas.models.media.StringSchema) OgcApiDataV2(de.ii.ogcapi.foundation.domain.OgcApiDataV2) Entry(java.util.Map.Entry) Optional(java.util.Optional) FeaturesCoreValidation(de.ii.ogcapi.features.core.domain.FeaturesCoreValidation) FeatureTypeConfigurationOgcApi(de.ii.ogcapi.foundation.domain.FeatureTypeConfigurationOgcApi) EntityRegistry(de.ii.xtraplatform.store.domain.entities.EntityRegistry) ServicesContext(de.ii.xtraplatform.services.domain.ServicesContext) ItemTypeSpecificConformanceClass(de.ii.ogcapi.features.core.domain.ItemTypeSpecificConformanceClass) ExtensionConfiguration(de.ii.ogcapi.foundation.domain.ExtensionConfiguration) PropertyTransformations(de.ii.xtraplatform.features.domain.transform.PropertyTransformations) SimpleImmutableEntry(java.util.AbstractMap.SimpleImmutableEntry) Singleton(javax.inject.Singleton) AutoBind(com.github.azahnen.dagger.annotations.AutoBind) POSITION(de.ii.ogcapi.features.html.domain.FeaturesHtmlConfiguration.POSITION) MessageFormat(java.text.MessageFormat) Inject(javax.inject.Inject) ImmutableList(com.google.common.collect.ImmutableList) ValidationResult(de.ii.xtraplatform.store.domain.entities.ValidationResult) Schema(io.swagger.v3.oas.models.media.Schema) NavigationDTO(de.ii.ogcapi.html.domain.NavigationDTO) FeaturesHtmlConfiguration(de.ii.ogcapi.features.html.domain.FeaturesHtmlConfiguration) FeatureFormatExtension(de.ii.ogcapi.features.core.domain.FeatureFormatExtension) I18n(de.ii.ogcapi.foundation.domain.I18n) URICustomizer(de.ii.ogcapi.foundation.domain.URICustomizer) FeaturesCoreConfiguration(de.ii.ogcapi.features.core.domain.FeaturesCoreConfiguration) AbstractMap(java.util.AbstractMap) DEFAULT_FLATTENING_SEPARATOR(de.ii.ogcapi.features.core.domain.SchemaGeneratorFeatureOpenApi.DEFAULT_FLATTENING_SEPARATOR) FeatureTransformationContext(de.ii.ogcapi.features.core.domain.FeatureTransformationContext) Metadata(de.ii.ogcapi.foundation.domain.Metadata) Comparator(java.util.Comparator) Codelist(de.ii.xtraplatform.codelists.domain.Codelist) ImmutableValidationResult(de.ii.xtraplatform.store.domain.entities.ImmutableValidationResult) FeaturesHtmlConfiguration(de.ii.ogcapi.features.html.domain.FeaturesHtmlConfiguration) FeatureTypeConfigurationOgcApi(de.ii.ogcapi.foundation.domain.FeatureTypeConfigurationOgcApi) SimpleImmutableEntry(java.util.AbstractMap.SimpleImmutableEntry) PropertyTransformation(de.ii.xtraplatform.features.domain.transform.PropertyTransformation) FeatureSchema(de.ii.xtraplatform.features.domain.FeatureSchema) Collection(java.util.Collection) List(java.util.List) ImmutableList(com.google.common.collect.ImmutableList) Map(java.util.Map) ImmutableMap(com.google.common.collect.ImmutableMap) AbstractMap(java.util.AbstractMap)

Example 2 with MODE

use of de.ii.xtraplatform.store.domain.entities.ValidationResult.MODE in project ldproxy by interactive-instruments.

the class CapabilityCrs method onStartup.

@Override
public ValidationResult onStartup(OgcApi api, MODE apiValidation) {
    Optional<CrsConfiguration> crsConfiguration = api.getData().getExtension(CrsConfiguration.class).filter(ExtensionConfiguration::isEnabled);
    if (crsConfiguration.isEmpty()) {
        return ValidationResult.of();
    }
    EpsgCrs defaultCrs = api.getData().getExtension(FeaturesCoreConfiguration.class).map(FeaturesCoreConfiguration::getDefaultEpsgCrs).orElse(OgcCrs.CRS84);
    EpsgCrs providerCrs = featuresCoreProviders.getFeatureProvider(api.getData()).flatMap(featureProvider2 -> featureProvider2.getData().getNativeCrs()).orElse(OgcCrs.CRS84);
    EpsgCrs lastCrs = null;
    try {
        lastCrs = defaultCrs;
        crsTransformerFactory.getTransformer(providerCrs, defaultCrs);
        for (EpsgCrs crs : crsConfiguration.get().getAdditionalCrs()) {
            lastCrs = crs;
            crsTransformerFactory.getTransformer(providerCrs, crs);
        }
    } catch (Throwable e) {
        return ImmutableValidationResult.builder().mode(apiValidation).addErrors(String.format("Could not find transformation for %s -> %s: %s", providerCrs.toHumanReadableString(), lastCrs.toHumanReadableString(), e.getMessage())).build();
    }
    try {
        lastCrs = defaultCrs;
        crsTransformerFactory.getTransformer(defaultCrs, providerCrs);
        for (EpsgCrs crs : crsConfiguration.get().getAdditionalCrs()) {
            lastCrs = crs;
            crsTransformerFactory.getTransformer(crs, providerCrs);
        }
    } catch (Throwable e) {
        return ImmutableValidationResult.builder().mode(apiValidation).addErrors(String.format("Could not find transformation for %s -> %s: %s", lastCrs.toHumanReadableString(), providerCrs.toHumanReadableString(), e.getMessage())).build();
    }
    return ValidationResult.of();
}
Also used : Builder(de.ii.ogcapi.crs.domain.ImmutableCrsConfiguration.Builder) ExtensionConfiguration(de.ii.ogcapi.foundation.domain.ExtensionConfiguration) FeaturesCoreProviders(de.ii.ogcapi.features.core.domain.FeaturesCoreProviders) OgcApi(de.ii.ogcapi.foundation.domain.OgcApi) EpsgCrs(de.ii.xtraplatform.crs.domain.EpsgCrs) ImmutableValidationResult(de.ii.xtraplatform.store.domain.entities.ImmutableValidationResult) MODE(de.ii.xtraplatform.store.domain.entities.ValidationResult.MODE) Singleton(javax.inject.Singleton) AutoBind(com.github.azahnen.dagger.annotations.AutoBind) FeaturesCoreConfiguration(de.ii.ogcapi.features.core.domain.FeaturesCoreConfiguration) Inject(javax.inject.Inject) CrsConfiguration(de.ii.ogcapi.crs.domain.CrsConfiguration) ValidationResult(de.ii.xtraplatform.store.domain.entities.ValidationResult) CrsTransformerFactory(de.ii.xtraplatform.crs.domain.CrsTransformerFactory) OgcCrs(de.ii.xtraplatform.crs.domain.OgcCrs) Optional(java.util.Optional) ApiBuildingBlock(de.ii.ogcapi.foundation.domain.ApiBuildingBlock) CrsConfiguration(de.ii.ogcapi.crs.domain.CrsConfiguration) EpsgCrs(de.ii.xtraplatform.crs.domain.EpsgCrs) ExtensionConfiguration(de.ii.ogcapi.foundation.domain.ExtensionConfiguration)

Example 3 with MODE

use of de.ii.xtraplatform.store.domain.entities.ValidationResult.MODE in project ldproxy by interactive-instruments.

the class CapabilityTiles method onStartup.

@Override
public ValidationResult onStartup(OgcApi api, MODE apiValidation) {
    // since building block / capability components are currently always enabled,
    // we need to test, if the TILES module is enabled for the API and stop, if not
    OgcApiDataV2 apiData = api.getData();
    if (!apiData.getExtension(TilesConfiguration.class).map(ExtensionConfiguration::isEnabled).orElse(false)) {
        return ValidationResult.of();
    }
    try {
        SQLiteJDBCLoader.initialize();
    } catch (Exception e) {
        return ImmutableValidationResult.builder().mode(apiValidation).addStrictErrors(MessageFormat.format("Could not load SQLite: {}", e.getMessage())).build();
    }
    if (apiValidation == MODE.NONE) {
        return ValidationResult.of();
    }
    ImmutableValidationResult.Builder builder = ImmutableValidationResult.builder().mode(apiValidation);
    for (Map.Entry<String, TilesConfiguration> entry : apiData.getCollections().entrySet().stream().filter(entry -> entry.getValue().getEnabled() && entry.getValue().getExtension(TilesConfiguration.class).isPresent()).map(entry -> new AbstractMap.SimpleImmutableEntry<>(entry.getKey(), entry.getValue().getExtension(TilesConfiguration.class).get())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)).entrySet()) {
        String collectionId = entry.getKey();
        TilesConfiguration config = entry.getValue();
        Optional<FeatureSchema> schema = providers.getFeatureSchema(apiData, apiData.getCollections().get(collectionId));
        List<String> featureProperties = schema.isPresent() ? schemaInfo.getPropertyNames(schema.get(), false, false) : ImmutableList.of();
        List<String> formatLabels = extensionRegistry.getExtensionsForType(TileFormatExtension.class).stream().filter(formatExtension -> formatExtension.isEnabledForApi(apiData)).map(format -> format.getMediaType().label()).collect(Collectors.toUnmodifiableList());
        List<String> tileEncodings = config.getTileEncodingsDerived();
        if (Objects.isNull(tileEncodings)) {
            builder.addStrictErrors(MessageFormat.format("No tile encoding has been specified in the TILES module configuration of collection ''{0}''.", collectionId));
        } else {
            for (String encoding : config.getTileEncodingsDerived()) {
                if (!formatLabels.contains(encoding)) {
                    builder.addStrictErrors(MessageFormat.format("The tile encoding ''{0}'' is specified in the TILES module configuration of collection ''{1}'', but the format does not exist.", encoding, collectionId));
                }
            }
        }
        formatLabels = extensionRegistry.getExtensionsForType(TileSetFormatExtension.class).stream().filter(formatExtension -> formatExtension.isEnabledForApi(apiData)).map(format -> format.getMediaType().label()).collect(Collectors.toUnmodifiableList());
        for (String encoding : config.getTileSetEncodings()) {
            if (!formatLabels.contains(encoding)) {
                builder.addStrictErrors(MessageFormat.format("The tile set encoding ''{0}'' is specified in the TILES module configuration of collection ''{1}'', but the format does not exist.", encoding, collectionId));
            }
        }
        List<Double> center = config.getCenterDerived();
        if (center.size() != 0 && center.size() != 2)
            builder.addStrictErrors(MessageFormat.format("The center has been specified in the TILES module configuration of collection ''{1}'', but the array length is ''{0}'', not 2.", center.size(), collectionId));
        Map<String, MinMax> zoomLevels = config.getZoomLevelsDerived();
        for (Map.Entry<String, MinMax> entry2 : zoomLevels.entrySet()) {
            String tileMatrixSetId = entry2.getKey();
            Optional<TileMatrixSet> tileMatrixSet = tileMatrixSetRepository.get(tileMatrixSetId).filter(tms -> config.getTileMatrixSets().contains(tms.getId()));
            if (tileMatrixSet.isEmpty()) {
                builder.addStrictErrors(MessageFormat.format("The configuration in the TILES module of collection ''{0}'' references a tile matrix set ''{1}'' that is not available in this API.", collectionId, tileMatrixSetId));
            } else {
                if (tileMatrixSet.get().getMinLevel() > entry2.getValue().getMin()) {
                    builder.addStrictErrors(MessageFormat.format("The configuration in the TILES module of collection ''{0}'' for tile matrix set ''{1}'' is specified to start at level ''{2}'', but the minimum level of the tile matrix set is ''{3}''.", collectionId, tileMatrixSetId, entry2.getValue().getMin(), tileMatrixSet.get().getMinLevel()));
                }
                if (tileMatrixSet.get().getMaxLevel() < entry2.getValue().getMax()) {
                    builder.addStrictErrors(MessageFormat.format("The configuration in the TILES module of collection ''{0}'' for tile matrix set ''{1}'' is specified to end at level ''{2}'', but the maximum level of the tile matrix set is ''{3}''.", collectionId, tileMatrixSetId, entry2.getValue().getMax(), tileMatrixSet.get().getMaxLevel()));
                }
                if (entry2.getValue().getDefault().isPresent()) {
                    Integer defaultLevel = entry2.getValue().getDefault().get();
                    if (defaultLevel < entry2.getValue().getMin() || defaultLevel > entry2.getValue().getMax()) {
                        builder.addStrictErrors(MessageFormat.format("The configuration in the TILES module of collection ''{0}'' for tile matrix set ''{1}'' specifies a default level ''{2}'' that is outside of the range [ ''{3}'' : ''{4}'' ].", tileMatrixSetId, defaultLevel, entry2.getValue().getMin(), entry2.getValue().getMax()));
                    }
                }
            }
        }
        if (config.getTileProvider() instanceof TileProviderFeatures) {
            Map<String, MinMax> zoomLevelsCache = config.getZoomLevelsCacheDerived();
            if (Objects.nonNull(zoomLevelsCache)) {
                for (Map.Entry<String, MinMax> entry2 : zoomLevelsCache.entrySet()) {
                    String tileMatrixSetId = entry2.getKey();
                    MinMax zoomLevelsTms = getZoomLevels(apiData, tileMatrixSetId);
                    if (Objects.isNull(zoomLevelsTms)) {
                        builder.addStrictErrors(MessageFormat.format("The cache in the TILES module of collection ''{0}'' references a tile matrix set ''{1}'' that is not configured for this API.", collectionId, tileMatrixSetId));
                    } else {
                        if (zoomLevelsTms.getMin() > entry2.getValue().getMin()) {
                            builder.addStrictErrors(MessageFormat.format("The cache in the TILES module of collection ''{0}'' for tile matrix set ''{1}'' is specified to start at level ''{2}'', but the minimum level is ''{3}''.", collectionId, tileMatrixSetId, entry2.getValue().getMin(), zoomLevelsTms.getMin()));
                        }
                        if (zoomLevelsTms.getMax() < entry2.getValue().getMax()) {
                            builder.addStrictErrors(MessageFormat.format("The cache in the TILES module of collection ''{0}'' for tile matrix set ''{1}'' is specified to end at level ''{2}'', but the maximum level is ''{3}''.", collectionId, tileMatrixSetId, entry2.getValue().getMax(), zoomLevelsTms.getMax()));
                        }
                    }
                }
            }
            Map<String, MinMax> seeding = config.getSeedingDerived();
            if (Objects.nonNull(seeding)) {
                for (Map.Entry<String, MinMax> entry2 : seeding.entrySet()) {
                    String tileMatrixSetId = entry2.getKey();
                    MinMax zoomLevelsTms = getZoomLevels(apiData, tileMatrixSetId);
                    if (Objects.isNull(zoomLevelsTms)) {
                        builder.addStrictErrors(MessageFormat.format("The seeding in the TILES module of collection ''{0}'' references a tile matrix set ''{1}'' that is not configured for this API.", collectionId, tileMatrixSetId));
                    } else {
                        if (zoomLevelsTms.getMin() > entry2.getValue().getMin()) {
                            builder.addStrictErrors(MessageFormat.format("The seeding in the TILES module of collection ''{0}'' for tile matrix set ''{1}'' is specified to start at level ''{2}'', but the minimum level is ''{3}''.", collectionId, tileMatrixSetId, entry2.getValue().getMin(), zoomLevelsTms.getMin()));
                        }
                        if (zoomLevelsTms.getMax() < entry2.getValue().getMax()) {
                            builder.addStrictErrors(MessageFormat.format("The seeding in the TILES module of collection ''{0}'' for tile matrix set ''{1}'' is specified to end at level ''{2}'', but the maximum level is ''{3}''.", collectionId, tileMatrixSetId, entry2.getValue().getMax(), zoomLevelsTms.getMax()));
                        }
                    }
                }
            }
            final Integer limit = Objects.requireNonNullElse(config.getLimitDerived(), 0);
            if (limit < 1) {
                builder.addStrictErrors(MessageFormat.format("The feature limit in the TILES module must be a positive integer. Found in collection ''{1}'': {0}.", limit, collectionId));
            }
            final Map<String, List<PredefinedFilter>> filters = config.getFiltersDerived();
            if (Objects.nonNull(filters)) {
                for (Map.Entry<String, List<PredefinedFilter>> entry2 : filters.entrySet()) {
                    String tileMatrixSetId = entry2.getKey();
                    MinMax zoomLevelsCfg = getZoomLevels(apiData, config, tileMatrixSetId);
                    if (Objects.isNull(zoomLevelsCfg)) {
                        builder.addStrictErrors(MessageFormat.format("The filters in the TILES module of collection ''{0}'' references a tile matrix set ''{0}'' that is not configured for this API.", collectionId, tileMatrixSetId));
                    } else {
                        for (PredefinedFilter filter : entry2.getValue()) {
                            if (zoomLevelsCfg.getMin() > filter.getMin()) {
                                builder.addStrictErrors(MessageFormat.format("A filter in the TILES module of collection ''{0}'' for tile matrix set ''{1}'' is specified to start at level ''{2}'', but the minimum level is ''{3}''.", collectionId, tileMatrixSetId, filter.getMin(), zoomLevelsCfg.getMin()));
                            }
                            if (zoomLevelsCfg.getMax() < filter.getMax()) {
                                builder.addStrictErrors(MessageFormat.format("A filter in the TILES module of collection ''{0}'' for tile matrix set ''{1}'' is specified to end at level ''{2}'', but the maximum level is ''{3}''.", collectionId, tileMatrixSetId, filter.getMax(), zoomLevelsCfg.getMax()));
                            }
                            if (filter.getFilter().isPresent()) {
                                // try to convert the filter to CQL2-text
                                String expression = filter.getFilter().get();
                                FeatureTypeConfigurationOgcApi collectionData = apiData.getCollections().get(collectionId);
                                final Map<String, String> filterableFields = queryParser.getFilterableFields(apiData, collectionData);
                                final Map<String, String> queryableTypes = queryParser.getQueryableTypes(apiData, collectionData);
                                try {
                                    queryParser.getFilterFromQuery(ImmutableMap.of("filter", expression), filterableFields, ImmutableSet.of("filter"), queryableTypes, Cql.Format.TEXT);
                                } catch (Exception e) {
                                    builder.addErrors(MessageFormat.format("A filter ''{0}'' in the TILES module of collection ''{1}'' for tile matrix set ''{2}'' is invalid. Reason: {3}", expression, collectionId, tileMatrixSetId, e.getMessage()));
                                }
                            }
                        }
                    }
                }
            }
            final Map<String, List<Rule>> rules = config.getRulesDerived();
            if (Objects.nonNull(rules)) {
                for (Map.Entry<String, List<Rule>> entry2 : rules.entrySet()) {
                    String tileMatrixSetId = entry2.getKey();
                    MinMax zoomLevelsCfg = getZoomLevels(apiData, config, tileMatrixSetId);
                    if (Objects.isNull(zoomLevelsCfg)) {
                        builder.addStrictErrors(MessageFormat.format("The rules in the TILES module of collection ''{0}'' references a tile matrix set ''{0}'' that is not configured for this API.", collectionId, tileMatrixSetId));
                    } else {
                        for (Rule rule : entry2.getValue()) {
                            if (zoomLevelsCfg.getMin() > rule.getMin()) {
                                builder.addStrictErrors(MessageFormat.format("A rule in the TILES module of collection ''{0}'' for tile matrix set ''{1}'' is specified to start at level ''{2}'', but the minimum level is ''{3}''.", collectionId, tileMatrixSetId, rule.getMin(), zoomLevelsCfg.getMin()));
                            }
                            if (zoomLevelsCfg.getMax() < rule.getMax()) {
                                builder.addStrictErrors(MessageFormat.format("A rule in the TILES module of collection ''{0}'' for tile matrix set ''{1}'' is specified to end at level ''{2}'', but the maximum level is ''{3}''.", collectionId, tileMatrixSetId, rule.getMax(), zoomLevelsCfg.getMax()));
                            }
                            for (String property : rule.getProperties()) {
                                if (!featureProperties.contains(property)) {
                                    builder.addErrors(MessageFormat.format("A rule in the TILES module of collection ''{0}'' for tile matrix set ''{1}'' references property ''{2}'' that is not part of the feature schema.", collectionId, tileMatrixSetId, property));
                                }
                            }
                            for (String property : rule.getGroupBy()) {
                                if (!featureProperties.contains(property)) {
                                    builder.addErrors(MessageFormat.format("A rule in the TILES module of collection ''{0}'' for tile matrix set ''{1}'' references group-by property ''{2}'' that is not part of the feature schema.", collectionId, tileMatrixSetId, property));
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    return builder.build();
}
Also used : TileFormatWithQuerySupportExtension(de.ii.ogcapi.tiles.domain.TileFormatWithQuerySupportExtension) Builder(de.ii.ogcapi.tiles.domain.ImmutableTilesConfiguration.Builder) ExtensionConfiguration(de.ii.ogcapi.foundation.domain.ExtensionConfiguration) TileSetFormatExtension(de.ii.ogcapi.tiles.domain.TileSetFormatExtension) ImmutableValidationResult(de.ii.xtraplatform.store.domain.entities.ImmutableValidationResult) MODE(de.ii.xtraplatform.store.domain.entities.ValidationResult.MODE) Singleton(javax.inject.Singleton) AutoBind(com.github.azahnen.dagger.annotations.AutoBind) TilesConfiguration(de.ii.ogcapi.tiles.domain.TilesConfiguration) MessageFormat(java.text.MessageFormat) FeaturesQuery(de.ii.ogcapi.features.core.domain.FeaturesQuery) Inject(javax.inject.Inject) ImmutableList(com.google.common.collect.ImmutableList) ValidationResult(de.ii.xtraplatform.store.domain.entities.ValidationResult) PredefinedFilter(de.ii.ogcapi.tiles.domain.PredefinedFilter) Rule(de.ii.ogcapi.tiles.domain.Rule) Map(java.util.Map) TileMatrixSetRepository(de.ii.ogcapi.tiles.domain.tileMatrixSet.TileMatrixSetRepository) ApiBuildingBlock(de.ii.ogcapi.foundation.domain.ApiBuildingBlock) ExtensionRegistry(de.ii.ogcapi.foundation.domain.ExtensionRegistry) FeatureSchema(de.ii.xtraplatform.features.domain.FeatureSchema) ImmutableSet(com.google.common.collect.ImmutableSet) FeaturesCoreProviders(de.ii.ogcapi.features.core.domain.FeaturesCoreProviders) ImmutableMap(com.google.common.collect.ImmutableMap) MinMax(de.ii.ogcapi.tiles.domain.MinMax) ImmutableMinMax(de.ii.ogcapi.tiles.domain.ImmutableMinMax) OgcApi(de.ii.ogcapi.foundation.domain.OgcApi) SQLiteJDBCLoader(org.sqlite.SQLiteJDBCLoader) Collectors(java.util.stream.Collectors) Cql(de.ii.xtraplatform.cql.domain.Cql) Objects(java.util.Objects) AbstractMap(java.util.AbstractMap) List(java.util.List) SchemaInfo(de.ii.ogcapi.features.core.domain.SchemaInfo) OgcApiDataV2(de.ii.ogcapi.foundation.domain.OgcApiDataV2) TileFormatExtension(de.ii.ogcapi.tiles.domain.TileFormatExtension) TileMatrixSet(de.ii.ogcapi.tiles.domain.tileMatrixSet.TileMatrixSet) Optional(java.util.Optional) FormatExtension(de.ii.ogcapi.foundation.domain.FormatExtension) FeatureTypeConfigurationOgcApi(de.ii.ogcapi.foundation.domain.FeatureTypeConfigurationOgcApi) TilesConfiguration(de.ii.ogcapi.tiles.domain.TilesConfiguration) ImmutableValidationResult(de.ii.xtraplatform.store.domain.entities.ImmutableValidationResult) MinMax(de.ii.ogcapi.tiles.domain.MinMax) ImmutableMinMax(de.ii.ogcapi.tiles.domain.ImmutableMinMax) AbstractMap(java.util.AbstractMap) FeatureTypeConfigurationOgcApi(de.ii.ogcapi.foundation.domain.FeatureTypeConfigurationOgcApi) FeatureSchema(de.ii.xtraplatform.features.domain.FeatureSchema) PredefinedFilter(de.ii.ogcapi.tiles.domain.PredefinedFilter) ImmutableList(com.google.common.collect.ImmutableList) List(java.util.List) TileMatrixSet(de.ii.ogcapi.tiles.domain.tileMatrixSet.TileMatrixSet) OgcApiDataV2(de.ii.ogcapi.foundation.domain.OgcApiDataV2) ExtensionConfiguration(de.ii.ogcapi.foundation.domain.ExtensionConfiguration) Rule(de.ii.ogcapi.tiles.domain.Rule) Map(java.util.Map) ImmutableMap(com.google.common.collect.ImmutableMap) AbstractMap(java.util.AbstractMap) TileSetFormatExtension(de.ii.ogcapi.tiles.domain.TileSetFormatExtension)

Example 4 with MODE

use of de.ii.xtraplatform.store.domain.entities.ValidationResult.MODE in project ldproxy by interactive-instruments.

the class EndpointRoutesPost method computeDefinition.

@Override
protected ApiEndpointDefinition computeDefinition(OgcApiDataV2 apiData) {
    Optional<RoutingConfiguration> config = apiData.getExtension(RoutingConfiguration.class);
    Optional<RoutesConfiguration> routesConfig = providers.getFeatureProviderOrThrow(apiData).getData().getExtension(RoutesConfiguration.class);
    ImmutableApiEndpointDefinition.Builder definitionBuilder = new ImmutableApiEndpointDefinition.Builder().apiEntrypoint("routes").sortPriority(ApiEndpointDefinition.SORT_PRIORITY_ROUTES_POST);
    String path = "/routes";
    HttpMethods method = HttpMethods.POST;
    List<OgcApiQueryParameter> queryParameters = getQueryParameters(extensionRegistry, apiData, path, method);
    List<ApiHeader> headers = getHeaders(extensionRegistry, apiData, path, method);
    String operationSummary = "compute a route";
    String description = String.format("This creates a new route. The payload of the request specifies the definition of the new route.\n\n" + (config.map(RoutingConfiguration::supportsIntermediateWaypoints).orElse(false) ? "A route is defined by two or more `waypoints`, which will be visited in the order in which they are provided. " : "A route is defined by two `waypoints`, the start and end location of the route. ") + "If the coordinates are in a coordinate reference system that is not WGS 84 longitude/latitude, " + "the URI of the coordinate reference system must be provided in a member `coordRefSys` in the waypoints object.\n\n" + "A preference how the route should be optimized can be specified (`preference`). The default value is `%s`. Valid values are:\n\n" + String.join("", routesConfig.map(RoutesConfiguration::getPreferences).map(Map::entrySet).orElseThrow().stream().map(entry -> String.format("* `%s`: %s\n", entry.getKey(), entry.getValue().getLabel())).collect(Collectors.toUnmodifiableList())) + "\n" + "The mode of transportation can be specified (`mode`). The default value is `%s`. Valid values are:\n\n" + String.join("", routesConfig.map(RoutesConfiguration::getModes).map(Map::entrySet).orElseThrow().stream().map(entry -> String.format("* `%s`: %s\n", entry.getKey(), entry.getValue())).collect(Collectors.toUnmodifiableList())) + "\n" + "In addition, some flags can be provided in `additionalFlags` to alter the computation of the route:\n\n" + String.join("", config.map(RoutingConfiguration::getAdditionalFlags).map(Map::entrySet).orElseThrow().stream().map(entry -> String.format("* `%s`: %s\n", entry.getKey(), entry.getValue().getLabel())).collect(Collectors.toUnmodifiableList())) + "\n" + "An optional `name` for the route may be provided.\n\n" + (config.map(RoutingConfiguration::supportsHeightRestrictions).orElse(false) ? "An optional vehicle height in meter may be provided (`height_m`).\n\n" : "") + (config.map(RoutingConfiguration::supportsWeightRestrictions).orElse(false) ? "An optional vehicle weight in metric tons may be provided (`weight_t`).\n\n" : "") + (config.map(RoutingConfiguration::supportsObstacles).orElse(false) ? "An optional multi-polygon geometry of areas that should be avoided may be provided (`obstacles`).\n\n" : ""), config.map(RoutingConfiguration::getDefaultPreference).orElseThrow(), config.map(RoutingConfiguration::getDefaultMode).orElseThrow());
    Optional<String> operationDescription = Optional.of(description);
    ImmutableOgcApiResourceData.Builder resourceBuilder = new ImmutableOgcApiResourceData.Builder().path(path);
    Map<MediaType, ApiMediaTypeContent> requestContent = getRequestContent(config);
    Map<MediaType, ApiMediaTypeContent> responseContent = getContent(apiData, "/routes", method);
    ApiOperation operation = addOperation(apiData, method, OPERATION_TYPE.PROCESS, requestContent, responseContent, queryParameters, headers, path, operationSummary, operationDescription, Optional.empty(), TAGS);
    if (operation != null)
        resourceBuilder.putOperations(method.toString(), operation);
    definitionBuilder.putResources(path, resourceBuilder.build());
    return definitionBuilder.build();
}
Also used : Endpoint(de.ii.ogcapi.foundation.domain.Endpoint) ApiHeader(de.ii.ogcapi.foundation.domain.ApiHeader) ImmutableApiMediaTypeContent(de.ii.ogcapi.foundation.domain.ImmutableApiMediaTypeContent) RouteRepository(de.ii.ogcapi.routes.domain.RouteRepository) User(de.ii.xtraplatform.auth.domain.User) LoggerFactory(org.slf4j.LoggerFactory) EpsgCrs(de.ii.xtraplatform.crs.domain.EpsgCrs) ImmutableValidationResult(de.ii.xtraplatform.store.domain.entities.ImmutableValidationResult) ImmutableRouteDefinition(de.ii.ogcapi.routes.domain.ImmutableRouteDefinition) MODE(de.ii.xtraplatform.store.domain.entities.ValidationResult.MODE) DeserializationFeature(com.fasterxml.jackson.databind.DeserializationFeature) ApiMediaType(de.ii.ogcapi.foundation.domain.ApiMediaType) ImmutableApiMediaType(de.ii.ogcapi.foundation.domain.ImmutableApiMediaType) RoutesConfiguration(de.ii.xtraplatform.routes.sql.domain.RoutesConfiguration) MediaType(javax.ws.rs.core.MediaType) ConformanceClass(de.ii.ogcapi.foundation.domain.ConformanceClass) SchemaGenerator(de.ii.ogcapi.foundation.domain.SchemaGenerator) Map(java.util.Map) ImmutableOgcApiResourceData(de.ii.ogcapi.collections.domain.ImmutableOgcApiResourceData) ExtensionRegistry(de.ii.ogcapi.foundation.domain.ExtensionRegistry) ApiOperation(de.ii.ogcapi.foundation.domain.ApiOperation) ApiMediaTypeContent(de.ii.ogcapi.foundation.domain.ApiMediaTypeContent) ApiRequestContext(de.ii.ogcapi.foundation.domain.ApiRequestContext) Context(javax.ws.rs.core.Context) FeaturesCoreProviders(de.ii.ogcapi.features.core.domain.FeaturesCoreProviders) ImmutableMap(com.google.common.collect.ImmutableMap) OgcApi(de.ii.ogcapi.foundation.domain.OgcApi) HttpMethods(de.ii.ogcapi.foundation.domain.HttpMethods) ImmutableQueryInputComputeRoute(de.ii.ogcapi.routes.domain.ImmutableQueryInputComputeRoute) Collectors(java.util.stream.Collectors) Jdk8Module(com.fasterxml.jackson.datatype.jdk8.Jdk8Module) StandardCharsets(java.nio.charset.StandardCharsets) Example(de.ii.ogcapi.foundation.domain.Example) ImmutableApiEndpointDefinition(de.ii.ogcapi.foundation.domain.ImmutableApiEndpointDefinition) ApiEndpointDefinition(de.ii.ogcapi.foundation.domain.ApiEndpointDefinition) ImmutableQueryInputRoute(de.ii.ogcapi.routes.domain.ImmutableQueryInputRoute) WaypointsValue(de.ii.ogcapi.routes.domain.WaypointsValue) List(java.util.List) Response(javax.ws.rs.core.Response) ImmutableWaypointsValue(de.ii.ogcapi.routes.domain.ImmutableWaypointsValue) OgcApiDataV2(de.ii.ogcapi.foundation.domain.OgcApiDataV2) RoutingConfiguration(de.ii.ogcapi.routes.domain.RoutingConfiguration) Optional(java.util.Optional) FormatExtension(de.ii.ogcapi.foundation.domain.FormatExtension) UriInfo(javax.ws.rs.core.UriInfo) FeatureQuery(de.ii.xtraplatform.features.domain.FeatureQuery) ExtensionConfiguration(de.ii.ogcapi.foundation.domain.ExtensionConfiguration) HtmlFormDefaults(de.ii.ogcapi.routes.domain.HtmlFormDefaults) HtmlForm(de.ii.ogcapi.routes.domain.HtmlForm) Auth(io.dropwizard.auth.Auth) Hashing(com.google.common.hash.Hashing) RouteFormatExtension(de.ii.ogcapi.routes.domain.RouteFormatExtension) Singleton(javax.inject.Singleton) ImmutableWaypoints(de.ii.ogcapi.routes.domain.ImmutableWaypoints) AutoBind(com.github.azahnen.dagger.annotations.AutoBind) FeaturesQuery(de.ii.ogcapi.features.core.domain.FeaturesQuery) Inject(javax.inject.Inject) HttpServletRequest(javax.servlet.http.HttpServletRequest) ImmutableList(com.google.common.collect.ImmutableList) ValidationResult(de.ii.xtraplatform.store.domain.entities.ValidationResult) RouteDefinition(de.ii.ogcapi.routes.domain.RouteDefinition) OgcCrs(de.ii.xtraplatform.crs.domain.OgcCrs) Schema(io.swagger.v3.oas.models.media.Schema) OgcApiQueryParameter(de.ii.ogcapi.foundation.domain.OgcApiQueryParameter) POST(javax.ws.rs.POST) Logger(org.slf4j.Logger) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) QueryHandlerRoutes(de.ii.ogcapi.routes.domain.QueryHandlerRoutes) IOException(java.io.IOException) FeatureProvider2(de.ii.xtraplatform.features.domain.FeatureProvider2) GuavaModule(com.fasterxml.jackson.datatype.guava.GuavaModule) ImmutableRouteDefinitionInputs(de.ii.ogcapi.routes.domain.ImmutableRouteDefinitionInputs) ImmutableExample(de.ii.ogcapi.foundation.domain.ImmutableExample) CapabilityRouting(de.ii.ogcapi.routes.app.CapabilityRouting) ImmutableApiEndpointDefinition(de.ii.ogcapi.foundation.domain.ImmutableApiEndpointDefinition) HttpMethods(de.ii.ogcapi.foundation.domain.HttpMethods) ApiHeader(de.ii.ogcapi.foundation.domain.ApiHeader) OgcApiQueryParameter(de.ii.ogcapi.foundation.domain.OgcApiQueryParameter) ImmutableApiMediaTypeContent(de.ii.ogcapi.foundation.domain.ImmutableApiMediaTypeContent) ApiMediaTypeContent(de.ii.ogcapi.foundation.domain.ApiMediaTypeContent) ImmutableOgcApiResourceData(de.ii.ogcapi.collections.domain.ImmutableOgcApiResourceData) RoutingConfiguration(de.ii.ogcapi.routes.domain.RoutingConfiguration) RoutesConfiguration(de.ii.xtraplatform.routes.sql.domain.RoutesConfiguration) ApiOperation(de.ii.ogcapi.foundation.domain.ApiOperation) ApiMediaType(de.ii.ogcapi.foundation.domain.ApiMediaType) ImmutableApiMediaType(de.ii.ogcapi.foundation.domain.ImmutableApiMediaType) MediaType(javax.ws.rs.core.MediaType) Map(java.util.Map) ImmutableMap(com.google.common.collect.ImmutableMap)

Example 5 with MODE

use of de.ii.xtraplatform.store.domain.entities.ValidationResult.MODE in project ldproxy by interactive-instruments.

the class FeaturesFormatGeoJson method onStartup.

@Override
public ValidationResult onStartup(OgcApi api, MODE apiValidation) {
    // no additional operational checks for now, only validation; we can stop, if no validation is requested
    if (apiValidation == MODE.NONE)
        return ValidationResult.of();
    ImmutableValidationResult.Builder builder = ImmutableValidationResult.builder().mode(apiValidation);
    Map<String, FeatureSchema> featureSchemas = providers.getFeatureSchemas(api.getData());
    // get GeoJSON configurations to process
    Map<String, GeoJsonConfiguration> geoJsonConfigurationMap = api.getData().getCollections().entrySet().stream().map(entry -> {
        final FeatureTypeConfigurationOgcApi collectionData = entry.getValue();
        final GeoJsonConfiguration config = collectionData.getExtension(GeoJsonConfiguration.class).orElse(null);
        if (Objects.isNull(config))
            return null;
        return new AbstractMap.SimpleImmutableEntry<>(entry.getKey(), config);
    }).filter(Objects::nonNull).collect(ImmutableMap.toImmutableMap(Map.Entry::getKey, Map.Entry::getValue));
    for (Map.Entry<String, GeoJsonConfiguration> entry : geoJsonConfigurationMap.entrySet()) {
        String collectionId = entry.getKey();
        GeoJsonConfiguration config = entry.getValue();
        if (config.getNestedObjectStrategy() == GeoJsonConfiguration.NESTED_OBJECTS.FLATTEN && config.getMultiplicityStrategy() != GeoJsonConfiguration.MULTIPLICITY.SUFFIX) {
            builder.addStrictErrors(MessageFormat.format("The GeoJSON Nested Object Strategy ''FLATTEN'' in collection ''{0}'' cannot be combined with the Multiplicity Strategy ''{1}''.", collectionId, config.getMultiplicityStrategy()));
        } else if (config.getNestedObjectStrategy() == GeoJsonConfiguration.NESTED_OBJECTS.NEST && config.getMultiplicityStrategy() != GeoJsonConfiguration.MULTIPLICITY.ARRAY) {
            builder.addStrictErrors(MessageFormat.format("The GeoJSON Nested Object Strategy ''FLATTEN'' in collection ''{0}'' cannot be combined with the Multiplicity Strategy ''{1}''.", collectionId, config.getMultiplicityStrategy()));
        }
        List<String> separators = ImmutableList.of(".", "_", ":", "/");
        if (!separators.contains(config.getSeparator())) {
            builder.addStrictErrors(MessageFormat.format("The separator ''{0}'' in collection ''{1}'' is invalid, it must be one of {2}.", config.getSeparator(), collectionId, separators));
        }
    }
    Map<String, Collection<String>> keyMap = geoJsonConfigurationMap.entrySet().stream().map(entry -> new AbstractMap.SimpleImmutableEntry<>(entry.getKey(), entry.getValue().getTransformations().keySet())).collect(ImmutableMap.toImmutableMap(Map.Entry::getKey, Map.Entry::getValue));
    for (Map.Entry<String, Collection<String>> stringCollectionEntry : featuresCoreValidator.getInvalidPropertyKeys(keyMap, featureSchemas).entrySet()) {
        for (String property : stringCollectionEntry.getValue()) {
            builder.addStrictErrors(MessageFormat.format("A transformation for property ''{0}'' in collection ''{1}'' is invalid, because the property was not found in the provider schema.", property, stringCollectionEntry.getKey()));
        }
    }
    Set<String> codelists = entityRegistry.getEntitiesForType(Codelist.class).stream().map(Codelist::getId).collect(Collectors.toUnmodifiableSet());
    for (Map.Entry<String, GeoJsonConfiguration> entry : geoJsonConfigurationMap.entrySet()) {
        String collectionId = entry.getKey();
        for (Map.Entry<String, List<PropertyTransformation>> entry2 : entry.getValue().getTransformations().entrySet()) {
            String property = entry2.getKey();
            for (PropertyTransformation transformation : entry2.getValue()) {
                builder = transformation.validate(builder, collectionId, property, codelists);
            }
        }
    }
    return builder.build();
}
Also used : ImmutableApiMediaTypeContent(de.ii.ogcapi.foundation.domain.ImmutableApiMediaTypeContent) ImmutableValidationResult(de.ii.xtraplatform.store.domain.entities.ImmutableValidationResult) MODE(de.ii.xtraplatform.store.domain.entities.ValidationResult.MODE) CollectionsConfiguration(de.ii.ogcapi.collections.domain.CollectionsConfiguration) ApiMediaType(de.ii.ogcapi.foundation.domain.ApiMediaType) ImmutableApiMediaType(de.ii.ogcapi.foundation.domain.ImmutableApiMediaType) MediaType(javax.ws.rs.core.MediaType) GeoJsonWriterRegistry(de.ii.ogcapi.features.geojson.domain.GeoJsonWriterRegistry) Locale(java.util.Locale) Map(java.util.Map) SchemaGeneratorCollectionOpenApi(de.ii.ogcapi.features.core.domain.SchemaGeneratorCollectionOpenApi) SchemaGeneratorOpenApi(de.ii.ogcapi.features.core.domain.SchemaGeneratorOpenApi) GeoJsonWriter(de.ii.ogcapi.features.geojson.domain.GeoJsonWriter) FeatureSchema(de.ii.xtraplatform.features.domain.FeatureSchema) ApiMediaTypeContent(de.ii.ogcapi.foundation.domain.ApiMediaTypeContent) FeaturesCoreProviders(de.ii.ogcapi.features.core.domain.FeaturesCoreProviders) ImmutableMap(com.google.common.collect.ImmutableMap) ImmutableFeatureTransformationContextGeoJson(de.ii.ogcapi.features.geojson.domain.ImmutableFeatureTransformationContextGeoJson) FeatureTokenEncoder(de.ii.xtraplatform.features.domain.FeatureTokenEncoder) Collection(java.util.Collection) OgcApi(de.ii.ogcapi.foundation.domain.OgcApi) Codelist(de.ii.xtraplatform.codelists.domain.Codelist) HttpMethods(de.ii.ogcapi.foundation.domain.HttpMethods) Set(java.util.Set) Collectors(java.util.stream.Collectors) PropertyTransformation(de.ii.xtraplatform.features.domain.transform.PropertyTransformation) Objects(java.util.Objects) List(java.util.List) OgcApiDataV2(de.ii.ogcapi.foundation.domain.OgcApiDataV2) Optional(java.util.Optional) ObjectSchema(io.swagger.v3.oas.models.media.ObjectSchema) FeaturesCoreValidation(de.ii.ogcapi.features.core.domain.FeaturesCoreValidation) FeatureTypeConfigurationOgcApi(de.ii.ogcapi.foundation.domain.FeatureTypeConfigurationOgcApi) EntityRegistry(de.ii.xtraplatform.store.domain.entities.EntityRegistry) ItemTypeSpecificConformanceClass(de.ii.ogcapi.features.core.domain.ItemTypeSpecificConformanceClass) ExtensionConfiguration(de.ii.ogcapi.foundation.domain.ExtensionConfiguration) Singleton(javax.inject.Singleton) AutoBind(com.github.azahnen.dagger.annotations.AutoBind) MessageFormat(java.text.MessageFormat) Inject(javax.inject.Inject) ImmutableList(com.google.common.collect.ImmutableList) ValidationResult(de.ii.xtraplatform.store.domain.entities.ValidationResult) FeatureEncoderGeoJson(de.ii.ogcapi.features.geojson.domain.FeatureEncoderGeoJson) Schema(io.swagger.v3.oas.models.media.Schema) ImmutableSortedSet(com.google.common.collect.ImmutableSortedSet) FeatureFormatExtension(de.ii.ogcapi.features.core.domain.FeatureFormatExtension) FeaturesCoreConfiguration(de.ii.ogcapi.features.core.domain.FeaturesCoreConfiguration) GeoJsonConfiguration(de.ii.ogcapi.features.geojson.domain.GeoJsonConfiguration) AbstractMap(java.util.AbstractMap) FeatureTransformationContext(de.ii.ogcapi.features.core.domain.FeatureTransformationContext) Comparator(java.util.Comparator) GeoJsonConfiguration(de.ii.ogcapi.features.geojson.domain.GeoJsonConfiguration) Codelist(de.ii.xtraplatform.codelists.domain.Codelist) ImmutableValidationResult(de.ii.xtraplatform.store.domain.entities.ImmutableValidationResult) FeatureTypeConfigurationOgcApi(de.ii.ogcapi.foundation.domain.FeatureTypeConfigurationOgcApi) PropertyTransformation(de.ii.xtraplatform.features.domain.transform.PropertyTransformation) FeatureSchema(de.ii.xtraplatform.features.domain.FeatureSchema) Collection(java.util.Collection) List(java.util.List) ImmutableList(com.google.common.collect.ImmutableList) Map(java.util.Map) ImmutableMap(com.google.common.collect.ImmutableMap) AbstractMap(java.util.AbstractMap)

Aggregations

MODE (de.ii.xtraplatform.store.domain.entities.ValidationResult.MODE)9 AutoBind (com.github.azahnen.dagger.annotations.AutoBind)8 FeaturesCoreProviders (de.ii.ogcapi.features.core.domain.FeaturesCoreProviders)8 ExtensionConfiguration (de.ii.ogcapi.foundation.domain.ExtensionConfiguration)8 OgcApiDataV2 (de.ii.ogcapi.foundation.domain.OgcApiDataV2)8 ValidationResult (de.ii.xtraplatform.store.domain.entities.ValidationResult)8 Optional (java.util.Optional)8 Inject (javax.inject.Inject)8 Singleton (javax.inject.Singleton)8 ImmutableList (com.google.common.collect.ImmutableList)7 OgcApi (de.ii.ogcapi.foundation.domain.OgcApi)7 ImmutableMap (com.google.common.collect.ImmutableMap)6 FeaturesCoreConfiguration (de.ii.ogcapi.features.core.domain.FeaturesCoreConfiguration)6 FeatureTypeConfigurationOgcApi (de.ii.ogcapi.foundation.domain.FeatureTypeConfigurationOgcApi)6 ImmutableValidationResult (de.ii.xtraplatform.store.domain.entities.ImmutableValidationResult)6 List (java.util.List)6 Map (java.util.Map)5 Objects (java.util.Objects)5 Collectors (java.util.stream.Collectors)5 FeatureSchema (de.ii.xtraplatform.features.domain.FeatureSchema)4