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

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