Class Geoportal_JSON_Mapper
- java.lang.Object
-
- org.gcube.application.geoportaldatamapper.Geoportal_JSON_Mapper
-
public class Geoportal_JSON_Mapper extends Object
The Class Geoportal_JSON_Mapper.- Author:
- Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it Nov 30, 2022
-
-
Field Summary
Fields Modifier and Type Field Description static String_BBOXstatic String_MATERIALIZATIONSstatic String_OGC_LINKSstatic String_PAYLOADSstatic String_THEDOCUMENTstatic String_TYPEstatic String_TYPE_GCUBE_SDI_LAYERstatic StringFILESETstatic StringJSON_$_POINTER
-
Constructor Summary
Constructors Constructor Description Geoportal_JSON_Mapper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<org.gcube.portlets.widgets.mpformbuilder.shared.metadata.MetadataFieldWrapper>cloneList(List<org.gcube.portlets.widgets.mpformbuilder.shared.metadata.MetadataFieldWrapper> list)Clone list.static ProjectEditloadProjectEdit(org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV theProjectDV, String scope, String username)Load project edit.static org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectViewloadProjectView(org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV theProjectDV, String scope, String username)Load project view.static voidprettyPrintProjectEdit(ProjectEdit projectEdit)Pretty print project view.static voidprettyPrintProjectView(org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView projectView)Pretty print project view.static voidprintArrayValue(org.json.JSONArray dataArray)static voidprintList(List dataArray)static List<org.gcube.application.geoportalcommon.shared.geoportal.materialization.GCubeSDIViewerLayerDV>readGcubeSDILayersForFileset(String materializationParentJSONPath, String sectionJSONDocument)Read gcube SDI layers for fileset.static List<org.gcube.application.geoportalcommon.shared.geoportal.materialization.innerobject.PayloadDV>readImagesForFileset(String parentJSONPath, String sectionJSONDocument, boolean limitToFirstOneFound)Read images for fileset.static List<org.gcube.application.geoportalcommon.geoportal.serdes.Payload>readPayloadsForFileset(String filesetJSONPath, String sectionJSONDocument)Read payloads for fileset.static List<org.gcube.application.geoportalcommon.geoportal.serdes.Payload>recursiveFetchingPayloads(com.jayway.jsonpath.Configuration config, Object objectJSON, List<org.gcube.application.geoportalcommon.geoportal.serdes.Payload> payloads)Recursive fetching payloads.
-
-
-
Field Detail
-
_PAYLOADS
public static final String _PAYLOADS
- See Also:
- Constant Field Values
-
_MATERIALIZATIONS
public static final String _MATERIALIZATIONS
- See Also:
- Constant Field Values
-
_TYPE_GCUBE_SDI_LAYER
public static final String _TYPE_GCUBE_SDI_LAYER
- See Also:
- Constant Field Values
-
FILESET
public static final String FILESET
- See Also:
- Constant Field Values
-
_OGC_LINKS
public static final String _OGC_LINKS
- See Also:
- Constant Field Values
-
_BBOX
public static final String _BBOX
- See Also:
- Constant Field Values
-
_TYPE
public static final String _TYPE
- See Also:
- Constant Field Values
-
JSON_$_POINTER
public static final String JSON_$_POINTER
- See Also:
- Constant Field Values
-
_THEDOCUMENT
public static final String _THEDOCUMENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
loadProjectEdit
public static ProjectEdit loadProjectEdit(org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV theProjectDV, String scope, String username) throws Exception
Load project edit.- Parameters:
theProjectDV- the the project DVscope- the scopeusername- the username- Returns:
- the project edit
- Throws:
Exception- the exception
-
printArrayValue
public static void printArrayValue(org.json.JSONArray dataArray)
-
printList
public static void printList(List dataArray)
-
cloneList
public static List<org.gcube.portlets.widgets.mpformbuilder.shared.metadata.MetadataFieldWrapper> cloneList(List<org.gcube.portlets.widgets.mpformbuilder.shared.metadata.MetadataFieldWrapper> list)
Clone list.- Parameters:
list- the list- Returns:
- the list
-
loadProjectView
public static org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView loadProjectView(org.gcube.application.geoportalcommon.shared.geoportal.project.ProjectDV theProjectDV, String scope, String username) throws ExceptionLoad project view.- Parameters:
theProjectDV- the the project DVscope- the scopeusername- the username- Returns:
- the project view
- Throws:
Exception- the exception
-
readPayloadsForFileset
public static List<org.gcube.application.geoportalcommon.geoportal.serdes.Payload> readPayloadsForFileset(String filesetJSONPath, String sectionJSONDocument)
Read payloads for fileset.- Parameters:
filesetJSONPath- the fileset JSON pathsectionJSONDocument- the section JSON document- Returns:
- the list
-
readImagesForFileset
public static List<org.gcube.application.geoportalcommon.shared.geoportal.materialization.innerobject.PayloadDV> readImagesForFileset(String parentJSONPath, String sectionJSONDocument, boolean limitToFirstOneFound)
Read images for fileset.- Parameters:
parentJSONPath- the parent JSON pathsectionJSONDocument- the section JSON documentlimitToFirstOneFound- the limit to first one found- Returns:
- the list
-
readGcubeSDILayersForFileset
public static List<org.gcube.application.geoportalcommon.shared.geoportal.materialization.GCubeSDIViewerLayerDV> readGcubeSDILayersForFileset(String materializationParentJSONPath, String sectionJSONDocument)
Read gcube SDI layers for fileset.- Parameters:
materializationParentJSONPath- the materialization parent JSON pathsectionJSONDocument- the section JSON document- Returns:
- the list
-
recursiveFetchingPayloads
public static List<org.gcube.application.geoportalcommon.geoportal.serdes.Payload> recursiveFetchingPayloads(com.jayway.jsonpath.Configuration config, Object objectJSON, List<org.gcube.application.geoportalcommon.geoportal.serdes.Payload> payloads) throws org.json.JSONException
Recursive fetching payloads.- Parameters:
config- the configobjectJSON- the object JSONpayloads- the payloads- Returns:
- the list
- Throws:
org.json.JSONException- the JSON exception
-
prettyPrintProjectView
public static void prettyPrintProjectView(org.gcube.application.geoportalcommon.shared.geoportal.view.ProjectView projectView)
Pretty print project view.- Parameters:
projectView- the project view
-
prettyPrintProjectEdit
public static void prettyPrintProjectEdit(ProjectEdit projectEdit)
Pretty print project view.- Parameters:
projectEdit- the project edit
-
-