1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package pl.edu.agh.cast.backward.resources.xml;
19
20 import java.util.List;
21
22 import pl.edu.agh.cast.backward.resources.IProjectContainer;
23 import pl.edu.agh.cast.model.visual.backward.IDiagram;
24
25 import com.thoughtworks.xstream.annotations.XStreamAlias;
26 import com.thoughtworks.xstream.annotations.XStreamImplicit;
27
28
29
30
31
32
33
34
35 @XStreamAlias("diagrams")
36 public class XMLProjectContainer implements IProjectContainer {
37
38
39
40
41 @XStreamAlias("name")
42 private String projectName;
43
44
45
46
47 @XStreamImplicit(itemFieldName = "diagram")
48 private List<IDiagram> diagrams;
49
50
51
52
53
54
55
56
57
58 public XMLProjectContainer(String projectName, List<IDiagram> diagrams) {
59 this.projectName = projectName;
60 this.diagrams = diagrams;
61 }
62
63 public List<IDiagram> getDiagrams() {
64 return diagrams;
65 }
66
67 public String getProjectName() {
68 return projectName;
69 }
70
71 public void setProjectName(String name) {
72 this.projectName = name;
73 }
74
75 public void setDiagrams(List<IDiagram> diagrams) {
76 this.diagrams = diagrams;
77 }
78
79 }