Allow an instance of PropertyName to be set to an arbitrary value.
[acal.git] / src / com / morphoss / acal / davacal / PropertyName.java
blobc2d8ecae1f1234ec50be1384eedd05261cb58b86
1 package com.morphoss.acal.davacal;
3 public enum PropertyName {
4 UID, DTSTAMP, CREATED, LAST_MODIFIED, DTSTART, DTEND, DUE, DURATION, LOCATION, SUMMARY,
5 DESCRIPTION, RRULE, RDATE, EXDATE, PERCENT_COMPLETE, COMPLETED, STATUS, TRIGGER, ACTION,
6 RECURRENCE_ID, INVALID;
8 private String arbitraryName = null;
10 public String toString() {
11 if ( arbitraryName != null ) return arbitraryName;
12 return super.toString().replace('_', '-');
15 public static PropertyName arbitrary( String name ) {
16 PropertyName p = INVALID;
17 INVALID.arbitraryName = name;
18 return p;
21 /**
22 * Returns a static array of the properties which can be localised with a TZID.
23 * @return
25 public static PropertyName[] localisableDateProperties() {
26 return new PropertyName[] { DTSTART, DTEND, DUE, COMPLETED };