svn commit: r16250 - trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreFactoryMDRImpl.java
Bob Tarling <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: bobtarling
Date: 2008-12-05 01:51:49-0800
New Revision: 16250
Modified:
trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreFactoryMDRImpl.java
Log:
Remove and adjustments or WFR regarding association direction for interfaces
Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreFactoryMDRImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreFactoryMDRImpl.java?view=diff&pathrev=16250&r1=16249&r2=16250
==============================================================================
--- trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreFactoryMDRImpl.java (original)
+++ trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreFactoryMDRImpl.java 2008-12-05 01:51:49-0800
@@ -488,19 +488,8 @@
assoc.setName("");
assoc.setNamespace(ns);
- boolean nav1 = true;
- boolean nav2 = true;
-
- if (from instanceof Interface) {
- nav2 = false;
- agg2 = agg1;
- agg1 = null;
- } else if (to instanceof Interface) {
- nav1 = false;
- } else {
- nav1 = !Boolean.TRUE.equals(unidirectional);
- nav2 = true;
- }
+ final boolean nav1 = !unidirectional;
+ final boolean nav2 = true;
buildAssociationEnd(assoc, null, from, null, null, nav1, null, agg1,
null, null, null);
@@ -592,25 +581,6 @@
throw new IllegalArgumentException("VisibilityKind");
}
- if (type instanceof DataType || type instanceof Interface) {
- if (!navigable) {
- throw new IllegalArgumentException(
- "Wellformedness rule 2.5.3.3 [1] is broken. "
- + "The Classifier of an AssociationEnd cannot"
- + "be an Interface or a DataType if the "
- + "association is navigable away from "
- + "that end.");
- }
- List<AssociationEnd> ends = new ArrayList<AssociationEnd>();
- ends.addAll(((UmlAssociation) assoc).getConnection());
- for (AssociationEnd end : ends) {
- if (end.isNavigable()) {
- throw new IllegalArgumentException("type is either "
- + "datatype or " + "interface and is "
- + "navigable to");
- }
- }
- }
if (aggregation != null
&& aggregation.equals(AggregationKindEnum.AK_COMPOSITE)
&& multi != null && getMaxUpper((Multiplicity) multi) > 1) {
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=979997
To unsubscribe from this discussion, e-mail: [[email protected]].