Line | |
---|
1 | package clarin.cmdi.componentregistry.frontend; |
---|
2 | |
---|
3 | import clarin.cmdi.componentregistry.ComponentStatus; |
---|
4 | import java.io.Serializable; |
---|
5 | |
---|
6 | import clarin.cmdi.componentregistry.model.BaseDescription; |
---|
7 | |
---|
8 | public class DisplayDataNode implements Serializable { |
---|
9 | |
---|
10 | private static final long serialVersionUID = 1L; |
---|
11 | private final String name; |
---|
12 | private final boolean isDeleted; |
---|
13 | private BaseDescription desc; |
---|
14 | private final ComponentStatus status; |
---|
15 | |
---|
16 | public DisplayDataNode(String name, boolean isDeleted) { |
---|
17 | // TODO: what is sensible default status? |
---|
18 | this(name, isDeleted, null, ComponentStatus.PRIVATE); |
---|
19 | } |
---|
20 | |
---|
21 | public DisplayDataNode(String name, boolean isDeleted, BaseDescription desc, ComponentStatus status) { |
---|
22 | this.name = name; |
---|
23 | this.isDeleted = isDeleted; |
---|
24 | this.desc = desc; |
---|
25 | this.status = status; |
---|
26 | } |
---|
27 | |
---|
28 | /** |
---|
29 | * Can be null for non leaves. |
---|
30 | * |
---|
31 | * @return |
---|
32 | */ |
---|
33 | public BaseDescription getDescription() { |
---|
34 | return desc; |
---|
35 | } |
---|
36 | |
---|
37 | public boolean isDeleted() { |
---|
38 | return isDeleted; |
---|
39 | } |
---|
40 | |
---|
41 | @Override |
---|
42 | public String toString() { |
---|
43 | return name; |
---|
44 | } |
---|
45 | |
---|
46 | public ComponentStatus getStatus() { |
---|
47 | return status; |
---|
48 | } |
---|
49 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.