1 package org.kuali.ole.docstore.common.document.content.instance;
2
3 import com.thoughtworks.xstream.annotations.XStreamAlias;
4 import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
5 import com.thoughtworks.xstream.annotations.XStreamImplicit;
6
7 import javax.xml.bind.JAXBContext;
8 import javax.xml.bind.Marshaller;
9 import javax.xml.bind.annotation.*;
10 import java.io.StringWriter;
11 import java.sql.Timestamp;
12 import java.util.ArrayList;
13 import java.util.List;
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 @XmlAccessorType(XmlAccessType.FIELD)
52 @XmlType(name = "oleHoldings", propOrder = {
53 "holdingsType",
54 "bibIdentifier",
55 "holdingsIdentifier",
56 "extentOfOwnership",
57 "receiptStatus",
58 "uri",
59 "note",
60 "location",
61 "extension",
62 "callNumber",
63 "copyNumber",
64 "publisher",
65 "imprint",
66 "localPersistentLink",
67 "link",
68 "interLibraryLoanAllowed",
69 "staffOnlyFlag",
70 "donorPublicDisplay",
71 "donorNote",
72 "accessStatus",
73 "statusDate",
74 "statisticalSearchingCode",
75 "eResourceId",
76 "holdingsAccessInformation",
77 "platform",
78 "subscriptionStatus",
79 "donorInfo",
80 })
81 @XStreamAlias("oleHoldings")
82 @XmlRootElement(name = "oleHoldings")
83 public class OleHoldings {
84
85 @XmlElement(required = true)
86 protected String holdingsType;
87 @XmlElement(required = true)
88 protected String holdingsIdentifier;
89 @XmlElement(name = "resourceIdentifier")
90 protected String bibIdentifier;
91 @XStreamImplicit(itemFieldName = "extentOfOwnership")
92 protected List<ExtentOfOwnership> extentOfOwnership;
93 @XmlElement(required = true)
94 protected String receiptStatus;
95 @XStreamImplicit(itemFieldName = "uri")
96 protected List<Uri> uri;
97 @XStreamImplicit(itemFieldName = "note")
98 protected List<Note> note;
99 @XmlElement(required = true)
100 protected Location location;
101 @XmlElement(required = true)
102 protected Extension extension;
103 @XmlElement(required = true)
104 protected CallNumber callNumber;
105 @XmlElement(required = true)
106 protected String copyNumber;
107 @XmlAttribute
108 @XStreamAsAttribute
109 protected String primary;
110 protected String publisher;
111 protected String imprint;
112 @XmlSchemaType(name = "anyURI")
113 protected String localPersistentLink;
114 protected List<Link> link;
115 protected boolean interLibraryLoanAllowed;
116 protected boolean staffOnlyFlag;
117 protected String donorPublicDisplay;
118 protected String donorNote;
119 protected String accessStatus;
120 protected String statusDate;
121 protected StatisticalSearchingCode statisticalSearchingCode;
122 protected String eResourceId;
123 protected HoldingsAccessInformation holdingsAccessInformation;
124 @XmlElement(required = true)
125 protected Platform platform;
126 protected String subscriptionStatus;
127 protected List<DonorInfo> donorInfo;
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172 public String getHoldingsType() {
173 return holdingsType;
174 }
175
176 public void setHoldingsType(String holdingsType) {
177 this.holdingsType = holdingsType;
178 }
179
180
181
182
183
184
185
186 public String getHoldingsIdentifier() {
187 return holdingsIdentifier;
188 }
189
190
191
192
193
194
195
196 public void setHoldingsIdentifier(String value) {
197 this.holdingsIdentifier = value;
198 }
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220 public List<ExtentOfOwnership> getExtentOfOwnership() {
221 if (extentOfOwnership == null) {
222 extentOfOwnership = new ArrayList<ExtentOfOwnership>();
223 }
224 return this.extentOfOwnership;
225 }
226
227
228
229
230 public void setExtentOfOwnership(List<ExtentOfOwnership> extentOfOwnership) {
231 this.extentOfOwnership = extentOfOwnership;
232 }
233
234
235
236
237
238
239
240 public String getReceiptStatus() {
241 return receiptStatus;
242 }
243
244
245
246
247
248
249
250 public void setReceiptStatus(String value) {
251 this.receiptStatus = value;
252 }
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274 public List<Uri> getUri() {
275 if (uri == null) {
276 uri = new ArrayList<Uri>();
277 }
278 return this.uri;
279 }
280
281
282
283
284 public void setUri(List<Uri> uri) {
285 this.uri = uri;
286 }
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308 public List<Note> getNote() {
309 if (note == null) {
310 note = new ArrayList<Note>();
311 }
312 return this.note;
313 }
314
315
316
317
318 public void setNote(List<Note> note) {
319 this.note = note;
320 }
321
322
323
324
325
326
327
328 public Location getLocation() {
329 return location;
330 }
331
332
333
334
335
336
337
338 public void setLocation(Location value) {
339 this.location = value;
340 }
341
342
343
344
345
346
347
348 public Extension getExtension() {
349 return extension;
350 }
351
352
353
354
355
356
357
358 public void setExtension(Extension value) {
359 this.extension = value;
360 }
361
362
363
364
365
366
367
368 public CallNumber getCallNumber() {
369 return callNumber;
370 }
371
372
373
374
375
376
377
378 public void setCallNumber(CallNumber value) {
379 this.callNumber = value;
380 }
381
382
383
384
385
386
387
388 public String getCopyNumber() {
389 return copyNumber;
390 }
391
392
393
394
395
396
397
398 public void setCopyNumber(String value) {
399 this.copyNumber = value;
400 }
401
402
403
404
405
406
407
408 public String getPrimary() {
409 return primary;
410 }
411
412
413
414
415
416
417
418 public void setPrimary(String value) {
419 this.primary = value;
420 }
421
422
423
424
425
426
427
428 public String getPublisher() {
429 return publisher;
430 }
431
432
433
434
435
436
437
438 public void setPublisher(String value) {
439 this.publisher = value;
440 }
441
442
443
444
445
446
447
448 public String getImprint() {
449 return imprint;
450 }
451
452
453
454
455
456
457
458 public void setImprint(String value) {
459 this.imprint = value;
460 }
461
462
463
464
465
466
467
468 public String getLocalPersistentLink() {
469 return localPersistentLink;
470 }
471
472
473
474
475
476
477
478 public void setLocalPersistentLink(String value) {
479 this.localPersistentLink = value;
480 }
481
482
483
484
485
486
487
488 public List<Link> getLink() {
489 if (link == null){
490 link = new ArrayList<Link>();
491 }
492 return this.link;
493 }
494
495
496
497
498
499
500
501 public void setLink(List<Link> value) {
502 this.link = value;
503 }
504
505
506
507
508 public boolean isInterLibraryLoanAllowed() {
509 return interLibraryLoanAllowed;
510 }
511
512
513
514
515 public void setInterLibraryLoanAllowed(boolean value) {
516 this.interLibraryLoanAllowed = value;
517 }
518
519
520
521
522 public boolean isStaffOnlyFlag() {
523 return staffOnlyFlag;
524 }
525
526
527
528
529 public void setStaffOnlyFlag(boolean value) {
530 this.staffOnlyFlag = value;
531 }
532
533
534
535
536
537
538 public String getDonorPublicDisplay() {
539 return donorPublicDisplay;
540 }
541
542
543
544
545
546
547
548 public void setDonorPublicDisplay(String value) {
549 this.donorPublicDisplay = value;
550 }
551
552
553
554
555
556
557
558 public String getDonorNote() {
559 return donorNote;
560 }
561
562
563
564
565
566
567
568 public void setDonorNote(String value) {
569 this.donorNote = value;
570 }
571
572
573
574
575
576
577
578 public String getAccessStatus() {
579 return accessStatus;
580 }
581
582
583
584
585
586
587
588 public void setAccessStatus(String value) {
589 this.accessStatus = value;
590 }
591
592
593
594
595
596
597
598 public String getStatusDate() {
599 return statusDate;
600 }
601
602
603
604
605
606
607
608 public void setStatusDate(String value) {
609 this.statusDate = value;
610 }
611
612 public StatisticalSearchingCode getStatisticalSearchingCode() {
613 return statisticalSearchingCode;
614 }
615
616 public void setStatisticalSearchingCode(StatisticalSearchingCode statisticalSearchingCode) {
617 this.statisticalSearchingCode = statisticalSearchingCode;
618 }
619
620
621
622
623
624
625
626 public String getEResourceId() {
627 return eResourceId;
628 }
629
630
631
632
633
634
635
636 public void setEResourceId(String value) {
637 this.eResourceId = value;
638 }
639
640
641
642
643
644
645
646 public HoldingsAccessInformation getHoldingsAccessInformation() {
647 return holdingsAccessInformation;
648 }
649
650
651
652
653
654
655
656 public void setHoldingsAccessInformation(HoldingsAccessInformation value) {
657 this.holdingsAccessInformation = value;
658 }
659
660
661
662
663
664
665
666 public Platform getPlatform() {
667 return platform;
668 }
669
670
671
672
673
674
675
676 public void setPlatform(Platform value) {
677 this.platform = value;
678 }
679
680
681
682
683
684
685
686 public String getSubscriptionStatus() {
687 return subscriptionStatus;
688 }
689
690
691
692
693
694
695
696 public void setSubscriptionStatus(String value) {
697 this.subscriptionStatus = value;
698 }
699 public List<DonorInfo> getDonorInfo() {
700 if (donorInfo == null) {
701 donorInfo = new ArrayList<DonorInfo>();
702 }
703 return this.donorInfo;
704 }
705
706 public void setDonorInfo(List<DonorInfo> value){
707 this.donorInfo= value;
708 }
709
710 public String getBibIdentifier() {
711 return bibIdentifier;
712 }
713
714 public void setBibIdentifier(String bibIdentifier) {
715 this.bibIdentifier = bibIdentifier;
716 }
717
718 public String serialize(Object object) {
719 String result = null;
720 StringWriter sw = new StringWriter();
721 OleHoldings oleHoldings = (OleHoldings) object;
722 try {
723 JAXBContext jaxbContext = JAXBContext.newInstance(OleHoldings.class);
724 Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
725 jaxbMarshaller.marshal(oleHoldings, sw);
726 result = sw.toString();
727 } catch (Exception e) {
728
729 }
730 return result;
731 }
732
733 }