Added ability to make aggregate relationships navigable

The @has and @composed now also have corresponding @navhas
and @navcomposed relationships.

Contributed by: Alan Jeffrey.
This commit is contained in:
Diomidis Spinellis 2012-04-23 18:30:50 +00:00
parent 6fcc5df6ef
commit d54d8bf7da
4 changed files with 15 additions and 9 deletions

View File

@ -22,14 +22,12 @@ collaborations, and packages
</li>
<li>generalization relationships (specified using the Java <code>extends</code> declaration or (for multiple inheritance) the <em>javadoc</em> <code>@extends</code> tag)
</li>
<li>association relationships (specified using the <em>javadoc</em> <code>@assoc</code> tag)
</li>
<li>navigatable (directed) association relationships (specified using the <em>javadoc</em> <code>@navassoc</code> tag)
</li>
<li>aggregation relationships (specified using the <em>javadoc</em> <code>@has</code> tag)
</li>
<li>composition relationships (specified using the <em>javadoc</em> <code>@composed</code> tag)
</li>
<li>association relationships (specified using the <em>javadoc</em> <code>@assoc</code> tag) </li>
<li>navigable (directed) association relationships (specified using the <em>javadoc</em> <code>@navassoc</code> tag) </li>
<li>aggregation relationships (specified using the <em>javadoc</em> <code>@has</code> tag) </li>
<li>navigable aggregation relationships (specified using the <em>javadoc</em> <code>@navhas</code> tag) </li>
<li>composition relationships (specified using the <em>javadoc</em> <code>@composed</code> tag) </li>
<li>navigable composition relationships (specified using the <em>javadoc</em> <code>@navcomposed</code> tag) </li>
<li>dependency relationships (specified using the <em>javadoc</em> <code>@depend</code> tag)
</li>
</ul>

View File

@ -5,6 +5,10 @@
<dt>Version 5.5 Under development </dt><dd>
<ul>
<li>Added ability to make aggregate relationships (<code>@has</code> and
</code>@composed</code>) navigable through the new <code>@navhas</code>
and <code>@navcomposed</code> relationships.
(Contributed by Alan Jeffrey.)</li>
<li>Make UMLGraphDoc generation compatible with JDK 7
(Contributed by Stefano Martina.)</li>
<li>Various documentation improvements.</li>

View File

@ -74,7 +74,9 @@ class ClassGraph {
associationMap.put(RelationType.ASSOC, "arrowhead=none");
associationMap.put(RelationType.NAVASSOC, "arrowhead=open");
associationMap.put(RelationType.HAS, "arrowhead=none, arrowtail=ediamond, dir=both");
associationMap.put(RelationType.NAVHAS, "arrowhead=open, arrowtail=ediamond, dir=both");
associationMap.put(RelationType.COMPOSED, "arrowhead=none, arrowtail=diamond, dir=both");
associationMap.put(RelationType.NAVCOMPOSED, "arrowhead=open, arrowtail=diamond, dir=both");
associationMap.put(RelationType.DEPEND, "arrowhead=open, style=dashed");
}
protected Map<String, ClassInfo> classnames = new HashMap<String, ClassInfo>();
@ -757,7 +759,9 @@ class ClassGraph {
allRelation(opt, RelationType.ASSOC, c);
allRelation(opt, RelationType.NAVASSOC, c);
allRelation(opt, RelationType.HAS, c);
allRelation(opt, RelationType.NAVHAS, c);
allRelation(opt, RelationType.COMPOSED, c);
allRelation(opt, RelationType.NAVCOMPOSED, c);
allRelation(opt, RelationType.DEPEND, c);
}

View File

@ -6,5 +6,5 @@ package org.umlgraph.doclet;
*
*/
public enum RelationType {
ASSOC, NAVASSOC, HAS, COMPOSED, DEPEND, EXTENDS, IMPLEMENTS;
ASSOC, NAVASSOC, HAS, NAVHAS, COMPOSED, NAVCOMPOSED, DEPEND, EXTENDS, IMPLEMENTS;
}