refactoring

This commit is contained in:
Francesco Mangiacrapa 2022-10-13 17:36:44 +02:00
parent c89277aef8
commit 805a3171e2
5 changed files with 15 additions and 14 deletions

View File

@ -41,7 +41,8 @@ import org.gcube.application.geoportalcommon.shared.geoportal.config.ActionDefin
import org.gcube.application.geoportalcommon.shared.geoportal.config.FilePathDV; import org.gcube.application.geoportalcommon.shared.geoportal.config.FilePathDV;
import org.gcube.application.geoportalcommon.shared.geoportal.config.GcubeProfileDV; import org.gcube.application.geoportalcommon.shared.geoportal.config.GcubeProfileDV;
import org.gcube.application.geoportalcommon.shared.geoportal.config.ItemFieldDV; import org.gcube.application.geoportalcommon.shared.geoportal.config.ItemFieldDV;
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.IndexLayer; import org.gcube.application.geoportalcommon.shared.geoportal.materialization.IndexLayerDV;
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.PayloadDV;
import org.gcube.application.geoportalcommon.shared.geoportal.project.AccessDV; import org.gcube.application.geoportalcommon.shared.geoportal.project.AccessDV;
import org.gcube.application.geoportalcommon.shared.geoportal.project.AccountingInfoDV; import org.gcube.application.geoportalcommon.shared.geoportal.project.AccountingInfoDV;
import org.gcube.application.geoportalcommon.shared.geoportal.project.BasicLifecycleInformationDV; import org.gcube.application.geoportalcommon.shared.geoportal.project.BasicLifecycleInformationDV;
@ -55,7 +56,6 @@ import org.gcube.application.geoportalcommon.shared.geoportal.ucd.GEOPORTAL_DATA
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.HandlerDeclarationDV; import org.gcube.application.geoportalcommon.shared.geoportal.ucd.HandlerDeclarationDV;
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.RelationshipDefinitionDV; import org.gcube.application.geoportalcommon.shared.geoportal.ucd.RelationshipDefinitionDV;
import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV; import org.gcube.application.geoportalcommon.shared.geoportal.ucd.UseCaseDescriptorDV;
import org.gcube.application.geoportalcommon.shared.geoportal.view.PayloadDV;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -1185,15 +1185,15 @@ public class ConvertToDataValueObjectModel {
*/ */
public static IndexLayer convert(Index toConvert) throws InvalidObjectException { public static IndexLayerDV convert(Index toConvert) throws InvalidObjectException {
if(toConvert==null || toConvert.getType()==null) if(toConvert==null || toConvert.getType()==null)
throw new InvalidObjectException("Unable to convert Index. Unknown type: "+toConvert); throw new InvalidObjectException("Unable to convert Index. Unknown type: "+toConvert);
IndexLayer toReturn = null; IndexLayerDV toReturn = null;
switch(toConvert.getType()) { switch(toConvert.getType()) {
case "GIS-CENTROIDS" : { case "GIS-CENTROIDS" : {
toReturn = Serialization.convert(toConvert,IndexLayer.class); toReturn = Serialization.convert(toConvert,IndexLayerDV.class);
// toReturn.setLayer(Serialization.read(toConvert.get("layer"), GCubeSDILayer.class)); // toReturn.setLayer(Serialization.read(toConvert.get("layer"), GCubeSDILayer.class));
// toReturn.setFlag(toConvert.getString("flag")); // toReturn.setFlag(toConvert.getString("flag"));
// toReturn.setIndexName(toConvert.getString()); // toReturn.setIndexName(toConvert.getString());

View File

@ -1,4 +1,4 @@
package org.gcube.application.geoportalcommon.shared.geoportal.view; package org.gcube.application.geoportalcommon.shared.geoportal.materialization;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -4,7 +4,7 @@ import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
public class IndexLayer implements Serializable { public class IndexLayerDV implements Serializable {
/** /**
* *
@ -18,7 +18,7 @@ public class IndexLayer implements Serializable {
private int records; private int records;
private String flag; private String flag;
public IndexLayer() { public IndexLayerDV() {
} }
@ -65,7 +65,7 @@ public class IndexLayer implements Serializable {
@Override @Override
public String toString() { public String toString() {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.append("IndexLayer [type="); builder.append("IndexLayerDV [type=");
builder.append(type); builder.append(type);
builder.append(", layer="); builder.append(", layer=");
builder.append(layer); builder.append(layer);

View File

@ -1,4 +1,4 @@
package org.gcube.application.geoportalcommon.shared.geoportal.view; package org.gcube.application.geoportalcommon.shared.geoportal.materialization;
import java.io.Serializable; import java.io.Serializable;

View File

@ -3,7 +3,8 @@ package org.gcube.application.geoportalcommon.shared.geoportal.view;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
import org.gcube.application.geoportalcommon.shared.products.model.SDILayerDescriptorDV; import org.gcube.application.geoportalcommon.shared.geoportal.materialization.FilesetDV;
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.GCubeSDILayerDV;
public class SubDocumentView implements Serializable { public class SubDocumentView implements Serializable {
@ -17,7 +18,7 @@ public class SubDocumentView implements Serializable {
private List<FilesetDV> listFiles; private List<FilesetDV> listFiles;
private List<FilesetDV> listImages; private List<FilesetDV> listImages;
private List<SDILayerDescriptorDV> listLayers; private List<GCubeSDILayerDV> listLayers;
public SubDocumentView() { public SubDocumentView() {
@ -35,7 +36,7 @@ public class SubDocumentView implements Serializable {
return listImages; return listImages;
} }
public List<SDILayerDescriptorDV> getListLayers() { public List<GCubeSDILayerDV> getListLayers() {
return listLayers; return listLayers;
} }
@ -51,7 +52,7 @@ public class SubDocumentView implements Serializable {
this.listImages = listImages; this.listImages = listImages;
} }
public void setListLayers(List<SDILayerDescriptorDV> listLayers) { public void setListLayers(List<GCubeSDILayerDV> listLayers) {
this.listLayers = listLayers; this.listLayers = listLayers;
} }