svn commit: r12786 - trunk/src/model/src/org/argouml/model

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

Modified:
   trunk/src/model/src/org/argouml/model/CoreFactory.java
   trunk/src/model/src/org/argouml/model/Facade.java
   trunk/src/model/src/org/argouml/model/UseCasesFactory.java

Log:
More UML 2.x related API & Javadoc updates

Modified: trunk/src/model/src/org/argouml/model/CoreFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/CoreFactory.java?view=diff&rev=12786&p1=trunk/src/model/src/org/argouml/model/CoreFactory.java&p2=trunk/src/model/src/org/argouml/model/CoreFactory.java&r1=12785&r2=12786
==============================================================================
--- trunk/src/model/src/org/argouml/model/CoreFactory.java	(original)
+++ trunk/src/model/src/org/argouml/model/CoreFactory.java	2007-06-08 00:51:31-0700
@@ -500,11 +500,16 @@
 
     /**
      * Builds a generalization between a parent and a child with a given name.
-     *
-     * @param child is the child
-     * @param parent is the parent
-     * @param name is the given name
+     * 
+     * @param child
+     *            is the child
+     * @param parent
+     *            is the parent
+     * @param name
+     *            is the given name
      * @return generalization
+     * @deprecated for 0.25.4 by tfmorris. Generalizations are unnamed in UML
+     *             2.x. Use {@link #buildGeneralization(Object, Object)}.
      */
     Object buildGeneralization(Object child, Object parent, String name);
 
@@ -610,13 +615,13 @@
      * Builds a realization between some supplier (for example an
      * interface in Java) and a client who implements the realization.
      *
-     * @param clnt is the client
-     * @param spplr is the supplier
-     * @param model the namespace to use if client and
+     * @param client is the client
+     * @param supplier is the supplier
+     * @param namespace the namespace to use if client and
      * supplier are of different namespace
      * @return Object the created abstraction
      */
-    Object buildRealization(Object clnt, Object spplr, Object model);
+    Object buildRealization(Object client, Object supplier, Object namespace);
 
     /**
      * Build a TemplateArgument which has the given element as its modelElement.

Modified: trunk/src/model/src/org/argouml/model/Facade.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/Facade.java?view=diff&rev=12786&p1=trunk/src/model/src/org/argouml/model/Facade.java&p2=trunk/src/model/src/org/argouml/model/Facade.java&r1=12785&r2=12786
==============================================================================
--- trunk/src/model/src/org/argouml/model/Facade.java	(original)
+++ trunk/src/model/src/org/argouml/model/Facade.java	2007-06-08 00:51:31-0700
@@ -713,6 +713,17 @@
      * @return true if handle is a ModelElement
      */
     boolean isAModelElement(Object handle);
+    
+    /**
+     * Recognizer for a UML element which can have a name. In UML 1.x, this is
+     * just a ModelElement, but in UML 2.x it's a separate metatype. Use this method
+     * if you're principally interested in whether something can be named.
+     * 
+     * @param handle
+     *            candidate
+     * @return true if handle is a ModelElement
+     */
+    boolean isANamedElement(Object handle);
 
     /**
      * Recognizer for Multiplicity.
@@ -1375,8 +1386,12 @@
     /**
      * Recognizer for ModelElements which have the <<singleton>> Stereotype
      * applied.
-     *
-     * @param handle candidate
+     * <p>
+     * TODO: Moved this out of the Facade to someplace elese since it's not
+     * Model subsystem specific - tfm 20070607
+     * 
+     * @param handle
+     *            candidate
      * @return true if handle is a singleton.
      */
     boolean isSingleton(Object handle);
@@ -1539,13 +1554,27 @@
 
     /**
      * Get the child of a generalization.
-     *
-     * @param handle 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.
      */
     Object getChild(Object handle);
 
     /**
+     * Get the specific end of a generalization. This was getChild() in UML 1.x.
+     * 
+     * @param handle
+     *            generalization.
+     * @return the specific classifier.
+     * @since 0.25.4
+     */
+    Object getSpecific(Object handle);
+    
+    
+    /**
      * Get the children of a GeneralizableElement.
      *
      * @param handle the GeneralizableElement.
@@ -1971,9 +2000,12 @@
 
     /**
      * Get the Ranges from a Multiplicity.
-     *
-     * @param handle multiplicity to retrieve from.
+     * 
+     * @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.
      */
     Iterator getRanges(Object handle);
 
@@ -2186,9 +2218,12 @@
 
     /**
      * Get the discriminator for a Generalization.
-     *
-     * @param handle the Generalization
+     * 
+     * @param handle
+     *            the Generalization
      * @return the discriminator a String
+     * @deprecated for 0.25.4 by tfmorris. Discriminators have been removed from
+     *             UML 2.x.
      */
     Object getDiscriminator(Object handle);
 
@@ -2488,13 +2523,26 @@
 
     /**
      * Get the parent of a generalization.
-     *
-     * @param handle 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.
      */
     Object getParent(Object handle);
 
     /**
+     * Get the general end of a generalization. This was getParent in UML 1.x.
+     * 
+     * @param handle
+     *            generalization.
+     * @return the general end.
+     * @since 0.25.4
+     */
+    Object getGeneral(Object handle);
+    
+    /**
      * Return the raised signals of an operation.
      *
      * @param handle the operation

Modified: trunk/src/model/src/org/argouml/model/UseCasesFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/UseCasesFactory.java?view=diff&rev=12786&p1=trunk/src/model/src/org/argouml/model/UseCasesFactory.java&p2=trunk/src/model/src/org/argouml/model/UseCasesFactory.java&r1=12785&r2=12786
==============================================================================
--- trunk/src/model/src/org/argouml/model/UseCasesFactory.java	(original)
+++ trunk/src/model/src/org/argouml/model/UseCasesFactory.java	2007-06-08 00:51:31-0700
@@ -123,12 +123,15 @@
     Object buildInclude(Object abase, Object anaddition);
 
     /**
-     * Builds an actor in the same namespace of the given actor. If
-     * object is no actor nothing is build.<p>
+     * Builds an actor in the same namespace as the given actor. If
+     * the object is not and actor nothing is built.<p>
+     * 
+     * TODO: This shouldn't just silently fail if it is passed a bad
+     * argument.  This contract will change. - tfm 20070607
      *
      * @param model The namespace.
      * @param actor the given actor
-     * @return MActor the newly build actor
+     * @return Actor the newly built actor
      */
     Object buildActor(Object actor, Object model);
 }
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.