Last change
on this file since 5549 was
5549,
checked in by olhsha@mpi.nl, 10 years ago
|
Added group service. Tested via the tomcat on loclahots (test URI and postman), old unit tests are adjusted and work well. Todo: retest on localhost tomcat, look at run-time exceptions, add new unit tests, adjust front-end
|
File size:
1.2 KB
|
Line | |
---|
1 | package clarin.cmdi.componentregistry.frontend; |
---|
2 | |
---|
3 | import clarin.cmdi.componentregistry.ComponentStatus; |
---|
4 | import clarin.cmdi.componentregistry.RegistrySpace; |
---|
5 | import java.io.Serializable; |
---|
6 | |
---|
7 | import clarin.cmdi.componentregistry.model.BaseDescription; |
---|
8 | |
---|
9 | public class DisplayDataNode implements Serializable { |
---|
10 | |
---|
11 | private static final long serialVersionUID = 1L; |
---|
12 | private final String name; |
---|
13 | private final boolean isDeleted; |
---|
14 | private BaseDescription desc; |
---|
15 | private final RegistrySpace space; |
---|
16 | |
---|
17 | public DisplayDataNode(String name, boolean isDeleted) { |
---|
18 | // TODO: what is sensible default status? |
---|
19 | this(name, isDeleted, null, RegistrySpace.PRIVATE); |
---|
20 | } |
---|
21 | |
---|
22 | public DisplayDataNode(String name, boolean isDeleted, BaseDescription desc, RegistrySpace space) { |
---|
23 | this.name = name; |
---|
24 | this.isDeleted = isDeleted; |
---|
25 | this.desc = desc; |
---|
26 | this.space = space; |
---|
27 | } |
---|
28 | |
---|
29 | /** |
---|
30 | * Can be null for non leaves. |
---|
31 | * |
---|
32 | * @return |
---|
33 | */ |
---|
34 | public BaseDescription getDescription() { |
---|
35 | return desc; |
---|
36 | } |
---|
37 | |
---|
38 | public boolean isDeleted() { |
---|
39 | return isDeleted; |
---|
40 | } |
---|
41 | |
---|
42 | @Override |
---|
43 | public String toString() { |
---|
44 | return name; |
---|
45 | } |
---|
46 | |
---|
47 | public RegistrySpace getSpace() { |
---|
48 | return space; |
---|
49 | } |
---|
50 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.