mirror of https://github.com/dspinellis/UMLGraph
Converted to XHTML 1.0
This commit is contained in:
parent
032a11ee05
commit
1b0ec453d3
203
index.html
203
index.html
|
|
@ -1,12 +1,15 @@
|
|||
<!doctype html public "-//IETF//DTD HTML//EN">
|
||||
<?xml version="1.0" encoding="us-ascii"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- No not edit this page in the web directory. -->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>UMLGraph - Declarative Drawing of UML diagrams</TITLE>
|
||||
<META NAME="AUTHOR" CONTENT="Diomidis Spinellis">
|
||||
</HEAD>
|
||||
<head>
|
||||
<title>UMLGraph - Declarative Drawing of UML diagrams</title>
|
||||
<meta name="AUTHOR" content="Diomidis Spinellis" />
|
||||
</head>
|
||||
<body>
|
||||
<h1 align=right><tt><font color="#ff0000">UMLGraph dds</font></tt></h1>
|
||||
<h1 align="right"><tt><font color="#ff0000">UMLGraph dds</font></tt></h1>
|
||||
<h2>UMLGraph - Declarative Drawing of UML diagrams</h2>
|
||||
<!-- Introduction {{{1 -->
|
||||
UMLGraph allows the declarative specification and drawing of
|
||||
|
|
@ -19,7 +22,7 @@ a
|
|||
<a href="http://www.research.att.com/sw/tools/graphviz/">Graphviz</a>
|
||||
diagram specification that can be automatically processed to
|
||||
create Postscript, GIF, SVG, JPEG, fig, or Framemaker drawings.
|
||||
<p>
|
||||
<p />
|
||||
The following is an example of a specification and the resulting UML
|
||||
diagram:
|
||||
<table>
|
||||
|
|
@ -34,20 +37,23 @@ class Employee extends Person {}
|
|||
class Client extends Person {}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="simple.gif">
|
||||
</tr></table>
|
||||
<p>
|
||||
<img src="simple.gif" alt="Simple UML class diagram" />
|
||||
</td></tr></table>
|
||||
<p />
|
||||
<b>See also</b>
|
||||
<ul>
|
||||
<li> <A NAME="Spi03e"> </A>Diomidis Spinellis.
|
||||
<A HREF="../../pubs/jrnl/2003-IEEESW-umlgraph/html/article.html">On the declarative specification of models</A>.
|
||||
<CITE>IEEE Software</CITE>, 20(2):94-96, March/April 2003.
|
||||
<li> <a name="Spi03e"> </a>Diomidis Spinellis.
|
||||
<a href="../../pubs/jrnl/2003-IEEESW-umlgraph/html/article.html">On the declarative specification of models</a>.
|
||||
<cite>IEEE Software</cite>, 20(2):94-96, March/April 2003.
|
||||
</li>
|
||||
<li> Diomidis Spinellis.
|
||||
<A HREF="http://www.spinellis.gr/codereading">Code Reading: The Open Source Perspective</A>.
|
||||
<a href="http://www.spinellis.gr/codereading">Code Reading: The Open Source Perspective</a>.
|
||||
Addison Wesley, 2003.
|
||||
</li>
|
||||
<li> Adam Feuer's
|
||||
<a href="http://www.zipcon.net/~adamf/software/PyUMLGraph/">PyUMLGraph</a>
|
||||
extending the concept to Python programs.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
@ -73,7 +79,7 @@ In theory you can also use UMLGraph to reverse engineer existing
|
|||
Java code.
|
||||
Note however that UMLGraph is not designed for this purpose;
|
||||
the resulting graphs may be large and unwieldy.
|
||||
<p>
|
||||
<p />
|
||||
UMLGraph is implemented as a <em>javadoc</em> doclet (a program satisfying the
|
||||
doclet API that specifies the content and format of the output
|
||||
generated by the <em>javadoc</em> tool).
|
||||
|
|
@ -108,24 +114,40 @@ or adjusting the UMLGraph output.
|
|||
UMLGraph allows you to model
|
||||
<ul>
|
||||
<li>classes (specified as Java classes)
|
||||
</li>
|
||||
<li>attributes (specified as Java fields)
|
||||
</li>
|
||||
<li>operations (specified as Java methods)
|
||||
</li>
|
||||
<li>stereotypes (using the <code>@stereotype</code> <em>name</em> tag)
|
||||
</li>
|
||||
<li>tagged values (using the <code>@tagvalue</code> <em>name</em> <em>value</em> tag)
|
||||
</li>
|
||||
<li>implementation relationships (specified using the Java <code>implements</code> declaration)
|
||||
</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>dependency relationships (specified using the <em>javadoc</em> <code>@depend</code> tag)
|
||||
</li>
|
||||
</ul>
|
||||
All relationship tags appart from <code>@extends</code> take four arguments:
|
||||
<ol>
|
||||
<li> The source adornments (role, multiplicity, and visibility)
|
||||
</li>
|
||||
<li> The relationship name
|
||||
</li>
|
||||
<li> The target adornments (role, multiplicity, and visibility)
|
||||
</li>
|
||||
<li> The target class
|
||||
</li>
|
||||
</ol>
|
||||
Arguments can be space-separated, or enclosed in quotes if they
|
||||
need to contain the space character.
|
||||
|
|
@ -156,42 +178,61 @@ class Body {}
|
|||
class Car {}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="car.gif">
|
||||
</tr></table>
|
||||
<img src="car.gif" alt="UML relationship diagram" />
|
||||
</td></tr></table>
|
||||
|
||||
<h3>Program Options</h3> <!-- {{{1 -->
|
||||
A number of command-line options contol the operation of UMLGraph:
|
||||
<dl>
|
||||
<dt>-output<dd>Specify the output file name (default <code>graph.dot</code>).
|
||||
<dt>-qualify<dd>Produce fully-qualified class names.
|
||||
<dt>-horizontal<dd>Layout the graph in the horizontal direction.
|
||||
<dt>-attributes<dd>Show class attributes (Java fields)
|
||||
<dt>-operations<dd>Show class operations (Java methods)
|
||||
<dt>-visibility<dd>Adorn class elements according to their
|
||||
<dt>-output</dt><dd>Specify the output file name (default <code>graph.dot</code>).
|
||||
</dd>
|
||||
<dt>-qualify</dt><dd>Produce fully-qualified class names.
|
||||
</dd>
|
||||
<dt>-horizontal</dt><dd>Layout the graph in the horizontal direction.
|
||||
</dd>
|
||||
<dt>-attributes</dt><dd>Show class attributes (Java fields)
|
||||
</dd>
|
||||
<dt>-operations</dt><dd>Show class operations (Java methods)
|
||||
</dd>
|
||||
<dt>-visibility</dt><dd>Adorn class elements according to their
|
||||
visibility (private, public, protected)
|
||||
<dt>-types<dd>Add type information to attributes and operations
|
||||
<dt>-all<dd>Same as
|
||||
</dd>
|
||||
<dt>-types</dt><dd>Add type information to attributes and operations
|
||||
</dd>
|
||||
<dt>-all</dt><dd>Same as
|
||||
<code>-attributes</code>
|
||||
<code>-operations</code>
|
||||
<code>-visibility</code>
|
||||
<code>-types</code>
|
||||
<dt>-nodefillcolor<dd>Specify the color to use to fill the shapes.
|
||||
<dt>-nodefontname<dd>Specify the font name to use inside nodes.
|
||||
<dt>-nodefontabstractname<dd>Specify the font name to use
|
||||
</dd>
|
||||
<dt>-nodefillcolor</dt><dd>Specify the color to use to fill the shapes.
|
||||
</dd>
|
||||
<dt>-nodefontname</dt><dd>Specify the font name to use inside nodes.
|
||||
</dd>
|
||||
<dt>-nodefontabstractname</dt><dd>Specify the font name to use
|
||||
inside abstract class nodes.
|
||||
<dt>-nodefontsize<dd>Specify the font size to use inside nodes.
|
||||
<dt>-nodefontcolor<dd>Specify the font color to use inside nodes.
|
||||
<dt>-edgefontname<dd>Specify the font name to use for edge labels.
|
||||
<dt>-edgefontsize<dd>Specify the font size to use for edge labels.
|
||||
<dt>-edgefontcolor<dd>Specify the font color to use for edge labels.
|
||||
<dt>-edgecolor<dd>Specify the color for drawing edges.
|
||||
<dt>-bgcolor<dd>Specify the graph's background color.
|
||||
<dt>-hide<dd>Specify entities to hide from the graph.
|
||||
</dd>
|
||||
<dt>-nodefontsize</dt><dd>Specify the font size to use inside nodes.
|
||||
</dd>
|
||||
<dt>-nodefontcolor</dt><dd>Specify the font color to use inside nodes.
|
||||
</dd>
|
||||
<dt>-edgefontname</dt><dd>Specify the font name to use for edge labels.
|
||||
</dd>
|
||||
<dt>-edgefontsize</dt><dd>Specify the font size to use for edge labels.
|
||||
</dd>
|
||||
<dt>-edgefontcolor</dt><dd>Specify the font color to use for edge labels.
|
||||
</dd>
|
||||
<dt>-edgecolor</dt><dd>Specify the color for drawing edges.
|
||||
</dd>
|
||||
<dt>-bgcolor</dt><dd>Specify the graph's background color.
|
||||
</dd>
|
||||
<dt>-hide</dt><dd>Specify entities to hide from the graph.
|
||||
Matching is done against the end of each entity's name.
|
||||
For instance, "<code>-hide Widget</code>" would hide "<code>com.foo.widgets.Widget</code>" and
|
||||
"<code>com.foo.widgets.BigWidget</code>".
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
<p />
|
||||
All colors can be either a symbolic name (e.g. blue),
|
||||
a tripple specifying hue-saturation-brightness as values 0-1
|
||||
(e.g. ".13 0.9 1"),
|
||||
|
|
@ -199,11 +240,11 @@ or a tripple specifying red-green-blue values as hexadecimal
|
|||
digits prefixed by a # (e.g. "#ff8020").
|
||||
The symbolic color names are derived from the X Windows System;
|
||||
you can find a complete list in the Graphviz documentation.
|
||||
<p>
|
||||
<p />
|
||||
Font names are passed directly to the dot graph generation back-end.
|
||||
In general the Postcript standard names Times, Helvetica, Courier, and
|
||||
Symbol are safe to use.
|
||||
<p>
|
||||
<p />
|
||||
Since the options are really a part of the generated graph you
|
||||
want in many cases to include them in the diagram specification.
|
||||
You can do that by adding <em>javadoc</em> <code>@opt</code> tags in front
|
||||
|
|
@ -227,36 +268,45 @@ UMLGraph is hereby made freely available as Open Source Software.
|
|||
You can download it in source and compiled format from the following links:
|
||||
<ul>
|
||||
<li> <a href="UmlGraph.java">UmlGraph.java (source code)</a>
|
||||
</li>
|
||||
<li> <a href="UmlGraph.jar">UmlGraph.jar (compiled archive)</a>
|
||||
</li>
|
||||
<li> <a href="makefile">Makefile example</a> (GNU make)
|
||||
</li>
|
||||
<li> <a href="build.xml">build.xml</a> (to use with <a href="http://ant.apache.org">ant</a>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Version History</h3> <!-- {{{1 -->
|
||||
<dl>
|
||||
<dt>Version 1.24 2003/07/30<dd>
|
||||
<dt>Version 1.24 2003/07/30</dt><dd>
|
||||
Changes by Art Hampton (thanks):
|
||||
<ul>
|
||||
<li> Create the appropriate label for relationship tags when referring to
|
||||
classes which were not parsed by javadoc.
|
||||
</li>
|
||||
<li> New "-hide <matchstring>" option, where <matchstring>
|
||||
matches the end of the name of an entity.
|
||||
Matched entities are removed from the graph.
|
||||
A regular expression matching facility will be added when Java 1.4
|
||||
becomes more widespread.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<dt>Version 1.23 2003/05/7<dd>
|
||||
</dd>
|
||||
<dt>Version 1.23 2003/05/7</dt><dd>
|
||||
Added <code>-output</code> command-line option, and an <em>ant</em>-based
|
||||
build file.
|
||||
Modified the dot output to avoid triggering a graphviz bug that made escape codes visible.
|
||||
|
||||
<dt>Version 1.20 2003/04/25<dd>
|
||||
</dd>
|
||||
<dt>Version 1.20 2003/04/25</dt><dd>
|
||||
Fixes by Nick Efthymiou (thanks):
|
||||
will generate SVG hyperlinks to Javadoc documentation,
|
||||
better handling of abstract class fonts,
|
||||
and correct listing of interfaces.
|
||||
<dt>Version 1.19 2002/09/20<dd>
|
||||
</dd>
|
||||
<dt>Version 1.19 2002/09/20</dt><dd>
|
||||
New options:
|
||||
nodefontname,
|
||||
nodefontabstractname,
|
||||
|
|
@ -268,15 +318,22 @@ edgefontcolor,
|
|||
edgecolor,
|
||||
bgcolor.
|
||||
|
||||
<dt>Version 1.18 2002/08/26<dd>
|
||||
</dd>
|
||||
<dt>Version 1.18 2002/08/26</dt><dd>
|
||||
<ul>
|
||||
<li> Can now specify class-local options.
|
||||
</li>
|
||||
<li> Support for the @tagvalue tag.
|
||||
</li>
|
||||
<li> Support for the @stereotype tag.
|
||||
</li>
|
||||
<li> Added nodefillcolor option.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<dt>Version 1.15 2002/07/26<dd>First public release.
|
||||
</dd>
|
||||
<dt>Version 1.15 2002/07/26</dt><dd>First public release.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h3>More Examples</h3> <!-- {{{1 -->
|
||||
|
|
@ -313,8 +370,8 @@ class CheckingAccount extends BankAccount {}
|
|||
class SavingsAccount extends BankAccount {}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="general.gif">
|
||||
</tr></table>
|
||||
<img src="general.gif" alt="UML diagram showing generalization relationships" />
|
||||
</td></tr></table>
|
||||
Download the <a href="general.java">declarative specification</a>, the generated <a href="general.dot">dot code</a>.
|
||||
<h3>Advanced Relationships</h3> <!-- {{{2 -->
|
||||
<table>
|
||||
|
|
@ -348,7 +405,7 @@ class SetTopController implements URLStreamHandler {
|
|||
void connect() {}
|
||||
}
|
||||
|
||||
/** @depend - <friend> - SetTopController */
|
||||
/** @depend - <friend> - SetTopController */
|
||||
class ChannelIterator {}
|
||||
|
||||
interface URLStreamHandler {
|
||||
|
|
@ -359,8 +416,8 @@ interface URLStreamHandler {
|
|||
}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="advrel.gif">
|
||||
</tr></table>
|
||||
<img src="advrel.gif" alt="UML diagram showing dependency and navigation relationships" />
|
||||
</td></tr></table>
|
||||
Download the <a href="advrel.java">declarative specification</a>, the generated <a href="advrel.dot">dot code</a>.
|
||||
<h3>Schema</h3> <!-- {{{2 -->
|
||||
<table>
|
||||
|
|
@ -437,8 +494,8 @@ class Instructor {
|
|||
}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="schema.gif">
|
||||
</tr></table>
|
||||
<img src="schema.gif" alt="UML diagram showing a database scheme model" />
|
||||
</td></tr></table>
|
||||
Download the <a href="schema.java">declarative specification</a>, the generated <a href="schema.dot">dot code</a>.
|
||||
<h3>Element Visibility</h3> <!-- {{{2 -->
|
||||
<table>
|
||||
|
|
@ -471,8 +528,8 @@ class Toolbar {
|
|||
}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="vis.gif">
|
||||
</tr></table>
|
||||
<img src="vis.gif" alt="UML diagram showing attribute and operation visility" />
|
||||
</td></tr></table>
|
||||
Download the <a href="vis.java">declarative specification</a>, the generated <a href="vis.dot">dot code</a>.
|
||||
<h3>Association Types</h3> <!-- {{{2 -->
|
||||
<table>
|
||||
|
|
@ -496,8 +553,8 @@ class User{}
|
|||
class Password{}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="assoc.gif">
|
||||
</tr></table>
|
||||
<img src="assoc.gif" alt="UML diagram showing association types" />
|
||||
</td></tr></table>
|
||||
Download the <a href="assoc.java">declarative specification</a>, the generated <a href="assoc.dot">dot code</a>.
|
||||
<h3>Real Example (Catalina Classes)</h3> <!-- {{{2 -->
|
||||
<pre>
|
||||
|
|
@ -526,7 +583,7 @@ class ResponseFacade implements ServletResponse {}
|
|||
abstract interface ServletResponse {}
|
||||
abstract interface Response {}
|
||||
</pre>
|
||||
<img src="catalina.gif"><br>
|
||||
<img src="catalina.gif" alt="UML diagram of representative Cataline classes" /><br />
|
||||
Download the <a href="catalina.java">declarative specification</a>, the generated <a href="catalina.dot">dot code</a>.
|
||||
<h3>Class Stereotypes and Tagged Values</h3> <!-- {{{2 -->
|
||||
<table>
|
||||
|
|
@ -564,8 +621,8 @@ class ActionQueue {
|
|||
}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="classadd.gif">
|
||||
</tr></table>
|
||||
<img src="classadd.gif" alt="UML diagram of class stereotypes and tagged values" />
|
||||
</td></tr></table>
|
||||
Download the <a href="classadd.java">declarative specification</a>, the generated <a href="classadd.dot">dot code</a>.
|
||||
<h3>Colors, Global and Local Options</h3> <!-- {{{2 -->
|
||||
<table>
|
||||
|
|
@ -609,18 +666,26 @@ class Blue {}
|
|||
class ColorValue{}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="color.gif">
|
||||
</tr></table>
|
||||
<img src="color.gif" alt="UML diagram demonstrating the use of colors" />
|
||||
</td></tr></table>
|
||||
Download the <a href="color.java">declarative specification</a>, the generated <a href="color.dot">dot code</a>.
|
||||
<!-- End matter {{{1 -->
|
||||
<p>
|
||||
<p />
|
||||
<a href="../../">Diomidis Spinellis home page</a>
|
||||
<HR> <P>
|
||||
<font size=-2>
|
||||
$Id$<br>
|
||||
(C) Copyright 2002-2003 Diomidis D. Spinellis.
|
||||
<hr />
|
||||
<table>
|
||||
<tr><td>
|
||||
<a href="http://validator.w3.org/check/referer"><img src="valid-xhtml10.png" border="0" alt="Valid XHTML 1.0!" height="31" width="88" /></a>
|
||||
<a href="http://www.w3.org/WAI/WCAG1AAA-Conformance" title="Explanation of Level Triple-A Conformance"><img border="0" height="32" width="88" src="wcag1AAA.gif" alt="Level Triple-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0" /></a>
|
||||
</td><td>
|
||||
<font size="-2">
|
||||
(C) Copyright 2002-2003 D. Spinellis.
|
||||
May be freely uploaded by WWW viewers and similar programs.
|
||||
All other rights reserved.
|
||||
<br />
|
||||
Last modified: $Date$
|
||||
</font>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
203
web/index.html
203
web/index.html
|
|
@ -1,12 +1,15 @@
|
|||
<!doctype html public "-//IETF//DTD HTML//EN">
|
||||
<?xml version="1.0" encoding="us-ascii"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!-- No not edit this page in the web directory. -->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>UMLGraph - Declarative Drawing of UML diagrams</TITLE>
|
||||
<META NAME="AUTHOR" CONTENT="Diomidis Spinellis">
|
||||
</HEAD>
|
||||
<head>
|
||||
<title>UMLGraph - Declarative Drawing of UML diagrams</title>
|
||||
<meta name="AUTHOR" content="Diomidis Spinellis" />
|
||||
</head>
|
||||
<body>
|
||||
<h1 align=right><tt><font color="#ff0000">UMLGraph dds</font></tt></h1>
|
||||
<h1 align="right"><tt><font color="#ff0000">UMLGraph dds</font></tt></h1>
|
||||
<h2>UMLGraph - Declarative Drawing of UML diagrams</h2>
|
||||
<!-- Introduction {{{1 -->
|
||||
UMLGraph allows the declarative specification and drawing of
|
||||
|
|
@ -19,7 +22,7 @@ a
|
|||
<a href="http://www.research.att.com/sw/tools/graphviz/">Graphviz</a>
|
||||
diagram specification that can be automatically processed to
|
||||
create Postscript, GIF, SVG, JPEG, fig, or Framemaker drawings.
|
||||
<p>
|
||||
<p />
|
||||
The following is an example of a specification and the resulting UML
|
||||
diagram:
|
||||
<table>
|
||||
|
|
@ -34,20 +37,23 @@ class Employee extends Person {}
|
|||
class Client extends Person {}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="simple.gif">
|
||||
</tr></table>
|
||||
<p>
|
||||
<img src="simple.gif" alt="Simple UML class diagram" />
|
||||
</td></tr></table>
|
||||
<p />
|
||||
<b>See also</b>
|
||||
<ul>
|
||||
<li> <A NAME="Spi03e"> </A>Diomidis Spinellis.
|
||||
<A HREF="../../pubs/jrnl/2003-IEEESW-umlgraph/html/article.html">On the declarative specification of models</A>.
|
||||
<CITE>IEEE Software</CITE>, 20(2):94-96, March/April 2003.
|
||||
<li> <a name="Spi03e"> </a>Diomidis Spinellis.
|
||||
<a href="../../pubs/jrnl/2003-IEEESW-umlgraph/html/article.html">On the declarative specification of models</a>.
|
||||
<cite>IEEE Software</cite>, 20(2):94-96, March/April 2003.
|
||||
</li>
|
||||
<li> Diomidis Spinellis.
|
||||
<A HREF="http://www.spinellis.gr/codereading">Code Reading: The Open Source Perspective</A>.
|
||||
<a href="http://www.spinellis.gr/codereading">Code Reading: The Open Source Perspective</a>.
|
||||
Addison Wesley, 2003.
|
||||
</li>
|
||||
<li> Adam Feuer's
|
||||
<a href="http://www.zipcon.net/~adamf/software/PyUMLGraph/">PyUMLGraph</a>
|
||||
extending the concept to Python programs.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
@ -73,7 +79,7 @@ In theory you can also use UMLGraph to reverse engineer existing
|
|||
Java code.
|
||||
Note however that UMLGraph is not designed for this purpose;
|
||||
the resulting graphs may be large and unwieldy.
|
||||
<p>
|
||||
<p />
|
||||
UMLGraph is implemented as a <em>javadoc</em> doclet (a program satisfying the
|
||||
doclet API that specifies the content and format of the output
|
||||
generated by the <em>javadoc</em> tool).
|
||||
|
|
@ -108,24 +114,40 @@ or adjusting the UMLGraph output.
|
|||
UMLGraph allows you to model
|
||||
<ul>
|
||||
<li>classes (specified as Java classes)
|
||||
</li>
|
||||
<li>attributes (specified as Java fields)
|
||||
</li>
|
||||
<li>operations (specified as Java methods)
|
||||
</li>
|
||||
<li>stereotypes (using the <code>@stereotype</code> <em>name</em> tag)
|
||||
</li>
|
||||
<li>tagged values (using the <code>@tagvalue</code> <em>name</em> <em>value</em> tag)
|
||||
</li>
|
||||
<li>implementation relationships (specified using the Java <code>implements</code> declaration)
|
||||
</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>dependency relationships (specified using the <em>javadoc</em> <code>@depend</code> tag)
|
||||
</li>
|
||||
</ul>
|
||||
All relationship tags appart from <code>@extends</code> take four arguments:
|
||||
<ol>
|
||||
<li> The source adornments (role, multiplicity, and visibility)
|
||||
</li>
|
||||
<li> The relationship name
|
||||
</li>
|
||||
<li> The target adornments (role, multiplicity, and visibility)
|
||||
</li>
|
||||
<li> The target class
|
||||
</li>
|
||||
</ol>
|
||||
Arguments can be space-separated, or enclosed in quotes if they
|
||||
need to contain the space character.
|
||||
|
|
@ -156,42 +178,61 @@ class Body {}
|
|||
class Car {}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="car.gif">
|
||||
</tr></table>
|
||||
<img src="car.gif" alt="UML relationship diagram" />
|
||||
</td></tr></table>
|
||||
|
||||
<h3>Program Options</h3> <!-- {{{1 -->
|
||||
A number of command-line options contol the operation of UMLGraph:
|
||||
<dl>
|
||||
<dt>-output<dd>Specify the output file name (default <code>graph.dot</code>).
|
||||
<dt>-qualify<dd>Produce fully-qualified class names.
|
||||
<dt>-horizontal<dd>Layout the graph in the horizontal direction.
|
||||
<dt>-attributes<dd>Show class attributes (Java fields)
|
||||
<dt>-operations<dd>Show class operations (Java methods)
|
||||
<dt>-visibility<dd>Adorn class elements according to their
|
||||
<dt>-output</dt><dd>Specify the output file name (default <code>graph.dot</code>).
|
||||
</dd>
|
||||
<dt>-qualify</dt><dd>Produce fully-qualified class names.
|
||||
</dd>
|
||||
<dt>-horizontal</dt><dd>Layout the graph in the horizontal direction.
|
||||
</dd>
|
||||
<dt>-attributes</dt><dd>Show class attributes (Java fields)
|
||||
</dd>
|
||||
<dt>-operations</dt><dd>Show class operations (Java methods)
|
||||
</dd>
|
||||
<dt>-visibility</dt><dd>Adorn class elements according to their
|
||||
visibility (private, public, protected)
|
||||
<dt>-types<dd>Add type information to attributes and operations
|
||||
<dt>-all<dd>Same as
|
||||
</dd>
|
||||
<dt>-types</dt><dd>Add type information to attributes and operations
|
||||
</dd>
|
||||
<dt>-all</dt><dd>Same as
|
||||
<code>-attributes</code>
|
||||
<code>-operations</code>
|
||||
<code>-visibility</code>
|
||||
<code>-types</code>
|
||||
<dt>-nodefillcolor<dd>Specify the color to use to fill the shapes.
|
||||
<dt>-nodefontname<dd>Specify the font name to use inside nodes.
|
||||
<dt>-nodefontabstractname<dd>Specify the font name to use
|
||||
</dd>
|
||||
<dt>-nodefillcolor</dt><dd>Specify the color to use to fill the shapes.
|
||||
</dd>
|
||||
<dt>-nodefontname</dt><dd>Specify the font name to use inside nodes.
|
||||
</dd>
|
||||
<dt>-nodefontabstractname</dt><dd>Specify the font name to use
|
||||
inside abstract class nodes.
|
||||
<dt>-nodefontsize<dd>Specify the font size to use inside nodes.
|
||||
<dt>-nodefontcolor<dd>Specify the font color to use inside nodes.
|
||||
<dt>-edgefontname<dd>Specify the font name to use for edge labels.
|
||||
<dt>-edgefontsize<dd>Specify the font size to use for edge labels.
|
||||
<dt>-edgefontcolor<dd>Specify the font color to use for edge labels.
|
||||
<dt>-edgecolor<dd>Specify the color for drawing edges.
|
||||
<dt>-bgcolor<dd>Specify the graph's background color.
|
||||
<dt>-hide<dd>Specify entities to hide from the graph.
|
||||
</dd>
|
||||
<dt>-nodefontsize</dt><dd>Specify the font size to use inside nodes.
|
||||
</dd>
|
||||
<dt>-nodefontcolor</dt><dd>Specify the font color to use inside nodes.
|
||||
</dd>
|
||||
<dt>-edgefontname</dt><dd>Specify the font name to use for edge labels.
|
||||
</dd>
|
||||
<dt>-edgefontsize</dt><dd>Specify the font size to use for edge labels.
|
||||
</dd>
|
||||
<dt>-edgefontcolor</dt><dd>Specify the font color to use for edge labels.
|
||||
</dd>
|
||||
<dt>-edgecolor</dt><dd>Specify the color for drawing edges.
|
||||
</dd>
|
||||
<dt>-bgcolor</dt><dd>Specify the graph's background color.
|
||||
</dd>
|
||||
<dt>-hide</dt><dd>Specify entities to hide from the graph.
|
||||
Matching is done against the end of each entity's name.
|
||||
For instance, "<code>-hide Widget</code>" would hide "<code>com.foo.widgets.Widget</code>" and
|
||||
"<code>com.foo.widgets.BigWidget</code>".
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
<p />
|
||||
All colors can be either a symbolic name (e.g. blue),
|
||||
a tripple specifying hue-saturation-brightness as values 0-1
|
||||
(e.g. ".13 0.9 1"),
|
||||
|
|
@ -199,11 +240,11 @@ or a tripple specifying red-green-blue values as hexadecimal
|
|||
digits prefixed by a # (e.g. "#ff8020").
|
||||
The symbolic color names are derived from the X Windows System;
|
||||
you can find a complete list in the Graphviz documentation.
|
||||
<p>
|
||||
<p />
|
||||
Font names are passed directly to the dot graph generation back-end.
|
||||
In general the Postcript standard names Times, Helvetica, Courier, and
|
||||
Symbol are safe to use.
|
||||
<p>
|
||||
<p />
|
||||
Since the options are really a part of the generated graph you
|
||||
want in many cases to include them in the diagram specification.
|
||||
You can do that by adding <em>javadoc</em> <code>@opt</code> tags in front
|
||||
|
|
@ -227,36 +268,45 @@ UMLGraph is hereby made freely available as Open Source Software.
|
|||
You can download it in source and compiled format from the following links:
|
||||
<ul>
|
||||
<li> <a href="UmlGraph.java">UmlGraph.java (source code)</a>
|
||||
</li>
|
||||
<li> <a href="UmlGraph.jar">UmlGraph.jar (compiled archive)</a>
|
||||
</li>
|
||||
<li> <a href="makefile">Makefile example</a> (GNU make)
|
||||
</li>
|
||||
<li> <a href="build.xml">build.xml</a> (to use with <a href="http://ant.apache.org">ant</a>)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Version History</h3> <!-- {{{1 -->
|
||||
<dl>
|
||||
<dt>Version 1.24 2003/07/30<dd>
|
||||
<dt>Version 1.24 2003/07/30</dt><dd>
|
||||
Changes by Art Hampton (thanks):
|
||||
<ul>
|
||||
<li> Create the appropriate label for relationship tags when referring to
|
||||
classes which were not parsed by javadoc.
|
||||
</li>
|
||||
<li> New "-hide <matchstring>" option, where <matchstring>
|
||||
matches the end of the name of an entity.
|
||||
Matched entities are removed from the graph.
|
||||
A regular expression matching facility will be added when Java 1.4
|
||||
becomes more widespread.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<dt>Version 1.23 2003/05/7<dd>
|
||||
</dd>
|
||||
<dt>Version 1.23 2003/05/7</dt><dd>
|
||||
Added <code>-output</code> command-line option, and an <em>ant</em>-based
|
||||
build file.
|
||||
Modified the dot output to avoid triggering a graphviz bug that made escape codes visible.
|
||||
|
||||
<dt>Version 1.20 2003/04/25<dd>
|
||||
</dd>
|
||||
<dt>Version 1.20 2003/04/25</dt><dd>
|
||||
Fixes by Nick Efthymiou (thanks):
|
||||
will generate SVG hyperlinks to Javadoc documentation,
|
||||
better handling of abstract class fonts,
|
||||
and correct listing of interfaces.
|
||||
<dt>Version 1.19 2002/09/20<dd>
|
||||
</dd>
|
||||
<dt>Version 1.19 2002/09/20</dt><dd>
|
||||
New options:
|
||||
nodefontname,
|
||||
nodefontabstractname,
|
||||
|
|
@ -268,15 +318,22 @@ edgefontcolor,
|
|||
edgecolor,
|
||||
bgcolor.
|
||||
|
||||
<dt>Version 1.18 2002/08/26<dd>
|
||||
</dd>
|
||||
<dt>Version 1.18 2002/08/26</dt><dd>
|
||||
<ul>
|
||||
<li> Can now specify class-local options.
|
||||
</li>
|
||||
<li> Support for the @tagvalue tag.
|
||||
</li>
|
||||
<li> Support for the @stereotype tag.
|
||||
</li>
|
||||
<li> Added nodefillcolor option.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<dt>Version 1.15 2002/07/26<dd>First public release.
|
||||
</dd>
|
||||
<dt>Version 1.15 2002/07/26</dt><dd>First public release.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h3>More Examples</h3> <!-- {{{1 -->
|
||||
|
|
@ -313,8 +370,8 @@ class CheckingAccount extends BankAccount {}
|
|||
class SavingsAccount extends BankAccount {}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="general.gif">
|
||||
</tr></table>
|
||||
<img src="general.gif" alt="UML diagram showing generalization relationships" />
|
||||
</td></tr></table>
|
||||
Download the <a href="general.java">declarative specification</a>, the generated <a href="general.dot">dot code</a>.
|
||||
<h3>Advanced Relationships</h3> <!-- {{{2 -->
|
||||
<table>
|
||||
|
|
@ -348,7 +405,7 @@ class SetTopController implements URLStreamHandler {
|
|||
void connect() {}
|
||||
}
|
||||
|
||||
/** @depend - <friend> - SetTopController */
|
||||
/** @depend - <friend> - SetTopController */
|
||||
class ChannelIterator {}
|
||||
|
||||
interface URLStreamHandler {
|
||||
|
|
@ -359,8 +416,8 @@ interface URLStreamHandler {
|
|||
}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="advrel.gif">
|
||||
</tr></table>
|
||||
<img src="advrel.gif" alt="UML diagram showing dependency and navigation relationships" />
|
||||
</td></tr></table>
|
||||
Download the <a href="advrel.java">declarative specification</a>, the generated <a href="advrel.dot">dot code</a>.
|
||||
<h3>Schema</h3> <!-- {{{2 -->
|
||||
<table>
|
||||
|
|
@ -437,8 +494,8 @@ class Instructor {
|
|||
}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="schema.gif">
|
||||
</tr></table>
|
||||
<img src="schema.gif" alt="UML diagram showing a database scheme model" />
|
||||
</td></tr></table>
|
||||
Download the <a href="schema.java">declarative specification</a>, the generated <a href="schema.dot">dot code</a>.
|
||||
<h3>Element Visibility</h3> <!-- {{{2 -->
|
||||
<table>
|
||||
|
|
@ -471,8 +528,8 @@ class Toolbar {
|
|||
}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="vis.gif">
|
||||
</tr></table>
|
||||
<img src="vis.gif" alt="UML diagram showing attribute and operation visility" />
|
||||
</td></tr></table>
|
||||
Download the <a href="vis.java">declarative specification</a>, the generated <a href="vis.dot">dot code</a>.
|
||||
<h3>Association Types</h3> <!-- {{{2 -->
|
||||
<table>
|
||||
|
|
@ -496,8 +553,8 @@ class User{}
|
|||
class Password{}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="assoc.gif">
|
||||
</tr></table>
|
||||
<img src="assoc.gif" alt="UML diagram showing association types" />
|
||||
</td></tr></table>
|
||||
Download the <a href="assoc.java">declarative specification</a>, the generated <a href="assoc.dot">dot code</a>.
|
||||
<h3>Real Example (Catalina Classes)</h3> <!-- {{{2 -->
|
||||
<pre>
|
||||
|
|
@ -526,7 +583,7 @@ class ResponseFacade implements ServletResponse {}
|
|||
abstract interface ServletResponse {}
|
||||
abstract interface Response {}
|
||||
</pre>
|
||||
<img src="catalina.gif"><br>
|
||||
<img src="catalina.gif" alt="UML diagram of representative Cataline classes" /><br />
|
||||
Download the <a href="catalina.java">declarative specification</a>, the generated <a href="catalina.dot">dot code</a>.
|
||||
<h3>Class Stereotypes and Tagged Values</h3> <!-- {{{2 -->
|
||||
<table>
|
||||
|
|
@ -564,8 +621,8 @@ class ActionQueue {
|
|||
}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="classadd.gif">
|
||||
</tr></table>
|
||||
<img src="classadd.gif" alt="UML diagram of class stereotypes and tagged values" />
|
||||
</td></tr></table>
|
||||
Download the <a href="classadd.java">declarative specification</a>, the generated <a href="classadd.dot">dot code</a>.
|
||||
<h3>Colors, Global and Local Options</h3> <!-- {{{2 -->
|
||||
<table>
|
||||
|
|
@ -609,18 +666,26 @@ class Blue {}
|
|||
class ColorValue{}
|
||||
</pre>
|
||||
</td><td>
|
||||
<img src="color.gif">
|
||||
</tr></table>
|
||||
<img src="color.gif" alt="UML diagram demonstrating the use of colors" />
|
||||
</td></tr></table>
|
||||
Download the <a href="color.java">declarative specification</a>, the generated <a href="color.dot">dot code</a>.
|
||||
<!-- End matter {{{1 -->
|
||||
<p>
|
||||
<p />
|
||||
<a href="../../">Diomidis Spinellis home page</a>
|
||||
<HR> <P>
|
||||
<font size=-2>
|
||||
$Id$<br>
|
||||
(C) Copyright 2002-2003 Diomidis D. Spinellis.
|
||||
<hr />
|
||||
<table>
|
||||
<tr><td>
|
||||
<a href="http://validator.w3.org/check/referer"><img src="valid-xhtml10.png" border="0" alt="Valid XHTML 1.0!" height="31" width="88" /></a>
|
||||
<a href="http://www.w3.org/WAI/WCAG1AAA-Conformance" title="Explanation of Level Triple-A Conformance"><img border="0" height="32" width="88" src="wcag1AAA.gif" alt="Level Triple-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0" /></a>
|
||||
</td><td>
|
||||
<font size="-2">
|
||||
(C) Copyright 2002-2003 D. Spinellis.
|
||||
May be freely uploaded by WWW viewers and similar programs.
|
||||
All other rights reserved.
|
||||
<br />
|
||||
Last modified: $Date$
|
||||
</font>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in New Issue