1 package org.andromda.core.configuration;
2
3 import java.io.Serializable;
4 import java.util.ArrayList;
5 import java.util.Collection;
6
7
8
9
10
11
12 public class Repository
13 implements Serializable
14 {
15 private static final long serialVersionUID = 34L;
16
17
18
19
20 private String name;
21
22
23
24
25
26
27
28 public void setName(final String name)
29 {
30 this.name = name;
31 }
32
33
34
35
36
37
38 public String getName()
39 {
40 return this.name;
41 }
42
43
44
45
46 private final Collection<Model> models = new ArrayList<Model>();
47
48
49
50
51
52
53 public void addModel(final Model model)
54 {
55 model.setRepository(this);
56 this.models.add(model);
57 }
58
59
60
61
62
63
64 public Model[] getModels()
65 {
66 return this.models.toArray(new Model[this.models.size()]);
67 }
68 }