Changes for page KGraph Meta Model
Last modified by Alexander Schulz-Rosengarten on 2023/09/13 12:18
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. msp1 +XWiki.cds - Content
-
... ... @@ -1,22 +2,28 @@ 1 -(% class="wikipage searchable" %) 2 2 ((( 3 -((( 4 -See also [[KLayoutData>>doc:KLayoutData Meta Model]] and [[KRendering>>doc:The KRendering Notation Model]]. 2 +KGraph is the central data structure in KIELER for representation of graphs. It was generated using [[EMF>>url:http://www.eclipse.org/modeling/emf/||style="text-decoration: none;" shape="rect" class="ext-link"]] and therefore inherits all capabilities of EMF models such as storage in XML format, transformation, and validation. The KGraph is used for several purposes: 5 5 6 -[[image:attach:kgraph.png]] 7 - 8 -KGraph is the central data structure in KIELER for representation of graphs. It was generated using [[EMF>>url:http://www.eclipse.org/modeling/emf/||style="text-decoration: none;" shape="rect" class="ext-link"]] and therefore inherits all capabilites of EMF models such as storage in XML format, transformation, and validation. The KGraph is used for several purposes: 9 - 10 10 * as intermediate data structure in the [[KIML>>doc:Infrastructure for Meta Layout (KIML)]] project for exchanging layout information between graphical diagrams and graph layout algorithms, 11 11 * as a file format for graphs in the [[KWebS>>doc:Web Services (KWebS)]] project, and 12 12 * as basic structure for the notational model of the [[KLighD>>doc:Lightweight Diagrams (KLighD)]] project. 13 13 14 -The meta model and generated data structure is contained in the plugin [[{{code language="none"}}de.cau.cs.kieler.core.kgraph{{/code}}>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/ ~~br=master/kieler/plugins/de.cau.cs.kieler.core.kgraph||shape="rect"]].8 +The meta model and generated data structure is contained in the plugin [[{{code language="none"}}de.cau.cs.kieler.core.kgraph{{/code}}>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/%7Ebr=master/kieler/plugins/de.cau.cs.kieler.core.kgraph||shape="rect"]]. 15 15 16 - Each nodeinaKGraph maycontain other nodes, thus representinganested sub-graph. The graph itself is representedby a top-level node that has no parent node. Nodes mayhave incoming and outgoing edges,and eachedge hasreferences toits source node andits targetnode. Usage of portsis optional andcan be applied tospecial cases suchas data flow diagrams. If ports areused, they each contain a list of connectededges, and the edges havereferences to their correspondingsource port and target port.Nodes, edges, and ports may have arbitrarily many labels, which are usually (but notnecessarily)representedby text.10 +See also [[KLayoutData>>doc:KLayoutData Meta Model]] and [[KRendering>>doc:The KRendering Notation Model]]. 17 17 18 -Each element of the graph may contain arbitrary additional data, which must implement the interface KGraphData. There are two important extending models that use this interface: [[KLayoutData>>doc:KLayoutData Meta Model]], which is used to store layout data for the graph, and [[KRendering>>doc:The KRendering Notation Model]], which adds graphical information. Graph data inherits from the plain Java IPropertyHolder interface, which enables it to provide a key-value mapping. Keys are IProperty instances, which have an identifier string and a type, and values are arbitrary objects of the corresponding type. This mapping is transient and is thus not stored in the XML format. The makePersistent() operation can be used to translate the mapping into a serializable list of string pairs. 12 + 13 +))) 19 19 15 +((( 16 += The Meta Model = 17 + 18 +[[image:attach:kgraph.png]] 19 + 20 +Each node in a KGraph may contain other nodes, thus representing a nested sub-graph. The graph itself is represented by a top-level node that has no parent node. Nodes may have incoming and outgoing edges, and each edge has references to its source node and its target node. Usage of ports is optional and can be applied to special cases such as data flow diagrams. If ports are used, they each contain a list of connected edges, and the edges have references to their corresponding source port and target port. Nodes, edges, and ports may have arbitrarily many labels, which are usually (but not necessarily) represented by text.Each element of the graph may contain arbitrary additional data, which must implement the interface KGraphData. There are two important extending models that use this interface: [[KLayoutData>>doc:KLayoutData Meta Model]], which is used to store layout data for the graph, and [[KRendering>>doc:The KRendering Notation Model]], which adds graphical information. Graph data inherits from the plain Java IPropertyHolder interface, which enables it to provide a key-value mapping. Keys are IProperty instances, which have an identifier string and a type, and values are arbitrary objects of the corresponding type. This mapping is transient and is thus not stored in the XML format. The makePersistent() operation can be used to translate the mapping into a serializable list of string pairs. 21 + 22 +== Editing KGraphs == 23 + 24 +KGraphs can be easily created and edited using our [[Textual KGraph (KGT)>>doc:KGraph Text (KGT)]] format. 25 + 20 20 == API Example == 21 21 22 22 {{code theme="Eclipse" language="java"}} ... ... @@ -61,4 +61,3 @@ 61 61 62 62 A larger example that uses the KGraph for automatic layout is found in [[standalone/LayoutTest/src/test/layout/Test.java>>url:http://rtsys.informatik.uni-kiel.de/fisheye/browse/kieler/standalone/LayoutTest/src/test/layout/Test.java||shape="rect"]]. 63 63 ))) 64 -)))
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 - 77008041 +9469960 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/ 7700804/KGraph Meta Model1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9469960/KGraph Meta Model