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

lgiessmann at common-lisp.net lgiessmann at common-lisp.net
Wed Jun 29 20:00:45 UTC 2011


Author: lgiessmann
Date: Wed Jun 29 13:00:44 2011
New Revision: 531

Log:
gdl-frontend: Widgets: changed the event handling; added a callback system

Added:
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/ExecutionException.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlErrorTypes.java
      - copied, changed from r530, branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlError.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/ILoadSchemaCallback.java
      - copied, changed from r530, branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/ILoadCallback.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/InvalidContentException.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/Pair.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/
Deleted:
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlError.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/IGdlEventHandler.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/ILoadCallback.java
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/environment/ICommitCallback.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/IDeleteCallback.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/IGdlErrorHandler.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlCreatorAssociationView.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlDefaultCreatorTopicView.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlDefaultEditorTopicView.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlEditorAssociationView.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlSpecialCreatorTopicView.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlSpecialEditorTopicView.java
   branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlView.java

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 Jun 29 06:29:49 2011	(r530)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -3,12 +3,14 @@
 import java.util.ArrayList;
 import us.isidor.gdl.anaToMia.TopicMaps.TmEngineModel.TmEngine;
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
-import us.isidor.gdl.anaToMia.Widgets.environment.GdlError;
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMapsTypes;
+import us.isidor.gdl.anaToMia.Widgets.environment.ExecutionException;
+import us.isidor.gdl.anaToMia.Widgets.environment.GdlErrorTypes;
 import us.isidor.gdl.anaToMia.Widgets.environment.ICommitCallback;
 import us.isidor.gdl.anaToMia.Widgets.environment.IDeleteCallback;
 import us.isidor.gdl.anaToMia.Widgets.environment.IGdlErrorHandler;
-import us.isidor.gdl.anaToMia.Widgets.environment.IGdlEventHandler;
-import us.isidor.gdl.anaToMia.Widgets.environment.ILoadCallback;
+import us.isidor.gdl.anaToMia.Widgets.environment.ILoadSchemaCallback;
+import us.isidor.gdl.anaToMia.Widgets.environment.InvalidContentException;
 import us.isidor.gdl.anaToMia.Widgets.views.GdlDefaultTopicView;
 import com.google.gwt.user.client.ui.AbsolutePanel;
 import com.google.gwt.user.client.ui.Composite;
@@ -17,18 +19,10 @@
 public class GdlPanel extends Composite{
 	// tmEngine is used as Topic Maps engine for this GdlPanel instance
 	private TmEngine tmEngine = null;
-	// onLoadContainer references handlers that are executed when the GDL schema was successfully loaded from the server
-	private ArrayList<IGdlEventHandler> onLoadContainer = new ArrayList<IGdlEventHandler>();
-	// onCommitContainer references handlers that are executed when the GDL content was successfully committed
-	private ArrayList<IGdlEventHandler> onCommitContainer = new ArrayList<IGdlEventHandler>();
-	// onValidateContainer references handlers that are executed when the GDL content was successfully validated
-	private ArrayList<IGdlEventHandler> onValidateContainer = new ArrayList<IGdlEventHandler>();
-	// onDeleteContainer references handlers that are executed when the GDL content was successfully deleted
-	private ArrayList<IGdlEventHandler> onDeleteContainer = new ArrayList<IGdlEventHandler>();
 	// onErrorContainer references handlers that are executed if an error occurred, i.e. if one of the processes
 	// GDL loading, GDL commit, GDL validate, GDL delete failed, but any other execution error also executes an
 	// error handler
-	private ArrayList<IGdlErrorHandler> onErrorContainer = new ArrayList<IGdlErrorHandler>();
+	private ArrayList<IGdlErrorHandler> localOnErrorContainer = new ArrayList<IGdlErrorHandler>();
 	
 	// If requestedTypes is not null or length != 0, the string values must be treated as topic
 	// identifiers of a topic type. The created GDL view must be a Default-Topic-Creator-View
@@ -42,9 +36,13 @@
 	
 	// the actual view with the corresponding content
 	GdlDefaultTopicView view = null;
+	// the topic map that is the base of the created GDL view
+	private TopicMap tm = null;
+	// the locator of the topic map "tm"
+	private final String TOPIC_MAP_LOCATOR = GdlPsis.gdl + "topicmap/tm-1";
 	
 	// callback instance for getting/loading the GDL schema
-	private ILoadCallback loadCallback = null;
+	private ILoadSchemaCallback loadSchemaCallback = null;
 	// callback instance for committing the frontend data to the server
 	private ICommitCallback commitCallback = null;
 	// callback instance for deleting the frontend data on the server
@@ -65,16 +63,7 @@
 		
 		createView();
 	}
-	
-	
-	// TODO: 5x constructor
-	
-	// TODO: getter + setter Tmengine
-	
-	// TODO: getter + setter Event/Error Containers
-	
-	// TODO: getter + setter Callbacks
-	
+		
 	
 	public GdlPanel(String instanceIdentifier, int width, int height){
 		this(instanceIdentifier);
@@ -108,171 +97,189 @@
 		this(typeIdentifiers);
 		this.setSize(width, height);
 	}
+
 	
-	
-	// some methods for adding handler instances
-	public void addOnLoadHandler(IGdlEventHandler handler){
-		if(!onLoadContainer.contains(handler)){
-			onLoadContainer.add(handler);
+	public void addOnErrorHandler(String descriptorId, IGdlErrorHandler handler){
+		if(!localOnErrorContainer.contains(handler)){
+			localOnErrorContainer.add(handler);
 		}
 	}
 	
 	
-	public void removeOnLoadHandler(IGdlEventHandler handler){
-		onLoadContainer.remove(handler);
+	public void removeOnErrorHandler(String descriptorId, IGdlErrorHandler handler){
+		localOnErrorContainer.remove(handler);
 	}
 	
 	
-	public void addOnCommitHandler(IGdlEventHandler handler){
-		if(!onCommitContainer.contains(handler)){
-			onCommitContainer.add(handler);
-		}
-	}
-	
-	
-	public void removeOnCommitHandler(IGdlEventHandler handler){
-		onCommitContainer.remove(handler);
+	// getter for the Topic Maps engine instance
+	public TmEngine getTmengine(){
+		return this.tmEngine;
 	}
 	
 	
-	public void addOnValidateHandler(IGdlEventHandler handler){
-		if(!onValidateContainer.contains(handler)){
-			onValidateContainer.add(handler);
+	// setter for the Topic Maps engine instance
+	public void setTmEngine(TmEngine tmEngine) {
+		// the Topic Maps engine can be only set if no Topic Maps engine is set
+		// or if the topic map "tm" is null, or contains no topics and associations
+		if(tmEngine != null && (tm == null || (tm.getTopics().length() == 0 && tm.getAssociations().length() == 0))){
+			this.tmEngine = tmEngine;
+			this.tm = this.tmEngine.createTopicMap(this.TOPIC_MAP_LOCATOR);
 		}
 	}
 	
 	
-	public void removeOnValidateHandler(IGdlEventHandler handler){
-		onValidateContainer.remove(handler);
-	}
-	
-	
-	public void addOnDeleteHandler(IGdlEventHandler handler){
-		if(!onDeleteContainer.contains(handler)){
-			onDeleteContainer.add(handler);
+	// some setters for callback instances
+	public void setLoadCallback(ILoadSchemaCallback callback){
+		if(callback != null){
+			this.loadSchemaCallback = callback;
 		}
 	}
 	
 	
-	public void removeOnDeleteHandler(IGdlEventHandler handler){
-		onDeleteContainer.remove(handler);
+	public void setCommitCallback(ICommitCallback callback){
+		if(callback != null){
+			this.commitCallback = callback;
+		}
 	}
 	
 	
-	public void addOnErrorHandler(IGdlErrorHandler handler){
-		if(!onErrorContainer.contains(handler)){
-			onErrorContainer.add(handler);
+	public void setDeleteCallback(IDeleteCallback callback){
+		if(callback != null){
+			this.deleteCallback = callback;
 		}
 	}
+
 	
-	
-	public void removeOnErrorHandler(IGdlErrorHandler handler){
-		onErrorContainer.remove(handler);
+	// some getters for callback instances
+	public ILoadSchemaCallback getLoadCallback(){
+		return this.loadSchemaCallback;
 	}
 	
 	
-	// getter for the Topic Maps engine instance
-	public TmEngine getTmengine(){
-		return this.tmEngine;
+	public ICommitCallback getCommitCallback(){
+		return this.commitCallback;
 	}
 	
 	
-	
-	public void setTmEngine(TmEngine tmEngine) {
-		if(tmEngine != null){
-			this.tmEngine = tmEngine;
-		}
+	public IDeleteCallback getDeleteCallback(){
+		return this.deleteCallback;
 	}
 	
 	
-	// some setters for callback instances
-	
-	
-	// some getters for callback instances
-	
-	
+	// this method is responsible for loading the Topic Map by using the
+	// loadCallback. After a successfully load operation the
+	// onLoadHandlers are executed
 	public void doLoad(){
 		try{
-			// TODO: Implement
+			if(tmEngine == null || tm == null){
+				throw new ExecutionException("No Topic Maps engine was set yet");
+			}
+			if(this.loadSchemaCallback == null){
+				throw new ExecutionException("No LoadCallback was set yet");
+			}
+			this.loadSchemaCallback.loadSchema(tm, this.requestedInstance, this.requestedTypes);
 			
-			// TODO: execute onLoadContainer items
 		}catch(Exception e){
-			for (IGdlErrorHandler handler : onErrorContainer) {
-				handler.onError(GdlError.LoadError, e);
+			for (IGdlErrorHandler handler : localOnErrorContainer) {
+				handler.onError(GdlErrorTypes.LoadError, e);
 			}
 		}
 	}
 	
 	
-	
-	
+	// this method is responsible for committing the Topic Map by using the
+	// commitCallback. After a successfully commit operation the 
+	// onCommitHandlers are executed
 	public void doCommit(){
 		try{
-			// TODO: Implement
-			
-			// TODO: execute onCommitContainer items
+			if(tmEngine == null || tm == null){
+				throw new ExecutionException("No Topic Maps engine was set yet");
+			}
+			if(this.commitCallback == null){
+				throw new ExecutionException("No CommitCallback was set yet");
+			}
+			this.commitCallback.commitTmConstruct(tm, TopicMapsTypes.TopicMap);
 		}catch(Exception e){
-			for (IGdlErrorHandler handler : onErrorContainer) {
-				handler.onError(GdlError.CommitError, e);
+			for (IGdlErrorHandler handler : localOnErrorContainer) {
+				handler.onError(GdlErrorTypes.CommitError, e);
 			}
 		}
 	}
 	
 	
-	
-	
+	// this method is responsible for validating the Topic Map by calling the
+	// view's validate method. After a successfully validate operation the 
+	// onValidateHandlers are executed
 	public void doValidate() {
 		try{
-			// TODO: Implement
+			if(tmEngine == null || tm == null){
+				throw new ExecutionException("No Topic Maps engine was set yet");
+			}
 			
-			// TODO: execute onValidateContainer items
-		}catch(Exception e){
-			for (IGdlErrorHandler handler : onErrorContainer) {
-				handler.onError(GdlError.ValidateError, e);
+			if(!this.view.validate()){
+				throw new InvalidContentException("The topic map content is not valid:\n" + tmEngine.exportTm(view.getContent()));
+			}
+		}catch(InvalidContentException e){
+			for (IGdlErrorHandler handler : localOnErrorContainer) {
+				handler.onError(GdlErrorTypes.ValidateError, e);
+			}
+		} catch(Exception e){
+			for (IGdlErrorHandler handler : localOnErrorContainer) {
+				handler.onError(GdlErrorTypes.ExecutionError, e);
 			}
 		}
 	}
 	
 	
-	
-	
+	// this method is responsible for deleting the Topic Map by using the
+	// deleteCallback. After a successfully delete operation the 
+	// onDeleteHandlers are executed and the panel's content is removed
 	public void doDelete() {
 		try{
-			// TODO: Implement
-			
-			// TODO: execute onDeleteContainer items
+			if(tmEngine == null || tm == null){
+				throw new ExecutionException("No Topic Maps engine was set yet");
+			}
+			if(this.deleteCallback == null){
+				throw new ExecutionException("No DeleteCallback was set yet");
+			}
+			this.deleteCallback.deleteTmConstruct(tm, TopicMapsTypes.TopicMap);
 		}catch(Exception e){
-			for (IGdlErrorHandler handler : onErrorContainer) {
-				handler.onError(GdlError.DeleteError, e);
+			for (IGdlErrorHandler handler : localOnErrorContainer) {
+				handler.onError(GdlErrorTypes.DeleteError, e);
 			}
 		}
 	}
 	
 	
-	
-	
-	public TopicMap generateTopicMap() {
+	// this method is responsible for generating a Topic Map fo the user's
+	// data by using the view's getContent method.
+	public TopicMap generateTopicMap() throws Exception {
 		try{
-			// TODO: Implement
-			return  null;
+			return this.view.getContent();
 		}catch(Exception e){
-			for (IGdlErrorHandler handler : onErrorContainer) {
-				handler.onError(GdlError.TopicMapsGenerationError, e);
+			for (IGdlErrorHandler handler : localOnErrorContainer) {
+				handler.onError(GdlErrorTypes.TopicMapsGenerationError, e);
 			}
-			return null;
+			throw e;
 		}
 	}
 	
 	
-	
-	
+	// Creates the actual view from the requested topic map
 	public void createView(){
 		try{
 			// TODO: Implement
+			// TODO: register the handlers to the elements with the corresponding id
 		}catch(Exception e){
-			for (IGdlErrorHandler handler : onErrorContainer) {
-				handler.onError(GdlError.ViewCreationError, e);
+			for (IGdlErrorHandler handler : localOnErrorContainer) {
+				handler.onError(GdlErrorTypes.ViewCreationError, e);
 			}
 		}
 	}
+
+
+	// remove all content from the main panel
+	public void clear(){
+		this.mainPanel.clear();
+	}
 }

Added: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/ExecutionException.java
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/ExecutionException.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -0,0 +1,10 @@
+package us.isidor.gdl.anaToMia.Widgets.environment;
+
+public class ExecutionException extends Exception {
+	protected ExecutionException() {}
+	
+	
+	public ExecutionException(String message){
+		super(message);
+	}
+}

Copied and modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlErrorTypes.java (from r530, branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlError.java)
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlError.java	Wed Jun 29 06:29:49 2011	(r530, copy source)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlErrorTypes.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -1,11 +1,12 @@
 package us.isidor.gdl.anaToMia.Widgets.environment;
 
-public enum GdlError {
+public enum GdlErrorTypes {
 	LoadError,
 	CommitError,
 	ValidateError,
 	DeleteError,
 	TopicMapsGenerationError,
-	ViewCreationError
+	ViewCreationError,
+	ExecutionError
 	// TODO: ...
 }

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/ICommitCallback.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/ICommitCallback.java	Wed Jun 29 06:29:49 2011	(r530)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/ICommitCallback.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -1,5 +1,9 @@
 package us.isidor.gdl.anaToMia.Widgets.environment;
 
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMapsTypes;
+
+
 public interface ICommitCallback {
-	// TODO: implement
+	public void commitTmConstruct(Construct construct, TopicMapsTypes constructType);
 }

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/IDeleteCallback.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/IDeleteCallback.java	Wed Jun 29 06:29:49 2011	(r530)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/IDeleteCallback.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -1,5 +1,9 @@
 package us.isidor.gdl.anaToMia.Widgets.environment;
 
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMapsTypes;
+
+
 public interface IDeleteCallback {
-	// TODO: implement
+	public void deleteTmConstruct(Construct construct, TopicMapsTypes constructType);
 }

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/IGdlErrorHandler.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/IGdlErrorHandler.java	Wed Jun 29 06:29:49 2011	(r530)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/IGdlErrorHandler.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -2,5 +2,5 @@
 
 
 public interface IGdlErrorHandler {
-	public void onError(GdlError errorType, Exception errorInformation);
+	public void onError(GdlErrorTypes errorType, Exception errorInformation);
 }

Copied and modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/ILoadSchemaCallback.java (from r530, branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/ILoadCallback.java)
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/ILoadCallback.java	Wed Jun 29 06:29:49 2011	(r530, copy source)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/ILoadSchemaCallback.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -1,5 +1,8 @@
 package us.isidor.gdl.anaToMia.Widgets.environment;
 
-public interface ILoadCallback {
-	// TODO: implement
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
+
+public interface ILoadSchemaCallback {
+	public Construct loadSchema(TopicMap tm, String instanceIdentifier, String[] typeIdentifiers);
 }

Added: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/InvalidContentException.java
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/InvalidContentException.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -0,0 +1,10 @@
+package us.isidor.gdl.anaToMia.Widgets.environment;
+
+public class InvalidContentException extends Exception {
+	protected InvalidContentException() {}
+	
+	
+	public InvalidContentException(String message){
+		super(message);
+	}
+}

Added: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/Pair.java
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/Pair.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -0,0 +1,5 @@
+package us.isidor.gdl.anaToMia.Widgets.environment;
+
+public class Pair {
+
+}

Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlCreatorAssociationView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlCreatorAssociationView.java	Wed Jun 29 06:29:49 2011	(r530)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlCreatorAssociationView.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -1,6 +1,10 @@
 package us.isidor.gdl.anaToMia.Widgets.views;
 
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Association;
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
 import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
 
 
@@ -25,4 +29,23 @@
 		return null;
 	}
 	// TODO: implement
+
+	@Override
+	public void append(GdlVisibleObject ancestor, GdlVisibleObject descendant)
+			throws InvalidGdlSchemaException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public boolean validate() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@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/views/GdlDefaultCreatorTopicView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlDefaultCreatorTopicView.java	Wed Jun 29 06:29:49 2011	(r530)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlDefaultCreatorTopicView.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -1,6 +1,9 @@
 package us.isidor.gdl.anaToMia.Widgets.views;
 
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
 import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
 
 
@@ -25,5 +28,24 @@
 		// TODO Auto-generated method stub
 		return null;
 	}
+
+	@Override
+	public void append(GdlVisibleObject ancestor, GdlVisibleObject descendant)
+			throws InvalidGdlSchemaException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public boolean validate() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@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/views/GdlDefaultEditorTopicView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlDefaultEditorTopicView.java	Wed Jun 29 06:29:49 2011	(r530)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlDefaultEditorTopicView.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -1,6 +1,9 @@
 package us.isidor.gdl.anaToMia.Widgets.views;
 
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
 import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
 
 
@@ -25,6 +28,25 @@
 		return null;
 	}
 	// TODO: implement
+
+	@Override
+	public void append(GdlVisibleObject ancestor, GdlVisibleObject descendant)
+			throws InvalidGdlSchemaException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public boolean validate() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@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/views/GdlEditorAssociationView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlEditorAssociationView.java	Wed Jun 29 06:29:49 2011	(r530)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlEditorAssociationView.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -1,6 +1,10 @@
 package us.isidor.gdl.anaToMia.Widgets.views;
 
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Association;
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
 import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
 
 
@@ -25,4 +29,23 @@
 		return null;
 	}
 	// TODO: implement
+
+	@Override
+	public void append(GdlVisibleObject ancestor, GdlVisibleObject descendant)
+			throws InvalidGdlSchemaException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public boolean validate() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@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/views/GdlSpecialCreatorTopicView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlSpecialCreatorTopicView.java	Wed Jun 29 06:29:49 2011	(r530)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlSpecialCreatorTopicView.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -1,6 +1,9 @@
 package us.isidor.gdl.anaToMia.Widgets.views;
 
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
 import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
 
 public class GdlSpecialCreatorTopicView extends GdlSpecialTopicView{
@@ -24,5 +27,24 @@
 		// TODO Auto-generated method stub
 		return null;
 	}
+
+	@Override
+	public void append(GdlVisibleObject ancestor, GdlVisibleObject descendant)
+			throws InvalidGdlSchemaException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public boolean validate() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@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/views/GdlSpecialEditorTopicView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlSpecialEditorTopicView.java	Wed Jun 29 06:29:49 2011	(r530)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlSpecialEditorTopicView.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -1,6 +1,9 @@
 package us.isidor.gdl.anaToMia.Widgets.views;
 
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
+import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
 import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
 
 
@@ -26,4 +29,23 @@
 		// TODO Auto-generated method stub
 		return null;
 	}
+
+	@Override
+	public void append(GdlVisibleObject ancestor, GdlVisibleObject descendant)
+			throws InvalidGdlSchemaException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public boolean validate() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@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/views/GdlView.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlView.java	Wed Jun 29 06:29:49 2011	(r530)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/views/GdlView.java	Wed Jun 29 13:00:44 2011	(r531)
@@ -2,15 +2,17 @@
 
 import com.google.gwt.core.client.JsArray;
 
+import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Construct;
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Name;
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.Topic;
 import us.isidor.gdl.anaToMia.TopicMaps.TopicMapsModel.TopicMap;
 import us.isidor.gdl.anaToMia.Widgets.base.GdlPsis;
 import us.isidor.gdl.anaToMia.Widgets.base.GdlVisibleObject;
+import us.isidor.gdl.anaToMia.Widgets.base.IGdlContainer;
 import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException;
 
 
-public abstract class GdlView extends GdlVisibleObject{
+public abstract class GdlView extends GdlVisibleObject implements IGdlContainer {
 	private String viewName = "";
 	private TopicMap tm = null;
 	private Topic representative = null;
@@ -22,7 +24,7 @@
 		this.representative = representative;
 		JsArray<Name> viewNames = representative.getNames(tm.getTopicBySubjectIdentifier(tm.createLocator(GdlPsis.NameType.gdlViewName)));
 		if(viewNames.length() != 1){
-			throw new InvalidGdlSchemaException("A view must be bound to a gdl:view-name instance");
+			throw new InvalidGdlSchemaException("A view must be bound to a " + GdlPsis.NameType.gdlViewName + " instance");
 		}
 		
 		this.viewName = viewNames.get(0).getValue();
@@ -34,6 +36,12 @@
 	}
 	
 	
+	public abstract boolean validate();
+	
+	
+	public abstract TopicMap getContent();
+	
+	
 	
 	
 	// hierarchy




More information about the Isidorus-cvs mailing list