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

Last change on this file since 1993 was 1993, checked in by twagoo, 12 years ago

ComponentRegistryFactory? now using ComponentStatus? and Owner instead of userId and userspace parameter.

Refs #142 and #143

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.AbstractDescription;
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 AbstractDescription 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.DEVELOPMENT);
19    }
20
21    public DisplayDataNode(String name, boolean isDeleted, AbstractDescription 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 AbstractDescription 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.