svn commit: r12775 - trunk/src/model-euml/src/org/argouml/model/euml

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-06-08 00:43:13-0700
New Revision: 12775

Modified:
   trunk/src/model-euml/src/org/argouml/model/euml/CommonBehaviorFactoryEUMLImpl.java
   trunk/src/model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java
   trunk/src/model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java
   trunk/src/model-euml/src/org/argouml/model/euml/DataTypesFactoryEUMLImpl.java
   trunk/src/model-euml/src/org/argouml/model/euml/ExtensionMechanismsFactoryEUMLImpl.java
   trunk/src/model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java
   trunk/src/model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java
   trunk/src/model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java
   trunk/src/model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java
   trunk/src/model-euml/src/org/argouml/model/euml/UseCasesFactoryEUMLImpl.java

Log:
Implement save/load XMI and the basic core functionality

Modified: trunk/src/model-euml/src/org/argouml/model/euml/CommonBehaviorFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-euml/src/org/argouml/model/euml/CommonBehaviorFactoryEUMLImpl.java?view=diff&rev=12775&p1=trunk/src/model-euml/src/org/argouml/model/euml/CommonBehaviorFactoryEUMLImpl.java&p2=trunk/src/model-euml/src/org/argouml/model/euml/CommonBehaviorFactoryEUMLImpl.java&r1=12774&r2=12775
==============================================================================
--- trunk/src/model-euml/src/org/argouml/model/euml/CommonBehaviorFactoryEUMLImpl.java	(original)
+++ trunk/src/model-euml/src/org/argouml/model/euml/CommonBehaviorFactoryEUMLImpl.java	2007-06-08 00:43:13-0700
@@ -27,6 +27,12 @@
 package org.argouml.model.euml;
 
 import org.argouml.model.CommonBehaviorFactory;
+import org.eclipse.uml2.uml.Action;
+import org.eclipse.uml2.uml.Behavior;
+import org.eclipse.uml2.uml.OpaqueAction;
+import org.eclipse.uml2.uml.Signal;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.UMLFactory;
 
 /**
  * The implementation of the CommonBehaviorFactory for EUML2.
@@ -98,6 +104,7 @@
     }
 
     public Object createCallAction() {
+
         // TODO Auto-generated method stub
         return null;
     }
@@ -108,8 +115,7 @@
     }
 
     public Object createCreateAction() {
-        // TODO Auto-generated method stub
-        return null;
+        return UMLFactory.eINSTANCE.createCreateObjectAction();
     }
 
     public Object createDataValue() {
@@ -118,8 +124,7 @@
     }
 
     public Object createDestroyAction() {
-        // TODO Auto-generated method stub
-        return null;
+        return UMLFactory.eINSTANCE.createDestroyObjectAction();
     }
 
     public Object createException() {
@@ -153,8 +158,7 @@
     }
 
     public Object createReception() {
-        // TODO Auto-generated method stub
-        return null;
+        return UMLFactory.eINSTANCE.createReception();
     }
 
     public Object createReturnAction() {
@@ -163,13 +167,11 @@
     }
 
     public Object createSendAction() {
-        // TODO Auto-generated method stub
-        return null;
+        return UMLFactory.eINSTANCE.createSendObjectAction();
     }
 
-    public Object createSignal() {
-        // TODO Auto-generated method stub
-        return null;
+    public Signal createSignal() {
+        return UMLFactory.eINSTANCE.createSignal();
     }
 
     public Object createStimulus() {
@@ -187,7 +189,7 @@
         return null;
     }
 
-    public Object createUninterpretedAction() {
+    public OpaqueAction createUninterpretedAction() {
         // TODO Auto-generated method stub
         return null;
     }

Modified: trunk/src/model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java?view=diff&rev=12775&p1=trunk/src/model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java&p2=trunk/src/model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java&r1=12774&r2=12775
==============================================================================
--- trunk/src/model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java	(original)
+++ trunk/src/model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java	2007-06-08 00:43:13-0700
@@ -29,18 +29,36 @@
 import java.util.List;
 
 import org.argouml.model.CoreFactory;
+import org.eclipse.uml2.uml.Abstraction;
 import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Artifact;
 import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.AssociationClass;
+import org.eclipse.uml2.uml.BehavioredClassifier;
 import org.eclipse.uml2.uml.Classifier;
 import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Constraint;
 import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Dependency;
 import org.eclipse.uml2.uml.Element;
 import org.eclipse.uml2.uml.Enumeration;
 import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.InterfaceRealization;
+import org.eclipse.uml2.uml.NamedElement;
 import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Node;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.PackageImport;
+import org.eclipse.uml2.uml.Parameter;
 import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.TemplateParameter;
 import org.eclipse.uml2.uml.Type;
 import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.Usage;
+import org.eclipse.uml2.uml.VisibilityKind;
 
 
 /**
@@ -53,6 +71,7 @@
      */
     private EUMLModelImplementation modelImpl;
 
+
     /**
      * Constructor.
      *
@@ -62,9 +81,12 @@
         modelImpl = implementation;
     }
 
-    public Object buildAbstraction(String name, Object supplier, Object client) {
-        // TODO Auto-generated method stub
-        return null;
+    public Abstraction buildAbstraction(String name, Object supplier, Object client) {
+        Abstraction abstraction = createAbstraction();
+        abstraction.setName(name);
+        abstraction.getSuppliers().add((NamedElement) supplier);
+        abstraction.getClients().add((NamedElement) client);
+        return abstraction;
     }
 
     // TODO: A few different ways of building Associations.  Pick one that
@@ -122,25 +144,24 @@
         return null;
     }
     
-    public Object buildAttribute() {
-        // TODO: Required for UmlFactory.buildNode()
-        throw new NotYetImplementedException();
-//        Attribute attr = (Attribute) createAttribute();
-//        attr.setName("newAttr");
-//        attr.setMultiplicity(getMultiplicity11());
-//        attr.setVisibility(VisibilityKindEnum.VK_PUBLIC);
-//        attr.setOwnerScope(ScopeKindEnum.SK_INSTANCE);
-//        attr.setChangeability(ChangeableKindEnum.CK_CHANGEABLE);
-//        attr.setTargetScope(ScopeKindEnum.SK_INSTANCE);
-//        return attr;
+    public Property buildAttribute() {
+        Property attr = createAttribute();
+        attr.setName("newAttr");
+        attr.setLower(1);
+        attr.setUpper(1);
+        attr.setVisibility(VisibilityKind.PUBLIC_LITERAL);
+        attr.setIsStatic(false);
+        attr.setIsReadOnly(false);
+        return attr;
+    }
+
+    public Property buildAttribute(Object model, Object type) {
+        Property attr = buildAttribute();
+        attr.setType((Type) type);
+        return attr;
     }
 
-    public Object buildAttribute(Object model, Object type) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public Object buildAttribute(Object handle, Object model, Object type) {
+    public Property buildAttribute(Object handle, Object model, Object type) {
         // TODO Auto-generated method stub
         return null;
     }
@@ -176,7 +197,7 @@
         org.eclipse.uml2.uml.Class cls =
                 (org.eclipse.uml2.uml.Class) createClass();
         if (owner != null) {
-            ((Namespace) owner).getOwnedElements().add(cls);
+            modelImpl.getCoreHelper().addOwnedElement(owner, cls);
         }
         if (name != null) {
             cls.setName(name);
@@ -189,18 +210,16 @@
             throw new IllegalArgumentException("A namespace must be supplied.");
         }
         Element elementToAnnotate = (Element) element;
-        Comment comment = (Comment) createComment();
-
-        Element owner = null;
+        // TODO: This actually creates the Comment as owned by
+        // the Element itself, rather than the Element's namespace which
+        // seems to make more sense, but is different than the specified
+        // Model API semantics - tfm
         if (elementToAnnotate != null) {
-            comment.getAnnotatedElements().add(elementToAnnotate);
-            owner = elementToAnnotate.getOwner();
+            return elementToAnnotate.createOwnedComment();
         } else {
-            owner = (Namespace) model;
+            return ((Namespace) model).createOwnedComment();
         }
 
-        owner.getOwnedElements().add(comment);
-        return comment;
     }
 
     public Object buildConstraint(Object constrElement) {
@@ -216,7 +235,7 @@
     public Object buildDataType(String name, Object owner) {
         DataType dt = (DataType) createDataType();
         dt.setName(name);
-        ((Element) owner).getOwnedElements().add(dt);
+        modelImpl.getCoreHelper().addOwnedElement(owner, dt);
         return dt;
     }
 
@@ -234,7 +253,7 @@
         Enumeration enumer = (Enumeration) createEnumeration();
         enumer.setName(name);
         if (owner != null) {
-            ((Element) owner).getOwnedElements().add(enumer);
+            modelImpl.getCoreHelper().addOwnedElement(owner, enumer);
         }
         return enumer;
     }
@@ -243,32 +262,33 @@
         return ((Enumeration) enumeration).createOwnedLiteral(name);
     }
 
-    public Object buildGeneralization(Object child, Object parent, String name) {
-        // TODO Auto-generated method stub
-        return null;
+    public Generalization buildGeneralization(Object child, Object parent, String name) {
+        // TODO: Generalizations are unnamed in UML 2.x
+        return buildGeneralization(parent, child);
     }
 
-    public Object buildGeneralization(Object child, Object parent) {
-        // TODO Auto-generated method stub
-        return null;
+    public Generalization buildGeneralization(Object child, Object parent) {
+        Generalization generalization =
+            ((BehavioredClassifier) child).createGeneralization((Classifier) parent);
+        return generalization;
     }
 
-    public Object buildInterface() {
-        // TODO Auto-generated method stub
-        return null;
+    public Interface buildInterface() {
+        return createInterface();
     }
 
-    public Object buildInterface(Object owner) {
+    public Interface buildInterface(Object owner) {
         // TODO Auto-generated method stub
         return null;
     }
 
-    public Object buildInterface(String name) {
-        // TODO Auto-generated method stub
-        return null;
+    public Interface buildInterface(String name) {
+        Interface i = buildInterface();
+        i.setName(name);
+        return i;
     }
 
-    public Object buildInterface(String name, Object owner) {
+    public Interface buildInterface(String name, Object owner) {
         // TODO Auto-generated method stub
         return null;
     }
@@ -278,44 +298,48 @@
         return null;
     }
 
-    public Object buildOperation(Object classifier, Object model, Object returnType) {
+    public Operation buildOperation(Object classifier, Object model, Object returnType) {
         // TODO Auto-generated method stub
         return null;
     }
 
-    public Object buildOperation(Object classifier, Object returnType) {
+    public Operation buildOperation(Object classifier, Object returnType) {
         // TODO Auto-generated method stub
         return null;
     }
 
-    public Object buildOperation(Object cls, Object model, Object returnType, String name) {
+    public Operation buildOperation(Object cls, Object model, Object returnType, String name) {
         // TODO Auto-generated method stub
         return null;
     }
 
-    public Object buildOperation2(Object cls, Object returnType, String name) {
+    public Operation buildOperation2(Object cls, Object returnType, String name) {
         // TODO Auto-generated method stub
         return null;
     }
 
-    public Object buildParameter(Object o, Object model, Object type) {
+    public Parameter buildParameter(Object o, Object model, Object type) {
         // TODO Auto-generated method stub
         return null;
     }
 
-    public Object buildParameter(Object o, Object type) {
+    public Parameter buildParameter(Object o, Object type) {
         // TODO Auto-generated method stub
         return null;
     }
 
-    public Object buildPermission(Object clientObj, Object supplierObj) {
+    public PackageImport buildPermission(Object clientObj, Object supplierObj) {
         // TODO Auto-generated method stub
         return null;
     }
 
-    public Object buildRealization(Object clnt, Object spplr, Object model) {
-        // TODO Auto-generated method stub
-        return null;
+    public InterfaceRealization buildRealization(Object client,
+            Object supplier, Object namespace) {
+        // TODO: namespace is ignored
+        InterfaceRealization realization =
+                ((BehavioredClassifier) client).createInterfaceRealization(
+                        null, (Interface) supplier);
+        return realization;
     }
 
     public Object buildTemplateArgument(Object element) {
@@ -323,7 +347,7 @@
         return null;
     }
 
-    public Object buildUsage(Object client, Object supplier) {
+    public Usage buildUsage(Object client, Object supplier) {
         // TODO Auto-generated method stub
         return null;
     }
@@ -348,28 +372,28 @@
         return null;
     }
 
-    public Object createAbstraction() {
+    public Abstraction createAbstraction() {
         return UMLFactory.eINSTANCE.createAbstraction();
     }
 
-    public Object createArtifact() {
+    public Artifact createArtifact() {
         return UMLFactory.eINSTANCE.createArtifact();
     }
 
-    public Object createAssociation() {
+    public Association createAssociation() {
         return UMLFactory.eINSTANCE.createAssociation();
     }
 
-    public Object createAssociationClass() {
+    public AssociationClass createAssociationClass() {
         return UMLFactory.eINSTANCE.createAssociationClass();
     }
 
-    public Object createAssociationEnd() {
-        // TODO Auto-generated method stub
-        return null;
+    public Property createAssociationEnd() {
+        // TODO: Double check - tfm
+        return UMLFactory.eINSTANCE.createProperty();
     }
 
-    public Object createAttribute() {
+    public Property createAttribute() {
         // TODO: Double check - tfm
         return UMLFactory.eINSTANCE.createProperty();
     }
@@ -378,11 +402,11 @@
         return UMLFactory.eINSTANCE.createTemplateBinding();
     }
 
-    public Object createClass() {
+    public org.eclipse.uml2.uml.Class createClass() {
         return UMLFactory.eINSTANCE.createClass();
     }
 
-    public Object createComment() {
+    public Comment createComment() {
         return UMLFactory.eINSTANCE.createComment();
     }
 
@@ -391,15 +415,15 @@
         return null;
     }
 
-    public Object createConstraint() {
+    public Constraint createConstraint() {
         return UMLFactory.eINSTANCE.createConstraint();
     }
 
-    public Object createDataType() {
+    public DataType createDataType() {
         return UMLFactory.eINSTANCE.createDataType();
     }
 
-    public Object createDependency() {
+    public Dependency createDependency() {
         return UMLFactory.eINSTANCE.createDependency();
     }
 
@@ -408,11 +432,11 @@
         return null;
     }
 
-    public Object createEnumeration() {
+    public Enumeration createEnumeration() {
         return UMLFactory.eINSTANCE.createEnumeration();
     }
 
-    public Object createEnumerationLiteral() {
+    public EnumerationLiteral createEnumerationLiteral() {
         return UMLFactory.eINSTANCE.createEnumerationLiteral();
     }
 
@@ -421,11 +445,11 @@
         return null;
     }
 
-    public Object createGeneralization() {
+    public Generalization createGeneralization() {
         return UMLFactory.eINSTANCE.createGeneralization();
     }
 
-    public Object createInterface() {
+    public Interface createInterface() {
         return UMLFactory.eINSTANCE.createInterface();
     }
 
@@ -434,19 +458,19 @@
         return null;
     }
 
-    public Object createNode() {
+    public Node createNode() {
         return UMLFactory.eINSTANCE.createNode();
     }
 
-    public Object createOperation() {
+    public Operation createOperation() {
         return UMLFactory.eINSTANCE.createOperation();
     }
 
-    public Object createParameter() {
+    public Parameter createParameter() {
         return UMLFactory.eINSTANCE.createParameter();
     }
 
-    public Object createPermission() {
+    public PackageImport createPermission() {
         return UMLFactory.eINSTANCE.createPackageImport();
     }
 
@@ -465,11 +489,11 @@
         return null;
     }
 
-    public Object createTemplateParameter() {
+    public TemplateParameter createTemplateParameter() {
         return UMLFactory.eINSTANCE.createTemplateParameter();
     }
 
-    public Object createUsage() {
+    public Usage createUsage() {
         return UMLFactory.eINSTANCE.createUsage();
     }
 

Modified: trunk/src/model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java?view=diff&rev=12775&p1=trunk/src/model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java&p2=trunk/src/model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java&r1=12774&r2=12775
==============================================================================
--- trunk/src/model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java	(original)
+++ trunk/src/model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java	2007-06-08 00:43:13-0700
@@ -28,7 +28,7 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
+import java.util.HashSet;
 import java.util.List;
 
 import org.argouml.model.CoreHelper;
@@ -45,6 +45,7 @@
 import org.eclipse.uml2.uml.NamedElement;
 import org.eclipse.uml2.uml.Namespace;
 import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.PackageableElement;
 import org.eclipse.uml2.uml.Property;
 import org.eclipse.uml2.uml.RedefinableElement;
 import org.eclipse.uml2.uml.StructuralFeature;
@@ -73,340 +74,349 @@
     }
 
     public void addAllStereotypes(Object modelElement, Collection stereos) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addAnnotatedElement(Object comment, Object annotatedElement) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addClient(Object dependency, Object element) {
-        // TODO Auto-generated method stub
-        
+        throw new NotYetImplementedException();
     }
 
     public void addClientDependency(Object handle, Object dependency) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addComment(Object element, Object comment) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addConnection(Object handle, Object connection) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addConnection(Object handle, int position, Object connection) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addConstraint(Object handle, Object mc) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addDeploymentLocation(Object handle, Object node) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addElementResidence(Object handle, Object residence) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addFeature(Object handle, int index, Object f) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addFeature(Object handle, Object f) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addLink(Object handle, Object link) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addLiteral(Object handle, int index, Object literal) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addMethod(Object handle, Object method) {
-        // TODO Auto-generated method stub
-        
+        throw new NotYetImplementedException();
     }
 
     public void addOwnedElement(Object handle, Object me) {
-        // TODO Auto-generated method stub
-        
+        if (handle instanceof org.eclipse.uml2.uml.Package
+                && me instanceof Type) {
+            ((org.eclipse.uml2.uml.Package) handle).getOwnedTypes().add(
+                    (Type) me);
+        } else if (handle instanceof org.eclipse.uml2.uml.Package
+                && me instanceof PackageableElement) {
+            ((org.eclipse.uml2.uml.Package) handle).getPackagedElements().add(
+                    (PackageableElement) me);
+        } else {
+            throw new NotYetImplementedException();
+        }
     }
 
     public void addParameter(Object handle, int index, Object parameter) {
-        // TODO Auto-generated method stub
-        
+        throw new NotYetImplementedException();
     }
 
     public void addParameter(Object handle, Object parameter) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addQualifier(Object handle, int position, Object qualifier) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addRaisedSignal(Object handle, Object sig) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addSourceFlow(Object handle, Object flow) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addStereotype(Object modelElement, Object stereo) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addSupplier(Object handle, Object element) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addSupplierDependency(Object supplier, Object dependency) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addTaggedValue(Object handle, Object taggedValue) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addTargetFlow(Object handle, Object flow) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addTemplateArgument(Object handle, int index, Object argument) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addTemplateArgument(Object handle, Object argument) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addTemplateParameter(Object handle, int index, Object parameter) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void addTemplateParameter(Object handle, Object parameter) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void clearStereotypes(Object handle) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public boolean equalsAggregationKind(Object associationEnd, String kindType) {
-        // TODO Auto-generated method stub
-        return false;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getAllAttributes(Object classifier) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getAllBehavioralFeatures(Object element) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getAllClasses(Object ns) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getAllClassifiers(Object namespace) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getAllComponents(Object ns) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getAllContents(Object namespace) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getAllDataTypes(Object ns) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getAllInterfaces(Object ns) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getAllMetatypeNames() {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getAllNodes(Object ns) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getAllPossibleNamespaces(Object modelElement, Object model) {
-        // TODO: Dummy implementation that just returns the current namespace
+        // TODO: Dummy implementation that just returns the current namespace hierarchy
         Collection<Namespace> result = new ArrayList<Namespace>();
-        result.add(((NamedElement) modelElement).getNamespace());
+        result.addAll(((NamedElement) modelElement).allNamespaces());
         return result;
     }
 
     public Collection getAllRealizedInterfaces(Object element) {
-        // TODO Auto-generated method stub
-        return Collections.EMPTY_SET;
+        return ((Classifier) element).getAllUsedInterfaces();
     }
 
     public Collection getAllSupertypes(Object classifier) {
-        // TODO Auto-generated method stub
-        return Collections.EMPTY_SET;
+        return ((Classifier) classifier).allParents();
     }
 
     public Collection getAllVisibleElements(Object ns) {
-        // TODO Auto-generated method stub
-        return Collections.EMPTY_SET;
+        throw new NotYetImplementedException();
     }
 
     public Collection getAssociateEnds(Object classifier) {
-        // TODO Auto-generated method stub
-        return Collections.EMPTY_SET;
+        throw new NotYetImplementedException();
     }
 
     public Collection getAssociateEndsInh(Object classifier) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
     }
 
     public Collection getAssociatedClassifiers(Object aclassifier) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Object getAssociationEnd(Object type, Object assoc) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
     }
 
     public Collection getAssociations(Object from, Object to) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getAssociations(Object oclassifier) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getAttributesInh(Object classifier) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
-    public List getBehavioralFeatures(Object classifier) {
-        // TODO Auto-generated method stub
-        return null;
+    public List<BehavioralFeature> getBehavioralFeatures(Object classifier) {
+        List<BehavioralFeature> result = new ArrayList<BehavioralFeature>();
+        for (Feature feature : ((Classifier) classifier).getFeatures()) {
+            if (feature instanceof BehavioralFeature) {
+                result.add((BehavioralFeature) feature);
+            }
+        }
+        return result;
     }
 
     public String getBody(Object comment) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
-    public Collection getChildren(Object element) {
-        // TODO Auto-generated method stub
-        return null;
+    public Collection<Classifier> getChildren(Object element) {
+        Collection<Classifier> results = new HashSet<Classifier>();
+        for (Generalization g : ((Classifier) element).getGeneralizations()) {
+            results.addAll(getChildren(g.getSpecific()));
+        }
+        results.remove(element);
+        return results;
     }
 
     public Collection getDependencies(Object supplierObj, Object clientObj) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getExtendedClassifiers(Object element) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getExtendingClassifiers(Object classifier) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getExtendingElements(Object element) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Object getFirstSharedNamespace(Object ns1, Object ns2) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getFlows(Object source, Object target) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Object getGeneralization(Object achild, Object aparent) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getOperationsInh(Object classifier) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getRealizedInterfaces(Object cls) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getRelationships(Object source, Object dest) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public List getReturnParameters(Object operation) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Object getSource(Object relationship) {
@@ -521,122 +531,132 @@
 
 
     public Object getSpecification(Object object) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getSpecifications(Object classifier) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getSubtypes(Object cls) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public Collection getSupertypes(Object generalizableElement) {
-        // TODO Auto-generated method stub
-        return null;
+        throw new NotYetImplementedException();
+
     }
 
     public boolean hasCompositeEnd(Object association) {
-        // TODO Auto-generated method stub
-        return false;
+        throw new NotYetImplementedException();
+
     }
 
     public boolean isSubType(Object type, Object subType) {
-        // TODO Auto-generated method stub
-        return false;
+        throw new NotYetImplementedException();
+
     }
 
     public boolean isValidNamespace(Object element, Object namespace) {
-        // TODO Auto-generated method stub
-        return false;
+
+        if (!(element instanceof Element) 
+                || !(namespace instanceof Namespace)) {
+            return false;
+        }
+
+        Element e = (Element) element;
+        Namespace ns = (Namespace) namespace;
+        
+        // TODO: Needs implementation - for now anything is valid
+        
+        return true;
     }
 
     public void removeAnnotatedElement(Object handle, Object me) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeClientDependency(Object handle, Object dep) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeConnection(Object handle, Object connection) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeConstraint(Object handle, Object cons) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeDeploymentLocation(Object handle, Object node) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeElementResidence(Object handle, Object residence) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeFeature(Object cls, Object feature) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeLiteral(Object enumeration, Object literal) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeOwnedElement(Object handle, Object value) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeParameter(Object handle, Object parameter) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeQualifier(Object handle, Object qualifier) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeSourceFlow(Object handle, Object flow) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeStereotype(Object handle, Object stereo) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeSupplierDependency(Object supplier, Object dependency) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeTargetFlow(Object handle, Object flow) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeTemplateArgument(Object binding, Object argument) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void removeTemplateParameter(Object handle, Object parameter) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
@@ -655,101 +675,101 @@
     }
 
     public void setAggregation(Object handle, Object aggregationKind) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
     }
 
     public void setAnnotatedElements(Object handle, Collection elems) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setAssociation(Object handle, Object association) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setAttributes(Object classifier, List attributes) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setBody(Object handle, Object expr) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setBody(Object handle, String body) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
+    @SuppressWarnings("deprecation")
     public void setChangeability(Object handle, Object ck) {
-        // TODO Auto-generated method stub
-        
+        throw new NotImplementedException();
     }
 
+    @SuppressWarnings("deprecation")
     public void setChangeable(Object handle, boolean changeable) {
-        // TODO Auto-generated method stub
-        
+        setReadOnly(handle, !changeable);
     }
 
     public void setChild(Object handle, Object child) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setConcurrency(Object handle, Object concurrencyKind) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setConnections(Object handle, Collection ends) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setContainer(Object handle, Object component) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setDefaultElement(Object handle, Object element) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setDefaultValue(Object handle, Object expression) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setDiscriminator(Object handle, String discriminator) {
-        // TODO Auto-generated method stub
-        
+        // Removed from UML 2.x
+        throw new NotImplementedException();
     }
 
     public void setEnumerationLiterals(Object enumeration, List literals) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setFeature(Object classifier, int index, Object feature) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setFeatures(Object classifier, Collection features) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setInitialValue(Object attribute, Object expression) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setKind(Object handle, Object kind) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
@@ -758,12 +778,12 @@
     }
 
     public void setModelElementContainer(Object handle, Object container) {
-        // TODO Auto-generated method stub
-        
+        // TODO: This method is mostly (entirely?) redundant - tfm
+        addOwnedElement(container, handle);
     }
 
     public void setMultiplicity(Object handle, Object arg) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
@@ -772,7 +792,7 @@
     }
 
     public void setNamespace(Object handle, Object ns) {
-        ((Namespace) ns).getOwnedElements().add((NamedElement) handle);
+        addOwnedElement(ns, handle);
     }
 
     public void setNavigable(Object handle, boolean flag) {
@@ -780,46 +800,47 @@
     }
 
     public void setOperations(Object classifier, List operations) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setOrdering(Object handle, Object ordering) {
 //        ((Property) handle).setIsOrdered(ordering);
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
     }
 
     public void setOwner(Object handle, Object owner) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
     }
 
+    @SuppressWarnings("deprecation")
     public void setOwnerScope(Object feature, Object scopeKind) {
         // Don't implement - deprecated method in interface.
         throw new NotImplementedException();
     }
 
     public void setParameter(Object handle, Object parameter) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setParameters(Object handle, Collection parameters) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setParent(Object handle, Object parent) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setPowertype(Object handle, Object powerType) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setQualifiers(Object handle, List qualifiers) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
@@ -828,7 +849,7 @@
     }
 
     public void setRaisedSignals(Object handle, Collection raisedSignals) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
     
@@ -837,40 +858,40 @@
     }
 
     public void setResident(Object handle, Object resident) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setResidents(Object handle, Collection residents) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setRoot(Object handle, boolean isRoot) {
-        // TODO Auto-generated method stub
-        
+        // Appears to be gone from UML 2.x
+        throw new NotImplementedException();
     }
 
     public void setSources(Object handle, Collection specifications) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setSpecification(Object handle, boolean isSpecification) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setSpecification(Object method, Object specification) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
     }
 
     public void setSpecification(Object operation, String specification) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
     }
 
     public void setSpecifications(Object handle, Collection specifications) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
 
     }
     
@@ -879,15 +900,16 @@
     }
 
     public void setTaggedValue(Object handle, String tag, String value) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
     public void setTaggedValues(Object handle, Collection taggedValues) {
-        // TODO Auto-generated method stub
+        throw new NotYetImplementedException();
         
     }
 
+    @SuppressWarnings("deprecation")
     public void setTargetScope(Object handle, Object targetScope) {
         // Don't implement - deprecated method in interface.
         throw new NotImplementedException();

Modified: trunk/src/model-euml/src/org/argouml/model/euml/DataTypesFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-euml/src/org/argouml/model/euml/DataTypesFactoryEUMLImpl.java?view=diff&rev=12775&p1=trunk/src/model-euml/src/org/argouml/model/euml/DataTypesFactoryEUMLImpl.java&p2=trunk/src/model-euml/src/org/argouml/model/euml/DataTypesFactoryEUMLImpl.java&r1=12774&r2=12775
==============================================================================
--- trunk/src/model-euml/src/org/argouml/model/euml/DataTypesFactoryEUMLImpl.java	(original)
+++ trunk/src/model-euml/src/org/argouml/model/euml/DataTypesFactoryEUMLImpl.java	2007-06-08 00:43:13-0700
@@ -29,6 +29,9 @@
 import java.util.List;
 
 import org.argouml.model.DataTypesFactory;
+import org.argouml.model.NotImplementedException;
+import org.eclipse.uml2.uml.Expression;
+import org.eclipse.uml2.uml.UMLFactory;
 
 /**
  * The implementation of the DataTypesFactory for EUML2.
@@ -64,7 +67,7 @@
         return null;
     }
 
-    public Object createExpression(String language, String body) {
+    public Expression createExpression(String language, String body) {
         // TODO Auto-generated method stub
         return null;
     }
@@ -79,29 +82,28 @@
         return null;
     }
 
+    
+    // TODO: Callers will need to be refactored to work around the
+    // change in the way multiplicities work - tfm
+    
     public Object createMultiplicity(int lower, int upper) {
-        // TODO Auto-generated method stub
-        return null;
+        return new NotImplementedException();
     }
 
     public Object createMultiplicity(List range) {
-        // TODO Auto-generated method stub
-        return null;
+        return new NotImplementedException();
     }
 
     public Object createMultiplicity(String str) {
-        // TODO Auto-generated method stub
-        return null;
+        return new NotImplementedException();
     }
 
     public Object createMultiplicityRange(String str) {
-        // TODO Auto-generated method stub
-        return null;
+        return new NotImplementedException();
     }
 
     public Object createMultiplicityRange(int lower, int upper) {
-        // TODO Auto-generated method stub
-        return null;
+        return new NotImplementedException();
     }
 
     public Object createObjectSetExpression(String language, String body) {

Modified: trunk/src/model-euml/src/org/argouml/model/euml/ExtensionMechanismsFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-euml/src/org/argouml/model/euml/ExtensionMechanismsFactoryEUMLImpl.java?view=diff&rev=12775&p1=trunk/src/model-euml/src/org/argouml/model/euml/ExtensionMechanismsFactoryEUMLImpl.java&p2=trunk/src/model-euml/src/org/argouml/model/euml/ExtensionMechanismsFactoryEUMLImpl.java&r1=12774&r2=12775
==============================================================================
--- trunk/src/model-euml/src/org/argouml/model/euml/ExtensionMechanismsFactoryEUMLImpl.java	(original)
+++ trunk/src/model-euml/src/org/argouml/model/euml/ExtensionMechanismsFactoryEUMLImpl.java	2007-06-08 00:43:13-0700
@@ -29,6 +29,7 @@
 import java.util.Collection;
 
 import org.argouml.model.ExtensionMechanismsFactory;
+import org.eclipse.uml2.uml.UMLFactory;
 
 /**
  * The implementation of the ExtensionMechanismsFactory for EUML2.
@@ -95,8 +96,7 @@
     }
 
     public Object createStereotype() {
-        // TODO Auto-generated method stub
-        return null;
+        return UMLFactory.eINSTANCE.createStereotype();
     }
 
     public Object createTagDefinition() {

Modified: trunk/src/model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java?view=diff&rev=12775&p1=trunk/src/model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java&p2=trunk/src/model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java&r1=12774&r2=12775
==============================================================================
--- trunk/src/model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java	(original)
+++ trunk/src/model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java	2007-06-08 00:43:13-0700
@@ -27,6 +27,7 @@
 package org.argouml.model.euml;
 
 import org.argouml.model.MetaTypes;
+import org.argouml.model.NotImplementedException;
 import org.eclipse.uml2.uml.Abstraction;
 import org.eclipse.uml2.uml.Action;
 import org.eclipse.uml2.uml.ActivityPartition;
@@ -35,7 +36,10 @@
 import org.eclipse.uml2.uml.Association;
 import org.eclipse.uml2.uml.AssociationClass;
 import org.eclipse.uml2.uml.BehavioralFeature;
+import org.eclipse.uml2.uml.CallAction;
+import org.eclipse.uml2.uml.CallConcurrencyKind;
 import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Collaboration;
 import org.eclipse.uml2.uml.Comment;
 import org.eclipse.uml2.uml.Component;
 import org.eclipse.uml2.uml.DataType;
@@ -58,6 +62,7 @@
 import org.eclipse.uml2.uml.Operation;
 import org.eclipse.uml2.uml.PackageImport;
 import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
 import org.eclipse.uml2.uml.Property;
 import org.eclipse.uml2.uml.Pseudostate;
 import org.eclipse.uml2.uml.PseudostateKind;
@@ -69,6 +74,7 @@
 import org.eclipse.uml2.uml.Transition;
 import org.eclipse.uml2.uml.Usage;
 import org.eclipse.uml2.uml.UseCase;
+import org.eclipse.uml2.uml.VisibilityKind;
 
 
 /**
@@ -105,9 +111,9 @@
     }
 
     public Object getActionState() {
-        // TODO: ActionState, CallState, and SubactivityState have been replaced
-        // in UML 2.0 by explicitly modeled Actions
-        return null;
+        // TODO: ActionState, CallState, and SubactivityState have been
+        // replaced in UML 2.0 by explicitly modeled Actions
+        return State.class;
     }
 
     public Object getActor() {
@@ -136,14 +142,14 @@
         // TODO: In UML 2.0, ClassifierRole, AssociationRole, and
         // AssociationEndRole have been replaced by the internal 
         // structure of the Collaboration
-        return null;
+        return Classifier.class;
     }
 
     public Object getAssociationRole() {
         // TODO: In UML 2.0, ClassifierRole, AssociationRole, and
         // AssociationEndRole have been replaced by the internal 
         // structure of the Collaboration
-        return null;
+        return Classifier.class;
     }
 
     public Object getAttribute() {
@@ -161,19 +167,17 @@
     }
 
     public Object getCallAction() {
-        // TODO Auto-generated method stub
-        throw new NotYetImplementedException();
+        return CallAction.class;
     }
 
     public Object getCallConcurrencyKind() {
-        // TODO Auto-generated method stub
-        throw new NotYetImplementedException();
+        return CallConcurrencyKind.class;
     }
 
     public Object getCallState() {
         // TODO: ActionState, CallState, and SubactivityState have been replaced
         // in UML 2.0 by explicitly modeled Actions
-        return null;
+        return State.class;
     }
 
     public Object getClassifier() {
@@ -184,12 +188,11 @@
         // TODO: In UML 2.0, ClassifierRole, AssociationRole, and
         // AssociationEndRole have been replaced by the internal 
         // structure of the Collaboration
-        return null;
+        return Classifier.class;
     }
 
     public Object getCollaboration() {
-        // TODO Auto-generated method stub
-        throw new NotYetImplementedException();
+        return Collaboration.class;
     }
 
     public Object getComment() {
@@ -201,8 +204,9 @@
     }
 
     public Object getComponentInstance() {
-        // Gone in UML 2.x
-        return null;
+        // TODO: Gone in UML 2.x
+        // return place holder for now
+        return InstanceSpecification.class;
     }
 
     public Object getCompositeState() {
@@ -274,7 +278,7 @@
     }
 
     public Object getInstance() {
-        // TODO: Just a guess - double check - tfm
+        // TODO: Check for changed semantics - tfm
         return InstanceSpecification.class;
     }
 
@@ -287,9 +291,10 @@
     }
 
     public Object getLink() {
-        // TODO Auto-generated method stub
-//        throw new NotYetImplementedException();
-        return null;
+        // TODO: Gone in UML 2.1
+        // It is now an InstanceSpecification with an 
+        // Association as its classifier
+        return InstanceSpecification.class;
     }
 
     public Object getMessage() {
@@ -349,8 +354,9 @@
     }
 
     public Object getNodeInstance() {
-        // Gone in UML 2.x
-        return null;
+        // TODO: Gone in UML 2.x
+        // Return place holder for now
+        return InstanceSpecification.class;
     }
 
     public Object getObject() {
@@ -376,8 +382,7 @@
     }
 
     public Object getParameterDirectionKind() {
-        // TODO Auto-generated method stub
-        throw new NotYetImplementedException();
+        return ParameterDirectionKind.class;
     }
 
     public Object getPartition() {
@@ -407,8 +412,8 @@
     }
 
     public Object getScopeKind() {
-        // TODO Auto-generated method stub
-        throw new NotYetImplementedException();
+        // Not in UML 2.x - deprecated in Model API
+        throw new NotImplementedException();
     }
 
     public Object getSendAction() {
@@ -422,7 +427,7 @@
 
     public Object getSimpleState() {
         // TODO: Gone in UML 2.1
-        return null;
+        return State.class;
     }
 
     public Object getState() {
@@ -449,23 +454,23 @@
 
     public Object getStubState() {
         // TODO: gone in UML 2.1
-        return null;
+        return State.class;
     }
 
     public Object getSubactivityState() {
         // TODO: ActionState, CallState, and SubactivityState have been replaced
         // in UML 2.0 by explicitly modeled Actions
-        return null;
+        return State.class;
     }
 
     public Object getSubmachineState() {
         // TODO: gone in UML 2.1
-        return null;
+        return State.class;
     }
 
     public Object getSubsystem() {
-        // TODO Auto-generated method stub
-        return null;
+        // TODO: Changed in UML 2.1 - Package with <<subsystem>> stereotype?
+        return org.eclipse.uml2.uml.Package.class;
     }
 
     public Object getSynchState() {
@@ -502,8 +507,7 @@
     }
 
     public Object getVisibilityKind() {
-        // TODO Auto-generated method stub
-        throw new NotYetImplementedException();
+        return VisibilityKind.class;
     }
 
 }

Modified: trunk/src/model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java?view=diff&rev=12775&p1=trunk/src/model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java&p2=trunk/src/model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java&r1=12774&r2=12775
==============================================================================
--- trunk/src/model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java	(original)
+++ trunk/src/model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java	2007-06-08 00:43:13-0700
@@ -29,9 +29,13 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
 import java.util.Vector;
 
 import org.argouml.model.ModelManagementHelper;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
 import org.eclipse.uml2.uml.Namespace;
 
 
@@ -67,8 +71,7 @@
     }
 
     public Collection getAllContents(Object namespace) {
-        // TODO Auto-generated method stub
-        return null;
+        return ((Element) namespace).allOwnedElements();
     }
 
     public Collection getAllImportedElements(Object pack) {
@@ -149,6 +152,7 @@
         }
         return false;
     }
+    
     public Collection getAllModelElementsOfKind(Object nsa, String kind) {
         try {
             return getAllModelElementsOfKind(nsa, Class.forName(kind));
@@ -175,8 +179,13 @@
     }
 
     public Collection getAllNamespaces(Object ns) {
-        // TODO Auto-generated method stub
-        return null;
+        Set<Element> results = new HashSet<Element>();
+        for (Element element : ((Namespace) ns).allOwnedElements()) {
+            if (element instanceof Namespace) {
+                results.add(element);
+            }
+        }
+        return results;
     }
 
     public Collection getAllPossibleImports(Object pack) {
@@ -190,8 +199,7 @@
     }
 
     public Collection getAllSurroundingNamespaces(Object ns) {
-        // TODO Auto-generated method stub
-        return null;
+        return ((NamedElement) ns).allNamespaces();
     }
 
     public Collection getContents(Object namespace) {

Modified: trunk/src/model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java?view=diff&rev=12775&p1=trunk/src/model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java&p2=trunk/src/model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java&r1=12774&r2=12775
==============================================================================
--- trunk/src/model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java	(original)
+++ trunk/src/model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java	2007-06-08 00:43:13-0700
@@ -27,6 +27,7 @@
 package org.argouml.model.euml;
 
 import org.argouml.model.StateMachinesFactory;
+import org.eclipse.uml2.uml.UMLFactory;
 
 /**
  * The implementation of the StateMachinesFactory for EUML2.
@@ -175,15 +176,11 @@
     }
 
     public Object createCallEvent() {
-        // TODO: Auto-generated method stub
-        throw new NotYetImplementedException();
-
+        return UMLFactory.eINSTANCE.createCallEvent();
     }
 
     public Object createChangeEvent() {
-        // TODO: Auto-generated method stub
-        throw new NotYetImplementedException();
-
+        return UMLFactory.eINSTANCE.createChangeEvent();
     }
 
     public Object createCompositeState() {
@@ -205,15 +202,11 @@
     }
 
     public Object createPseudostate() {
-        // TODO: Auto-generated method stub
-        throw new NotYetImplementedException();
-
+        return UMLFactory.eINSTANCE.createPseudostate();
     }
 
     public Object createSignalEvent() {
-        // TODO: Auto-generated method stub
-        throw new NotYetImplementedException();
-
+        return UMLFactory.eINSTANCE.createSignalEvent();
     }
 
     public Object createSimpleState() {
@@ -223,9 +216,7 @@
     }
 
     public Object createStateMachine() {
-        // TODO: Auto-generated method stub
-        throw new NotYetImplementedException();
-
+        return UMLFactory.eINSTANCE.createStateMachine();
     }
 
     public Object createStubState() {
@@ -247,15 +238,11 @@
     }
 
     public Object createTimeEvent() {
-        // TODO: Auto-generated method stub
-        throw new NotYetImplementedException();
-
+        return UMLFactory.eINSTANCE.createTimeEvent();
     }
 
     public Object createTransition() {
-        // TODO: Auto-generated method stub
-        throw new NotYetImplementedException();
-
+        return UMLFactory.eINSTANCE.createTransition();
     }
 
 }

Modified: trunk/src/model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java?view=diff&rev=12775&p1=trunk/src/model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java&p2=trunk/src/model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java&r1=12774&r2=12775
==============================================================================
--- trunk/src/model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java	(original)
+++ trunk/src/model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java	2007-06-08 00:43:13-0700
@@ -300,8 +300,8 @@
     }
 
     public void delete(Object elem) {
-        // TODO Auto-generated method stub
-        throw new NotYetImplementedException();
+        // TODO: Not sure if there's more to do here - tfm
+        ((Element) elem).destroy();
     }
 
     public boolean isConnectionType(Object connectionType) {

Modified: trunk/src/model-euml/src/org/argouml/model/euml/UseCasesFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-euml/src/org/argouml/model/euml/UseCasesFactoryEUMLImpl.java?view=diff&rev=12775&p1=trunk/src/model-euml/src/org/argouml/model/euml/UseCasesFactoryEUMLImpl.java&p2=trunk/src/model-euml/src/org/argouml/model/euml/UseCasesFactoryEUMLImpl.java&r1=12774&r2=12775
==============================================================================
--- trunk/src/model-euml/src/org/argouml/model/euml/UseCasesFactoryEUMLImpl.java	(original)
+++ trunk/src/model-euml/src/org/argouml/model/euml/UseCasesFactoryEUMLImpl.java	2007-06-08 00:43:13-0700
@@ -31,6 +31,7 @@
 import org.eclipse.uml2.uml.Extend;
 import org.eclipse.uml2.uml.ExtensionPoint;
 import org.eclipse.uml2.uml.Include;
+import org.eclipse.uml2.uml.InstanceSpecification;
 import org.eclipse.uml2.uml.Namespace;
 import org.eclipse.uml2.uml.UMLFactory;
 import org.eclipse.uml2.uml.UseCase;
@@ -56,65 +57,70 @@
         modelImpl = implementation;
     }
 
-    public Object buildActor(Object actor, Object model) {
+    public Actor buildActor(Object actor, Object model) {
         Namespace ns = ((Actor) actor).getNamespace();
         if (ns == null) {
             ns = (Namespace) model;
         }
         Actor actor2 = (Actor) createActor();
-//        actor2.setNamespace(ns);
-        ns.getOwnedElements().add(actor2);
+        modelImpl.getCoreHelper().addOwnedElement(ns, actor2);
         actor2.setIsLeaf(false);
 //        actor2.setIsRoot(false);
         return actor2;
     }
 
-    public Object buildExtend(Object abase, Object anextension) {
-        // TODO Auto-generated method stub
-        return null;
+    public Extend buildExtend(Object abase, Object anextension) {
+        return buildExtend(abase, anextension, null);
     }
 
-    public Object buildExtend(Object abase, Object anextension, Object apoint) {
-        Extend ext = (Extend) createExtend();
-        // TODO Auto-generated method stub
-        return null;
+    public Extend buildExtend(Object abase, Object anextension, Object apoint) {
+        ExtensionPoint ep;
+        if (apoint == null) {
+            ep = buildExtensionPoint((UseCase) abase);
+        } else {
+            ep = (ExtensionPoint) apoint;
+            if (ep.getUseCase().equals(abase)) {
+                throw new IllegalArgumentException(
+                        "extension point must belong to extended use case");
+            }
+        }
+        Extend extend =
+                ((UseCase) anextension).createExtend(null, (UseCase) abase);
+        extend.getExtensionLocations().add(ep);
+        return extend;
     }
 
-    public Object buildExtensionPoint(Object modelElement) {
-        ExtensionPoint ep = (ExtensionPoint) createExtensionPoint();
-        ((UseCase) modelElement).getExtensionPoints().add(ep);
-        return ep;
+    public ExtensionPoint buildExtensionPoint(Object modelElement) {
+        return ((UseCase) modelElement).createExtensionPoint(null);
     }
 
-    public Object buildInclude(Object abase, Object anaddition) {
-        Include inc = (Include) createInclude();
-        // TODO Auto-generated method stub
-        return inc;
+    public Include buildInclude(Object abase, Object anaddition) {
+        return ((UseCase) anaddition).createInclude(null, (UseCase) abase);
     }
 
-    public Object createActor() {
+    public Actor createActor() {
         return UMLFactory.eINSTANCE.createActor();
     }
 
-    public Object createExtend() {
+    public Extend createExtend() {
         return UMLFactory.eINSTANCE.createExtend();
     }
 
-    public Object createExtensionPoint() {
+    public ExtensionPoint createExtensionPoint() {
         return UMLFactory.eINSTANCE.createExtensionPoint();
     }
 
-    public Object createInclude() {
+    public Include createInclude() {
         return UMLFactory.eINSTANCE.createInclude();
     }
     
-    public Object createUseCase() {
+    public UseCase createUseCase() {
         return UMLFactory.eINSTANCE.createUseCase();
     }
 
-    public Object createUseCaseInstance() {
-        // TODO Auto-generated method stub
-        return null;
+    public InstanceSpecification createUseCaseInstance() {
+        // TODO: double check this - tfm 
+        return UMLFactory.eINSTANCE.createInstanceSpecification();
     }
 
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.