1 package org.kite9.diagram.adl;
2
3 import java.util.List;
4
5 import org.kite9.diagram.position.Direction;
6 import org.kite9.diagram.primitives.AbstractContainer;
7 import org.kite9.diagram.primitives.Contained;
8
9 import com.thoughtworks.xstream.annotations.XStreamAlias;
10
11
12 /***
13 * This class represents a whole diagram within ADL. A diagram itself is a container of either Glyphs or
14 * contexts. It also has a key explaining what Symbol's mean.
15 *
16 * Arrows and ArrowLinks are implicitly contained in the diagram since they are connected to the Glyphs.
17 *
18 * @author robmoffat
19 *
20 */
21 @XStreamAlias("diagram")
22 public class Diagram extends AbstractContainer {
23
24 private static final long serialVersionUID = -7727042271665853389L;
25
26 public Diagram() {
27 }
28
29 public Diagram(String id, List<Contained> contained, Key key) {
30 super(id, contained, null, key);
31 }
32
33 public Diagram(String id, List<Contained> contained, Direction d, Key key) {
34 super(id, contained, d, key);
35 }
36
37 public Key getKey() {
38 return (Key) label;
39 }
40
41 public void setKey(Key k) {
42 this.label = k;
43 }
44 }