Debian Codegraph @

src/main/java/ezvcard/property/OrgDirectory.java

raw symbols SCIP
1 package ezvcard.property;
2
3 import ezvcard.SupportedVersions;
4 import ezvcard.VCardVersion;
5
6 /*
7 Copyright (c) 2012-2023, Michael Angstadt
8 All rights reserved.
9
10 Redistribution and use in source and binary forms, with or without
11 modification, are permitted provided that the following conditions are met:
12
13 1. Redistributions of source code must retain the above copyright notice, this
14 list of conditions and the following disclaimer.
15 2. Redistributions in binary form must reproduce the above copyright notice,
16 this list of conditions and the following disclaimer in the documentation
17 and/or other materials provided with the distribution.
18
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
23 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
30 The views and conclusions contained in the software and documentation are those
31 of the authors and should not be interpreted as representing official policies,
32 either expressed or implied, of the FreeBSD Project.
33 */
34
35 /**
36 * <p>
37 * Defines a URI that can be used to retrieve information about the person's
38 * co-workers.
39 * </p>
40 *
41 * <p>
42 * <b>Code sample</b>
43 * </p>
44 *
45 * <pre class="brush:java">
46 * VCard vcard = new VCard();
47 *
48 * OrgDirectory orgDirectory = new OrgDirectory("http://www.company.com/staff");
49 * vcard.addOrgDirectory(orgDirectory);
50 * </pre>
51 *
52 * <p>
53 * <b>Property name:</b> {@code ORG-DIRECTORY}
54 * </p>
55 * <p>
56 * <b>Supported versions:</b> {@code 4.0}
57 * </p>
58 * @author Michael Angstadt
59 * @see <a href="http://tools.ietf.org/html/rfc6715#page-6">RFC 6715 p.6</a>
60 */
61 @SupportedVersions(VCardVersion.V4_0)
62 public class OrgDirectory extends UriProperty implements HasAltId {
63 /**
64 * @param uri the URI
65 */
66 public OrgDirectory(String uri) {
67 super(uri);
68 }
69
70 /**
71 * Copy constructor.
72 * @param original the property to make a copy of
73 */
74 public OrgDirectory(OrgDirectory original) {
75 super(original);
76 }
77
78 @Override
79 public Integer getIndex() {
80 return super.getIndex();
81 }
82
83 @Override
84 public void setIndex(Integer index) {
85 super.setIndex(index);
86 }
87
88 /**
89 * Gets the TYPE parameter.
90 * @return the TYPE value (typically, this will be either "work" or "home")
91 * or null if it doesn't exist
92 */
93 public String getType() {
94 return parameters.getType();
95 }
96
97 /**
98 * Sets the TYPE parameter.
99 * @param type the TYPE value (this should be either "work" or "home") or
100 * null to remove
101 */
102 public void setType(String type) {
103 parameters.setType(type);
104 }
105
106 @Override
107 public String getLanguage() {
108 return super.getLanguage();
109 }
110
111 @Override
112 public void setLanguage(String language) {
113 super.setLanguage(language);
114 }
115
116 @Override
117 public Integer getPref() {
118 return super.getPref();
119 }
120
121 @Override
122 public void setPref(Integer pref) {
123 super.setPref(pref);
124 }
125
126 //@Override
127 public String getAltId() {
128 return parameters.getAltId();
129 }
130
131 //@Override
132 public void setAltId(String altId) {
133 parameters.setAltId(altId);
134 }
135
136 @Override
137 public OrgDirectory copy() {
138 return new OrgDirectory(this);
139 }
140 }