source: ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/model/AbstractDescription.java @ 207

Last change on this file since 207 was 207, checked in by patdui, 14 years ago
  • addd Basic security in webapp
  • Added Delete functionality in registry
  • Made POST and DELETE use authorisation
File size: 1.9 KB
Line 
1package clarin.cmdi.componentregistry.model;
2
3import java.text.DateFormat;
4import java.text.SimpleDateFormat;
5import java.util.Locale;
6
7import javax.xml.bind.annotation.XmlAccessType;
8import javax.xml.bind.annotation.XmlAccessorType;
9import javax.xml.bind.annotation.XmlElement;
10import javax.xml.bind.annotation.XmlSeeAlso;
11
12@XmlAccessorType(XmlAccessType.FIELD)
13@XmlSeeAlso( { ComponentDescription.class, ProfileDescription.class })
14public abstract class AbstractDescription {
15
16    public final static DateFormat DATE_FORMAT = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss zzz", Locale.UK);
17
18    private String id;
19    private String description;
20    private String name;
21    private String registrationDate;
22    private String creatorName;
23    @XmlElement(namespace = "http://www.w3.org/1999/xlink")
24    private String href;
25
26    public void setId(String id) {
27        this.id = id;
28    }
29
30    public String getId() {
31        return id;
32    }
33
34    public void setDescription(String description) {
35        this.description = description;
36    }
37
38    public String getDescription() {
39        return description;
40    }
41
42    public void setName(String name) {
43        this.name = name;
44    }
45
46    public String getName() {
47        return name;
48    }
49
50    public void setRegistrationDate(String registrationDate) {
51        this.registrationDate = registrationDate;
52    }
53
54    public String getRegistrationDate() {
55        return registrationDate;
56    }
57
58    public void setCreatorName(String creatorName) {
59        this.creatorName = creatorName;
60    }
61
62    public String getCreatorName() {
63        return creatorName;
64    }
65
66    public void setHref(String href) {
67        this.href = href;
68    }
69
70    public String getHref() {
71        return href;
72    }
73
74    @Override
75    public String toString() {
76        return "Name=" + getName() + ", id=" + getId() + ", creatorName=" + getCreatorName();
77    }
78
79    public boolean isProfile() {
80        return this instanceof ProfileDescription;
81    }
82
83}
Note: See TracBrowser for help on using the repository browser.