[isidorus-cvs] r614 - in branches/gdl-frontend/src/anaToMia/GDL_Widgets: lib src/us/isidor/gdl/anaToMia/Widgets/base src/us/isidor/gdl/anaToMia/Widgets/environment

lgiessmann at common-lisp.net lgiessmann at common-lisp.net
Wed Jul 13 19:32:30 UTC 2011


Author: lgiessmann
Date: Wed Jul 13 12:32:30 2011
New Revision: 614

Log:
gdl-frontend: Widgets: fixed some bugs when instantiating GdlDefaultViews

Modified:
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/lib/GDL_TmEngine.jar
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java
   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/environment/GdlInstantiator.java

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/lib/GDL_TmEngine.jar
==============================================================================
Binary file (source and/or target). No diff available.

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java	Wed Jul 13 12:25:30 2011	(r613)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java	Wed Jul 13 12:32:30 2011	(r614)
@@ -253,6 +253,7 @@
 			throw e;
 		}
 	}
+
 	
 	
 	// Creates the actual view from the requested topic map

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 Jul 13 12:25:30 2011	(r613)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TestClass.java	Wed Jul 13 12:32:30 2011	(r614)
@@ -4,19 +4,9 @@
 import java.util.ArrayList;
 
 import us.isidor.gdl.anaToMia.TmEngine.jtmsBasedEngine.JtmsTmEngine;
-import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Occurrence;
-import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
-import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
-import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMapsTypes;
-import us.isidor.gdl.anaToMia.Widgets.complexData.GdlDatePicker;
-import us.isidor.gdl.anaToMia.Widgets.container.GdlUnit;
-import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
 import us.isidor.gdl.anaToMia.Widgets.environment.Pair;
 import us.isidor.gdl.anaToMia.Widgets.environment.TopicIdentifierTypes;
 import us.isidor.gdl.anaToMia.Widgets.isidorus.LoadSchemaCallback;
-import us.isidor.gdl.anaToMia.Widgets.value.CursorValue;
-import us.isidor.gdl.anaToMia.Widgets.view.GdlView;
-
 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
@@ -62,6 +52,7 @@
 			mainPanel.add(requestButton);
 			
 		
+			
 		
 		/*
 		// only for testing
@@ -156,25 +147,21 @@
 				
 				@Override
 				public boolean validate() {
-					// TODO Auto-generated method stub
 					return false;
 				}
 				
 				@Override
 				public ArrayList<Pair<TopicMapsTypes, Object>> getTmValue() {
-					// TODO Auto-generated method stub
 					return null;
 				}
 				
 				@Override
 				public ArrayList<String> getStringValue() {
-					// TODO Auto-generated method stub
 					return null;
 				}
 				
 				@Override
 				public TopicMap getContent() {
-					// TODO Auto-generated method stub
 					return null;
 				}
 			};

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java	Wed Jul 13 12:25:30 2011	(r613)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java	Wed Jul 13 12:32:30 2011	(r614)
@@ -2,9 +2,6 @@
 
 
 import java.util.ArrayList;
-
-import com.google.gwt.user.client.Window;
-
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
 import us.isidor.gdl.anaToMia.Widgets.base.GdlLineBreak;
@@ -137,7 +134,7 @@
 	// given view super type. Note only topics that are bound to TM-Single-Type-Value and
 	// TM-Multiple-Type-Value are taken into account.
 	public static ArrayList<Topic> getViewTopics(ArrayList<Pair<String, TopicIdentifierTypes>> requestedTopics, Topic viewSupertype, TopicMap schemaTm) throws InvalidGdlSchemaException{
-	if(requestedTopics == null || requestedTopics.size() == 0 || schemaTm == null) return null;
+		if(requestedTopics == null || requestedTopics.size() == 0 || schemaTm == null) return null;
 		
 		// request all topics that are passed by the user
 		ArrayList<Topic> requestedTops = new ArrayList<Topic>();
@@ -146,7 +143,7 @@
 			if(top == null) throw new InvalidGdlSchemaException("the topic " + topId.getFirst() + " was not found!");
 			if(!requestedTops.contains(top)) requestedTops.add(top);
 		}
-			
+
 		// get all TM-Values, i.e. TM-Multiple-Type-Value and TM-Single-Type-Value (only if requstedTops.sie() == 1)
 		ArrayList<Topic> tmValues = new ArrayList<Topic>();
 		Topic tmConstruct = TmHelper.getTopicByPsi(GdlPsis.RoleType.gdlTmConstruct, schemaTm);
@@ -163,16 +160,11 @@
 					// if exactly those topics are associated to it through a tm-binding association, which are
 					// requested by the user
 					ArrayList<Topic> allInstanceValues = TmHelper.getOtherPlayerOfBinaryAssociation(tmValue, descriptor, tmBinding, null, tmConstruct);
-					Window.alert("allTmValues >> " + tmValue.getSubjectIdentifiers().get(0).getReference() + " >> " + allInstanceValues.size()); // TODO: remove
 					if(Utils.compareLists(allInstanceValues, requestedTops) && !tmValues.contains(tmValue)) tmValues.add(tmValue);
 				}
 			}
 		}
-		
-		for (Topic topic : tmValues) { // TODO: remove
-			Window.alert("tmValue >> " + topic.getSubjectIdentifiers().get(0).getReference());
-		}
-		
+
 		// get all views that are bound to the found tm-values
 		ArrayList<Topic> views = new ArrayList<Topic>();
 		Topic tmValueRoleType = TmHelper.getTopicByPsi(GdlPsis.RoleType.gdlTmValue, schemaTm);
@@ -182,11 +174,7 @@
 			for (Topic view : allViews)
 				if(!views.contains(view) && TmHelper.isInstanceOf(view, viewSupertype)) views.add(view);
 		}
-		
-		for (Topic topic : views) { // TODO: remove
-			Window.alert("view >> " + topic.getSubjectIdentifiers().get(0).getReference());
-		}
-		
+
 		return views;
 	}
 	




More information about the Isidorus-cvs mailing list