[isidorus-cvs] r920 - in branches/gdl-frontend/src/anaToMia/GDL_Widgets: src/us/isidor/gdl/anaToMia/Widgets/isidorus war war/gdl_widgets

Author: lgiessmann Date: Mon Sep 19 02:18:12 2011 New Revision: 920 Log: gdl-frontend: Widgets: adapted the psi-request handler to the tm-sparql-interface; fixed a css bug in the host-file Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/GdlWebPage.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.css branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.html branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/EnvironmentPsis.json branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/HashObjectPsis.json Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/GdlWebPage.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/GdlWebPage.java Mon Sep 19 01:56:58 2011 (r919) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/GdlWebPage.java Mon Sep 19 02:18:12 2011 (r920) @@ -12,6 +12,7 @@ import com.google.gwt.http.client.Response; import com.google.gwt.http.client.URL; import com.google.gwt.json.client.JSONArray; +import com.google.gwt.json.client.JSONObject; import com.google.gwt.json.client.JSONParser; import com.google.gwt.json.client.JSONString; import com.google.gwt.json.client.JSONValue; @@ -173,20 +174,39 @@ public void onResponseReceived(Request request, Response response) { if (200 == response.getStatusCode()) { JSONValue psiVals = JSONParser.parseStrict(response.getText()); + JSONObject resultObject = psiVals.isObject(); + if(resultObject == null) { + Window.alert("got bad json, a query result object was expected, but got: " + response.getText()); + GdlWebPage.this.resetPage(); + } + + JSONValue content = resultObject.get("topics"); + if(content == null){ + Window.alert("got bad json, a query result object was expected, but got: " + response.getText()); + GdlWebPage.this.resetPage(); + } + JSONArray psis = null; - if(psiVals != null) psis = psiVals.isArray(); + if(psiVals != null) psis = content.isArray(); if(psis == null){ - Window.alert("got bad json, an array of strings was expected, but got: " + response.getText()); + Window.alert("got bad json, a query result object was expected, but got: " + response.getText()); GdlWebPage.this.resetPage(); } for(int psisIdx = 0; psisIdx != psis.size(); ++psisIdx){ JSONValue psiVal = psis.get(psisIdx); JSONString psiString = null; if(psiVal != null) psiString = psiVal.isString(); - GdlWebPage.this.psiContainer.addPsi(psiString); + String psiValue = null; + if(psiString != null){ + psiValue = psiString.stringValue(); + if(psiValue.startsWith("<")) psiValue = psiValue.substring(1); + if(psiValue.endsWith(">")) psiValue = psiValue.substring(0, psiValue.length() - 1); + } + GdlWebPage.this.psiContainer.addPsi(psiValue); } - GdlWebPage.this.psiContainer.insertIn(GdlWebPage.this.navigationPanel); } else { + GdlWebPage.this.psiContainer.insertIn(GdlWebPage.this.navigationPanel); + } else { Window.alert("could not request existing instances of " + GdlWebPage.this.topicTypePsi + ", because(" + response.getStatusCode() + "): " + response.getStatusText()); GdlWebPage.this.resetPage(); } Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.css ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.css Mon Sep 19 01:56:58 2011 (r919) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.css Mon Sep 19 02:18:12 2011 (r920) @@ -62,11 +62,6 @@ } -image { - border-style: none; -} - - .gdl_panel { margin-left:auto; margin-right:0; Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.html ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.html Mon Sep 19 01:56:58 2011 (r919) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.html Mon Sep 19 02:18:12 2011 (r920) @@ -47,7 +47,7 @@ <center> <div id="GWT_Content"/> - <a href="http://www.textgrid.org/"><image style="position:fixed; bottom:0px; right:0px" src="http://127.0.0.1:8888/gdl_widgets/textgrid_small.png"/></a> + <a href="http://www.textgrid.org/"><image style="position:fixed; bottom:0px; right:0px; border-style: none;" src="http://127.0.0.1:8888/gdl_widgets/textgrid_small.png"/></a> </center> </body> </html> Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/EnvironmentPsis.json ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/EnvironmentPsis.json Mon Sep 19 01:56:58 2011 (r919) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/EnvironmentPsis.json Mon Sep 19 02:18:12 2011 (r920) @@ -1,20 +1,23 @@ -[ - "http://textgrid.org/serviceregistry/environment/env-1", - "http://textgrid.org/serviceregistry/environment/env-2", - "http://textgrid.org/serviceregistry/environment/env-3", - "http://textgrid.org/serviceregistry/environment/env-4", - "http://textgrid.org/serviceregistry/environment/env-5", - "http://textgrid.org/serviceregistry/environment/env-6", - "http://textgrid.org/serviceregistry/environment/env-7", - "http://textgrid.org/serviceregistry/test-env-1", - "http://textgrid.org/serviceregistry/environment/env-8", - "http://textgrid.org/serviceregistry/environment/env-9", - "http://textgrid.org/serviceregistry/environment/env-10", - "http://textgrid.org/serviceregistry/environment/env-11", - "http://textgrid.org/serviceregistry/environment/env-12", - "http://textgrid.org/serviceregistry/environment/env-13", - "http://textgrid.org/serviceregistry/environment/env-14", - "http://textgrid.org/serviceregistry/environment/env-15", - "http://textgrid.org/serviceregistry/environment/env-16", - "http://textgrid.org/serviceregistry/environment/env-17" -] \ No newline at end of file +{ + "topics": + [ + "<http://textgrid.org/serviceregistry/environment/env-1>", + "<http://textgrid.org/serviceregistry/environment/env-2>", + "<http://textgrid.org/serviceregistry/environment/env-3>", + "<http://textgrid.org/serviceregistry/environment/env-4>", + "<http://textgrid.org/serviceregistry/environment/env-5>", + "<http://textgrid.org/serviceregistry/environment/env-6>", + "<http://textgrid.org/serviceregistry/environment/env-7>", + "<http://textgrid.org/serviceregistry/test-env-1>", + "<http://textgrid.org/serviceregistry/environment/env-8>", + "<http://textgrid.org/serviceregistry/environment/env-9>", + "<http://textgrid.org/serviceregistry/environment/env-10>", + "<http://textgrid.org/serviceregistry/environment/env-11>", + "<http://textgrid.org/serviceregistry/environment/env-12>", + "<http://textgrid.org/serviceregistry/environment/env-13>", + "<http://textgrid.org/serviceregistry/environment/env-14>", + "<http://textgrid.org/serviceregistry/environment/env-15>", + "<http://textgrid.org/serviceregistry/environment/env-16>", + "<http://textgrid.org/serviceregistry/environment/env-17>" + ] +} \ No newline at end of file Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/HashObjectPsis.json ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/HashObjectPsis.json Mon Sep 19 01:56:58 2011 (r919) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/HashObjectPsis.json Mon Sep 19 02:18:12 2011 (r920) @@ -1,103 +1,101 @@ -[ - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash1", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash2", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash3", - "http://textgrid.org/serviceregistry/hash-object/environment-4/hash4", - "http://textgrid.org/serviceregistry/hash-object/environment-3/hash5", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash6", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash7", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash8", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash9", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash10", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash11", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash12", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash13", - "http://textgrid.org/serviceregistry/hash-object/environment-5/hash14", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash15", - "http://textgrid.org/serviceregistry/test-hash-2", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash16", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash17", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash18", - "http://textgrid.org/serviceregistry/hash-object/environment-4/hash19", - "http://textgrid.org/serviceregistry/hash-object/environment-3/hash20", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash21", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash22", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash23", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash24", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash25", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash26", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash27", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash28", - "http://textgrid.org/serviceregistry/hash-object/environment-5/hash29", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash30", - "http://textgrid.org/serviceregistry/test-hash-31", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash32", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash33", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash34", - "http://textgrid.org/serviceregistry/hash-object/environment-4/hash35", - "http://textgrid.org/serviceregistry/hash-object/environment-3/hash36", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash37", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash38", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash39", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash40", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash41", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash42", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash43", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash44", - "http://textgrid.org/serviceregistry/hash-object/environment-5/hash45", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash46", - "http://textgrid.org/serviceregistry/test-hash-47", - - - - - - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash1", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash2", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash3", - "http://textgrid.org/serviceregistry/hash-object/environment-4/hash4", - "http://textgrid.org/serviceregistry/hash-object/environment-3/hash5", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash6", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash7", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash8", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash9", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash10", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash11", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash12", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash13", - "http://textgrid.org/serviceregistry/hash-object/environment-5/hash14", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash15", - "http://textgrid.org/serviceregistry/test-hash-2", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash16", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash17", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash18", - "http://textgrid.org/serviceregistry/hash-object/environment-4/hash19", - "http://textgrid.org/serviceregistry/hash-object/environment-3/hash20", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash21", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash22", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash23", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash24", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash25", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash26", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash27", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash28", - "http://textgrid.org/serviceregistry/hash-object/environment-5/hash29", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash30", - "http://textgrid.org/serviceregistry/test-hash-31", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash32", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash33", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash34", - "http://textgrid.org/serviceregistry/hash-object/environment-4/hash35", - "http://textgrid.org/serviceregistry/hash-object/environment-3/hash36", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash37", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash38", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash39", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash40", - "http://textgrid.org/serviceregistry/hash-object/environment-2/hash41", - "http://textgrid.org/serviceregistry/hash-object/environment-1/hash42", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash43", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash44", - "http://textgrid.org/serviceregistry/hash-object/environment-5/hash45", - "http://textgrid.org/serviceregistry/hash-object/environment-6/hash46", - "http://textgrid.org/serviceregistry/test-hash-47" -] \ No newline at end of file +{ + "topics": + [ + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash1>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash2>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash3>", + "<http://textgrid.org/serviceregistry/hash-object/environment-4/hash4>", + "<http://textgrid.org/serviceregistry/hash-object/environment-3/hash5>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash6>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash7>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash8>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash9>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash10>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash11>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash12>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash13>", + "<http://textgrid.org/serviceregistry/hash-object/environment-5/hash14>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash15>", + "<http://textgrid.org/serviceregistry/test-hash-2>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash16>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash17>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash18>", + "<http://textgrid.org/serviceregistry/hash-object/environment-4/hash19>", + "<http://textgrid.org/serviceregistry/hash-object/environment-3/hash20>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash21>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash22>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash23>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash24>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash25>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash26>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash27>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash28>", + "<http://textgrid.org/serviceregistry/hash-object/environment-5/hash29>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash30>", + "<http://textgrid.org/serviceregistry/test-hash-31>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash32>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash33>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash34>", + "<http://textgrid.org/serviceregistry/hash-object/environment-4/hash35>", + "<http://textgrid.org/serviceregistry/hash-object/environment-3/hash36>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash37>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash38>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash39>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash40>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash41>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash42>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash43>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash44>", + "<http://textgrid.org/serviceregistry/hash-object/environment-5/hash45>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash46>", + "<http://textgrid.org/serviceregistry/test-hash-47>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash1>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash2>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash3>", + "<http://textgrid.org/serviceregistry/hash-object/environment-4/hash4>", + "<http://textgrid.org/serviceregistry/hash-object/environment-3/hash5>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash6>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash7>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash8>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash9>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash10>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash11>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash12>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash13>", + "<http://textgrid.org/serviceregistry/hash-object/environment-5/hash14>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash15>", + "<http://textgrid.org/serviceregistry/test-hash-2>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash16>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash17>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash18>", + "<http://textgrid.org/serviceregistry/hash-object/environment-4/hash19>", + "<http://textgrid.org/serviceregistry/hash-object/environment-3/hash20>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash21>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash22>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash23>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash24>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash25>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash26>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash27>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash28>", + "<http://textgrid.org/serviceregistry/hash-object/environment-5/hash29>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash30>", + "<http://textgrid.org/serviceregistry/test-hash-31>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash32>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash33>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash34>", + "<http://textgrid.org/serviceregistry/hash-object/environment-4/hash35>", + "<http://textgrid.org/serviceregistry/hash-object/environment-3/hash36>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash37>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash38>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash39>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash40>", + "<http://textgrid.org/serviceregistry/hash-object/environment-2/hash41>", + "<http://textgrid.org/serviceregistry/hash-object/environment-1/hash42>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash43>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash44>", + "<http://textgrid.org/serviceregistry/hash-object/environment-5/hash45>", + "<http://textgrid.org/serviceregistry/hash-object/environment-6/hash46>", + "<http://textgrid.org/serviceregistry/test-hash-47>" + ] +} \ No newline at end of file
participants (1)
-
lgiessmann@common-lisp.net