[isidorus-cvs] r999 - in branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets: . base

lgiessmann at common-lisp.net lgiessmann at common-lisp.net
Thu Oct 13 13:21:35 UTC 2011


Author: lgiessmann
Date: Thu Oct 13 06:21:32 2011
New Revision: 999

Log:
gdl-frontend: Widgets: started to implement the constriant support for: reifier-constraint, variant-name-constraint, scope-constraint, Type, Datatype, Variant-Name-Identifiers, Variant-Name-Refier, Variant-Name-Scope

Modified:
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/GDL_Widgets.gwt.xml
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/TODO.txt
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/GDL_Widgets.gwt.xml
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/GDL_Widgets.gwt.xml	Mon Oct 10 02:27:34 2011	(r998)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/GDL_Widgets.gwt.xml	Thu Oct 13 06:21:32 2011	(r999)
@@ -18,10 +18,10 @@
   <inherits name="com.google.gwt.http.HTTP" />
   
   <!-- Specify the app entry point class.                         -->
-  <!-- <entry-point class='us.isidor.gdl.anaToMia.Widgets.base.TestClass'/> -->
+  <entry-point class='us.isidor.gdl.anaToMia.Widgets.base.TestClass'/>
   <!-- <entry-point class="us.isidor.gdl.anaToMia.Widgets.isidorus.HashObjectUi"/> -->
   <!-- <ntry-point class="us.isidor.gdl.anaToMia.Widgets.isidorus.EnvironmentUi"/> -->
-  <entry-point class='us.isidor.gdl.anaToMia.Widgets.isidorus.IsidorusEntryPoint'/>
+  <!-- <entry-point class='us.isidor.gdl.anaToMia.Widgets.isidorus.IsidorusEntryPoint'/> -->
   
 
   <!-- Specify the paths for translatable code                    -->

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/TODO.txt
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/TODO.txt	Mon Oct 10 02:27:34 2011	(r998)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/TODO.txt	Thu Oct 13 06:21:32 2011	(r999)
@@ -3,7 +3,7 @@
      and all referenced topics must be exported as stubs
 * implement validation
 * implement the handling of default-values
-* Implement TopicMaps data consumption
-* Implement TopicMaps data generation
 * Implement HiddenValue
+* Finalise Text and List-Box
+* Implement all other elements
 * Fix css-pseudo-class-handlers
\ No newline at end of file

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java	Mon Oct 10 02:27:34 2011	(r998)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java	Thu Oct 13 06:21:32 2011	(r999)
@@ -1937,6 +1937,12 @@
 			Topic occurrenceType = TmHelper.getConstrainedStatement(this.getConstraint());
 			for(int i = 0; i != ((Topic)this.receivedData).getOccurrences(occurrenceType).length(); ++i)
 				this.addSubItem(((Topic)this.receivedData).getOccurrences(occurrenceType).get(i).getValue());
+		} else if (TmHelper.isInstanceOf(this.getConstraint(), PSIs.TMCL.tmclReifierConstraint)){
+			// TODO: implement: reifier-constraint
+		} else if (TmHelper.isInstanceOf(this.getConstraint(), PSIs.TMCL.tmclVariantNameConstraint)){
+			// TODO: implement: variant-name-constraint
+		} else if (TmHelper.isInstanceOf(this.getConstraint(), PSIs.TMCL.tmclScopeConstraint)){
+			// TODO: implement: scope-constraint
 		} else if(TmHelper.isInstanceOf(this.getConstraint(), PSIs.GDL.TopicType.gdlRolePlayer)){
 			if(!(receivedData instanceof Association)) throw new ExecutionException("the constraint " + TmHelper.getAnyIdOfTopic(this.getConstraint()) + " must be bound to an Association, but is: " + receivedData.getClass());
 			if(this.getRootConstraint() == null || !TmHelper.isInstanceOf(this.getRootConstraint(), PSIs.TMCL.tmclTopicRoleConstraint)) throw new InvalidGdlSchemaException("the constraint " + TmHelper.getAnyIdOfTopic(this.getConstraint()) + " must be bound to a root constraint of the type " + PSIs.TMCL.tmclTopicRoleConstraint + ", but ist bound to the root topic: " + (this.getRootConstraint() == null ? "null" : TmHelper.getAnyIdOfTopic(this.getRootConstraint())));
@@ -1948,8 +1954,19 @@
 					this.addSubItem(this.getTopicRepresentation(assocRoles.get(i).getPlayer(), this.getDisplayByOfValueGroup(), this.getPreferredScopeOfValueGroup()));
 				}
 			}
+		} else if(TmHelper.isInstanceOf(this.getConstraint(), PSIs.GDL.TopicType.gdlType)){
+			// TODO: implement: Type
+		} else if (TmHelper.isInstanceOf(this.getConstraint(), PSIs.GDL.TopicType.gdlDatatype)){
+			// TODO: implement: Datatype
+		} else if (TmHelper.isInstanceOf(this.getConstraint(), PSIs.GDL.TopicType.gdlVariantNameIdentifiers)){
+			// TODO: implement: Variant-Name-Identifiers
+		} else if (TmHelper.isInstanceOf(this.getConstraint(), PSIs.GDL.TopicType.gdlVariantNameReifier)){
+			// TODO: implement: Variant-Name-Reifier
+		} else if (TmHelper.isInstanceOf(this.getConstraint(), PSIs.GDL.TopicType.gdlVariantNameScope)){
+			// TODO: implement: Variant-Name-Scope
+		} else {
+			throw new InvalidGdlSchemaException("The constraint " + TmHelper.getAnyIdOfTopic(this.getConstraint()) + " is not suported to be bound to the value group instance " + TmHelper.getAnyIdOfTopic(this.getValueGroup()));
 		}
-		// TODO: implement type, variant, datatype, associations, roles, ... constraints
 	}
 	
 	

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	Mon Oct 10 02:27:34 2011	(r998)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java	Thu Oct 13 06:21:32 2011	(r999)
@@ -1,10 +1,21 @@
 package us.isidor.gdl.anaToMia.Widgets.base;
 
 
-import us.isidor.gdl.anaToMia.Widgets.isidorus.LoadScreenPanel;
-
+import java.util.ArrayList;
+import us.isidor.gdl.anaToMia.TmEngine.jtmsBasedEngine.JtmsTmEngine;
+import us.isidor.gdl.anaToMia.Widgets.environment.Pair;
+import us.isidor.gdl.anaToMia.Widgets.environment.TopicIdentifierTypes;
+import us.isidor.gdl.anaToMia.Widgets.isidorus.CommitCallback;
+import us.isidor.gdl.anaToMia.Widgets.isidorus.DeleteCallback;
+import us.isidor.gdl.anaToMia.Widgets.isidorus.LoadSchemaCallback;
 import com.google.gwt.core.client.EntryPoint;
-import com.google.gwt.user.client.Timer;
+import com.google.gwt.dom.client.Element;
+import com.google.gwt.dom.client.TextAreaElement;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.ui.Button;
 import com.google.gwt.user.client.ui.HorizontalPanel;
 import com.google.gwt.user.client.ui.RootPanel;
 
@@ -14,20 +25,7 @@
 	GdlPanel gdlPanel = null;
 	
 	@Override
-	public void onModuleLoad() {
-		final LoadScreenPanel lsp = new LoadScreenPanel("Title", "message");
-		RootPanel.get().add(lsp);
-		
-		Timer t = new Timer() {
-			@Override
-			public void run() {
-				lsp.removeFromParent();
-			}
-		};
-		
-		t.schedule(5000);
-		
-		/*
+	public void onModuleLoad() {	
 		try{
 			RootPanel.get("GWT_Content").add(mainPanel);
 			mainPanel.setBorderWidth(1);
@@ -44,7 +42,7 @@
 			//Pair<String, TopicIdentifierTypes> requestedTopicToEdit = new Pair<String, TopicIdentifierTypes>("http://textgrid.org/serviceregistry/hash-object/Test Environment 1/test1", TopicIdentifierTypes.SubjectIdentifier);
 			gdlPanel = new GdlPanel(null, requestedTopicsToCreate);
 			 
-			gdlPanel.addClickHandler("hash_object_reset_button_id", new ClickHandler() {
+			GdlPanel.addClickHandler("hash_object_reset_button_id", new ClickHandler() {
 				@Override
 				public void onClick(ClickEvent event) {
 					Element elem = DOM.getElementById("hash_object_text_key_id__GDL_0");
@@ -56,9 +54,9 @@
 			
 			mainPanel.add(gdlPanel);
 			gdlPanel.setTmEngine(new JtmsTmEngine());
-			gdlPanel.setLoadSchemaCallback(new LoadSchemaCallback());
-			gdlPanel.setCommitCallback(new CommitCallback());
-			gdlPanel.setDeleteCallback(new DeleteCallback());
+			gdlPanel.setLoadSchemaCallback(new LoadSchemaCallback(null));
+			gdlPanel.setCommitCallback(new CommitCallback(null));
+			gdlPanel.setDeleteCallback(new DeleteCallback(null));
 			
 			Button requestButton = new Button("load schema");
 			requestButton.addClickHandler(new ClickHandler() {
@@ -73,6 +71,5 @@
 			e.printStackTrace();
 			Window.alert(">> e >> " + e.getClass() + " >> " + e.getMessage());
 		}
-		*/
 	}
 }




More information about the Isidorus-cvs mailing list