Search in sources :

Example 1 with ImmutableOgcApiCollection

use of de.ii.ogcapi.collections.domain.ImmutableOgcApiCollection in project ldproxy by interactive-instruments.

the class CollectionExtensionFeatures method createNestedCollection.

public static OgcApiCollection createNestedCollection(FeatureTypeConfigurationOgcApi featureType, OgcApi api, ApiMediaType mediaType, List<ApiMediaType> alternateMediaTypes, Optional<Locale> language, URICustomizer uriCustomizer, List<CollectionExtension> collectionExtenders) {
    ImmutableOgcApiCollection.Builder ogcApiCollection = ImmutableOgcApiCollection.builder().id(featureType.getId());
    for (CollectionExtension ogcApiCollectionExtension : collectionExtenders) {
        ogcApiCollection = ogcApiCollectionExtension.process(ogcApiCollection, featureType, api, uriCustomizer.copy(), true, mediaType, alternateMediaTypes, language);
    }
    ImmutableOgcApiCollection result = null;
    try {
        result = ogcApiCollection.build();
    } catch (Throwable e) {
        result = null;
    }
    return result;
}
Also used : Builder(de.ii.ogcapi.collections.domain.ImmutableOgcApiCollection.Builder) CollectionExtension(de.ii.ogcapi.collections.domain.CollectionExtension) ImmutableOgcApiCollection(de.ii.ogcapi.collections.domain.ImmutableOgcApiCollection)

Aggregations

CollectionExtension (de.ii.ogcapi.collections.domain.CollectionExtension)1 ImmutableOgcApiCollection (de.ii.ogcapi.collections.domain.ImmutableOgcApiCollection)1 Builder (de.ii.ogcapi.collections.domain.ImmutableOgcApiCollection.Builder)1