/
Label.java
65 lines (55 loc) · 1.91 KB
/
Label.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package net.fortuna.ical4j.extensions.parameter;
import net.fortuna.ical4j.model.Content;
import net.fortuna.ical4j.model.Parameter;
import net.fortuna.ical4j.model.ParameterFactory;
import net.fortuna.ical4j.model.ParameterFactoryImpl;
/**
* <pre>
* Parameter Name: LABEL
*
* Purpose: To provide a human readable label.
*
* Format Definition: This property parameter is defined by the
* following notation:
*
* infoparam = "LABEL" "=" param-value
*
* Description: This property parameter MAY be specified on the
* "CONFERENCE" property. It is anticipated that other extensions to
* iCalendar will re-use this property parameter on new properties
* that they define. As a result, clients SHOULD expect to find this
* property parameter present on many different properties. It
* provides a human readable label that can be presented to calendar
* users to allow them to discriminate between properties which might
* be similar, or provide additional information for properties that
* are not self-describing.
*
* Example:
*
* CONFERENCE;VALUE=URI;FEATURE=VIDEO;
* LABEL="Web video chat, access code=76543";
* :http://video-chat.example.com/;group-id=1234
* </pre>
*/
public class Label extends Parameter {
private static final long serialVersionUID = 1L;
private static final String PARAMETER_NAME = "LABEL";
private final String value;
public Label(String value) {
super(PARAMETER_NAME, ParameterFactoryImpl.getInstance());
this.value = value;
}
@Override
public String getValue() {
return value;
}
public static class Factory extends Content.Factory implements ParameterFactory {
private static final long serialVersionUID = 1L;
public Factory() {
super(PARAMETER_NAME);
}
public Parameter createParameter(final String value) {
return new Label(value);
}
}
}