Author: lgiessmann Date: Wed Sep 21 06:56:39 2011 New Revision: 957
Log: gdl-frontend: Widgets: fixed a bug in the method HashObjectPsiContainer.createObjectToBeDeleted(...)
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/HashObjectPsiContainer.java
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/HashObjectPsiContainer.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/HashObjectPsiContainer.java Wed Sep 21 06:29:26 2011 (r956) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/HashObjectPsiContainer.java Wed Sep 21 06:56:39 2011 (r957) @@ -78,8 +78,7 @@ private void deleteHashObject(String psi, DeleteAllHashObjectsRequest reqCallback){ if(psi != null || reqCallback != null){ - Window.alert(">> " + psi); - JSONObject delObj = this.createObjectToBeDelete(psi); + JSONObject delObj = this.createObjectToBeDeleted(psi); try{ String url = URL.encode(this.DELETE_URL); RequestBuilder builder = new RequestBuilder(RequestBuilder.DELETE, url); @@ -93,17 +92,17 @@ } - private JSONObject createObjectToBeDelete(String psi){ + private JSONObject createObjectToBeDeleted(String psi){ JSONArray psis = new JSONArray(); psis.set(0, new JSONString(psi)); - + JSONObject delObj = new JSONObject(); delObj.put("type", new JSONString("Topic")); - + String[] pref = Utils.splitUriByLastFragment(psi); - JSONValue val = JSONParser.parseStrict("{"version":"1.1","prefixes":{"pref":" + pref[0] + "},"subject_identifiers":["[pref:" + pref[1] + "]"]}"); + JSONValue val = JSONParser.parseStrict("{"version":"1.1","prefixes":{"pref":"" + pref[0] + ""},"subject_identifiers":["[pref:" + pref[1] + "]"]}"); delObj.put("delete", val.isObject()); - + return delObj; } @@ -179,7 +178,7 @@ top.remove(); } - JSONObject delObj = HashObjectPsiContainer.this.createObjectToBeDelete(this.environmentPsi); + JSONObject delObj = HashObjectPsiContainer.this.createObjectToBeDeleted(this.environmentPsi); String url = URL.encode(HashObjectPsiContainer.this.DELETE_URL); RequestBuilder builder = new RequestBuilder(RequestBuilder.DELETE, url); builder.setHeader("Content-type", "application/json");