[isidorus-cvs] r842 - in branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets: base isidorus
lgiessmann at common-lisp.net
lgiessmann at common-lisp.net
Wed Sep 7 10:24:00 UTC 2011
Author: lgiessmann
Date: Wed Sep 7 03:23:59 2011
New Revision: 842
Log:
gdl-frontend: Widgets: finalised the commit operation of created Environments
Modified:
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/CommitCallback.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/IsidorusConstants.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/LoadSchemaCallback.java
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java Wed Sep 7 02:26:22 2011 (r841)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java Wed Sep 7 03:23:59 2011 (r842)
@@ -62,9 +62,7 @@
}
});
- mainPanel.add(requestButton);
-
- Window.alert(">> " + Window.Location.getHost());
+ mainPanel.add(requestButton);
}catch(Exception e){
e.printStackTrace();
Window.alert(">> e >> " + e.getClass() + " >> " + e.getMessage());
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/CommitCallback.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/CommitCallback.java Wed Sep 7 02:26:22 2011 (r841)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/CommitCallback.java Wed Sep 7 03:23:59 2011 (r842)
@@ -17,6 +17,8 @@
import com.google.gwt.json.client.JSONString;
import com.google.gwt.json.client.JSONValue;
import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.RootPanel;
+
import us.isidor.gdl.anaToMia.TopicMaps.TmEngineModel.ExporterException;
import us.isidor.gdl.anaToMia.TopicMaps.TmEngineModel.TmEngine;
import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Association;
@@ -80,12 +82,17 @@
Locator psi = tm.createLocator("http://textgrid.org/serviceregistry/environment/" + envName.getValue());
top.removeSubjectIdentifier(carrierLocator);
top.addSubjectIdentifier(psi);
+ top.addType(TmHelper.getTopicByPsi("http://textgrid.org/serviceregistry/model/types/Environment", tm));
}
String jtm = null;
if(topicMaps.size() != 0){
jtm = tmEngine.exportTm(topicMaps.get(0));
} else if(topics.size() != 0){
+ topics.add(TmHelper.getTopicByPsi("http://textgrid.org/serviceregistry/model/types/Environment", tm));
+ topics.add(TmHelper.getTopicByPsi("http://textgrid.org/serviceregistry/model/environment-name", tm));
+ topics.add(TmHelper.getTopicByPsi(PSIs.TMCL.tmclNameType, tm));
+ topics.add(TmHelper.getTopicByPsi(PSIs.TMCL.tmclTopictype, tm));
jtm = tmEngine.exportTm(topics, new ArrayList<Association>());
}
@@ -94,6 +101,8 @@
try{
// a check for an existing environment topic is not necessary,
// since it would be exactly the same topic.
+
+ //RootPanel.getBodyElement().setInnerText(jtm); // TODO: remove
builder.sendRequest(null, new EnvironmentCommitRequest(jtm));
}catch(RequestException e){
Window.alert("could not commit the topic: " + jtm + ", because(" + e.getClass() + "): " + e.getMessage());
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/IsidorusConstants.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/IsidorusConstants.java Wed Sep 7 02:26:22 2011 (r841)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/IsidorusConstants.java Wed Sep 7 03:23:59 2011 (r842)
@@ -1,10 +1,12 @@
package us.isidor.gdl.anaToMia.Widgets.isidorus;
+import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Window;
+
public class IsidorusConstants {
public final static String DELETE_REUQEST_URL = Window.Location.getHost() + "/gdl/delete";
public final static String COMMIT_REQUEST_URL = Window.Location.getHost() + "/gdl/commit";
public final static String GET_FRAGMENT_REQUEST_URL = Window.Location.getHost() + "/gdl/fragment/";
- public final static String GET_SCHEMA_REQUEST_URL = Window.Location.getHost() + "/gdl/schema"; //"TextGrid_ServiceRegistry_required_TMCL_and_GDL_Schema_with_test_data.jtm";
+ public final static String GET_SCHEMA_REQUEST_URL = GWT.getModuleBaseURL() + "TextGrid_ServiceRegistry_required_TMCL_and_GDL_Schema_with_test_data.jtm"; //"gdl/schema";
}
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/LoadSchemaCallback.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/LoadSchemaCallback.java Wed Sep 7 02:26:22 2011 (r841)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/LoadSchemaCallback.java Wed Sep 7 03:23:59 2011 (r842)
@@ -1,8 +1,6 @@
package us.isidor.gdl.anaToMia.Widgets.isidorus;
import java.util.ArrayList;
-
-import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.http.client.Request;
@@ -23,7 +21,7 @@
// this class can be used as a callback that requests the Topic Map data
// addressable by the URI isidorusUrl
public class LoadSchemaCallback implements ILoadSchemaCallback{
- private final String isidorusUrl = URL.encode(GWT.getModuleBaseURL() + IsidorusConstants.GET_SCHEMA_REQUEST_URL);
+ private final String isidorusUrl = URL.encode(IsidorusConstants.GET_SCHEMA_REQUEST_URL);
private ArrayList<Pair<String, TopicIdentifierTypes>> requestedTopicsToCreate = new ArrayList<Pair<String,TopicIdentifierTypes>>();
private Pair<String, TopicIdentifierTypes> requestedTopicToEdit = null;
private RequestBuilder requestBuilder = new RequestBuilder(RequestBuilder.GET, isidorusUrl);
More information about the Isidorus-cvs
mailing list