From 5762aa9c80051cb9acbf9ff75eb2fa58ac0cf476 Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Tue, 19 May 2015 13:37:31 +0000 Subject: [PATCH] added org.json json 20140107 compile removed gisinterface json dependency git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/gis-viewer@114795 82a268e6-3cf1-43bd-a215-b396298e98cf --- pom.xml | 6 ++++++ .../user/gisviewer/server/datafeature/FeatureParser.java | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 50aecad..4b518cb 100644 --- a/pom.xml +++ b/pom.xml @@ -94,6 +94,12 @@ compile + + org.json + json + 20140107 + compile + diff --git a/src/main/java/org/gcube/portlets/user/gisviewer/server/datafeature/FeatureParser.java b/src/main/java/org/gcube/portlets/user/gisviewer/server/datafeature/FeatureParser.java index e608db4..0a027c2 100644 --- a/src/main/java/org/gcube/portlets/user/gisviewer/server/datafeature/FeatureParser.java +++ b/src/main/java/org/gcube/portlets/user/gisviewer/server/datafeature/FeatureParser.java @@ -16,13 +16,13 @@ import javax.xml.parsers.DocumentBuilderFactory; import org.apache.commons.io.IOUtils; import org.apache.log4j.Logger; -import org.gcube.common.geoserverinterface.json.JSONArray; -import org.gcube.common.geoserverinterface.json.JSONException; -import org.gcube.common.geoserverinterface.json.JSONObject; import org.gcube.portlets.user.gisviewer.client.Constants; import org.gcube.portlets.user.gisviewer.client.commons.beans.LayerItem; import org.gcube.portlets.user.gisviewer.client.commons.beans.WfsTable; import org.gcube.portlets.user.gisviewer.client.commons.utils.URLMakers; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; import org.w3c.dom.Document; import com.extjs.gxt.ui.client.data.BaseModel; @@ -135,6 +135,7 @@ public class FeatureParser { * @param layerItem * @return */ + @SuppressWarnings("unchecked") private static WfsTable getTableFromJson(LayerItem layerItem, String bbox, int maxWFSFeature) { final WfsTable table = new WfsTable(); table.setTitle(layerItem.getName()); @@ -166,6 +167,7 @@ public class FeatureParser { // iterate properties JSONObject properties = ((JSONObject)features.get(i)).getJSONObject("properties"); + @SuppressWarnings("unchecked") Iterator ii = properties.keys(); while (ii.hasNext()) { String key = ii.next();