[isidorus-cvs] r1021 - in trunk/src/anaToMia/GDL_Widgets: src/us/isidor/gdl/anaToMia/Widgets/base war/gdl_widgets
lgiessmann at common-lisp.net
lgiessmann at common-lisp.net
Wed Oct 26 09:11:24 UTC 2011
Author: lgiessmann
Date: Wed Oct 26 02:11:12 2011
New Revision: 1021
Log:
gdl-frontend: Widgets: implemented additional functionality for the gdlt:Variant-Name-Scope and gdlt:Variant-Name-Reifier semantics for generating content entered in GdlVisibleObject
Modified:
trunk/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java
trunk/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java
trunk/src/anaToMia/GDL_Widgets/war/gdl_widgets/Service_GDL_Schema.jtm
Modified: trunk/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java
==============================================================================
--- trunk/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java Tue Oct 25 09:29:07 2011 (r1020)
+++ trunk/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java Wed Oct 26 02:11:12 2011 (r1021)
@@ -2560,7 +2560,7 @@
Variant variant = possibleVariants.get(0);
Topic reifier = TmHelper.getTopicFromStringRepresentation(this.getSelectedValues().get(selectedValueIndex), this.getValueGroup());
- if(reifier != null) variant.setReifier(reifier);
+ if(reifier != null && !variant.getReifier().equals(reifier)) variant.setReifier(reifier);
contents.add(new Pair<Object, TopicMapsTypes>(variant, TopicMapsTypes.Variant));
}
}
Modified: trunk/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java
==============================================================================
--- trunk/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java Tue Oct 25 09:29:07 2011 (r1020)
+++ trunk/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java Wed Oct 26 02:11:12 2011 (r1021)
@@ -1139,7 +1139,7 @@
}
- // returns the topic that can be used to satisfy the passed type-constraint.
+ // returns the topics that can be used to satisfy the passed type-constraint.
public static ArrayList<Topic> getTmValuesForTypeConstraint(Topic typeConstraint, Topic valueGroup) throws InvalidGdlSchemaException, ExecutionException {
ArrayList<Topic> result = new ArrayList<Topic>();
if(typeConstraint == null || valueGroup == null) return result;
@@ -1180,7 +1180,7 @@
}
- // returns the topic that can be used to satisfy the passed variant-name-reifier-constraint.
+ // returns the topics that can be used to satisfy the passed variant-name-reifier-constraint.
public static ArrayList<Topic> getTmValuesForVariantNameReifierConstraint(Topic variantNameReifierConstraint) throws ExecutionException, InvalidGdlSchemaException {
ArrayList<Topic> result = new ArrayList<Topic>();
if(variantNameReifierConstraint == null) return result;
@@ -1199,9 +1199,8 @@
// get subtypes of typeTopic
JsArray<Topic> allTopics = tm.getTopics();
- for(int i = 0; i != allTopics.length(); ++i) if(isSupertypeOf(allTopics.get(i), reifierTypeTopics.get(0))) result.add(allTopics.get(i));
+ for(int i = 0; i != allTopics.length(); ++i) if(isInstanceOf(allTopics.get(i), reifierTypeTopics.get(0))) result.add(allTopics.get(i));
}
-
return result;
}
@@ -1225,7 +1224,7 @@
// get subtypes of typeTopic
JsArray<Topic> allTopics = tm.getTopics();
- for(int i = 0; i != allTopics.length(); ++i) if(isSupertypeOf(allTopics.get(i), scopeTypeTopics.get(0))) result.add(allTopics.get(i));
+ for(int i = 0; i != allTopics.length(); ++i) if(isInstanceOf(allTopics.get(i), scopeTypeTopics.get(0))) result.add(allTopics.get(i));
}
return result;
Modified: trunk/src/anaToMia/GDL_Widgets/war/gdl_widgets/Service_GDL_Schema.jtm
==============================================================================
--- trunk/src/anaToMia/GDL_Widgets/war/gdl_widgets/Service_GDL_Schema.jtm Tue Oct 25 09:29:07 2011 (r1020)
+++ trunk/src/anaToMia/GDL_Widgets/war/gdl_widgets/Service_GDL_Schema.jtm Wed Oct 26 02:11:12 2011 (r1021)
@@ -419,7 +419,8 @@
{"type":"si:[gdl:view-binding]", "roles":[{"type":"si:[gdl:value-group]", "player":"si:[gdlsrv:service-variant-name-scope-text-value-group]"},{"type":"si:[gdl:descriptor]", "player":"si:[gdlsrv:service-variant-name-scope-text]"}]},
{"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:value-group]", "player":"si:[gdlsrv:service-variant-name-scope-text-value-group]"},{"type":"si:[gdl:tm-construct]", "player":"si:[model:service-variant-name-scope-constraint]"}]},
{"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[model:service-variant-name-scope-constraint]"},{"type":"si:[gdl:tm-construct]", "player":"si:[model:service-variant-name-constraint]"}]},
-
+ {"type":"si:[tmcl:constrained-scope]", "roles":[{"type":"si:[tmcl:constraint]", "player":"si:[model:service-variant-name-scope-constraint]"},{"type":"si:[tmcl:constrained]", "player":"si:[types:Scope-Type]"}]},
+
{"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[gdlsrv:service-default-editor-topic-view]"},{"type":"si:[gdl:containee]", "player":"si:[gdlsrv:service-variant-name-iis-text]"}]},
{"type":"si:[gdl:position]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[gdlsrv:service-variant-name-iis-text-position]"},{"type":"si:[gdl:ancestor]", "player":"si:[gdlsrv:service-variant-name-scope-text]"},{"type":"si:[gdl:descendant]", "player":"si:[gdlsrv:service-variant-name-iis-text]"}]},
{"type":"si:[gdl:view-binding]", "roles":[{"type":"si:[gdl:value-group]", "player":"si:[gdlsrv:service-variant-name-iis-text-value-group]"},{"type":"si:[gdl:descriptor]", "player":"si:[gdlsrv:service-variant-name-iis-text]"}]},
@@ -431,6 +432,8 @@
{"type":"si:[gdl:view-binding]", "roles":[{"type":"si:[gdl:value-group]", "player":"si:[gdlsrv:service-variant-name-reifier-text-value-group]"},{"type":"si:[gdl:descriptor]", "player":"si:[gdlsrv:service-variant-name-reifier-text]"}]},
{"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:value-group]", "player":"si:[gdlsrv:service-variant-name-reifier-text-value-group]"},{"type":"si:[gdl:tm-construct]", "player":"si:[model:service-variant-name-reifier-constraint]"}]},
{"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[model:service-variant-name-reifier-constraint]"},{"type":"si:[gdl:tm-construct]", "player":"si:[model:service-variant-name-constraint]"}]},
+ {"type":"si:[tmcl:allowed-reifier]", "roles":[{"type":"si:[tmcl:allows]", "player":"si:[model:service-variant-name-reifier-constraint]"},{"type":"si:[tmcl:allowed]", "player":"si:[types:Reifier-Type]"}]},
+
{"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[gdlsrv:service-default-editor-topic-view]"},{"type":"si:[gdl:containee]", "player":"si:[gdlsrv:service-editor-commit-button]"}]},
{"type":"si:[gdl:position]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[gdlsrv:service-editor-commit-button-position]"},{"type":"si:[gdl:ancestor]", "player":"si:[gdlsrv:service-variant-name-reifier-text]"},{"type":"si:[gdl:descendant]", "player":"si:[gdlsrv:service-editor-commit-button]"}]}
More information about the Isidorus-cvs
mailing list