[isidorus-cvs] r966 - branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus
lgiessmann at common-lisp.net
lgiessmann at common-lisp.net
Sat Sep 24 20:16:52 UTC 2011
Author: lgiessmann
Date: Sat Sep 24 13:16:49 2011
New Revision: 966
Log:
gdl-frontend: Widgets: added some 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/IsidorusConstants.java
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 22 07:23:54 2011 (r965)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/CommitCallback.java Sat Sep 24 13:16:49 2011 (r966)
@@ -109,7 +109,7 @@
// set the new valid psi
Name envName = top.getNames().get(0);
- Locator psi = tm.createLocator("http://textgrid.org/serviceregistry/environment/" + envName.getValue());
+ Locator psi = tm.createLocator(IsidorusConstants.ENVIRONMENT_PSI_PREFIX + envName.getValue());
top.addSubjectIdentifier(psi);
}
@@ -167,7 +167,7 @@
assoc = associations.get(0);
} else {
JsArray<Association> assocs = top.getTopicMap().getAssociations();
- Topic assocType = TmHelper.getTopicByPsi("http://textgrid.org/serviceregistry/model/has-environment", tm);
+ Topic assocType = TmHelper.getTopicByPsi(IsidorusConstants.HAS_ENVIRONMENT_PSI, tm);
for(int i = 0; i != assocs.length(); ++i){
if(assocs.get(i).getType().equals(assocType)){
assoc = assocs.get(i);
@@ -176,9 +176,9 @@
}
}
- Name env = assoc.getRoles(TmHelper.getTopicByPsi("http://textgrid.org/serviceregistry/model/environment", tm)).get(0).getPlayer().getNames().get(0);
- Occurrence key = top.getOccurrences(TmHelper.getTopicByPsi("http://textgrid.org/serviceregistry/model/key", tm)).get(0);
- String psiValue = "http://textgrid.org/serviceregistry/hash-object/" + env.getValue() + "/" + key.getValue();
+ Name env = assoc.getRoles(TmHelper.getTopicByPsi(IsidorusConstants.ENVIRONMENT_ROLE_TYPE_PSI, tm)).get(0).getPlayer().getNames().get(0);
+ Occurrence key = top.getOccurrences(TmHelper.getTopicByPsi(IsidorusConstants.KEY_OCCURRENCE_TYPE_PSI, tm)).get(0);
+ String psiValue = IsidorusConstants.HASH_OBJECT_PSI_PREFIX + env.getValue() + "/" + key.getValue();
Locator psi = tm.createLocator(psiValue);
this.removeSubjectIdentifiers(top);
top.addSubjectIdentifier(psi);
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 22 07:23:54 2011 (r965)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/IsidorusConstants.java Sat Sep 24 13:16:49 2011 (r966)
@@ -10,6 +10,11 @@
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 ENVIRONMENT_PSI_PREFIX = "http://textgrid.org/serviceregistry/environment/";
+ public final static String HASH_OBJECT_PSI_PREFIX = "http://textgrid.org/serviceregistry/hash-object/";
+ public final static String HAS_ENVIRONMENT_PSI = "http://textgrid.org/serviceregistry/model/has-environment";
+ public final static String ENVIRONMENT_ROLE_TYPE_PSI = "http://textgrid.org/serviceregistry/model/environment";
+ public final static String KEY_OCCURRENCE_TYPE_PSI = "http://textgrid.org/serviceregistry/model/key";
public final static String TM_SPARQL_ENDPOINT = Window.Location.getProtocol() + "//" + Window.Location.getHost() + "/gdl/tm-sparql";
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";
More information about the Isidorus-cvs
mailing list