Search in sources :

Example 1 with OGCConfiguration

use of io.arlas.server.core.app.OGCConfiguration in project ARLAS-server by gisaia.

the class CSWService method initMetaCollection.

private void initMetaCollection(String index, OGCConfiguration ogcConfiguration, InspireConfiguration inspireConfiguration) throws ArlasException {
    List<CollectionReference> collectionReferences = collectionReferenceService.getAllCollectionReferences(Optional.empty());
    long count = collectionReferences.stream().filter(collectionReference -> collectionReference.collectionName.equals(getMetacollectionName())).count();
    if (count > 0) {
        collectionReferenceService.deleteCollectionReference(getMetacollectionName());
    }
    CollectionReference metacolletion = createMetaCollection(index, ogcConfiguration, inspireConfiguration);
    collectionReferenceService.putCollectionReference(metacolletion);
}
Also used : CollectionReference(io.arlas.server.core.model.CollectionReference) List(java.util.List) ArlasException(io.arlas.server.core.exceptions.ArlasException) InspireConfiguration(io.arlas.server.core.app.InspireConfiguration) CollectionReferenceService(io.arlas.server.core.services.CollectionReferenceService) OGCConfiguration(io.arlas.server.core.app.OGCConfiguration) OgcInspireConfigurationParameters(io.arlas.server.core.model.OgcInspireConfigurationParameters) OGCCollectionReferenceDao(io.arlas.server.ogc.common.dao.OGCCollectionReferenceDao) MetaCollectionReferenceParameters(io.arlas.server.core.model.MetaCollectionReferenceParameters) Optional(java.util.Optional) ArlasServerConfiguration(io.arlas.server.core.app.ArlasServerConfiguration) CollectionReference(io.arlas.server.core.model.CollectionReference)

Aggregations

ArlasServerConfiguration (io.arlas.server.core.app.ArlasServerConfiguration)1 InspireConfiguration (io.arlas.server.core.app.InspireConfiguration)1 OGCConfiguration (io.arlas.server.core.app.OGCConfiguration)1 ArlasException (io.arlas.server.core.exceptions.ArlasException)1 CollectionReference (io.arlas.server.core.model.CollectionReference)1 MetaCollectionReferenceParameters (io.arlas.server.core.model.MetaCollectionReferenceParameters)1 OgcInspireConfigurationParameters (io.arlas.server.core.model.OgcInspireConfigurationParameters)1 CollectionReferenceService (io.arlas.server.core.services.CollectionReferenceService)1 OGCCollectionReferenceDao (io.arlas.server.ogc.common.dao.OGCCollectionReferenceDao)1 List (java.util.List)1 Optional (java.util.Optional)1