Class 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
    • Constructor Detail

      • Geoportal_JSON_Mapper

        public Geoportal_JSON_Mapper()
    • 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 DV
        scope - the scope
        username - 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 Exception
        Load project view.
        Parameters:
        theProjectDV - the the project DV
        scope - the scope
        username - 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 path
        sectionJSONDocument - 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 path
        sectionJSONDocument - the section JSON document
        limitToFirstOneFound - 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 path
        sectionJSONDocument - 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 config
        objectJSON - the object JSON
        payloads - 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