mirror of https://github.com/dspinellis/UMLGraph
Relationship inference documentation
This commit is contained in:
parent
daf9b854bc
commit
fe09e407d1
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<!-- $Id$ -->
|
||||||
|
<notes>
|
||||||
|
<table>
|
||||||
|
<tr><td>
|
||||||
|
<fmtcode ext="java">
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @opt inferrel
|
||||||
|
* @opt collpackages java.util.*
|
||||||
|
* @opt inferdep
|
||||||
|
* @opt hide java.*
|
||||||
|
* @hidden
|
||||||
|
*/
|
||||||
|
class UMLOptions {}
|
||||||
|
|
||||||
|
class Person {
|
||||||
|
House[] houses;
|
||||||
|
List<Dog> dogs;
|
||||||
|
|
||||||
|
public Room getFavouriteRoom(House house) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @opt inferreltype composed
|
||||||
|
*/
|
||||||
|
class House {
|
||||||
|
Map<String, Room> nameRoomMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Room {}
|
||||||
|
|
||||||
|
class Dog {
|
||||||
|
Person owner;
|
||||||
|
}
|
||||||
|
|
||||||
|
</fmtcode>
|
||||||
|
</td><td>
|
||||||
|
<img src="infer.png" alt="UML diagram with relationship inference" />
|
||||||
|
</td></tr></table>
|
||||||
|
|
||||||
|
<p/>In this diagram we enabled both relationship and dependency inference.<br/>
|
||||||
|
To make sure Person.dogs and Person.friends are interpreted as one to many relationship
|
||||||
|
the <code>collpackage</code> option has to be specified.
|
||||||
|
</notes>
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
<ch><ti>Class Diagram Options</ti><fi>cd-opt</fi></ch>
|
<ch><ti>Class Diagram Options</ti><fi>cd-opt</fi></ch>
|
||||||
<ch><ti>Class Diagram Example: Generalisation Relationships</ti><fi>ceg-gen</fi></ch>
|
<ch><ti>Class Diagram Example: Generalisation Relationships</ti><fi>ceg-gen</fi></ch>
|
||||||
<ch><ti>Class Diagram Example: Advanced Relationships</ti><fi>ceg-adv</fi></ch>
|
<ch><ti>Class Diagram Example: Advanced Relationships</ti><fi>ceg-adv</fi></ch>
|
||||||
|
<ch><ti>Class Diagram Example: Relationships Inference</ti><fi>ceg-infer</fi></ch>
|
||||||
<ch><ti>Class Diagram Example: Schema</ti><fi>ceg-schema</fi></ch>
|
<ch><ti>Class Diagram Example: Schema</ti><fi>ceg-schema</fi></ch>
|
||||||
<ch><ti>Class Diagram Example: Element Visibility</ti><fi>ceg-ev</fi></ch>
|
<ch><ti>Class Diagram Example: Element Visibility</ti><fi>ceg-ev</fi></ch>
|
||||||
<ch><ti>Class Diagram Example: Association Types</ti><fi>ceg-at</fi></ch>
|
<ch><ti>Class Diagram Example: Association Types</ti><fi>ceg-at</fi></ch>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
* Relationship inference
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @opt inferrel
|
||||||
|
* @opt collpackages java.util.*
|
||||||
|
* @opt inferdep
|
||||||
|
* @opt hide java.*
|
||||||
|
* @hidden
|
||||||
|
*/
|
||||||
|
class UMLOptions {}
|
||||||
|
|
||||||
|
class Person {
|
||||||
|
House[] houses;
|
||||||
|
List<Dog> dogs;
|
||||||
|
|
||||||
|
public Room getFavouriteRoom(House house) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @opt inferreltype composed
|
||||||
|
*/
|
||||||
|
class House {
|
||||||
|
Map<String, Room> nameRoomMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Room {}
|
||||||
|
|
||||||
|
class Dog {
|
||||||
|
Person owner;
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -7,10 +7,14 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li> Correct the handling of qualified class names following
|
<li> Correct the handling of qualified class names following
|
||||||
the extends keyword (Arnaud Rogues).</li>
|
the extends keyword (Arnaud Rogues).</li>
|
||||||
|
<li> Relationship inference support. When enabled UMLGraph will try to
|
||||||
|
compute relationships and dependecies by field/method/import
|
||||||
|
statements examination. (Andrea Aime)
|
||||||
|
</li>
|
||||||
<li> Standard class lookup for association targets. The target can be
|
<li> Standard class lookup for association targets. The target can be
|
||||||
specified by name without the need to include the full package
|
specified by name without the need to include the full package
|
||||||
information, imports and standard visibility rules will be applied
|
information, imports and standard visibility rules will be applied
|
||||||
to determine the actual class
|
to determine the actual class (Andrea Aime)
|
||||||
</li>
|
</li>
|
||||||
<li> A <em>views</em> feature provides the ability to specify package-based
|
<li> A <em>views</em> feature provides the ability to specify package-based
|
||||||
option overrides in UMLOptions like classes,
|
option overrides in UMLOptions like classes,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue