]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.api.acr/src/org/argeo/api/acr/DName.java
Add cr:path name
[lgpl/argeo-commons.git] / org.argeo.api.acr / src / org / argeo / api / acr / DName.java
1 package org.argeo.api.acr;
2
3 /**
4 * Name for core concepts with the same semantics as defined in the WebDav
5 * standard and extensions.
6 *
7 * @see "http://www.webdav.org/specs/rfc4918.html"
8 * @see "http://www.webdav.org/specs/rfc3744.html"
9 */
10 public enum DName implements QNamed
11
12 {
13 // RFC4918 (WebDav) properties used as CR attr
14 creationdate, //
15 displayname, //
16 getcontentlanguage, //
17 getcontentlength, //
18 getcontenttype, //
19 getetag, //
20 getlastmodified, //
21 resourcetype, //
22
23 // RFC4918 (WebDav) value used as CR class
24 collection, //
25
26 // RFC3744 (ACL) properties used as CR attr
27 owner, //
28 group, //
29
30 // RFC3253 (versioning) properties used as CR attr
31 checkedOut("checked-out"), //
32 checkedIn("checked-in"), //
33 //
34 ;
35
36 public final static String WEBDAV_NAMESPACE_URI = "DAV:";
37 public final static String WEBDAV_DEFAULT_PREFIX = "D";
38
39 private final String localName;
40
41 private DName(String localName) {
42 assert localName != null;
43 this.localName = localName;
44 }
45
46 private DName() {
47 this.localName = null;
48 }
49
50 @Override
51 public String localName() {
52 if (localName != null)
53 return localName;
54 else
55 return name();
56 }
57
58 @Override
59 public String getNamespace() {
60 return WEBDAV_NAMESPACE_URI;
61 }
62
63 @Override
64 public String getDefaultPrefix() {
65 return WEBDAV_DEFAULT_PREFIX;
66 }
67
68 }