add some LOGs

This commit is contained in:
Francesco Mangiacrapa 2020-11-27 11:12:53 +01:00
parent e2034659f2
commit 8034248799
7 changed files with 56 additions and 56 deletions

68
pom.xml
View File

@ -49,31 +49,31 @@
</developer> </developer>
</developers> </developers>
<!-- <dependencyManagement> --> <!-- <dependencyManagement> -->
<!-- <dependencies> --> <!-- <dependencies> -->
<!-- <dependency> --> <!-- <dependency> -->
<!-- <groupId>org.gcube.distribution</groupId> --> <!-- <groupId>org.gcube.distribution</groupId> -->
<!-- <artifactId>maven-portal-bom</artifactId> --> <!-- <artifactId>maven-portal-bom</artifactId> -->
<!-- <version>3.6.0</version> --> <!-- <version>3.6.0</version> -->
<!-- <type>pom</type> --> <!-- <type>pom</type> -->
<!-- <scope>import</scope> --> <!-- <scope>import</scope> -->
<!-- <exclusions> --> <!-- <exclusions> -->
<!-- <exclusion> --> <!-- <exclusion> -->
<!-- <groupId>com.google.gwt</groupId> --> <!-- <groupId>com.google.gwt</groupId> -->
<!-- <artifactId>gwt-user</artifactId> --> <!-- <artifactId>gwt-user</artifactId> -->
<!-- </exclusion> --> <!-- </exclusion> -->
<!-- <exclusion> --> <!-- <exclusion> -->
<!-- <groupId>com.google.gwt</groupId> --> <!-- <groupId>com.google.gwt</groupId> -->
<!-- <artifactId>gwt-servlet</artifactId> --> <!-- <artifactId>gwt-servlet</artifactId> -->
<!-- </exclusion> --> <!-- </exclusion> -->
<!-- <exclusion> --> <!-- <exclusion> -->
<!-- <groupId>com.google.gwt</groupId> --> <!-- <groupId>com.google.gwt</groupId> -->
<!-- <artifactId>gwt-dev</artifactId> --> <!-- <artifactId>gwt-dev</artifactId> -->
<!-- </exclusion> --> <!-- </exclusion> -->
<!-- </exclusions> --> <!-- </exclusions> -->
<!-- </dependency> --> <!-- </dependency> -->
<!-- </dependencies> --> <!-- </dependencies> -->
<!-- </dependencyManagement> --> <!-- </dependencyManagement> -->
<dependencies> <dependencies>
<dependency> <dependency>
@ -116,12 +116,6 @@
<version>[2.0.0, 3.0.0-SNAPSHOT)</version> <version>[2.0.0, 3.0.0-SNAPSHOT)</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.gcube.resources.discovery</groupId>
<artifactId>ic-client</artifactId>
<version>[1.0.0, 2.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.core</groupId> <groupId>org.gcube.core</groupId>
<artifactId>common-scope-maps</artifactId> <artifactId>common-scope-maps</artifactId>
@ -151,12 +145,12 @@
<artifactId>geoportal-client</artifactId> <artifactId>geoportal-client</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> <version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>compile</scope> <scope>compile</scope>
<!-- <exclusions> --> <exclusions>
<!-- <exclusion> --> <exclusion>
<!-- <groupId>javax.json</groupId> --> <groupId>org.gcube.resources.discovery</groupId>
<!-- <artifactId>javax.json-api</artifactId> --> <artifactId>ic-client</artifactId>
<!-- </exclusion> --> </exclusion>
<!-- </exclusions> --> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.liferay.portal</groupId> <groupId>com.liferay.portal</groupId>

View File

@ -53,7 +53,7 @@ public class GeoportalDataViewerConstants {
* @param msg the msg * @param msg the msg
*/ */
public static native void print(String msg)/*-{ public static native void print(String msg)/*-{
console.log(msg); console.log("js console: "+msg);
}-*/; }-*/;

View File

@ -134,6 +134,7 @@ public class LayerManager {
mapBBOX.setCrs(GeoportalDataViewerConstants.EPSG_4326); mapBBOX.setCrs(GeoportalDataViewerConstants.EPSG_4326);
GWT.log("Bounds is: "+mapBBOX); GWT.log("Bounds is: "+mapBBOX);
GWT.log("MAX_WFS_FEATURES is: "+GeoportalDataViewerConstants.MAX_WFS_FEATURES);
GeoportalDataViewerServiceAsync.Util.getInstance().getDataResult(layerObjects, olMap.getProjectionCode(), mapBBOX, GeoportalDataViewerConstants.MAX_WFS_FEATURES, olMap.getCurrentZoomLevel(), new AsyncCallback<List<GeoNaSpatialQueryResult>>() { GeoportalDataViewerServiceAsync.Util.getInstance().getDataResult(layerObjects, olMap.getProjectionCode(), mapBBOX, GeoportalDataViewerConstants.MAX_WFS_FEATURES, olMap.getCurrentZoomLevel(), new AsyncCallback<List<GeoNaSpatialQueryResult>>() {
@ -184,8 +185,12 @@ public class LayerManager {
} }
//If recordId not passed, I'm using the first feature returned //If recordId not passed, I'm using the first feature returned
if(feature==null) if(feature==null && recordId==null) {
feature = features.get(0); feature = features.get(0);
}else {
//the recordId to show has been passed but not found into list of FeatureRow
return;
}
Map<String, List<String>> entries = feature.getMapProperties(); Map<String, List<String>> entries = feature.getMapProperties();

View File

@ -30,7 +30,6 @@ import org.gcube.portlets.user.geoportaldataviewer.shared.gis.wms.GeoInformation
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.wms.Styles; import org.gcube.portlets.user.geoportaldataviewer.shared.gis.wms.Styles;
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.wms.ZAxis; import org.gcube.portlets.user.geoportaldataviewer.shared.gis.wms.ZAxis;
import org.gcube.portlets.user.geoportaldataviewer.shared.products.ConcessioneDV; import org.gcube.portlets.user.geoportaldataviewer.shared.products.ConcessioneDV;
import org.gcube.portlets.user.geoportaldataviewer.shared.products.content.WorkspaceContentDV;
import org.gcube.portlets.user.geoportaldataviewer.shared.products.model.UploadedImageDV; import org.gcube.portlets.user.geoportaldataviewer.shared.products.model.UploadedImageDV;
import org.gcube.portlets.user.urlshortener.UrlShortener; import org.gcube.portlets.user.urlshortener.UrlShortener;
import org.gcube.spatial.data.geoutility.GeoNcWMSMetadataUtility; import org.gcube.spatial.data.geoutility.GeoNcWMSMetadataUtility;
@ -173,7 +172,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
*/ */
@Override @Override
public List<UploadedImageDV> getUploadedImagesForId(String itemType, Long id, int maxImages) throws Exception{ public List<UploadedImageDV> getUploadedImagesForId(String itemType, Long id, int maxImages) throws Exception{
LOG.info("getUploadedImagesForId "+id+ " called"); LOG.info("getUploadedImagesForId [id: "+id+", itemType: "+itemType+"] called");
if(itemType==null) if(itemType==null)
throw new Exception("Invalid parameter. The itemType is null"); throw new Exception("Invalid parameter. The itemType is null");
@ -209,25 +208,25 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
throw new Exception("Concessione with id: "+id +" not available"); throw new Exception("Concessione with id: "+id +" not available");
} }
return listUI; return listUI;
}catch (Exception e) { }catch (Exception e) {
String erroMsg = UploadedImage.class.getSimpleName() +" not available for "+Concessione.class.getSimpleName() +" with id "+id; String erroMsg = UploadedImage.class.getSimpleName() +" not available for "+Concessione.class.getSimpleName() +" with id "+id;
LOG.error(erroMsg,e); LOG.error(erroMsg,e);
throw new Exception(erroMsg);
//TODO REMOTE THIS //TODO REMOTE THIS
listUI = new ArrayList<UploadedImageDV>(1); // listUI = new ArrayList<UploadedImageDV>(1);
UploadedImageDV img = new UploadedImageDV(); // UploadedImageDV img = new UploadedImageDV();
List<WorkspaceContentDV> listWsContent = new ArrayList<WorkspaceContentDV>(); // List<WorkspaceContentDV> listWsContent = new ArrayList<WorkspaceContentDV>();
WorkspaceContentDV wcDV = new WorkspaceContentDV(); // WorkspaceContentDV wcDV = new WorkspaceContentDV();
wcDV.setLink("https://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Tempio_di_Giove_2.jpg/1280px-Tempio_di_Giove_2.jpg"); // wcDV.setLink("https://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Tempio_di_Giove_2.jpg/1280px-Tempio_di_Giove_2.jpg");
listWsContent.add(wcDV); // listWsContent.add(wcDV);
img.setListWsContent(listWsContent); // img.setListWsContent(listWsContent);
listUI.add(img); // listUI.add(img);
LOG.warn("DUMMY UploadedImageDVs: "+listUI); // LOG.warn("DUMMY UploadedImageDVs: "+listUI);
return listUI; // return listUI;
//throw new Exception(erroMsg);
} }
} }
@ -260,6 +259,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
if(concessionDV==null) if(concessionDV==null)
throw new Exception("Concessione with id: "+id +" not available"); throw new Exception("Concessione with id: "+id +" not available");
LOG.debug("For id "+id+" returning "+ConcessioneDV.class.getSimpleName()+": "+concessionDV);
return concessionDV; return concessionDV;
}catch (Exception e) { }catch (Exception e) {

View File

@ -73,7 +73,7 @@ public class FeatureParser {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private static List<FeatureRow> getWFSFeatureProperties(LayerItem layerItem, String mapSrsName, BoundsMap selectBBOX, int maxWFSFeature) { private static List<FeatureRow> getWFSFeatureProperties(LayerItem layerItem, String mapSrsName, BoundsMap selectBBOX, int maxWFSFeature) {
LOG.info("getWFSFeatureProperties for layerItem: "+layerItem.getName() +" in the "+selectBBOX); LOG.info("getWFSFeatureProperties for layerItem: "+layerItem.getName() +" in the "+selectBBOX +" and maxWFSFeature: "+maxWFSFeature);
InputStream is = null; InputStream is = null;
List<FeatureRow> listFeaturesRow = new ArrayList<FeatureRow>(); List<FeatureRow> listFeaturesRow = new ArrayList<FeatureRow>();
try { try {

View File

@ -60,6 +60,7 @@ public class GisMakers {
String link = layerItem.getMapServerHost(); String link = layerItem.getMapServerHost();
LOG.debug("Map server host URL: " + link); LOG.debug("Map server host URL: " + link);
LOG.debug("CQL filter is: " + layerItem.getCqlFilter()); LOG.debug("CQL filter is: " + layerItem.getCqlFilter());
LOG.debug("MAX FEATURES: " + maxFeatures);
String outputformat = null; String outputformat = null;
String boundingBox = ""; String boundingBox = "";

View File

@ -13,10 +13,10 @@ public class GetConcessione {
private static final Logger LOG = LoggerFactory.getLogger(GetConcessione.class); private static final Logger LOG = LoggerFactory.getLogger(GetConcessione.class);
private static final String YOUR_TOKEN = "8e74a17c-92f1-405a-b591-3a6090066248-98187548"; private static final String YOUR_TOKEN = "";
public static String SCOPE = "/gcube/devsec/devVRE"; public static String SCOPE = "/gcube/devsec/devVRE";
public static long concessioneId = 67; public static long concessioneId = 8;
public static ConcessioneDV getConcessioneForId(Long id) throws Exception{ public static ConcessioneDV getConcessioneForId(Long id) throws Exception{
LOG.info("getConcessioneForId "+id+ "called"); LOG.info("getConcessioneForId "+id+ "called");