Added UML diagram as UMLet source and SVG export

generic-observer
Selebrator 7 years ago
parent 5782fd610b
commit fe3bd84482

@ -0,0 +1,210 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
<svg fill-opacity="1" xmlns:xlink="http://www.w3.org/1999/xlink" color-rendering="auto" color-interpolation="auto" text-rendering="auto" stroke="black" stroke-linecap="square" width="1000" stroke-miterlimit="10" shape-rendering="auto" stroke-opacity="1" fill="black" stroke-dasharray="none" font-weight="normal" stroke-width="1" viewBox="-10 80 1000 700" height="700" xmlns="http://www.w3.org/2000/svg" font-family="'Dialog'" font-style="normal" stroke-linejoin="miter" font-size="12px" stroke-dashoffset="0" image-rendering="auto"
><!--Generated by the Batik Graphics2D SVG Generator--><defs id="genericDefs"
/><g
><defs id="defs1"
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath1"
><path d="M0 0 L2147483647 0 L2147483647 2147483647 L0 2147483647 L0 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath2"
><path d="M0 0 L0 50 L210 50 L210 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath3"
><path d="M0 0 L0 70 L210 70 L210 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath4"
><path d="M0 0 L0 250 L230 250 L230 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath5"
><path d="M0 0 L0 150 L270 150 L270 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath6"
><path d="M0 0 L0 40 L150 40 L150 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath7"
><path d="M0 0 L0 130 L150 130 L150 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath8"
><path d="M0 0 L0 120 L220 120 L220 0 Z"
/></clipPath
><clipPath clipPathUnits="userSpaceOnUse" id="clipPath9"
><path d="M0 0 L0 50 L240 50 L240 0 Z"
/></clipPath
></defs
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(340,580)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="208.5" height="48.5" y="0.5" clip-path="url(#clipPath2)" stroke="none"
/></g
><g transform="translate(340,580)"
><rect fill="none" x="0.5" width="208.5" height="48.5" y="0.5" clip-path="url(#clipPath2)"
/><text x="68" font-size="14px" y="17.9688" text-decoration="underline" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>fish: Animal</text
><path fill="none" d="M1 23.9688 L209 23.9688" clip-path="url(#clipPath2)"
/><text x="5" font-size="14px" y="38.9375" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>name: "Fish"</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(10,580)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="208.5" height="48.5" y="0.5" clip-path="url(#clipPath2)" stroke="none"
/></g
><g transform="translate(10,580)"
><rect fill="none" x="0.5" width="208.5" height="48.5" y="0.5" clip-path="url(#clipPath2)"
/><text x="65" font-size="14px" y="17.9688" text-decoration="underline" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>bear: Animal</text
><path fill="none" d="M1 23.9688 L209 23.9688" clip-path="url(#clipPath2)"
/><text x="5" font-size="14px" y="38.9375" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>name: "Bear"</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(340,470)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="208.5" height="48.5" y="0.5" clip-path="url(#clipPath2)" stroke="none"
/></g
><g transform="translate(340,470)"
><rect fill="none" x="0.5" width="208.5" height="48.5" y="0.5" clip-path="url(#clipPath2)"
/><text x="62" font-size="14px" y="17.9688" text-decoration="underline" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>zebra: Animal</text
><path fill="none" d="M1 23.9688 L209 23.9688" clip-path="url(#clipPath2)"
/><text x="5" font-size="14px" y="38.9375" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>name: "Zebra"</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(10,470)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="208.5" height="48.5" y="0.5" clip-path="url(#clipPath2)" stroke="none"
/></g
><g transform="translate(10,470)"
><rect fill="none" x="0.5" width="208.5" height="48.5" y="0.5" clip-path="url(#clipPath2)"
/><text x="68" font-size="14px" y="17.9688" text-decoration="underline" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>lion: Animal</text
><path fill="none" d="M1 23.9688 L209 23.9688" clip-path="url(#clipPath2)"
/><text x="5" font-size="14px" y="38.9375" clip-path="url(#clipPath2)" font-family="sans-serif" stroke="none" xml:space="preserve"
>name: "Lion"</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(340,690)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="208.5" height="68.5" y="0.5" clip-path="url(#clipPath3)" stroke="none"
/></g
><g transform="translate(340,690)"
><rect fill="none" x="0.5" width="208.5" height="68.5" y="0.5" clip-path="url(#clipPath3)"
/><text x="69" font-size="14px" y="17.9688" text-decoration="underline" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>berry: Plant</text
><path fill="none" d="M1 23.9688 L209 23.9688" clip-path="url(#clipPath3)"
/><text x="5" font-size="14px" y="38.9375" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>name: "Berry"</text
><text x="5" font-size="14px" y="54.9062" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>description: "is red"</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(670,470)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="208.5" height="68.5" y="0.5" clip-path="url(#clipPath3)" stroke="none"
/></g
><g transform="translate(670,470)"
><rect fill="none" x="0.5" width="208.5" height="68.5" y="0.5" clip-path="url(#clipPath3)"
/><text x="68" font-size="14px" y="17.9688" text-decoration="underline" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>grass: Plant</text
><path fill="none" d="M1 23.9688 L209 23.9688" clip-path="url(#clipPath3)"
/><text x="5" font-size="14px" y="38.9375" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>name: "Grass"</text
><text x="5" font-size="14px" y="54.9062" clip-path="url(#clipPath3)" font-family="sans-serif" stroke="none" xml:space="preserve"
>description: "is green"</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(740,160)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="228.5" height="248.5" y="0.5" clip-path="url(#clipPath4)" stroke="none"
/></g
><g transform="translate(740,160)"
><rect fill="none" x="0.5" width="228.5" height="248.5" y="0.5" clip-path="url(#clipPath4)"
/><text x="91" font-size="14px" y="17.9688" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" font-weight="bold" xml:space="preserve"
>Animal</text
><path fill="none" d="M1 23.9688 L229 23.9688" clip-path="url(#clipPath4)"
/><text x="5" font-size="14px" y="38.9375" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>- name: String</text
><path fill="none" d="M1 44.9375 L229 44.9375" clip-path="url(#clipPath4)"
/><text x="5" font-size="14px" y="59.9062" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ Animal(name:String)</text
><text x="5" font-size="14px" y="75.875" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ addFood(food: Plant)</text
><text x="5" font-size="14px" y="91.8438" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ addFood(food: Animal)</text
><text x="5" font-size="14px" y="107.8125" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ getPlantFoods(): Plant[0..10]</text
><text x="5" font-size="14px" y="123.7812" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ getAnimalFoods(): Animal[0..10]</text
><text x="5" font-size="14px" y="139.75" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ eatsPlants(): boolean</text
><text x="5" font-size="14px" y="155.7188" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ eatsAnimals(): boolean</text
><text x="5" font-size="14px" y="171.6875" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ isCarnivore(): boolean</text
><text x="5" font-size="14px" y="187.6562" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ isOmnivore(): boolean</text
><text x="5" font-size="14px" y="203.625" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ isHerbivore(): boolean</text
><text x="5" font-size="14px" y="219.5938" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ getName(): String</text
><text x="5" font-size="14px" y="235.5625" clip-path="url(#clipPath4)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ setName(name: String)</text
></g
><g fill="rgb(255,255,255)" fill-opacity="0" transform="translate(260,190)" stroke-opacity="0" stroke="rgb(255,255,255)"
><rect x="0.5" width="268.5" height="148.5" y="0.5" clip-path="url(#clipPath5)" stroke="none"
/></g
><g transform="translate(260,190)"
><rect fill="none" x="0.5" width="268.5" height="148.5" y="0.5" clip-path="url(#clipPath5)"
/><text x="117" font-size="14px" y="17.9688" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" font-weight="bold" xml:space="preserve"
>Plant</text
><path fill="none" d="M1 23.9688 L269 23.9688" clip-path="url(#clipPath5)"
/><text x="5" font-size="14px" y="38.9375" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>- name: String</text
><text x="5" font-size="14px" y="54.9062" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>- description: String</text
><path fill="none" d="M1 60.9062 L269 60.9062" clip-path="url(#clipPath5)"
/><text x="5" font-size="14px" y="75.875" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ Plant(name: String, description: String)</text
><text x="5" font-size="14px" y="91.8438" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ getName(): String</text
><text x="5" font-size="14px" y="107.8125" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ setName(name: String)</text
><text x="5" font-size="14px" y="123.7812" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ getDescription(): String</text
><text x="5" font-size="14px" y="139.75" clip-path="url(#clipPath5)" font-family="sans-serif" stroke="none" xml:space="preserve"
>+ setDescription(description: String)</text
></g
><g transform="translate(210,590)"
><path fill="none" d="M129.5 20.5 L10.5 20.5" clip-path="url(#clipPath6)"
/><path fill="none" d="M118.7417 14 L130 20.5 L118.7417 27" clip-path="url(#clipPath6)"
/><text x="29.9243" font-size="14px" y="16" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>animalFoods</text
></g
><g transform="translate(210,480)"
><path fill="none" d="M129.5 20.5 L10.5 20.5" clip-path="url(#clipPath6)"
/><path fill="none" d="M118.7417 14 L130 20.5 L118.7417 27" clip-path="url(#clipPath6)"
/><text x="29.9243" font-size="14px" y="16" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>animalFoods</text
></g
><g transform="translate(540,480)"
><path fill="none" d="M129.5 20.5 L10.5 20.5" clip-path="url(#clipPath6)"
/><path fill="none" d="M118.7417 14 L130 20.5 L118.7417 27" clip-path="url(#clipPath6)"
/><text x="35.3657" font-size="14px" y="16" clip-path="url(#clipPath6)" font-family="sans-serif" stroke="none" xml:space="preserve"
>plantFoods</text
></g
><g transform="translate(210,610)"
><path fill="none" d="M129.7318 109.8598 L10.5 10.5" clip-path="url(#clipPath7)"
/><path fill="none" d="M125.6282 97.9791 L130.1159 110.1799 L117.3058 107.9659" clip-path="url(#clipPath7)"
/><text x="35.3657" font-size="14px" y="56" clip-path="url(#clipPath7)" font-family="sans-serif" stroke="none" xml:space="preserve"
>plantFoods</text
></g
><g transform="translate(610,100)"
><path fill="none" d="M129.5 90.5 L10.5 90.5" clip-path="url(#clipPath8)"
/><path fill="none" d="M10.5 90.5 L10.5 10.5" clip-path="url(#clipPath8)"
/><path fill="none" d="M10.5 10.5 L200.5 10.5" clip-path="url(#clipPath8)"
/><path fill="none" d="M200.5 10.5 L200.5 60.5" clip-path="url(#clipPath8)"
/><path fill="none" d="M118.7417 84 L130 90.5 L118.7417 97" clip-path="url(#clipPath8)"
/><text x="21.2969" font-size="14px" y="86" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" xml:space="preserve"
>- animalFoods</text
><text x="78.8623" font-size="14px" y="103.9688" clip-path="url(#clipPath8)" font-family="sans-serif" stroke="none" xml:space="preserve"
>0..10</text
></g
><g transform="translate(520,220)"
><path fill="none" d="M10.5 20.5 L220.5 20.5" clip-path="url(#clipPath9)"
/><text x="122.1797" font-size="14px" y="16" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>- plantFoods</text
><text x="168.8623" font-size="14px" y="33.9688" clip-path="url(#clipPath9)" font-family="sans-serif" stroke="none" xml:space="preserve"
>0..10</text
></g
></g
></svg
>

After

Width:  |  Height:  |  Size: 15 KiB

@ -0,0 +1,205 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<diagram program="umlet" version="14.3.0">
<zoom_level>10</zoom_level>
<element>
<id>UMLClass</id>
<coordinates>
<x>260</x>
<y>190</y>
<w>270</w>
<h>150</h>
</coordinates>
<panel_attributes>*Plant*
--
- name: String
- description: String
--
+ Plant(name: String, description: String)
+ getName(): String
+ setName(name: String)
+ getDescription(): String
+ setDescription(description: String)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>740</x>
<y>160</y>
<w>230</w>
<h>250</h>
</coordinates>
<panel_attributes>*Animal*
--
- name: String
--
+ Animal(name:String)
+ addFood(food: Plant)
+ addFood(food: Animal)
+ getPlantFoods(): Plant[0..10]
+ getAnimalFoods(): Animal[0..10]
+ eatsPlants(): boolean
+ eatsAnimals(): boolean
+ isCarnivore(): boolean
+ isOmnivore(): boolean
+ isHerbivore(): boolean
+ getName(): String
+ setName(name: String)</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>520</x>
<y>220</y>
<w>240</w>
<h>50</h>
</coordinates>
<panel_attributes>lt=-
r2=- plantFoods
m2=0..10
</panel_attributes>
<additional_attributes>10.0;20.0;220.0;20.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>610</x>
<y>100</y>
<w>220</w>
<h>120</h>
</coordinates>
<panel_attributes>lt=&lt;-
r1=- animalFoods
m1=0..10</panel_attributes>
<additional_attributes>130.0;90.0;10.0;90.0;10.0;10.0;200.0;10.0;200.0;60.0</additional_attributes>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>670</x>
<y>470</y>
<w>210</w>
<h>70</h>
</coordinates>
<panel_attributes>_grass: Plant_
--
name: "Grass"
description: "is green"</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>340</x>
<y>690</y>
<w>210</w>
<h>70</h>
</coordinates>
<panel_attributes>_berry: Plant_
--
name: "Berry"
description: "is red"</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>10</x>
<y>470</y>
<w>210</w>
<h>50</h>
</coordinates>
<panel_attributes>_lion: Animal_
--
name: "Lion"</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>340</x>
<y>470</y>
<w>210</w>
<h>50</h>
</coordinates>
<panel_attributes>_zebra: Animal_
--
name: "Zebra"</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>10</x>
<y>580</y>
<w>210</w>
<h>50</h>
</coordinates>
<panel_attributes>_bear: Animal_
--
name: "Bear"</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>UMLClass</id>
<coordinates>
<x>340</x>
<y>580</y>
<w>210</w>
<h>50</h>
</coordinates>
<panel_attributes>_fish: Animal_
--
name: "Fish"</panel_attributes>
<additional_attributes/>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>210</x>
<y>610</y>
<w>150</w>
<h>130</h>
</coordinates>
<panel_attributes>lt=&lt;-
plantFoods</panel_attributes>
<additional_attributes>130.0;110.0;10.0;10.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>540</x>
<y>480</y>
<w>150</w>
<h>40</h>
</coordinates>
<panel_attributes>lt=&lt;-
plantFoods</panel_attributes>
<additional_attributes>130.0;20.0;10.0;20.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>210</x>
<y>480</y>
<w>150</w>
<h>40</h>
</coordinates>
<panel_attributes>lt=&lt;-
animalFoods</panel_attributes>
<additional_attributes>130.0;20.0;10.0;20.0</additional_attributes>
</element>
<element>
<id>Relation</id>
<coordinates>
<x>210</x>
<y>590</y>
<w>150</w>
<h>40</h>
</coordinates>
<panel_attributes>lt=&lt;-
animalFoods</panel_attributes>
<additional_attributes>130.0;20.0;10.0;20.0</additional_attributes>
</element>
</diagram>
Loading…
Cancel
Save