BrightSide Workbench Full Report + Source Code
PropertyTag.java
Go to the documentation of this file.
1
/*
2
* TurrĂ³ i Cutiller Foundation. License notice.
3
* Copyright (C) 2011 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU Affero General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Affero General Public License for more details.
14
*
15
* You should have received a copy of the GNU Affero General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
package
org.turro.vcard.properties;
19
24
public
enum
PropertyTag
{
25
26
VCP_ID
(
"X-ID"
, 1),
27
VCP_GID
(
"X-GID"
, 1),
28
VCP_FN
(
"FN"
, 1),
29
VCP_N
(
"N"
, 5),
// familyName, givenName, additionalNames[], prefixes, suffixes
30
VCP_ADR
(
"ADR"
, 7),
// poBox, extended, street, locality, region, postcode, country
31
VCP_EMAIL
(
"EMAIL"
, 1),
32
VCP_TEL
(
"TEL"
, 1),
33
VCP_NOTE
(
"NOTE"
, 1),
34
VCP_SOURCE
(
"SOURCE"
, 1),
35
VCP_TITLE
(
"TITLE"
, 1);
36
37
public
static
PropertyTag
getInstance
(String l) {
38
for
(
PropertyTag
pt :
PropertyTag
.values()) {
39
if
(l.startsWith(pt.tag +
";"
) || l.startsWith(pt.tag +
":"
)) {
40
return
pt;
41
}
42
}
43
return
null
;
44
}
45
46
private
String tag;
47
private
int
valueCount;
48
49
private
PropertyTag
(String tag,
int
valueCount) {
50
this.tag = tag;
51
this.valueCount = valueCount;
52
}
53
54
public
String
getTag
() {
55
return
tag;
56
}
57
58
public
int
getValueCount
() {
59
return
valueCount;
60
}
61
62
}
org.turro.vcard.properties.PropertyTag
Definition:
PropertyTag.java:24
org.turro.vcard.properties.PropertyTag.VCP_FN
VCP_FN
Definition:
PropertyTag.java:28
org.turro.vcard.properties.PropertyTag.VCP_GID
VCP_GID
Definition:
PropertyTag.java:27
org.turro.vcard.properties.PropertyTag.getTag
String getTag()
Definition:
PropertyTag.java:54
org.turro.vcard.properties.PropertyTag.VCP_N
VCP_N
Definition:
PropertyTag.java:29
org.turro.vcard.properties.PropertyTag.getValueCount
int getValueCount()
Definition:
PropertyTag.java:58
org.turro.vcard.properties.PropertyTag.VCP_SOURCE
VCP_SOURCE
Definition:
PropertyTag.java:34
org.turro.vcard.properties.PropertyTag.VCP_TITLE
VCP_TITLE
Definition:
PropertyTag.java:35
org.turro.vcard.properties.PropertyTag.VCP_ADR
VCP_ADR
Definition:
PropertyTag.java:30
org.turro.vcard.properties.PropertyTag.VCP_TEL
VCP_TEL
Definition:
PropertyTag.java:32
org.turro.vcard.properties.PropertyTag.getInstance
static PropertyTag getInstance(String l)
Definition:
PropertyTag.java:37
org.turro.vcard.properties.PropertyTag.VCP_NOTE
VCP_NOTE
Definition:
PropertyTag.java:33
org.turro.vcard.properties.PropertyTag.VCP_EMAIL
VCP_EMAIL
Definition:
PropertyTag.java:31
org.turro.vcard.properties.PropertyTag.VCP_ID
VCP_ID
Definition:
PropertyTag.java:26
TurroProjects
Public
BrightSide
contacts-vcard
src
main
java
org
turro
vcard
properties
PropertyTag.java
Generated on Tue Mar 12 2024 07:01:20 for BrightSide by
1.9.1