Only fixed imports

This commit is contained in:
Francesco Mangiacrapa 2023-03-28 16:09:25 +02:00
parent 07730153ca
commit d083cae89e
16 changed files with 128 additions and 101 deletions

View File

@ -2,7 +2,9 @@ package org.gcube.application.cms.sdi.engine;
import java.util.ArrayList;
import static org.gcube.application.cms.sdi.engine.PostgisTable.*;
import org.gcube.application.cms.sdi.engine.PostgisTable.Field;
import org.gcube.application.cms.sdi.engine.PostgisTable.FieldType;
import org.gcube.application.cms.sdi.engine.PostgisTable.GeometryType;
public class DBConstants {

View File

@ -1,9 +1,5 @@
package org.gcube.application.cms.sdi.engine;
import lombok.extern.slf4j.Slf4j;
import org.gcube.application.cms.sdi.faults.DataParsingException;
import org.gcube.application.geoportal.common.model.legacy.BBOX;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@ -11,6 +7,11 @@ import java.sql.SQLException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.gcube.application.cms.sdi.faults.DataParsingException;
import org.gcube.application.geoportal.common.model.legacy.BBOX;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class PostgisDBManager implements PostgisDBManagerI {

View File

@ -1,16 +1,5 @@
package org.gcube.application.cms.sdi.engine;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.bson.Document;
import org.gcube.application.cms.sdi.faults.SDIInteractionException;
import org.gcube.application.cms.sdi.model.CrossReferencedLayer;
import org.gcube.application.cms.sdi.plugins.SDIIndexerPlugin;
import org.gcube.application.geoportal.common.model.configuration.Index;
import org.gcube.application.geoportal.common.model.document.filesets.sdi.GCubeSDILayer;
import org.gcube.application.geoportal.common.model.rest.DatabaseConnection;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
@ -18,6 +7,17 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.bson.Document;
import org.gcube.application.cms.sdi.faults.SDIInteractionException;
import org.gcube.application.cms.sdi.model.CrossReferencedLayer;
import org.gcube.application.geoportal.common.model.configuration.Index;
import org.gcube.application.geoportal.common.model.document.filesets.sdi.GCubeSDILayer;
import org.gcube.application.geoportal.common.model.rest.DatabaseConnection;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class PostgisIndexer {

View File

@ -1,20 +1,29 @@
package org.gcube.application.cms.sdi.engine;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.gcube.application.cms.sdi.faults.DataParsingException;
import org.gcube.application.cms.sdi.model.MappingObject;
import org.gcube.application.geoportal.common.model.legacy.BBOX;
import java.sql.Array;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Types;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RequiredArgsConstructor

View File

@ -1,21 +1,22 @@
package org.gcube.application.cms.sdi.engine;
import it.geosolutions.geoserver.rest.encoder.datastore.GSPostGISDatastoreEncoder;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.gcube.application.cms.sdi.faults.SDIInteractionException;
import org.gcube.application.geoportal.common.model.rest.DatabaseConnection;
import org.gcube.data.transfer.library.DataTransferClient;
import org.gcube.spatial.data.gis.GISInterface;
import org.gcube.spatial.data.gis.is.AbstractGeoServerDescriptor;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.gcube.application.cms.sdi.faults.SDIInteractionException;
import org.gcube.application.geoportal.common.model.rest.DatabaseConnection;
import org.gcube.data.transfer.library.DataTransferClient;
import org.gcube.spatial.data.gis.GISInterface;
import org.gcube.spatial.data.gis.is.AbstractGeoServerDescriptor;
import it.geosolutions.geoserver.rest.encoder.datastore.GSPostGISDatastoreEncoder;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class SDIManager {

View File

@ -1,13 +1,15 @@
package org.gcube.application.cms.sdi.engine;
import it.geosolutions.geoserver.rest.GeoServerRESTPublisher;
import it.geosolutions.geoserver.rest.GeoServerRESTReader;
import it.geosolutions.geoserver.rest.decoder.RESTFeatureType;
import it.geosolutions.geoserver.rest.decoder.RESTLayer;
import it.geosolutions.geoserver.rest.encoder.GSLayerEncoder;
import it.geosolutions.geoserver.rest.encoder.feature.GSAttributeEncoder;
import it.geosolutions.geoserver.rest.encoder.feature.GSFeatureTypeEncoder;
import lombok.extern.slf4j.Slf4j;
import static it.geosolutions.geoserver.rest.encoder.GSResourceEncoder.ProjectionPolicy.REPROJECT_TO_DECLARED;
import static org.gcube.application.cms.sdi.model.GCubeSDILayerBuilder.EPSG_4326;
import static org.gcube.application.cms.sdi.model.GCubeSDILayerBuilder.WGS84_FULL;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import org.bson.Document;
import org.gcube.application.cms.plugins.requests.BaseExecutionRequest;
import org.gcube.application.cms.sdi.faults.SDIInteractionException;
@ -21,23 +23,25 @@ import org.gcube.application.geoportal.common.model.document.filesets.sdi.GeoSer
import org.gcube.application.geoportal.common.model.document.filesets.sdi.PlatformInfo;
import org.gcube.application.geoportal.common.model.rest.DatabaseConnection;
import org.gcube.application.geoportal.common.utils.Files;
import org.gcube.data.transfer.library.DataTransferClient;
import org.gcube.data.transfer.library.TransferResult;
import org.gcube.data.transfer.library.client.Client;
import org.gcube.data.transfer.library.faults.*;
import org.gcube.data.transfer.library.faults.DestinationNotSetException;
import org.gcube.data.transfer.library.faults.FailedTransferException;
import org.gcube.data.transfer.library.faults.InitializationException;
import org.gcube.data.transfer.library.faults.InvalidDestinationException;
import org.gcube.data.transfer.library.faults.InvalidSourceException;
import org.gcube.data.transfer.library.faults.SourceNotSetException;
import org.gcube.data.transfer.model.Destination;
import org.gcube.data.transfer.model.DestinationClashPolicy;
import org.gcube.spatial.data.gis.is.AbstractGeoServerDescriptor;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import static it.geosolutions.geoserver.rest.encoder.GSResourceEncoder.ProjectionPolicy.REPROJECT_TO_DECLARED;
import static org.gcube.application.cms.sdi.model.GCubeSDILayerBuilder.EPSG_4326;
import static org.gcube.application.cms.sdi.model.GCubeSDILayerBuilder.WGS84_FULL;
import it.geosolutions.geoserver.rest.GeoServerRESTPublisher;
import it.geosolutions.geoserver.rest.GeoServerRESTReader;
import it.geosolutions.geoserver.rest.decoder.RESTFeatureType;
import it.geosolutions.geoserver.rest.decoder.RESTLayer;
import it.geosolutions.geoserver.rest.encoder.GSLayerEncoder;
import it.geosolutions.geoserver.rest.encoder.feature.GSFeatureTypeEncoder;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class SDIManagerWrapper extends SDIManager{

View File

@ -1,15 +1,16 @@
package org.gcube.application.cms.sdi.engine.bboxes;
import lombok.Data;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import java.util.List;
import org.bson.Document;
import org.gcube.application.cms.serialization.Serialization;
import org.gcube.application.geoportal.common.model.JSONPathWrapper;
import org.gcube.application.geoportal.common.model.document.filesets.sdi.GCubeSDILayer;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
import java.util.List;
import lombok.Data;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class BBOXByCoordinatePaths extends BBOXEvaluator{

View File

@ -1,13 +1,14 @@
package org.gcube.application.cms.sdi.engine.bboxes;
import org.bson.Document;
import org.gcube.application.geoportal.common.model.JSONPathWrapper;
import org.gcube.application.geoportal.common.model.document.filesets.sdi.GCubeSDILayer;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import org.bson.Document;
import org.gcube.application.geoportal.common.model.JSONPathWrapper;
import org.gcube.application.geoportal.common.model.document.filesets.sdi.GCubeSDILayer;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
@RequiredArgsConstructor
@ToString

View File

@ -1,13 +1,14 @@
package org.gcube.application.cms.sdi.engine.bboxes;
import lombok.extern.slf4j.Slf4j;
import java.util.List;
import org.bson.Document;
import org.gcube.application.cms.serialization.Serialization;
import org.gcube.application.geoportal.common.model.JSONPathWrapper;
import org.gcube.application.geoportal.common.model.document.filesets.sdi.GCubeSDILayer;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class BBOXPathScanner extends BBOXEvaluator{

View File

@ -1,16 +1,17 @@
package org.gcube.application.cms.sdi.model;
import lombok.Getter;
import org.bson.Document;
import org.gcube.application.geoportal.common.model.document.filesets.sdi.GCubeSDILayer;
import org.gcube.application.geoportal.common.model.document.filesets.sdi.GeoServerPlatform;
import org.gcube.application.geoportal.common.model.document.filesets.sdi.PlatformInfo;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.bson.Document;
import org.gcube.application.geoportal.common.model.document.filesets.sdi.GCubeSDILayer;
import org.gcube.application.geoportal.common.model.document.filesets.sdi.GeoServerPlatform;
import org.gcube.application.geoportal.common.model.document.filesets.sdi.PlatformInfo;
import lombok.Getter;
public class GCubeSDILayerBuilder {
public static enum OGC_TYPE{

View File

@ -1,15 +1,16 @@
package org.gcube.application.cms.sdi.model;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.List;
import org.bson.Document;
import org.gcube.application.cms.plugins.faults.InvalidProfileException;
import org.gcube.application.cms.serialization.Serialization;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.HandlerDeclaration;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@Data
@Slf4j

View File

@ -1,10 +1,10 @@
package org.gcube.application.cms.sdi.model;
import org.bson.Document;
import java.util.HashMap;
import java.util.Map;
import org.bson.Document;
public class SDIConfiguration {
public static final String GEOSERVER_PLATFORM="GeoServer";

View File

@ -1,11 +1,12 @@
package org.gcube.application.cms.sdi.model;
import java.util.ArrayList;
import org.gcube.application.geoportal.common.model.document.filesets.RegisteredFile;
import lombok.Getter;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import org.gcube.application.geoportal.common.model.document.filesets.RegisteredFile;
import java.util.ArrayList;
@Getter
@RequiredArgsConstructor
public abstract class SupportedFormat {

View File

@ -1,7 +1,8 @@
package org.gcube.application.cms.sdi.plugins;
import lombok.Synchronized;
import lombok.extern.slf4j.Slf4j;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import org.gcube.application.cms.caches.AbstractScopedMap;
import org.gcube.application.cms.implementations.ISInterface;
import org.gcube.application.cms.implementations.ImplementationProvider;
@ -16,8 +17,8 @@ import org.gcube.application.cms.sdi.engine.SDIManagerWrapper;
import org.gcube.application.geoportal.common.model.rest.ConfigurationException;
import org.gcube.application.geoportal.common.model.rest.DatabaseConnection;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import lombok.Synchronized;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public abstract class SDIAbstractPlugin extends AbstractPlugin implements InitializablePlugin {

View File

@ -1,7 +1,11 @@
package org.gcube.application.cms.sdi.plugins;
import com.vdurmont.semver4j.Semver;
import lombok.extern.slf4j.Slf4j;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import org.bson.Document;
import org.gcube.application.cms.plugins.IndexerPluginInterface;
import org.gcube.application.cms.plugins.faults.IndexingException;
@ -41,11 +45,9 @@ import org.geojson.GeoJsonObject;
import org.geojson.LngLatAlt;
import org.geojson.Point;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import com.vdurmont.semver4j.Semver;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPluginInterface {
@ -140,7 +142,7 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
log.info("Geoportal GisViewer link is {} ", shortLink);
centroidDoc.put(DBConstants.Defaults.GEOVIEWER_LINK_FIELD, shortLink);
}catch (Exception e) {
// TODO: handle exception
log.error("Error on creating the Geoportal GisViewer link for project id {}", project.getId(), e);
}

View File

@ -1,9 +1,10 @@
package org.gcube.application.cms.sdi.plugins;
import com.vdurmont.semver4j.Semver;
import lombok.Data;
import lombok.Synchronized;
import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.bson.Document;
import org.gcube.application.cms.implementations.utils.UserUtils;
import org.gcube.application.cms.plugins.MaterializationPlugin;
@ -28,12 +29,12 @@ import org.gcube.application.geoportal.common.model.plugins.MaterializerPluginDe
import org.gcube.application.geoportal.common.model.plugins.PluginDescriptor;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.Field;
import org.gcube.application.geoportal.common.model.useCaseDescriptor.UseCaseDescriptor;
import org.gcube.application.geoportal.common.utils.ContextUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.vdurmont.semver4j.Semver;
import lombok.Data;
import lombok.Synchronized;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class SDIMaterializerPlugin extends AbstractPlugin implements MaterializationPlugin {