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. cds1 +XWiki.msp - Content
-
... ... @@ -1,28 +1,20 @@ 1 +(% class="wikipage searchable" %) 1 1 ((( 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:Infrastructure for Meta Layout (KIML)]] 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 - 3 +((( 10 10 See also [[KLayoutData>>doc:KLayoutData Meta Model]] and [[KRendering>>doc:The KRendering Notation Model]]. 11 11 12 - 13 -))) 14 - 15 -((( 16 -= The Meta Model = 17 - 18 18 [[image:attach:kgraph.png]] 19 19 20 - Each node in aKGraphmay containothernodes, thus representing a nested sub-graph. The graph itselfis representedbyatop-level node thathasno parentnode.Nodes may haveincomingandoutgoingedges, and each edge hasreferencesto its sourcenode and its targetnode. Usage of portsisoptionaland can be applied tospecial cases such as dataflowdiagrams. If portsare used,they each contain a list of connected edges,andtheedgeshave referencesto their correspondingsource portandtargetport.Nodes,edges, and portsmay havearbitrarily many labels, which are usually (butnot necessarily) represented by text.Eachelement of the graph maycontain arbitrary additionaldata, which must implement the interface KGraphData.Thereare two importantextendingmodels that usethis interface:[[KLayoutData>>doc:KLayoutDataMeta Model]], which is used to storelayout dataforthegraph, and [[KRendering>>doc:TheKRendering Notation Model]], which addsgraphicalinformation. Graph datainheritsfromtheplain Java IPropertyHolder interface,whichenablesittoprovideakey-valuemapping.Keysare IProperty instances,which have anidentifierstring and a type, and values are arbitrary objectsof the corresponding type. Thismappingistransient and is thusnot storedin the XMLformat.The makePersistent() operationcan beused to translate the mapping intoaserializable list of string pairs.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: 21 21 22 -== Editing KGraphs == 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. 23 23 24 -KGraph scanbe easilycreated and editedusing our[[TextualKGraph(KGT)>>doc:KGraphText(KGT)]]format.14 +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. 25 25 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>>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. 17 + 26 26 == API Example == 27 27 28 28 {{code theme="Eclipse" language="java"}} ... ... @@ -67,3 +67,4 @@ 67 67 68 68 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"]]. 69 69 ))) 62 +)))
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 - 86508681 +2490465 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/ 8650868/KGraph Meta Model1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/2490465/KGraph Meta Model