diff --git a/CHANGELOG.md b/CHANGELOG.md index a97ce62..51cf47a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [v1.1.0-SNAPSHOT] - 2021-01-29 +## [v1.1.0-SNAPSHOT] - 2021-09-09 #### Enhancements diff --git a/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataViewModel.java b/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataViewModel.java index caf2610..7e91648 100644 --- a/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataViewModel.java +++ b/src/main/java/org/gcube/application/geoportalcommon/ConvertToDataViewModel.java @@ -15,6 +15,7 @@ import org.gcube.application.geoportal.common.model.legacy.RelazioneScavo; import org.gcube.application.geoportal.common.model.legacy.UploadedImage; import org.gcube.application.geoportal.common.model.legacy.WorkspaceContent; import org.gcube.application.geoportalcommon.shared.gis.BoundsMap; +import org.gcube.application.geoportalcommon.shared.products.BaseConcessioneDV; import org.gcube.application.geoportalcommon.shared.products.ConcessioneDV; import org.gcube.application.geoportalcommon.shared.products.content.OtherContentDV; import org.gcube.application.geoportalcommon.shared.products.content.WorkspaceContentDV; @@ -47,7 +48,6 @@ public class ConvertToDataViewModel { public static final String TIME_FORMAT = "HH" + HOURS_MINUTES_SEPARATOR + "mm"; - /** * To concessione. * @@ -56,16 +56,16 @@ public class ConvertToDataViewModel { * @throws Exception the exception */ public static ConcessioneDV toConcessione(Concessione concessione) throws Exception { - LOG.debug("called toConcessione for: "+concessione); + LOG.debug("called toConcessione for: " + concessione); if (concessione == null) return null; - + try { ConcessioneDV theConcessione = new ConcessioneDV(); theConcessione.setPolicy(toPolicy(concessione.getPolicy())); - //theConcessione.setAuthors(concessione.getAuthors()); + // theConcessione.setAuthors(concessione.getAuthors()); theConcessione.setCentroidLat(concessione.getCentroidLat()); theConcessione.setCentroidLong(concessione.getCentroidLong()); theConcessione.setContributore(concessione.getContributore()); @@ -78,14 +78,14 @@ public class ConvertToDataViewModel { theConcessione.setFontiFinanziamento(concessione.getFontiFinanziamento()); theConcessione.setItemId(concessione.getMongo_id()); theConcessione.setNome(concessione.getNome()); - + theConcessione.setIntroduzione(concessione.getIntroduzione()); theConcessione.setLastUpdateTime(DateUtils.asDate(concessione.getLastUpdateTime())); theConcessione.setLastUpdateUser(toUser(concessione.getLastUpdateUser())); theConcessione.setLicenzaID(concessione.getLicenzaID()); theConcessione.setParoleChiaveICCD(concessione.getParoleChiaveICCD()); theConcessione.setParoleChiaveLibere(concessione.getParoleChiaveLibere()); - + theConcessione.setResponsabile(concessione.getResponsabile()); theConcessione.setRisorseCorrelate(concessione.getRisorseCorrelate()); theConcessione.setSoggetto(concessione.getSoggetto()); @@ -93,13 +93,12 @@ public class ConvertToDataViewModel { theConcessione.setTitolariLicenza(concessione.getTitolareLicenza()); theConcessione.setTitolari(concessione.getTitolari()); theConcessione.setVersion(concessione.getVersion()); - + theConcessione.setRecordType(concessione.getRecordType().name()); - + theConcessione.setAbstractRelazioneScavo(toAbstractRelazioneScavo(concessione.getRelazioneScavo())); theConcessione.setRelazioneScavo(toRelazioneScavo(concessione.getRelazioneScavo())); - - + if (concessione.getImmaginiRappresentative() != null) { List uploadedImagesDV = new ArrayList( concessione.getImmaginiRappresentative().size()); @@ -108,8 +107,7 @@ public class ConvertToDataViewModel { } theConcessione.setImmaginiRappresentative(uploadedImagesDV); } - - + if (concessione.getGenericContent() != null) { List otherContentsDV = new ArrayList( concessione.getGenericContent().size()); @@ -118,51 +116,48 @@ public class ConvertToDataViewModel { } theConcessione.setGenericContent(otherContentsDV); } - - + if (concessione.getPianteFineScavo() != null) { List piantaScavoDV = new ArrayList( concessione.getPianteFineScavo().size()); for (LayerConcessione lc : concessione.getPianteFineScavo()) { - piantaScavoDV.add(toLayerConcessione(lc)); + piantaScavoDV.add(toLayerConcessione(lc, (BaseConcessioneDV) theConcessione)); } theConcessione.setPianteFineScavo(piantaScavoDV); } - + if (concessione.getPosizionamentoScavo() != null) { - LayerConcessioneDV thePosizScavo = toLayerConcessione(concessione.getPosizionamentoScavo()); + LayerConcessioneDV thePosizScavo = toLayerConcessione(concessione.getPosizionamentoScavo(), + (BaseConcessioneDV) theConcessione); theConcessione.setPosizionamentoScavo(thePosizScavo); } - - + LOG.debug("Returning concessione: " + theConcessione); return theConcessione; - }catch (Exception e) { - LOG.error("Error on converting concessione: "+concessione, e); + } catch (Exception e) { + LOG.error("Error on converting concessione: " + concessione, e); return null; } } - - + /** - * To base concessione. + * To metadata concessione. * * @param concessione the concessione - * @return the concessione DV with core fields + * @return the concessione DV * @throws Exception the exception */ - public static ConcessioneDV toBaseConcessione(Concessione concessione) throws Exception { - LOG.debug("called toConcessione for: "+concessione); + public static ConcessioneDV toMetadataConcessione(Concessione concessione) throws Exception { + LOG.debug("called toConcessione for: " + concessione); if (concessione == null) return null; - + try { ConcessioneDV theConcessione = new ConcessioneDV(); theConcessione.setPolicy(toPolicy(concessione.getPolicy())); - //theConcessione.setAuthors(concessione.getAuthors()); theConcessione.setCentroidLat(concessione.getCentroidLat()); theConcessione.setCentroidLong(concessione.getCentroidLong()); theConcessione.setContributore(concessione.getContributore()); @@ -177,30 +172,67 @@ public class ConvertToDataViewModel { theConcessione.setNome(concessione.getNome()); theConcessione.setAuthors(concessione.getAuthors()); theConcessione.setCreationTime(DateUtils.asDate(concessione.getCreationTime())); - + theConcessione.setIntroduzione(concessione.getIntroduzione()); theConcessione.setLastUpdateTime(DateUtils.asDate(concessione.getLastUpdateTime())); theConcessione.setLastUpdateUser(toUser(concessione.getLastUpdateUser())); theConcessione.setLicenzaID(concessione.getLicenzaID()); theConcessione.setParoleChiaveICCD(concessione.getParoleChiaveICCD()); theConcessione.setParoleChiaveLibere(concessione.getParoleChiaveLibere()); - + theConcessione.setResponsabile(concessione.getResponsabile()); theConcessione.setTitolariCopyright(concessione.getTitolareCopyright()); theConcessione.setTitolariLicenza(concessione.getTitolareLicenza()); theConcessione.setTitolari(concessione.getTitolari()); - LOG.debug("Returning base concessione: " + theConcessione); return theConcessione; - }catch (Exception e) { - LOG.error("Error on converting concessione: "+concessione, e); + } catch (Exception e) { + LOG.error("Error on converting concessione: " + concessione, e); return null; } } - - //TO AVOID SERIALIZATION ISSUE AGAINST GWT + + /** + * To base concessione. + * + * @param concessione the concessione + * @return the concessione DV + * @throws Exception the exception + */ + public static BaseConcessioneDV toBaseConcessione(Concessione concessione) throws Exception { + LOG.debug("called toConcessione for: " + concessione); + + if (concessione == null) + return null; + + try { + + BaseConcessioneDV theConcessione = new BaseConcessioneDV(); + theConcessione.setPolicy(toPolicy(concessione.getPolicy())); + theConcessione.setCreationTime(DateUtils.asDate(concessione.getCreationTime())); + theConcessione.setCreationUser(toUser(concessione.getCreationUser())); + theConcessione.setItemId(concessione.getMongo_id()); + theConcessione.setNome(concessione.getNome()); + theConcessione.setAuthors(concessione.getAuthors()); + theConcessione.setCreationTime(DateUtils.asDate(concessione.getCreationTime())); + + theConcessione.setIntroduzione(concessione.getIntroduzione()); + theConcessione.setLastUpdateTime(DateUtils.asDate(concessione.getLastUpdateTime())); + theConcessione.setLastUpdateUser(toUser(concessione.getLastUpdateUser())); + theConcessione.setLicenzaID(concessione.getLicenzaID()); + + LOG.debug("Returning base concessione: " + theConcessione); + return theConcessione; + } catch (Exception e) { + LOG.error("Error on converting concessione: " + concessione, e); + return null; + } + + } + + // TO AVOID SERIALIZATION ISSUE AGAINST GWT // public static List toListString(List orginList){ // if(orginList==null) // return null; @@ -212,7 +244,7 @@ public class ConvertToDataViewModel { // // return destList; // } - + /** * To user. * @@ -220,14 +252,14 @@ public class ConvertToDataViewModel { * @return the string */ public static String toUser(String username) { - - if(username==null) + + if (username == null) return null; - + return username; - + } - + /** * To policy. * @@ -235,12 +267,12 @@ public class ConvertToDataViewModel { * @return the string */ public static String toPolicy(AccessPolicy policy) { - - if(policy==null) + + if (policy == null) return null; - + return policy.name(); - + } /** @@ -250,33 +282,33 @@ public class ConvertToDataViewModel { * @return the string */ public static String toDateFormatString(LocalDateTime dateTime) { - - if(dateTime==null) + + if (dateTime == null) return null; - + String time = dateTime.toString(); DateTimeFormatter formatter = null; try { - if(!time.endsWith(NO_TIME)) { + if (!time.endsWith(NO_TIME)) { formatter = DateTimeFormatter.ofPattern(DATE_FORMAT + " " + TIME_FORMAT); - }else { + } else { time = time.replace(NO_TIME, ""); formatter = DateTimeFormatter.ofPattern(DATE_FORMAT); } - }catch (Exception e) { - LOG.warn("Parsing error: ",e); + } catch (Exception e) { + LOG.warn("Parsing error: ", e); } - + try { - if(formatter!=null) - return dateTime.format(formatter); - }catch (Exception e) { - LOG.warn("Date format error: ",e); + if (formatter != null) + return dateTime.format(formatter); + } catch (Exception e) { + LOG.warn("Date format error: ", e); } - + return dateTime.toString(); } - + /** * To abstract relazione scavo. * @@ -291,12 +323,12 @@ public class ConvertToDataViewModel { AbstractRelazioneScavoDV theRelazioneDiScavo = new AbstractRelazioneScavoDV(); theRelazioneDiScavo.setAbstractSectionIta(relazioneScavo.getAbstractIta()); theRelazioneDiScavo.setAbstractSectionEng(relazioneScavo.getAbstractEng()); - + theRelazioneDiScavo.setCreationTime(DateUtils.asDate(relazioneScavo.getCreationTime())); theRelazioneDiScavo.setId(relazioneScavo.getId()); theRelazioneDiScavo.setLicenseID(relazioneScavo.getLicenseID()); theRelazioneDiScavo.setPolicy(toPolicy(relazioneScavo.getPolicy())); - //theRelazioneDiScavo.setRecord(recordDV); + // theRelazioneDiScavo.setRecord(recordDV); theRelazioneDiScavo.setResponsabili(relazioneScavo.getResponsabili()); theRelazioneDiScavo.setSoggetto(relazioneScavo.getSoggetto()); theRelazioneDiScavo.setTitolo(relazioneScavo.getTitolo()); @@ -321,18 +353,18 @@ public class ConvertToDataViewModel { theRelazioneDiScavo.setId(relazioneScavo.getId()); theRelazioneDiScavo.setLicenseID(relazioneScavo.getLicenseID()); theRelazioneDiScavo.setPolicy(toPolicy(relazioneScavo.getPolicy())); - //theRelazioneDiScavo.setRecord(recordDV); + // theRelazioneDiScavo.setRecord(recordDV); theRelazioneDiScavo.setResponsabili(relazioneScavo.getResponsabili()); theRelazioneDiScavo.setSoggetto(relazioneScavo.getSoggetto()); theRelazioneDiScavo.setTitolo(relazioneScavo.getTitolo()); - + List actContent = relazioneScavo.getActualContent(); - if(actContent!=null && actContent.size()>0) { + if (actContent != null && actContent.size() > 0) { List listWsContent = new ArrayList(); - + for (PersistedContent content : actContent) { - if(content!=null && content instanceof WorkspaceContent) { - listWsContent.add(toWorkspaceContent((WorkspaceContent)content)); + if (content != null && content instanceof WorkspaceContent) { + listWsContent.add(toWorkspaceContent((WorkspaceContent) content)); } } theRelazioneDiScavo.setListWsContent(listWsContent); @@ -341,7 +373,7 @@ public class ConvertToDataViewModel { LOG.debug("Returning: " + theRelazioneDiScavo); return theRelazioneDiScavo; } - + /** * To uploaded image. * @@ -360,18 +392,18 @@ public class ConvertToDataViewModel { theUploadedImageDV.setId(uploadedImage.getId()); theUploadedImageDV.setLicenseID(uploadedImage.getLicenseID()); theUploadedImageDV.setPolicy(toPolicy(uploadedImage.getPolicy())); - //theUploadedImageDV.setRecord(recordDV); + // theUploadedImageDV.setRecord(recordDV); theUploadedImageDV.setResponsabili(uploadedImage.getResponsabili()); theUploadedImageDV.setSoggetto(uploadedImage.getSoggetto()); theUploadedImageDV.setTitolo(uploadedImage.getTitolo()); - + List actContent = uploadedImage.getActualContent(); - if(actContent!=null && actContent.size()>0) { + if (actContent != null && actContent.size() > 0) { List listWsContent = new ArrayList(); - + for (PersistedContent content : actContent) { - if(content!=null && content instanceof WorkspaceContent) { - listWsContent.add(toWorkspaceContent((WorkspaceContent)content)); + if (content != null && content instanceof WorkspaceContent) { + listWsContent.add(toWorkspaceContent((WorkspaceContent) content)); } } theUploadedImageDV.setListWsContent(listWsContent); @@ -380,83 +412,83 @@ public class ConvertToDataViewModel { LOG.debug("Returning: " + theUploadedImageDV); return theUploadedImageDV; } - - + /** * To workspace content. * * @param wContent the w content * @return the workspace content DV */ - public static WorkspaceContentDV toWorkspaceContent(WorkspaceContent wContent){ + public static WorkspaceContentDV toWorkspaceContent(WorkspaceContent wContent) { if (wContent == null) return null; - + WorkspaceContentDV theWSDV = new WorkspaceContentDV(); theWSDV.setLink(wContent.getLink()); theWSDV.setMimetype(wContent.getMimetype()); theWSDV.setStorageID(wContent.getStorageID()); theWSDV.setId(wContent.getId()); - + return theWSDV; } /** * To layer concessione. * - * @param layerConcessione the layer concessione + * @param layerConcessione the layer concessione + * @param refersToBaseConcessione the refers to base concessione * @return the layer concessione data view */ - public static LayerConcessioneDV toLayerConcessione(LayerConcessione layerConcessione) { + public static LayerConcessioneDV toLayerConcessione(LayerConcessione layerConcessione, + BaseConcessioneDV refersToBaseConcessione) { if (layerConcessione == null) return null; - LOG.debug("Converting: "+layerConcessione); + LOG.debug("Converting: " + layerConcessione); LayerConcessioneDV theLayerConessione = new LayerConcessioneDV(); theLayerConessione.setAbstractSection(layerConcessione.getAbstractSection()); - + String wmsLink = layerConcessione.getWmsLink(); String layerName = null; BoundsMap bounds = null; - //reading layer name from wmsLink - //string bbox - if(wmsLink!=null) { + // reading layer name from wmsLink + // string bbox + if (wmsLink != null) { layerName = URLParserUtil.extractValueOfParameterFromURL("layers", wmsLink); String bbox = URLParserUtil.extractValueOfParameterFromURL("bbox", wmsLink); String wmsVersion = URLParserUtil.extractValueOfParameterFromURL("version", wmsLink); bounds = toBoundMap(wmsVersion, bbox, ","); - LOG.debug("Built bounds from wmsLInk: "+bounds); + LOG.debug("Built bounds from wmsLInk: " + bounds); } - - if(layerName!=null) + + if (layerName != null) theLayerConessione.setLayerName(layerName); else theLayerConessione.setLayerName(layerConcessione.getLayerName()); - theLayerConessione.setWmsLink(wmsLink); theLayerConessione.setLayerID(layerConcessione.getLayerID()); theLayerConessione.setLayerUUID(layerConcessione.getLayerUUID()); theLayerConessione.setAuthors(layerConcessione.getAuthors()); - - if(bounds==null) + + if (bounds == null) bounds = toBoundMap(layerConcessione.getBbox()); - + theLayerConessione.setBbox(bounds); theLayerConessione.setCreationTime(DateUtils.asDate(layerConcessione.getCreationTime())); theLayerConessione.setId(layerConcessione.getId()); theLayerConessione.setLicenseID(layerConcessione.getLicenseID()); theLayerConessione.setMetodoRaccoltaDati(layerConcessione.getMetodoRaccoltaDati()); theLayerConessione.setPolicy(toPolicy(layerConcessione.getPolicy())); - //theLayerConessione.setRecord(recordDV); + // theLayerConessione.setRecord(recordDV); theLayerConessione.setScalaAcquisizione(layerConcessione.getScalaAcquisizione()); theLayerConessione.setSubTopic(layerConcessione.getSubTopic()); theLayerConessione.setTitolo(layerConcessione.getTitolo()); theLayerConessione.setTopicCategory(layerConcessione.getTopicCategory()); theLayerConessione.setValutazioneQualita(layerConcessione.getValutazioneQualita()); - + theLayerConessione.setRefersTo(refersToBaseConcessione); LOG.debug("Returning: " + theLayerConessione); return theLayerConessione; @@ -479,7 +511,7 @@ public class ConvertToDataViewModel { theOtherContent.setId(otherContent.getId()); theOtherContent.setLicenseID(otherContent.getLicenseID()); theOtherContent.setPolicy(toPolicy(otherContent.getPolicy())); - //theOtherContent.setRecord(recordDV); + // theOtherContent.setRecord(recordDV); theOtherContent.setTitolo(otherContent.getTitolo()); return theOtherContent; @@ -498,44 +530,45 @@ public class ConvertToDataViewModel { return new BoundsMap(bbox.getMinLong(), bbox.getMinLat(), bbox.getMaxLong(), bbox.getMaxLat(), null); } - - + /** * To bound map. * * @param wmsVersion the wms version - * @param bbox the bbox - * @param separator the separator + * @param bbox the bbox + * @param separator the separator * @return the bounds map */ public static BoundsMap toBoundMap(String wmsVersion, String bbox, String separator) { if (bbox == null) return null; - - if(wmsVersion==null) + + if (wmsVersion == null) return null; - - if(separator==null) + + if (separator == null) separator = ","; - + try { - + String[] bboxArr = bbox.split(separator); - - if(wmsVersion.startsWith("1.3")) { - //is 1.3.x - return new BoundsMap(toDouble(bboxArr[1]), toDouble(bboxArr[0]), toDouble(bboxArr[3]), toDouble(bboxArr[2]), wmsVersion); - }else { - //should be 1.1.X - return new BoundsMap(toDouble(bboxArr[0]), toDouble(bboxArr[1]), toDouble(bboxArr[2]), toDouble(bboxArr[3]), wmsVersion); + + if (wmsVersion.startsWith("1.3")) { + // is 1.3.x + return new BoundsMap(toDouble(bboxArr[1]), toDouble(bboxArr[0]), toDouble(bboxArr[3]), + toDouble(bboxArr[2]), wmsVersion); + } else { + // should be 1.1.X + return new BoundsMap(toDouble(bboxArr[0]), toDouble(bboxArr[1]), toDouble(bboxArr[2]), + toDouble(bboxArr[3]), wmsVersion); } - }catch (Exception e) { - LOG.warn("Error on creating Bounds for wmsVersion "+wmsVersion+" and bbox "+bbox+" : ",e); + } catch (Exception e) { + LOG.warn("Error on creating Bounds for wmsVersion " + wmsVersion + " and bbox " + bbox + " : ", e); return null; } } - + /** * To double. * @@ -545,11 +578,10 @@ public class ConvertToDataViewModel { public static Double toDouble(String value) { try { return Double.parseDouble(value); - }catch (Exception e) { - LOG.warn("Error on parsing "+value+" as double: ",e); + } catch (Exception e) { + LOG.warn("Error on parsing " + value + " as double: ", e); return null; } } - } diff --git a/src/main/java/org/gcube/application/geoportalcommon/shared/products/BaseConcessioneDV.java b/src/main/java/org/gcube/application/geoportalcommon/shared/products/BaseConcessioneDV.java new file mode 100644 index 0000000..8e24151 --- /dev/null +++ b/src/main/java/org/gcube/application/geoportalcommon/shared/products/BaseConcessioneDV.java @@ -0,0 +1,83 @@ +package org.gcube.application.geoportalcommon.shared.products; + +import java.io.Serializable; +import java.util.List; + +import org.gcube.application.geoportalcommon.shared.products.model.RecordDV; + + +/** + * The Class BaseConcessioneDV. + * + * @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it + * + * Sep 9, 2021 + */ +public class BaseConcessioneDV extends RecordDV implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 8368901256890493525L; + + /** The introduzione. */ + private String introduzione; + + /** The authors. */ + private List authors; + + /** + * Instantiates a new base concessione DV. + */ + public BaseConcessioneDV() { + + } + + /** + * Instantiates a new base concessione DV. + * + * @param introduzione the introduzione + * @param authors the authors + */ + public BaseConcessioneDV(String introduzione, List authors) { + this.introduzione = introduzione; + this.authors = authors; + } + + /** + * Gets the introduzione. + * + * @return the introduzione + */ + public String getIntroduzione() { + return introduzione; + } + + /** + * Gets the authors. + * + * @return the authors + */ + public List getAuthors() { + return authors; + } + + /** + * Sets the introduzione. + * + * @param introduzione the new introduzione + */ + public void setIntroduzione(String introduzione) { + this.introduzione = introduzione; + } + + /** + * Sets the authors. + * + * @param authors the new authors + */ + public void setAuthors(List authors) { + this.authors = authors; + } + +} diff --git a/src/main/java/org/gcube/application/geoportalcommon/shared/products/ConcessioneDV.java b/src/main/java/org/gcube/application/geoportalcommon/shared/products/ConcessioneDV.java index 393376e..aee9636 100644 --- a/src/main/java/org/gcube/application/geoportalcommon/shared/products/ConcessioneDV.java +++ b/src/main/java/org/gcube/application/geoportalcommon/shared/products/ConcessioneDV.java @@ -8,7 +8,6 @@ import java.util.List; import org.gcube.application.geoportalcommon.shared.products.content.OtherContentDV; import org.gcube.application.geoportalcommon.shared.products.model.AbstractRelazioneScavoDV; import org.gcube.application.geoportalcommon.shared.products.model.LayerConcessioneDV; -import org.gcube.application.geoportalcommon.shared.products.model.RecordDV; import org.gcube.application.geoportalcommon.shared.products.model.RelazioneScavoDV; import org.gcube.application.geoportalcommon.shared.products.model.UploadedImageDV; @@ -19,22 +18,16 @@ import org.gcube.application.geoportalcommon.shared.products.model.UploadedImage * * Nov 4, 2020 */ -public class ConcessioneDV extends RecordDV implements Serializable { +public class ConcessioneDV extends BaseConcessioneDV implements Serializable { /** * */ private static final long serialVersionUID = 1387327199157005059L; - /** The introduzione. */ - private String introduzione; - /** The descrizione contenuto. */ private String descrizioneContenuto; - /** The authors. */ - private List authors; - /** The contributore. */ private String contributore; @@ -79,7 +72,7 @@ public class ConcessioneDV extends RecordDV implements Serializable { /** The centroid long. */ private Double centroidLong; - + /** The relazione scavo. */ private AbstractRelazioneScavoDV abstractRelazioneScavo; @@ -105,24 +98,6 @@ public class ConcessioneDV extends RecordDV implements Serializable { } - /** - * Gets the introduzione. - * - * @return the introduzione - */ - public String getIntroduzione() { - return introduzione; - } - - /** - * Sets the introduzione. - * - * @param introduzione the new introduzione - */ - public void setIntroduzione(String introduzione) { - this.introduzione = introduzione; - } - /** * Gets the descrizione contenuto. * @@ -141,24 +116,6 @@ public class ConcessioneDV extends RecordDV implements Serializable { this.descrizioneContenuto = descrizioneContenuto; } - /** - * Gets the authors. - * - * @return the authors - */ - public List getAuthors() { - return authors; - } - - /** - * Sets the authors. - * - * @param authors the new authors - */ - public void setAuthors(List authors) { - this.authors = authors; - } - /** * Gets the contributore. * @@ -518,7 +475,6 @@ public class ConcessioneDV extends RecordDV implements Serializable { public void setGenericContent(List genericContent) { this.genericContent = genericContent; } - /** * Gets the abstract relazione scavo. @@ -541,12 +497,8 @@ public class ConcessioneDV extends RecordDV implements Serializable { @Override public String toString() { StringBuilder builder = new StringBuilder(); - builder.append("ConcessioneDV [introduzione="); - builder.append(introduzione); - builder.append(", descrizioneContenuto="); + builder.append("ConcessioneDV [descrizioneContenuto="); builder.append(descrizioneContenuto); - builder.append(", authors="); - builder.append(authors); builder.append(", contributore="); builder.append(contributore); builder.append(", titolari="); diff --git a/src/main/java/org/gcube/application/geoportalcommon/shared/products/model/LayerConcessioneDV.java b/src/main/java/org/gcube/application/geoportalcommon/shared/products/model/LayerConcessioneDV.java index 873ed08..207815a 100644 --- a/src/main/java/org/gcube/application/geoportalcommon/shared/products/model/LayerConcessioneDV.java +++ b/src/main/java/org/gcube/application/geoportalcommon/shared/products/model/LayerConcessioneDV.java @@ -4,8 +4,16 @@ import java.io.Serializable; import java.util.List; import org.gcube.application.geoportalcommon.shared.gis.BoundsMap; +import org.gcube.application.geoportalcommon.shared.products.BaseConcessioneDV; -public class LayerConcessioneDV extends SDILayerDescriptorDV implements Serializable{ +/** + * The Class LayerConcessioneDV. + * + * @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it + * + * Sep 9, 2021 + */ +public class LayerConcessioneDV extends SDILayerDescriptorDV implements Serializable { /** * @@ -35,78 +43,186 @@ public class LayerConcessioneDV extends SDILayerDescriptorDV implements Serializ private List authors; + private BaseConcessioneDV refersTo; + + /** + * Instantiates a new layer concessione DV. + */ public LayerConcessioneDV() { } + /** + * Gets the abstract section. + * + * @return the abstract section + */ public String getAbstractSection() { return abstractSection; } + /** + * Sets the abstract section. + * + * @param abstractSection the new abstract section + */ public void setAbstractSection(String abstractSection) { this.abstractSection = abstractSection; } + /** + * Gets the topic category. + * + * @return the topic category + */ public String getTopicCategory() { return topicCategory; } + /** + * Sets the topic category. + * + * @param topicCategory the new topic category + */ public void setTopicCategory(String topicCategory) { this.topicCategory = topicCategory; } + /** + * Gets the sub topic. + * + * @return the sub topic + */ public String getSubTopic() { return subTopic; } + /** + * Sets the sub topic. + * + * @param subTopic the new sub topic + */ public void setSubTopic(String subTopic) { this.subTopic = subTopic; } + /** + * Gets the bbox. + * + * @return the bbox + */ public BoundsMap getBbox() { return bbox; } + /** + * Sets the bbox. + * + * @param bbox the new bbox + */ public void setBbox(BoundsMap bbox) { this.bbox = bbox; } + /** + * Gets the valutazione qualita. + * + * @return the valutazione qualita + */ public String getValutazioneQualita() { return valutazioneQualita; } + /** + * Sets the valutazione qualita. + * + * @param valutazioneQualita the new valutazione qualita + */ public void setValutazioneQualita(String valutazioneQualita) { this.valutazioneQualita = valutazioneQualita; } + /** + * Gets the metodo raccolta dati. + * + * @return the metodo raccolta dati + */ public String getMetodoRaccoltaDati() { return metodoRaccoltaDati; } + /** + * Sets the metodo raccolta dati. + * + * @param metodoRaccoltaDati the new metodo raccolta dati + */ public void setMetodoRaccoltaDati(String metodoRaccoltaDati) { this.metodoRaccoltaDati = metodoRaccoltaDati; } + /** + * Gets the scala acquisizione. + * + * @return the scala acquisizione + */ public String getScalaAcquisizione() { return scalaAcquisizione; } + /** + * Sets the scala acquisizione. + * + * @param scalaAcquisizione the new scala acquisizione + */ public void setScalaAcquisizione(String scalaAcquisizione) { this.scalaAcquisizione = scalaAcquisizione; } + /** + * Gets the authors. + * + * @return the authors + */ public List getAuthors() { return authors; } + /** + * Sets the authors. + * + * @param authors the new authors + */ public void setAuthors(List authors) { this.authors = authors; } + /** + * Gets the refers to. + * + * @return the refers to + */ + public BaseConcessioneDV getRefersTo() { + return refersTo; + } + + /** + * Sets the refers to. + * + * @param refersTo the new refers to + */ + public void setRefersTo(BaseConcessioneDV refersTo) { + this.refersTo = refersTo; + } + + /** + * To string. + * + * @return the string + */ @Override public String toString() { StringBuilder builder = new StringBuilder(); - builder.append("LayerConcessione [abstractSection="); + builder.append("LayerConcessioneDV [abstractSection="); builder.append(abstractSection); builder.append(", topicCategory="); builder.append(topicCategory); @@ -122,10 +238,8 @@ public class LayerConcessioneDV extends SDILayerDescriptorDV implements Serializ builder.append(scalaAcquisizione); builder.append(", authors="); builder.append(authors); - builder.append(", wmsLink="); - builder.append(super.getWmsLink()); - builder.append(", layerName="); - builder.append(super.getLayerName()); + builder.append(", refersTo="); + builder.append(refersTo); builder.append("]"); return builder.toString(); }