svn commit: r16301 - trunk/src: argouml-core-model-euml/src/org/argouml/model/euml argouml-core-model-mdr/src/org/argouml/model/mdr argouml-core-model/src/org/argouml/model

Tom Morris <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2008-12-07 13:34:09-0800
New Revision: 16301

Modified:
   trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
   trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java
   trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java
   trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/MetaTypesMDRImpl.java
   trunk/src/argouml-core-model/src/org/argouml/model/Facade.java
   trunk/src/argouml-core-model/src/org/argouml/model/MetaTypes.java

Log:
Remove deprecated Permission, ownerScope, getChild/Parent

Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java?view=diff&pathrev=16301&r1=16300&r2=16301
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java	(original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java	2008-12-07 13:34:09-0800
@@ -35,7 +35,6 @@
 import java.util.Set;
 
 import org.argouml.model.Facade;
-import org.argouml.model.NotImplementedException;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EStructuralFeature;
 import org.eclipse.emf.ecore.resource.Resource;
@@ -341,11 +340,6 @@
                 .getChangeableKind().getChangeable();
     }
 
-    @SuppressWarnings("deprecation")
-    public Object getChild(Object handle) {
-        return getSpecific(handle);
-    }
-
     public Object getSpecific(Object handle) {
         if (!(handle instanceof Generalization)) {
             throw new IllegalArgumentException(
@@ -940,14 +934,6 @@
         return ((Element) handle).getOwner();
     }
 
-    @SuppressWarnings("deprecation")
-    public Object getOwnerScope(Object handle) {
-        // Removed from UML 2.x and deprecated in Model API
-        // so we won't implement it
-//        throw new NotImplementedException();
-        return null;
-    }
-
     public Namespace getPackage(Object handle) {
         if (!(handle instanceof ElementImport)) {
             throw new IllegalArgumentException();
@@ -979,14 +965,6 @@
         throw new NotYetImplementedException();
     }
 
-    @SuppressWarnings("deprecation")
-    public Classifier getParent(Object handle) {
-        if (!(handle instanceof Generalization)) {
-            throw new IllegalArgumentException();
-        }
-        return ((Generalization) handle).getGeneral();
-    }
-
     public Classifier getGeneral(Object handle) {
         if (!(handle instanceof Generalization)) {
             throw new IllegalArgumentException();
@@ -1021,11 +999,6 @@
         throw new NotYetImplementedException();
     }
 
-    public Iterator getRanges(Object handle) {
-        // Multiplicities only have a single range in UML 2.x
-        throw new NotImplementedException();
-    }
-
     public Collection getReceivedMessages(Object handle) {
         throw new NotYetImplementedException();
     }
@@ -1120,7 +1093,8 @@
         if (!(handle instanceof Classifier)) {
             throw new IllegalArgumentException();
         }
-        return ((Classifier) handle).getTargetDirectedRelationships(UMLPackage.Literals.GENERALIZATION);
+        return ((Classifier) handle).getTargetDirectedRelationships(
+                UMLPackage.Literals.GENERALIZATION);
     }
 
     public String getSpecification(Object handle) {
@@ -1749,20 +1723,10 @@
     public boolean isAPartition(Object handle) {
         return handle instanceof ActivityPartition;
     }
-
-    @SuppressWarnings("deprecation")
-    public boolean isAPermission(Object handle) {
-        return handle instanceof PackageImport;
-    }
     
     public boolean isAPackageImport(Object handle) {
         return handle instanceof PackageImport;
     }
-    
-    @SuppressWarnings("deprecation")
-    public boolean isAPrimitive(Object handle) {
-        return isAPrimitiveType(handle);
-    }
 
     public boolean isAPrimitiveType(Object handle) {
         return handle instanceof PrimitiveType;

Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java?view=diff&pathrev=16301&r1=16300&r2=16301
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java	(original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java	2008-12-07 13:34:09-0800
@@ -412,11 +412,6 @@
         return ActivityPartition.class;
     }
 
-    @SuppressWarnings("deprecation")
-    public Object getPermission() {
-        return PackageImport.class;
-    }
-
     public Object getPackageImport() {
         return PackageImport.class;
     }

Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java?view=diff&pathrev=16301&r1=16300&r2=16301
==============================================================================
--- trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java	(original)
+++ trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/FacadeMDRImpl.java	2008-12-07 13:34:09-0800
@@ -559,11 +559,6 @@
         return handle instanceof Partition;
     }
 
-    @SuppressWarnings("deprecation")
-    public boolean isAPermission(Object handle) {
-        return handle instanceof Permission;
-    }
-
     public boolean isAPackageImport(Object handle) {
         return handle instanceof Permission;
     }
@@ -1340,13 +1335,6 @@
         }
     }
 
-    
-    @SuppressWarnings("deprecation")
-    public Object getChild(Object handle) {
-        return getSpecific(handle);
-    }
-
-
     public Object getSpecific(Object handle) {
         try {
             if (handle instanceof Generalization) {
@@ -2113,21 +2101,6 @@
         return illegalArgumentObject(handle);
     }
 
-
-    @SuppressWarnings("deprecation")
-    public Iterator getRanges(Object handle) {
-        try {
-            if (handle instanceof Multiplicity) {
-                Collection c = ((Multiplicity) handle).getRange();
-                return c.iterator();
-            }
-        } catch (InvalidObjectException e) {
-            throw new InvalidElementException(e);
-        }
-        throw new IllegalArgumentException("handle: " + handle);
-    }
-
-
     public Collection<Comment> getComments(Object handle) {
         try {
             if (handle instanceof ModelElement) {
@@ -2830,19 +2803,6 @@
         }
     }
 
-
-    @SuppressWarnings("deprecation")
-    public Object getOwnerScope(Object handle) {
-        try {
-            if (handle instanceof Feature) {
-                return ((Feature) handle).getOwnerScope();
-            }
-        } catch (InvalidObjectException e) {
-            throw new InvalidElementException(e);
-        }
-        return illegalArgumentObject(handle);
-    }
-    
     
     public boolean isStatic(Object handle) {
         try {
@@ -2988,11 +2948,6 @@
         return illegalArgumentList(handle);
     }
 
-
-    @SuppressWarnings("deprecation")
-    public Object getParent(Object handle) {
-        return getGeneral(handle);
-    }
     
     public Object getGeneral(Object handle) {
         try {

Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/MetaTypesMDRImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/MetaTypesMDRImpl.java?view=diff&pathrev=16301&r1=16300&r2=16301
==============================================================================
--- trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/MetaTypesMDRImpl.java	(original)
+++ trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/MetaTypesMDRImpl.java	2008-12-07 13:34:09-0800
@@ -406,11 +406,6 @@
         return Partition.class;
     }
 
-    @SuppressWarnings("deprecation")
-    public Object getPermission() {
-        return Permission.class;
-    }
-
     public Object getPackageImport() {
         return Permission.class;
     }

Modified: trunk/src/argouml-core-model/src/org/argouml/model/Facade.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model/src/org/argouml/model/Facade.java?view=diff&pathrev=16301&r1=16300&r2=16301
==============================================================================
--- trunk/src/argouml-core-model/src/org/argouml/model/Facade.java	(original)
+++ trunk/src/argouml-core-model/src/org/argouml/model/Facade.java	2008-12-07 13:34:09-0800
@@ -762,19 +762,6 @@
     boolean isAPartition(Object handle);
 
     /**
-     * Recognizer for Permission.
-     * 
-     * @param handle
-     *                candidate
-     * @return true if handle is an Permission
-     * @deprecated for 0.25.4 by tfmorris. Removed from UML 2.x. Use
-     *             {@link #isAPackageImport(Object)}.
-     * 
-     */
-    @Deprecated
-    boolean isAPermission(Object handle);
-
-    /**
      * Recognizer for PackageImport (was Permission in UML 1.x).
      * 
      * @param handle
@@ -1460,17 +1447,6 @@
     @Deprecated
     Object getChangeability(Object handle);
 
-    /**
-     * Get the child of a generalization.
-     * 
-     * @param handle
-     *            generalization.
-     * @return the child.
-     * @deprecated for 0.25.4 by tfmorris. Use {@link #getSpecific(Object)}
-     *             which matches the UML 2.x terminology.
-     */
-    @Deprecated
-    Object getChild(Object handle);
 
     /**
      * Get the specific end of a generalization. This was getChild() in UML 1.x.
@@ -1946,18 +1922,6 @@
     Object getMultiplicity(Object handle);
 
     /**
-     * Get the Ranges from a Multiplicity.
-     * 
-     * @param handle
-     *            multiplicity to retrieve from.
-     * @return iterator containing ranges
-     * @deprecated for 0.25.4 by tfmorris. Multiplicities in UML 2.x only have a
-     *             single range.
-     */
-    @Deprecated
-    Iterator getRanges(Object handle);
-
-    /**
      * Get the Comments which annotate a ModelElement.
      *
      * @param handle the ModelElement that we are getting the comments of
@@ -2358,19 +2322,6 @@
     Collection getOwnedElements(Object handle);
 
     /**
-     * Get the owner scope of a feature.
-     * 
-     * @param handle
-     *            feature
-     * @return owner scope
-     * @deprecated for 0.25.4 by tfmorris. Use {@link #isStatic(Object)}. The
-     *             ScopeKind with only two enumerated values has been replaced
-     *             by a boolean in UML 2.x.
-     */
-    @Deprecated
-    Object getOwnerScope(Object handle);
-
-    /**
      * Get the powertype of a generalization.
      *
      * @param handle generalization
@@ -2462,17 +2413,6 @@
      */
     List getParametersList(Object handle);
 
-    /**
-     * Get the parent of a generalization.
-     * 
-     * @param handle
-     *            generalization.
-     * @return the parent.
-     * @deprecated for 0.25.4 by tfmorris. Use {@link #getGeneral(Object)} which
-     *             matches the UML 2.x terminology.
-     */
-    @Deprecated
-    Object getParent(Object handle);
 
     /**
      * Get the general end of a generalization. This was getParent in UML 1.x.

Modified: trunk/src/argouml-core-model/src/org/argouml/model/MetaTypes.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model/src/org/argouml/model/MetaTypes.java?view=diff&pathrev=16301&r1=16300&r2=16301
==============================================================================
--- trunk/src/argouml-core-model/src/org/argouml/model/MetaTypes.java	(original)
+++ trunk/src/argouml-core-model/src/org/argouml/model/MetaTypes.java	2008-12-07 13:34:09-0800
@@ -364,13 +364,6 @@
     Object getPartition();
 
     /**
-     * @return Returns the Permission.
-     * @deprecated for 0.25.4 by tfmorris. Removed for UML 2.x. Use
-     *             {@link #getPackageImport()}.
-     */
-    Object getPermission();
-
-    /**
      * @return Return the PackageImport type.
      * @since UML 2.0
      */

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=980912

To unsubscribe from this discussion, e-mail: [[email protected]].
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.