Starting trasformation from JSON document to displayable sections
This commit is contained in:
parent
b49c1c1e21
commit
e487edcce0
|
@ -0,0 +1,36 @@
|
|||
package org.gcube.application.geoportalcommon.shared.geoportal.view;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class FilesetDV implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -2587586022638697113L;
|
||||
|
||||
private List<PayloadDV> listPayload;
|
||||
|
||||
public FilesetDV() {
|
||||
|
||||
}
|
||||
|
||||
public List<PayloadDV> getListPayload() {
|
||||
return listPayload;
|
||||
}
|
||||
|
||||
public void setListPayload(List<PayloadDV> listPayload) {
|
||||
this.listPayload = listPayload;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("FilesetDV [listPayload=");
|
||||
builder.append(listPayload);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package org.gcube.application.geoportalcommon.shared.geoportal.view;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@XmlRootElement(name = "_payloads")
|
||||
@Slf4j
|
||||
public class PayloadDV implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3975356671779455705L;
|
||||
|
||||
@JsonProperty("_mimetype")
|
||||
private String mimetype;
|
||||
|
||||
@JsonProperty("_storageID")
|
||||
private String storageID;
|
||||
|
||||
@JsonProperty("_link")
|
||||
private String link;
|
||||
|
||||
@JsonProperty("_name")
|
||||
private String name;
|
||||
|
||||
public PayloadDV() {
|
||||
|
||||
}
|
||||
|
||||
public String getMimetype() {
|
||||
return mimetype;
|
||||
}
|
||||
|
||||
public String getStorageID() {
|
||||
return storageID;
|
||||
}
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setMimetype(String mimetype) {
|
||||
this.mimetype = mimetype;
|
||||
}
|
||||
|
||||
public void setStorageID(String storageID) {
|
||||
this.storageID = storageID;
|
||||
}
|
||||
|
||||
public void setLink(String link) {
|
||||
this.link = link;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("PayloadDV [mimetype=");
|
||||
builder.append(mimetype);
|
||||
builder.append(", storageID=");
|
||||
builder.append(storageID);
|
||||
builder.append(", link=");
|
||||
builder.append(link);
|
||||
builder.append(", name=");
|
||||
builder.append(name);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package org.gcube.application.geoportalcommon.shared.geoportal.view;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV;
|
||||
|
||||
public class ProjectView {
|
||||
|
||||
private ProjectDV theProjectDV;
|
||||
private List<SectionView> listSections = new ArrayList<SectionView>();
|
||||
|
||||
public ProjectView() {
|
||||
|
||||
}
|
||||
|
||||
public void addSectionView(SectionView sectionView) {
|
||||
listSections.add(sectionView);
|
||||
}
|
||||
|
||||
public ProjectDV getTheProjectDV() {
|
||||
return theProjectDV;
|
||||
}
|
||||
|
||||
public List<SectionView> getListSections() {
|
||||
return listSections;
|
||||
}
|
||||
|
||||
public void setTheProjectDV(ProjectDV theProjectDV) {
|
||||
this.theProjectDV = theProjectDV;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("ProjectView [theProjectDV=");
|
||||
builder.append(theProjectDV);
|
||||
builder.append(", listSections=");
|
||||
builder.append(listSections);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package org.gcube.application.geoportalcommon.shared.geoportal.view;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SectionView implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -687500472291023073L;
|
||||
private String sectionTitle;
|
||||
|
||||
private List<SubDocumentView> listSubDocuments = new ArrayList<SubDocumentView>();
|
||||
|
||||
public SectionView() {
|
||||
|
||||
}
|
||||
|
||||
public String getSectionTitle() {
|
||||
return sectionTitle;
|
||||
}
|
||||
|
||||
public void addSubDocument(SubDocumentView subDocumentView) {
|
||||
listSubDocuments.add(subDocumentView);
|
||||
}
|
||||
|
||||
public List<SubDocumentView> getListSubDocuments() {
|
||||
return listSubDocuments;
|
||||
}
|
||||
|
||||
public void setSectionTitle(String sectionTitle) {
|
||||
this.sectionTitle = sectionTitle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("SectionView [sectionTitle=");
|
||||
builder.append(sectionTitle);
|
||||
builder.append(", listSubDocuments=");
|
||||
builder.append(listSubDocuments);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package org.gcube.application.geoportalcommon.shared.geoportal.view;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.application.geoportalcommon.shared.products.model.SDILayerDescriptorDV;
|
||||
|
||||
public class SubDocumentView implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -5437906835306090354L;
|
||||
|
||||
private String metadataAsJSON;
|
||||
|
||||
private List<FilesetDV> listFiles;
|
||||
private List<FilesetDV> listImages;
|
||||
private List<SDILayerDescriptorDV> listLayers;
|
||||
|
||||
public SubDocumentView() {
|
||||
|
||||
}
|
||||
|
||||
public String getMetadataAsJSON() {
|
||||
return metadataAsJSON;
|
||||
}
|
||||
|
||||
public List<FilesetDV> getListFiles() {
|
||||
return listFiles;
|
||||
}
|
||||
|
||||
public List<FilesetDV> getListImages() {
|
||||
return listImages;
|
||||
}
|
||||
|
||||
public List<SDILayerDescriptorDV> getListLayers() {
|
||||
return listLayers;
|
||||
}
|
||||
|
||||
public void setMetadataAsJSON(String metadataAsJSON) {
|
||||
this.metadataAsJSON = metadataAsJSON;
|
||||
}
|
||||
|
||||
public void setListFiles(List<FilesetDV> listFiles) {
|
||||
this.listFiles = listFiles;
|
||||
}
|
||||
|
||||
public void setListImages(List<FilesetDV> listImages) {
|
||||
this.listImages = listImages;
|
||||
}
|
||||
|
||||
public void setListLayers(List<SDILayerDescriptorDV> listLayers) {
|
||||
this.listLayers = listLayers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("SubDocumentView [metadataAsJSON=");
|
||||
builder.append(metadataAsJSON);
|
||||
builder.append(", listFiles=");
|
||||
builder.append(listFiles);
|
||||
builder.append(", listImages=");
|
||||
builder.append(listImages);
|
||||
builder.append(", listLayers=");
|
||||
builder.append(listLayers);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue