1
2 package org.kuali.ole.docstore.common.document.content.instance;
3
4 import com.thoughtworks.xstream.annotations.XStreamAlias;
5 import com.thoughtworks.xstream.annotations.XStreamImplicit;
6
7 import javax.xml.bind.annotation.*;
8 import java.util.ArrayList;
9 import java.util.List;
10
11
12 /**
13 * Created by IntelliJ IDEA.
14 * User: Pranitha
15 * Date: 8/17/12
16 * Time: 10:47 AM
17 * To change this template use File | Settings | File Templates.
18 * <p/>
19 * The instance captures holdings and item information. Holdings can be recorded in either the general
20 * holdings section or specific holdings format in the sourceHoldings section. The flag "primary" on
21 * either
22 * holdings or the sourceHoldings tag indicates which holdings is being used. OLE will support MFHD and
23 * any
24 * other specific holdings format will need to be accounted for and implemented by the individual
25 * institutions.
26 * At any given time, either the general holdings or the sourceHoldings can be in use.
27 * <p/>
28 * The item information is also recorded and also maps to fields in the MFHD record. OLE will provide
29 * the
30 * conversion if an institution is using MFHD, bearing in mind that in such an event the location will
31 * only be limited to 3 levels.
32 * <p/>
33 * <p/>
34 * <p>Java class for instance complex type.
35 * <p/>
36 * <p>The following schema fragment specifies the expected content contained within this class.
37 * <p/>
38 * <pre>
39 * <complexType name="instance">
40 * <complexContent>
41 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
42 * <sequence>
43 * <element name="instanceIdentifier" type="{http://www.w3.org/2001/XMLSchema}string"/>
44 * <element name="resourceIdentifier" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
45 * <element name="formerResourceIdentifier" type="{http://ole.kuali.org/standards/ole-instance}formerIdentifier" maxOccurs="unbounded" minOccurs="0"/>
46 * <element name="oleHoldings" type="{http://ole.kuali.org/standards/ole-instance}oleHoldings"/>
47 * <element name="sourceHoldings" type="{http://ole.kuali.org/standards/ole-instance}sourceHoldings"/>
48 * <element name="items" type="{http://ole.kuali.org/standards/ole-instance}items"/>
49 * <element name="extension" type="{http://ole.kuali.org/standards/ole-instance}extension"/>
50 * </sequence>
51 * </restriction>
52 * </complexContent>
53 * </complexType>
54 * </pre>
55 */
56 @XmlAccessorType(XmlAccessType.FIELD)
57 @XmlType(name = "instance", namespace = "http://ole.kuali.org/standards/ole-instance", propOrder = {
58 "instanceIdentifier",
59 "resourceIdentifier",
60 "formerResourceIdentifier",
61 "oleHoldings",
62 "sourceHoldings",
63 "items",
64 "extension"
65 })
66 @XStreamAlias("instance")
67 @XmlRootElement(name = "instance", namespace = "http://ole.kuali.org/standards/ole-instance")
68 public class Instance {
69
70 @XmlElement(namespace = "http://ole.kuali.org/standards/ole-instance", required = true)
71 protected String instanceIdentifier;
72 @XmlElement(namespace = "http://ole.kuali.org/standards/ole-instance", required = true)
73 @XStreamImplicit(itemFieldName = "resourceIdentifier")
74 protected List<String> resourceIdentifier;
75 @XmlElement(namespace = "http://ole.kuali.org/standards/ole-instance")
76 @XStreamImplicit(itemFieldName = "formerResourceIdentifier")
77 protected List<FormerIdentifier> formerResourceIdentifier;
78 @XmlElement(namespace = "http://ole.kuali.org/standards/ole-instance", required = true)
79 protected OleHoldings oleHoldings;
80 @XmlElement(namespace = "http://ole.kuali.org/standards/ole-instance", required = true)
81 protected SourceHoldings sourceHoldings;
82 @XmlElement(namespace = "http://ole.kuali.org/standards/ole-instance", required = true)
83 protected Items items;
84 @XmlElement(namespace = "http://ole.kuali.org/standards/ole-instance", required = true)
85 protected Extension extension;
86
87 /**
88 * Gets the value of the instanceIdentifier property.
89 *
90 * @return possible object is
91 * {@link String }
92 */
93 public String getInstanceIdentifier() {
94 return instanceIdentifier;
95 }
96
97 /**
98 * Sets the value of the instanceIdentifier property.
99 *
100 * @param value allowed object is
101 * {@link String }
102 */
103 public void setInstanceIdentifier(String value) {
104 this.instanceIdentifier = value;
105 }
106
107 /**
108 * Gets the value of the resourceIdentifier property.
109 * <p/>
110 * <p/>
111 * This accessor method returns a reference to the live list,
112 * not a snapshot. Therefore any modification you make to the
113 * returned list will be present inside the JAXB object.
114 * This is why there is not a <CODE>set</CODE> method for the resourceIdentifier property.
115 * <p/>
116 * <p/>
117 * For example, to add a new item, do as follows:
118 * <pre>
119 * getResourceIdentifier().add(newItem);
120 * </pre>
121 * <p/>
122 * <p/>
123 * <p/>
124 * Objects of the following type(s) are allowed in the list
125 * {@link String }
126 */
127 public List<String> getResourceIdentifier() {
128 if (resourceIdentifier == null) {
129 resourceIdentifier = new ArrayList<String>();
130 }
131 return this.resourceIdentifier;
132 }
133
134 /**
135 * @param resourceIdentifier
136 */
137 public void setResourceIdentifier(List<String> resourceIdentifier) {
138 this.resourceIdentifier = resourceIdentifier;
139 }
140
141 /**
142 * Gets the value of the formerResourceIdentifier property.
143 * <p/>
144 * <p/>
145 * This accessor method returns a reference to the live list,
146 * not a snapshot. Therefore any modification you make to the
147 * returned list will be present inside the JAXB object.
148 * This is why there is not a <CODE>set</CODE> method for the formerResourceIdentifier property.
149 * <p/>
150 * <p/>
151 * For example, to add a new item, do as follows:
152 * <pre>
153 * getFormerResourceIdentifier().add(newItem);
154 * </pre>
155 * <p/>
156 * <p/>
157 * <p/>
158 * Objects of the following type(s) are allowed in the list
159 * {@link FormerIdentifier }
160 */
161 public List<FormerIdentifier> getFormerResourceIdentifier() {
162 if (formerResourceIdentifier == null) {
163 formerResourceIdentifier = new ArrayList<FormerIdentifier>();
164 }
165 return this.formerResourceIdentifier;
166 }
167
168 /**
169 * @param formerResourceIdentifier
170 */
171 public void setFormerResourceIdentifier(List<FormerIdentifier> formerResourceIdentifier) {
172 this.formerResourceIdentifier = formerResourceIdentifier;
173 }
174
175 /**
176 * Gets the value of the oleHoldings property.
177 *
178 * @return possible object is
179 * {@link OleHoldings }
180 */
181 public OleHoldings getOleHoldings() {
182 return oleHoldings;
183 }
184
185 /**
186 * Sets the value of the oleHoldings property.
187 *
188 * @param value allowed object is
189 * {@link OleHoldings }
190 */
191 public void setOleHoldings(OleHoldings value) {
192 this.oleHoldings = value;
193 }
194
195 /**
196 * Gets the value of the sourceHoldings property.
197 *
198 * @return possible object is
199 * {@link SourceHoldings }
200 */
201 public SourceHoldings getSourceHoldings() {
202 return sourceHoldings;
203 }
204
205 /**
206 * Sets the value of the sourceHoldings property.
207 *
208 * @param value allowed object is
209 * {@link SourceHoldings }
210 */
211 public void setSourceHoldings(SourceHoldings value) {
212 this.sourceHoldings = value;
213 }
214
215 /**
216 * Gets the value of the items property.
217 *
218 * @return possible object is
219 * {@link Items }
220 */
221 public Items getItems() {
222 if (items == null) {
223 items = new Items();
224 }
225 return items;
226 }
227
228 /**
229 * Sets the value of the items property.
230 *
231 * @param value allowed object is
232 * {@link Items }
233 */
234 public void setItems(Items value) {
235 this.items = value;
236 }
237
238 /**
239 * Gets the value of the extension property.
240 *
241 * @return possible object is
242 * {@link Extension }
243 */
244 public Extension getExtension() {
245 return extension;
246 }
247
248 /**
249 * Sets the value of the extension property.
250 *
251 * @param value allowed object is
252 * {@link Extension }
253 */
254 public void setExtension(Extension value) {
255 this.extension = value;
256 }
257
258 }