[isidorus-cvs] r910 - in branches/gdl-frontend/src/anaToMia/GDL_Widgets: src/us/isidor/gdl/anaToMia/Widgets/isidorus war
lgiessmann at common-lisp.net
lgiessmann at common-lisp.net
Thu Sep 15 12:49:55 UTC 2011
Author: lgiessmann
Date: Thu Sep 15 05:49:55 2011
New Revision: 910
Log:
gdl-frontend: Widgets: replaced some hard coded strings (psis/urls) by constants
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/HashObjectUi.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/PsiContainer.java
branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.html
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 Thu Sep 15 05:15:35 2011 (r909)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/CommitCallback.java Thu Sep 15 05:49:55 2011 (r910)
@@ -36,7 +36,6 @@
public final String DELETE_REUQEST_URL = IsidorusConstants.DELETE_REQUEST_URL;
public final String COMMIT_REQUEST_URL = IsidorusConstants.COMMIT_REQUEST_URL;
public final String GET_REQUEST_URL = IsidorusConstants.GET_FRAGMENT_REQUEST_URL;
- public final String HASH_VALUE_OCCURRENCE_TYPE = "http://textgrid.org/serviceregistry/model/value";
@Override
@@ -238,7 +237,7 @@
if (200 == response.getStatusCode()) {
if(edited){
String[] topPsi = Utils.splitUriByLastFragment(psi);
- String[] hashValuePsi = Utils.splitUriByLastFragment(CommitCallback.this.HASH_VALUE_OCCURRENCE_TYPE);
+ String[] hashValuePsi = Utils.splitUriByLastFragment(IsidorusConstants.HASH_VALUE_OCCURRENCE_TYPE);
String[] xsdString = Utils.splitUriByLastFragment(IsidorusConstants.XSD_STRING);
JSONObject delObj = new JSONObject();
@@ -361,7 +360,7 @@
if(typeReference == null) continue;
Pair<String, TopicIdentifierTypes> typeRef = this.computeReferenceUri(typeReference, prefixes);
- if(typeRef != null && typeRef.getSecond().equals(TopicIdentifierTypes.SubjectIdentifier) && typeRef.getFirst().equals(CommitCallback.this.HASH_VALUE_OCCURRENCE_TYPE)) return occurrence;
+ if(typeRef != null && typeRef.getSecond().equals(TopicIdentifierTypes.SubjectIdentifier) && typeRef.getFirst().equals(IsidorusConstants.HASH_VALUE_OCCURRENCE_TYPE)) return occurrence;
}
return null;
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/HashObjectUi.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/HashObjectUi.java Thu Sep 15 05:15:35 2011 (r909)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/HashObjectUi.java Thu Sep 15 05:49:55 2011 (r910)
@@ -5,10 +5,8 @@
import us.isidor.gdl.anaToMia.TmEngine.jtmsBasedEngine.JtmsTmEngine;
import us.isidor.gdl.anaToMia.Widgets.base.GdlPanel;
-import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
import us.isidor.gdl.anaToMia.Widgets.environment.Pair;
import us.isidor.gdl.anaToMia.Widgets.environment.TopicIdentifierTypes;
-
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.TextAreaElement;
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 Thu Sep 15 05:15:35 2011 (r909)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/IsidorusConstants.java Thu Sep 15 05:49:55 2011 (r910)
@@ -11,6 +11,7 @@
public final static String TOPIC_MAP_IDENTIFIER = "http://textgrid.org/serviceregistry/gdl-frontend/gdl-tm";
public final static String HASH_OBJECT_PSI = "http://textgrid.org/serviceregistry/model/types/Hash-Object";
public final static String ENVIRONMENT_PSI = "http://textgrid.org/serviceregistry/model/types/Environment";
+ public final static String HASH_VALUE_OCCURRENCE_TYPE = "http://textgrid.org/serviceregistry/model/value";
public final static String DELETE_REQUEST_URL = Window.Location.getProtocol() + "//" + Window.Location.getHost() + "/gdl/delete";
public final static String COMMIT_REQUEST_URL = Window.Location.getProtocol() + "//" + Window.Location.getHost() + "/gdl/commit";
public final static String GET_FRAGMENT_REQUEST_URL = Window.Location.getProtocol() + "//" + Window.Location.getHost() + "/gdl/fragment/";
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/PsiContainer.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/PsiContainer.java Thu Sep 15 05:15:35 2011 (r909)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/PsiContainer.java Thu Sep 15 05:49:55 2011 (r910)
@@ -16,6 +16,7 @@
private ArrayList<Label> psiLabels = new ArrayList<Label>();
private VerticalPanel containerPanel = new VerticalPanel();
private ClickHandler lblClickHandler = null;
+ private final String PSI_LABEL_STYLE_CLASS = "psi_label";
public PsiContainer(ClickHandler labelClikcHandler) throws ExecutionException{
@@ -28,6 +29,7 @@
if(psi == null) return;
Label lbl = new Label(psi);
+ lbl.addStyleName(this.PSI_LABEL_STYLE_CLASS);
this.psiLabels.add(lbl);
int widgetIdx = 0;
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.html
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.html Thu Sep 15 05:15:35 2011 (r909)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/GDL_Widgets.html Thu Sep 15 05:49:55 2011 (r910)
@@ -47,7 +47,7 @@
<center>
<div id="GWT_Content"/>
- <image style="position:fixed; bottom:0px; right:0px" src="http://127.0.0.1:8888/gdl_widgets/textgrid_small.png"/>
+ <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>
</center>
</body>
</html>
More information about the Isidorus-cvs
mailing list