Added setGcubeProfile, documentSectionAsJSON

This commit is contained in:
Francesco Mangiacrapa 2022-12-12 17:27:57 +01:00
parent fb3790b2ef
commit b1a4a22cc6
2 changed files with 42 additions and 6 deletions

View File

@ -191,6 +191,7 @@ public class Geoportal_JSON_Mapper {
theProfileBeanExt.setCategories(theProfileBean.getCategories());
theProfileBeanExt.setTitle(theProfileBean.getTitle());
theProfileBeanExt.setType(theProfileBean.getType());
theProfileBeanExt.setGcubeProfile(gcubeProfileDV);
Document fromSectionDoc = listBSONDocument.get(i);
LOG.debug("\n\nNew section DOC for index " + i + " is: "
@ -236,6 +237,8 @@ public class Geoportal_JSON_Mapper {
}
theProfileBeanExt.setMetadataFields(new ArrayList<MetadataFieldWrapper>(cloneListOfMFW));
theProfileBeanExt.setDocumentSectionAsJSON(fromSectionDoc.toJson());
theProfileBeanExt.setGcubeProfile(gcubeProfileDV);
LOG.debug("Metadata fields are: " + theProfileBeanExt.getMetadataFields());
// Reading filePaths

View File

@ -4,6 +4,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.gcube.application.geoportalcommon.shared.geoportal.config.GcubeProfileDV;
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.innerobject.FilesetDV;
import org.gcube.application.geoportalcommon.shared.geoportal.materialization.innerobject.PayloadDV;
import org.gcube.portlets.widgets.mpformbuilder.shared.metadata.CategoryWrapper;
@ -23,8 +24,13 @@ public class MetaDataProfileBeanExt extends MetaDataProfileBean implements Seria
*
*/
private static final long serialVersionUID = 2518128223147908835L;
private String documentSectionAsJSON = null;
private List<FilesetDV> listFileset = null;
private GcubeProfileDV gcubeProfileDV;
/**
* Instantiates a new meta data profile bean ext.
*/
@ -56,6 +62,24 @@ public class MetaDataProfileBeanExt extends MetaDataProfileBean implements Seria
return listFileset;
}
/**
* Gets the document section as JSON.
*
* @return the document section as JSON
*/
public String getDocumentSectionAsJSON() {
return documentSectionAsJSON;
}
/**
* Sets the document section as JSON.
*
* @param documentSectionAsJSON the new document section as JSON
*/
public void setDocumentSectionAsJSON(String documentSectionAsJSON) {
this.documentSectionAsJSON = documentSectionAsJSON;
}
/**
* Sets the list fileset.
*
@ -120,15 +144,24 @@ public class MetaDataProfileBeanExt extends MetaDataProfileBean implements Seria
return clonedMDPBE;
}
public void setGcubeProfile(GcubeProfileDV gcubeProfileDV) {
this.gcubeProfileDV = gcubeProfileDV;
}
public GcubeProfileDV getGcubeProfileDV() {
return gcubeProfileDV;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("MetaDataProfileBeanExt [getType()=");
builder.append(getType());
builder.append(", getTitle()=");
builder.append(getTitle());
builder.append(", getMetadataFields()=");
builder.append(getMetadataFields());
builder.append("MetaDataProfileBeanExt [documentSectionAsJSON=");
builder.append(documentSectionAsJSON);
builder.append(", listFileset=");
builder.append(listFileset);
builder.append(", gcubeProfileDV=");
builder.append(gcubeProfileDV);
builder.append("]");
return builder.toString();
}