Changes for page KGraph Meta Model
Last modified by Alexander Schulz-Rosengarten on 2023/09/13 12:18
From version 3.1
edited by msp
on 2012/04/18 15:14
on 2012/04/18 15:14
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
-
Attachments (0 modified, 1 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,0 +1,1 @@ 1 +Infrastructure for Meta Layout (KIML) - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. msp1 +XWiki.uru - Content
-
... ... @@ -1,20 +2,28 @@ 1 -(% class="wikipage searchable" %) 2 2 ((( 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: 3 + 4 +* as intermediate data structure in the [[KIML>>doc:KIELER.Home.Discontinued Projects.Infrastructure for Meta Layout (KIML).WebHome]] project for exchanging layout information between graphical diagrams and graph layout algorithms, 5 +* as a file format for graphs in the [[KWebS>>doc:Web Services (KWebS)]] project, and 6 +* as basic structure for the notational model of the [[KLighD>>doc:Lightweight Diagrams (KLighD)]] project. 7 + 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"]]. 9 + 10 +See also [[KLayoutData>>doc:KLayoutData Meta Model]] and [[KRendering>>doc:The KRendering Notation Model]]. 11 + 12 + 13 +))) 14 + 3 3 ((( 4 - Seealso KLayoutData andKRendering.16 += The Meta Model = 5 5 6 6 [[image:attach:kgraph.png]] 7 7 8 -KGraph i sthecentral data structure inKIELERforrepresentation of graphs. Itwasgeneratedusing[[EMF>>url:http://www.eclipse.org/modeling/emf/||style="text-decoration:none;"shape="rect"class="ext-link"]]and therefore inheritsallcapabilitesofEMFmodelssuch asstorage inXMLformat,transformation, and validation. TheKGraphis used for severalpurposes: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. 9 9 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 -* as a file format for graphs in the [[KWebS>>doc:Web Services (KWebS)]] project, and 12 -* as basic structure for the notational model of the [[KLighD>>doc:Lightweight Diagrams (KLighD)]] project. 22 +== Editing KGraphs == 13 13 14 - Each node in aKGraphmaycontainothernodes, thus representinganested sub-graph. The graphitself is represented bya top-level node that has no parent node. Nodes may have incoming and outgoingedges,and each edge has references toits sourcenodeand itstargetnode. Usageof portsis optional and can beappliedto special cases suchas data flowdiagrams. Ifports are used, theyeach contain a list of connectededges, and the edges have references totheircorrespondingsourceportandtarget port. Nodes, edges, and portsmay have arbitrarily many labels, which are usually (but not necessarily) represented by text.24 +KGraphs can be easily created and edited using our [[Textual KGraph (KGT)>>doc:KGraph Text (KGT)]] format. 15 15 16 -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, which is used to store layout data for the graph, and KRendering, 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. 17 - 18 18 == API Example == 19 19 20 20 {{code theme="Eclipse" language="java"}} ... ... @@ -49,14 +49,11 @@ 49 49 KPort port2 = factory.createKPort(); 50 50 port2.setNode(node2); 51 51 52 - // The'edges'and 'sourcePort'/'targetPort'referencesare not53 - // opposite,so theyallhave tobesetexplicitly.60 + // Setting the source port / target port reference automatically 61 + // adds an edge to the port's list of edges. 54 54 edge.setSourcePort(port1); 55 - port1.getEdges().add(edge); 56 56 edge.setTargetPort(port2); 57 - port2.getEdges().add(edge); 58 58 {{/code}} 59 59 60 60 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"]]. 61 61 ))) 62 -)))
- kgraph.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.XWikiGuest - Size
-
... ... @@ -1,0 +1,1 @@ 1 +82.4 KB - Content
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -8850 801 +885075 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/8850 80/KGraph Meta Model1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/885075/KGraph Meta Model