source: ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/frontend/DisplayDataNode.java @ 4098

Last change on this file since 4098 was 4098, checked in by George.Georgovassilis@mpi.nl, 10 years ago

#360, #431, #432: JPA and unified component entities

File size: 1.1 KB
Line 
1package clarin.cmdi.componentregistry.frontend;
2
3import clarin.cmdi.componentregistry.ComponentStatus;
4import java.io.Serializable;
5
6import clarin.cmdi.componentregistry.model.BaseDescription;
7
8public 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.