1 package org.kuali.ole.batch.bo;
2
3 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
4
5 import java.io.IOException;
6
7
8
9
10
11
12
13
14 public class MatchingProfile extends PersistableBusinessObjectBase {
15
16 private boolean matchBibs;
17 private boolean noMatchBibs_addBibs;
18 private String bibsNotMatchAddIncomingBibs;
19
20 private boolean bibNotMatched_discardBib;
21 private boolean bibNotMatched_addBib;
22
23 private String matchIncomingExistBib;
24
25 private String bibNotMatchedDiscardOrAdd;
26
27 private boolean bibMatched_addBib;
28 private boolean bibMatched_discardBib;
29 private boolean bibMatched_updateBib;
30 private String bibMatchedDiscardOrAddOrUpdate;
31 private String bibMatchedDiscardOrUpdate;
32
33
34 private boolean matchHoldings;
35 private boolean noMatchHoldings_discardHoldingsItems;
36 private boolean noMatchHoldings_deleteAddHoldingsItems;
37 private boolean noMatchHoldings_retainAddHoldingsItems;
38 private boolean holdingsNotMatched_discardHoldings;
39 private boolean holdingsNotMatched_addHoldings;
40 private boolean holdingsNotMatched_addItems;
41 private boolean holdingsMatched_addHoldings;
42 private boolean holdingsMatched_addItems;
43 private boolean holdingsMatched_discardHoldings;
44 private boolean holdingsMatched_updateHoldings;
45
46 private String matchIncomingHoldings;
47 private String discardDeleteKeepHoldingItem;
48 private String incomingHoldingNotMatched;
49 private String incomingHoldingMatched;
50 private String incomingHoldingMatchedProcessHolding;
51 private String incomingHoldingMatchedProcessItem;
52 private String discardDeleteKeepItem;
53 private String incomingItemMatchedProcessItem;
54
55
56 private boolean matchItems;
57 private boolean noMatchItem_discardItems;
58 private boolean noMatchItem_deleteAddItems;
59 private boolean noMatchItem_retainAddItems;
60 private boolean itemNotMatched_discardItem;
61 private boolean itemNotMatched_addItem;
62 private boolean itemMatched_addItem;
63 private boolean itemMatched_updateItem;
64
65 private String matchIncomingItems;
66
67 private String incomingItemNotMatchedProcessItem;
68
69 private String incomingBibNotMatchWithExistBib;
70 private String incomingBibMatchWithExistBib;
71 private String processBib;
72
73 private static String MATCH_BIBS = "matchBibs";
74 private static String NO_MATCH_BIBS_ADD_BIBS = "noMatchBibs_addBibs";
75 private static String BIB_NOT_MATCHED_DISCARD_BIB = "bibNotMatched_discardBib";
76 private static String BIB_NOT_MATCHED_ADD_BIB = "bibNotMatched_addBib";
77 private static String BIB_MATCHED_ADD_BIB = "bibMatched_addBib";
78 private static String BIB_MATCHED_DISCARD_BIB = "bibMatched_discardBib";
79 private static String BIB_MATCHED_UPDATE_BIB = "bibMatched_updateBib";
80
81 private static String MATCH_HOLDINGS = "matchHoldings";
82 private static String NO_MATCH_HOLDINGS_DISCARD_HOLDINGS_ITEMS = "noMatchHoldings_discardHoldingsItems";
83 private static String NO_MATCH_HOLDINGS_DELETE_ADD_HOLDINGS_ITEMS = "noMatchHoldings_deleteAddHoldingsItems";
84 private static String NO_MATCH_HOLDINGS_RETAIN_ADD_HOLDINGS_ITEMS = "noMatchHoldings_retainAddHoldingsItems";
85 private static String HOLDINGS_NOT_MATCHED_DISCARD_HOLDINGS = "holdingsNotMatched_discardHoldings";
86 private static String HOLDINGS_NOT_MATCHED_ADD_HOLDINGS = "holdingsNotMatched_addHoldings";
87 private static String HOLDINGS_NOT_MATCHED_ADD_ITEMS = "holdingsNotMatched_addItems";
88 private static String HOLDINGS_MATCHED_ADD_HOLDINGS = "holdingsMatched_addHoldings";
89 private static String HOLDINGS_MATCHED_ADD_ITEMS = "holdingsMatched_addItems";
90 private static String HOLDINGS_MATCHED_DISCARD_HOLDINGS = "holdingsMatched_discardHoldings";
91 private static String HOLDINGS_MATCHED_UPDATE_HOLDINGS = "holdingsMatched_updateHoldings";
92
93 private static String MATCH_ITEMS = "matchItems";
94 private static String NO_MATCH_ITEM_DISCARD_ITEMS = "noMatchItem_discardItems";
95 private static String NO_MATCH_ITEM_DELETE_ADD_ITEMS = "noMatchItem_deleteAddItems";
96 private static String NO_MATCH_ITEM_RETAIN_ADD_ITEMS = "noMatchItem_retainAddItems";
97 private static String ITEM_NOT_MATCHED_DISCARD_ITEM = "itemNotMatched_discardItem";
98 private static String ITEM_NOT_MATCHED_ADD_ITEM = "itemNotMatched_addItem";
99 private static String ITEM_MATCHED_ADD_ITEM = "itemMatched_addItem";
100 private static String ITEM_MATCHED_UPDATE_ITEM = "itemMatched_updateItem";
101 private static String COMMA = ",";
102 private static String EQUALS = "=";
103
104 private static String PERFORM_MATCHING = "performMatching";
105 private static String NOT_PERFORM_MATCHING = "notPerformMatching";
106 private static String PERFORM_HOLDING_MATCH = "performHoldingMatch";
107 private static String NOT_PERFORM_HOLDING_MATCH = "notPerformHodingMatch";
108 private static String PERFORM_MATCHING_OF_ITEM = "performMatchingOfItem";
109 private static String NOT_PERFORM_MATCHING_OF_ITEM = "notPerformMatchingOfItem";
110 private static String PROCESS_BIB_HOLDINGS_ITEMS = "processBibHoldingsItems";
111 private static String PROCESS_HOLDING_AND_ITEM = "processHoldingAndItem";
112
113
114
115
116 @Override
117 public String toString() {
118 if (!matchIncomingExistBib.isEmpty() && matchIncomingExistBib.equals(PERFORM_MATCHING)) {
119 matchBibs = true;
120 } else {
121 matchBibs = false;
122 }
123 if (!bibsNotMatchAddIncomingBibs.isEmpty() && bibsNotMatchAddIncomingBibs.equals(NO_MATCH_BIBS_ADD_BIBS)) {
124 noMatchBibs_addBibs = true;
125 } else {
126 noMatchBibs_addBibs = false;
127 }
128
129 if (!bibNotMatchedDiscardOrAdd.isEmpty() && bibNotMatchedDiscardOrAdd.equals(BIB_NOT_MATCHED_ADD_BIB)) {
130
131 bibNotMatched_addBib = true;
132 bibNotMatched_discardBib = false;
133 } else {
134 bibNotMatched_discardBib = true;
135 bibNotMatched_addBib = false;
136 }
137
138 if (!bibMatchedDiscardOrAddOrUpdate.isEmpty() && bibMatchedDiscardOrAddOrUpdate.equals(PROCESS_BIB_HOLDINGS_ITEMS)) {
139 bibMatched_addBib = false;
140 } else {
141 bibMatched_addBib = true;
142 }
143
144 if (!bibMatchedDiscardOrUpdate.isEmpty() && bibMatchedDiscardOrUpdate.equals(BIB_MATCHED_UPDATE_BIB)) {
145 bibMatched_updateBib = true;
146 bibMatched_discardBib = false;
147 } else {
148 bibMatched_discardBib = true;
149 bibMatched_updateBib = false;
150 }
151
152 if (!matchIncomingHoldings.isEmpty() && matchIncomingHoldings.equals(PERFORM_HOLDING_MATCH)) {
153 matchHoldings = true;
154 } else {
155 matchHoldings = false;
156 }
157
158 if (!discardDeleteKeepHoldingItem.isEmpty() && discardDeleteKeepHoldingItem.equals(NO_MATCH_HOLDINGS_DISCARD_HOLDINGS_ITEMS)) {
159 noMatchHoldings_discardHoldingsItems = true;
160 noMatchHoldings_deleteAddHoldingsItems = false;
161 noMatchHoldings_retainAddHoldingsItems = false;
162
163 } else if (!discardDeleteKeepHoldingItem.isEmpty() && discardDeleteKeepHoldingItem.equals(NO_MATCH_HOLDINGS_DELETE_ADD_HOLDINGS_ITEMS)) {
164 noMatchHoldings_discardHoldingsItems = false;
165 noMatchHoldings_deleteAddHoldingsItems = true;
166 noMatchHoldings_retainAddHoldingsItems = false;
167 } else {
168 noMatchHoldings_discardHoldingsItems = false;
169 noMatchHoldings_deleteAddHoldingsItems = false;
170 noMatchHoldings_retainAddHoldingsItems = true;
171 }
172
173 if (!incomingHoldingNotMatched.isEmpty() && incomingHoldingNotMatched.equals(HOLDINGS_NOT_MATCHED_ADD_HOLDINGS)) {
174 holdingsNotMatched_addHoldings = true;
175
176 holdingsNotMatched_discardHoldings = false;
177 } else {
178 holdingsNotMatched_addHoldings = false;
179
180 holdingsNotMatched_discardHoldings = true;
181 }
182 if (!incomingHoldingMatched.isEmpty() && incomingHoldingMatched.equals(HOLDINGS_MATCHED_ADD_HOLDINGS)) {
183 holdingsMatched_addHoldings = true;
184
185 } else {
186 holdingsMatched_addHoldings = false;
187
188 }
189
190
191 if (!incomingHoldingMatchedProcessHolding.isEmpty() && incomingHoldingMatchedProcessHolding.equals(HOLDINGS_MATCHED_UPDATE_HOLDINGS)) {
192 holdingsMatched_updateHoldings = true;
193 holdingsMatched_discardHoldings = false;
194 } else {
195 holdingsMatched_updateHoldings = false;
196 holdingsMatched_discardHoldings = true;
197 }
198
199
200 if (!matchIncomingItems.isEmpty() && matchIncomingItems.equals(PERFORM_MATCHING_OF_ITEM)) {
201 matchItems = true;
202
203 } else {
204 matchItems = false;
205
206 }
207 if (!discardDeleteKeepItem.isEmpty() && discardDeleteKeepItem.equals(NO_MATCH_ITEM_DISCARD_ITEMS)) {
208 noMatchItem_discardItems = true;
209 noMatchItem_deleteAddItems = false;
210 noMatchItem_retainAddItems = false;
211 } else if (!discardDeleteKeepItem.isEmpty() && discardDeleteKeepItem.equals(NO_MATCH_ITEM_DELETE_ADD_ITEMS)) {
212 noMatchItem_discardItems = false;
213 noMatchItem_deleteAddItems = true;
214 noMatchItem_retainAddItems = false;
215 } else {
216 noMatchItem_discardItems = false;
217 noMatchItem_deleteAddItems = false;
218 noMatchItem_retainAddItems = true;
219
220 }
221
222
223 if (!incomingItemNotMatchedProcessItem.isEmpty() && incomingItemNotMatchedProcessItem.equals(ITEM_NOT_MATCHED_ADD_ITEM)) {
224 itemNotMatched_addItem = true;
225 itemNotMatched_discardItem = false;
226 } else {
227 itemNotMatched_addItem = false;
228 itemNotMatched_discardItem = true;
229 }
230 if (!incomingItemMatchedProcessItem.isEmpty() && incomingItemMatchedProcessItem.equals(ITEM_MATCHED_UPDATE_ITEM)) {
231 itemMatched_updateItem = true;
232 itemMatched_addItem = false;
233 } else {
234 itemMatched_updateItem = false;
235 itemMatched_addItem = true;
236 }
237
238
239 return MATCH_BIBS + EQUALS + matchBibs +
240 COMMA + NO_MATCH_BIBS_ADD_BIBS + EQUALS + noMatchBibs_addBibs +
241 COMMA + BIB_NOT_MATCHED_DISCARD_BIB + EQUALS + bibNotMatched_discardBib +
242 COMMA + BIB_NOT_MATCHED_ADD_BIB + EQUALS + bibNotMatched_addBib +
243 COMMA + BIB_MATCHED_ADD_BIB + EQUALS + bibMatched_addBib +
244 COMMA + BIB_MATCHED_DISCARD_BIB + EQUALS + bibMatched_discardBib +
245 COMMA + BIB_MATCHED_UPDATE_BIB + EQUALS + bibMatched_updateBib +
246 COMMA + MATCH_HOLDINGS + EQUALS + matchHoldings +
247 COMMA + NO_MATCH_HOLDINGS_DISCARD_HOLDINGS_ITEMS + EQUALS + noMatchHoldings_discardHoldingsItems +
248 COMMA + NO_MATCH_HOLDINGS_DELETE_ADD_HOLDINGS_ITEMS + EQUALS + noMatchHoldings_deleteAddHoldingsItems +
249 COMMA + NO_MATCH_HOLDINGS_RETAIN_ADD_HOLDINGS_ITEMS + EQUALS + noMatchHoldings_retainAddHoldingsItems +
250 COMMA + HOLDINGS_NOT_MATCHED_DISCARD_HOLDINGS + EQUALS + holdingsNotMatched_discardHoldings +
251 COMMA + HOLDINGS_NOT_MATCHED_ADD_HOLDINGS + EQUALS + holdingsNotMatched_addHoldings +
252 COMMA + HOLDINGS_NOT_MATCHED_ADD_ITEMS + EQUALS + holdingsNotMatched_addItems +
253 COMMA + HOLDINGS_MATCHED_ADD_HOLDINGS + EQUALS + holdingsMatched_addHoldings +
254 COMMA + HOLDINGS_MATCHED_ADD_ITEMS + EQUALS + holdingsMatched_addItems +
255 COMMA + HOLDINGS_MATCHED_DISCARD_HOLDINGS + EQUALS + holdingsMatched_discardHoldings +
256 COMMA + HOLDINGS_MATCHED_UPDATE_HOLDINGS + EQUALS + holdingsMatched_updateHoldings +
257 COMMA + MATCH_ITEMS + EQUALS + matchItems +
258 COMMA + NO_MATCH_ITEM_DISCARD_ITEMS + EQUALS + noMatchItem_discardItems +
259 COMMA + NO_MATCH_ITEM_DELETE_ADD_ITEMS + EQUALS + noMatchItem_deleteAddItems +
260 COMMA + NO_MATCH_ITEM_RETAIN_ADD_ITEMS + EQUALS + noMatchItem_retainAddItems +
261 COMMA + ITEM_NOT_MATCHED_DISCARD_ITEM + EQUALS + itemNotMatched_discardItem +
262 COMMA + ITEM_NOT_MATCHED_ADD_ITEM + EQUALS + itemNotMatched_addItem +
263 COMMA + ITEM_MATCHED_ADD_ITEM + EQUALS + itemMatched_addItem +
264 COMMA + ITEM_MATCHED_UPDATE_ITEM + EQUALS + itemMatched_updateItem;
265 }
266
267 public boolean isMatchBibs() {
268 return matchBibs;
269 }
270
271 public void setMatchBibs(boolean matchBibs) {
272 this.matchBibs = matchBibs;
273 }
274
275 public boolean isNoMatchBibs_addBibs() {
276 return noMatchBibs_addBibs;
277 }
278
279 public void setNoMatchBibs_addBibs(boolean noMatchBibs_addBibs) {
280 this.noMatchBibs_addBibs = noMatchBibs_addBibs;
281 }
282
283 public boolean isBibNotMatched_discardBib() {
284 return bibNotMatched_discardBib;
285 }
286
287 public void setBibNotMatched_discardBib(boolean bibNotMatched_discardBib) {
288 this.bibNotMatched_discardBib = bibNotMatched_discardBib;
289 }
290
291 public boolean isBibNotMatched_addBib() {
292 return bibNotMatched_addBib;
293 }
294
295 public void setBibNotMatched_addBib(boolean bibNotMatched_addBib) {
296 this.bibNotMatched_addBib = bibNotMatched_addBib;
297 }
298
299 public boolean isBibMatched_addBib() {
300 return bibMatched_addBib;
301 }
302
303 public void setBibMatched_addBib(boolean bibMatched_addBib) {
304 this.bibMatched_addBib = bibMatched_addBib;
305 }
306
307 public boolean isBibMatched_discardBib() {
308 return bibMatched_discardBib;
309 }
310
311 public void setBibMatched_discardBib(boolean bibMatched_discardBib) {
312 this.bibMatched_discardBib = bibMatched_discardBib;
313 }
314
315 public boolean isBibMatched_updateBib() {
316 return bibMatched_updateBib;
317 }
318
319 public void setBibMatched_updateBib(boolean bibMatched_updateBib) {
320 this.bibMatched_updateBib = bibMatched_updateBib;
321 }
322
323 public boolean isMatchHoldings() {
324 return matchHoldings;
325 }
326
327 public void setMatchHoldings(boolean matchHoldings) {
328 this.matchHoldings = matchHoldings;
329 }
330
331 public boolean isNoMatchHoldings_discardHoldingsItems() {
332 return noMatchHoldings_discardHoldingsItems;
333 }
334
335 public void setNoMatchHoldings_discardHoldingsItems(boolean noMatchHoldings_discardHoldingsItems) {
336 this.noMatchHoldings_discardHoldingsItems = noMatchHoldings_discardHoldingsItems;
337 }
338
339 public boolean isNoMatchHoldings_deleteAddHoldingsItems() {
340 return noMatchHoldings_deleteAddHoldingsItems;
341 }
342
343 public void setNoMatchHoldings_deleteAddHoldingsItems(boolean noMatchHoldings_deleteAddHoldingsItems) {
344 this.noMatchHoldings_deleteAddHoldingsItems = noMatchHoldings_deleteAddHoldingsItems;
345 }
346
347 public boolean isNoMatchHoldings_retainAddHoldingsItems() {
348 return noMatchHoldings_retainAddHoldingsItems;
349 }
350
351 public void setNoMatchHoldings_retainAddHoldingsItems(boolean noMatchHoldings_retainAddHoldingsItems) {
352 this.noMatchHoldings_retainAddHoldingsItems = noMatchHoldings_retainAddHoldingsItems;
353 }
354
355 public boolean isHoldingsNotMatched_discardHoldings() {
356 return holdingsNotMatched_discardHoldings;
357 }
358
359 public void setHoldingsNotMatched_discardHoldings(boolean holdingsNotMatched_discardHoldings) {
360 this.holdingsNotMatched_discardHoldings = holdingsNotMatched_discardHoldings;
361 }
362
363 public boolean isHoldingsNotMatched_addHoldings() {
364 return holdingsNotMatched_addHoldings;
365 }
366
367 public void setHoldingsNotMatched_addHoldings(boolean holdingsNotMatched_addHoldings) {
368 this.holdingsNotMatched_addHoldings = holdingsNotMatched_addHoldings;
369 }
370
371 public boolean isHoldingsNotMatched_addItems() {
372 return holdingsNotMatched_addItems;
373 }
374
375 public void setHoldingsNotMatched_addItems(boolean holdingsNotMatched_addItems) {
376 this.holdingsNotMatched_addItems = holdingsNotMatched_addItems;
377 }
378
379 public boolean isHoldingsMatched_addHoldings() {
380 return holdingsMatched_addHoldings;
381 }
382
383 public void setHoldingsMatched_addHoldings(boolean holdingsMatched_addHoldings) {
384 this.holdingsMatched_addHoldings = holdingsMatched_addHoldings;
385 }
386
387 public boolean isHoldingsMatched_addItems() {
388 return holdingsMatched_addItems;
389 }
390
391 public void setHoldingsMatched_addItems(boolean holdingsMatched_addItems) {
392 this.holdingsMatched_addItems = holdingsMatched_addItems;
393 }
394
395 public boolean isHoldingsMatched_discardHoldings() {
396 return holdingsMatched_discardHoldings;
397 }
398
399 public void setHoldingsMatched_discardHoldings(boolean holdingsMatched_discardHoldings) {
400 this.holdingsMatched_discardHoldings = holdingsMatched_discardHoldings;
401 }
402
403 public boolean isHoldingsMatched_updateHoldings() {
404 return holdingsMatched_updateHoldings;
405 }
406
407 public void setHoldingsMatched_updateHoldings(boolean holdingsMatched_updateHoldings) {
408 this.holdingsMatched_updateHoldings = holdingsMatched_updateHoldings;
409 }
410
411 public boolean isMatchItems() {
412 return matchItems;
413 }
414
415 public void setMatchItems(boolean matchItems) {
416 this.matchItems = matchItems;
417 }
418
419 public boolean isNoMatchItem_discardItems() {
420 return noMatchItem_discardItems;
421 }
422
423 public void setNoMatchItem_discardItems(boolean noMatchItem_discardItems) {
424 this.noMatchItem_discardItems = noMatchItem_discardItems;
425 }
426
427 public boolean isNoMatchItem_deleteAddItems() {
428 return noMatchItem_deleteAddItems;
429 }
430
431 public void setNoMatchItem_deleteAddItems(boolean noMatchItem_deleteAddItems) {
432 this.noMatchItem_deleteAddItems = noMatchItem_deleteAddItems;
433 }
434
435 public boolean isNoMatchItem_retainAddItems() {
436 return noMatchItem_retainAddItems;
437 }
438
439 public void setNoMatchItem_retainAddItems(boolean noMatchItem_retainAddItems) {
440 this.noMatchItem_retainAddItems = noMatchItem_retainAddItems;
441 }
442
443 public boolean isItemNotMatched_discardItem() {
444 return itemNotMatched_discardItem;
445 }
446
447 public void setItemNotMatched_discardItem(boolean itemNotMatched_discardItem) {
448 this.itemNotMatched_discardItem = itemNotMatched_discardItem;
449 }
450
451 public boolean isItemNotMatched_addItem() {
452 return itemNotMatched_addItem;
453 }
454
455 public void setItemNotMatched_addItem(boolean itemNotMatched_addItem) {
456 this.itemNotMatched_addItem = itemNotMatched_addItem;
457 }
458
459 public boolean isItemMatched_addItem() {
460 return itemMatched_addItem;
461 }
462
463 public void setItemMatched_addItem(boolean itemMatched_addItem) {
464 this.itemMatched_addItem = itemMatched_addItem;
465 }
466
467 public boolean isItemMatched_updateItem() {
468 return itemMatched_updateItem;
469 }
470
471 public void setItemMatched_updateItem(boolean itemMatched_updateItem) {
472 this.itemMatched_updateItem = itemMatched_updateItem;
473 }
474
475
476 public String getBibNotMatchedDiscardOrAdd() {
477 return bibNotMatchedDiscardOrAdd;
478 }
479
480 public void setBibNotMatchedDiscardOrAdd(String bibNotMatchedDiscardOrAdd) {
481 this.bibNotMatchedDiscardOrAdd = bibNotMatchedDiscardOrAdd;
482 }
483
484 public String getBibMatchedDiscardOrAddOrUpdate() {
485 return bibMatchedDiscardOrAddOrUpdate;
486 }
487
488 public void setBibMatchedDiscardOrAddOrUpdate(String bibMatchedDiscardOrAddOrUpdate) {
489 this.bibMatchedDiscardOrAddOrUpdate = bibMatchedDiscardOrAddOrUpdate;
490 }
491
492 public String getBibMatchedDiscardOrUpdate() {
493 return bibMatchedDiscardOrUpdate;
494 }
495
496 public void setBibMatchedDiscardOrUpdate(String bibMatchedDiscardOrUpdate) {
497 this.bibMatchedDiscardOrUpdate = bibMatchedDiscardOrUpdate;
498 }
499
500 public String getIncomingBibNotMatchWithExistBib() {
501 return incomingBibNotMatchWithExistBib;
502 }
503
504 public void setIncomingBibNotMatchWithExistBib(String incomingBibNotMatchWithExistBib) {
505 this.incomingBibNotMatchWithExistBib = incomingBibNotMatchWithExistBib;
506 }
507
508 public String getIncomingBibMatchWithExistBib() {
509 return incomingBibMatchWithExistBib;
510 }
511
512 public void setIncomingBibMatchWithExistBib(String incomingBibMatchWithExistBib) {
513 this.incomingBibMatchWithExistBib = incomingBibMatchWithExistBib;
514 }
515
516 public String getProcessBib() {
517 return processBib;
518 }
519
520 public void setProcessBib(String processBib) {
521 this.processBib = processBib;
522 }
523
524 public String getDiscardDeleteKeepHoldingItem() {
525 return discardDeleteKeepHoldingItem;
526 }
527
528 public void setDiscardDeleteKeepHoldingItem(String discardDeleteKeepHoldingItem) {
529 this.discardDeleteKeepHoldingItem = discardDeleteKeepHoldingItem;
530 }
531
532 public String getIncomingHoldingNotMatched() {
533 return incomingHoldingNotMatched;
534 }
535
536 public void setIncomingHoldingNotMatched(String incomingHoldingNotMatched) {
537 this.incomingHoldingNotMatched = incomingHoldingNotMatched;
538 }
539
540 public String getIncomingHoldingMatched() {
541 return incomingHoldingMatched;
542 }
543
544 public void setIncomingHoldingMatched(String incomingHoldingMatched) {
545 this.incomingHoldingMatched = incomingHoldingMatched;
546 }
547
548 public String getIncomingHoldingMatchedProcessHolding() {
549 return incomingHoldingMatchedProcessHolding;
550 }
551
552 public void setIncomingHoldingMatchedProcessHolding(String incomingHoldingMatchedProcessHolding) {
553 this.incomingHoldingMatchedProcessHolding = incomingHoldingMatchedProcessHolding;
554 }
555
556 public String getIncomingHoldingMatchedProcessItem() {
557 return incomingHoldingMatchedProcessItem;
558 }
559
560 public void setIncomingHoldingMatchedProcessItem(String incomingHoldingMatchedProcessItem) {
561 this.incomingHoldingMatchedProcessItem = incomingHoldingMatchedProcessItem;
562 }
563
564 public String getDiscardDeleteKeepItem() {
565 return discardDeleteKeepItem;
566 }
567
568 public void setDiscardDeleteKeepItem(String discardDeleteKeepItem) {
569 this.discardDeleteKeepItem = discardDeleteKeepItem;
570 }
571
572 public String getIncomingItemNotMatchedProcessItem() {
573 return incomingItemNotMatchedProcessItem;
574 }
575
576 public void setIncomingItemNotMatchedProcessItem(String incomingItemNotMatchedProcessItem) {
577 this.incomingItemNotMatchedProcessItem = incomingItemNotMatchedProcessItem;
578 }
579
580 public String getIncomingItemMatchedProcessItem() {
581 return incomingItemMatchedProcessItem;
582 }
583
584 public void setIncomingItemMatchedProcessItem(String incomingItemMatchedProcessItem) {
585 this.incomingItemMatchedProcessItem = incomingItemMatchedProcessItem;
586 }
587
588 public String getMatchIncomingExistBib() {
589 return matchIncomingExistBib;
590 }
591
592 public void setMatchIncomingExistBib(String matchIncomingExistBib) {
593 this.matchIncomingExistBib = matchIncomingExistBib;
594 }
595
596 public String getMatchIncomingHoldings() {
597 return matchIncomingHoldings;
598 }
599
600 public void setMatchIncomingHoldings(String matchIncomingHoldings) {
601 this.matchIncomingHoldings = matchIncomingHoldings;
602 }
603
604 public String getMatchIncomingItems() {
605 return matchIncomingItems;
606 }
607
608 public void setMatchIncomingItems(String matchIncomingItems) {
609 this.matchIncomingItems = matchIncomingItems;
610 }
611
612 public String getBibsNotMatchAddIncomingBibs() {
613 return bibsNotMatchAddIncomingBibs;
614 }
615
616 public void setBibsNotMatchAddIncomingBibs(String bibsNotMatchAddIncomingBibs) {
617 this.bibsNotMatchAddIncomingBibs = bibsNotMatchAddIncomingBibs;
618 }
619
620 public static MatchingProfile buildMatchProfileObj(String matchProfileString) throws IOException {
621 MatchingProfile matchingProfile = new MatchingProfile();
622 String keyValuePairs[] = matchProfileString.split(COMMA);
623
624 for (String keyValuePair : keyValuePairs) {
625 String keyValue[] = keyValuePair.split(EQUALS);
626 String key = keyValue[0];
627 String value = keyValue[1];
628 if (key.equalsIgnoreCase(MATCH_BIBS)) {
629 matchingProfile.setMatchBibs(Boolean.parseBoolean(value));
630 if (matchingProfile.isMatchBibs()) {
631 matchingProfile.setMatchIncomingExistBib(PERFORM_MATCHING);
632 } else {
633 matchingProfile.setMatchIncomingExistBib(NOT_PERFORM_MATCHING);
634 }
635
636 } else if (key.equalsIgnoreCase(NO_MATCH_BIBS_ADD_BIBS)) {
637 matchingProfile.setNoMatchBibs_addBibs(Boolean.parseBoolean(value));
638 if (matchingProfile.isNoMatchBibs_addBibs()) {
639 matchingProfile.setBibsNotMatchAddIncomingBibs(NO_MATCH_BIBS_ADD_BIBS);
640 }
641 } else if (key.equalsIgnoreCase(BIB_NOT_MATCHED_DISCARD_BIB)) {
642 matchingProfile.setBibNotMatched_discardBib(Boolean.parseBoolean(value));
643 if (matchingProfile.isBibNotMatched_discardBib()) {
644 matchingProfile.setBibNotMatchedDiscardOrAdd(BIB_NOT_MATCHED_DISCARD_BIB);
645 }
646 } else if (key.equalsIgnoreCase(BIB_NOT_MATCHED_ADD_BIB)) {
647 matchingProfile.setBibNotMatched_addBib(Boolean.parseBoolean(value));
648 if (matchingProfile.isBibNotMatched_addBib()) {
649 matchingProfile.setBibNotMatchedDiscardOrAdd(BIB_NOT_MATCHED_ADD_BIB);
650 }
651 } else if (key.equalsIgnoreCase(BIB_MATCHED_ADD_BIB)) {
652 matchingProfile.setBibMatched_addBib(Boolean.parseBoolean(value));
653 if (matchingProfile.isBibMatched_addBib()) {
654 matchingProfile.setBibMatchedDiscardOrAddOrUpdate(BIB_MATCHED_ADD_BIB);
655 } else {
656 matchingProfile.setBibMatchedDiscardOrAddOrUpdate(PROCESS_BIB_HOLDINGS_ITEMS);
657 }
658 } else if (key.equalsIgnoreCase(BIB_MATCHED_DISCARD_BIB)) {
659 matchingProfile.setBibMatched_discardBib(Boolean.parseBoolean(value));
660 if (matchingProfile.isBibMatched_discardBib()) {
661 matchingProfile.setBibMatchedDiscardOrUpdate(BIB_MATCHED_DISCARD_BIB);
662 }
663 } else if (key.equalsIgnoreCase(BIB_MATCHED_UPDATE_BIB)) {
664 matchingProfile.setBibMatched_updateBib(Boolean.parseBoolean(value));
665 if (matchingProfile.isBibMatched_updateBib()) {
666 matchingProfile.setBibMatchedDiscardOrUpdate(BIB_MATCHED_UPDATE_BIB);
667 }
668 } else if (key.equalsIgnoreCase(MATCH_HOLDINGS)) {
669 matchingProfile.setMatchHoldings(Boolean.parseBoolean(value));
670 if (matchingProfile.isMatchHoldings()) {
671 matchingProfile.setMatchIncomingHoldings(PERFORM_HOLDING_MATCH);
672 } else {
673 matchingProfile.setMatchIncomingHoldings(NOT_PERFORM_HOLDING_MATCH);
674 }
675 } else if (key.equalsIgnoreCase(NO_MATCH_HOLDINGS_DISCARD_HOLDINGS_ITEMS)) {
676 matchingProfile.setNoMatchHoldings_discardHoldingsItems(Boolean.parseBoolean(value));
677 if (matchingProfile.isNoMatchHoldings_discardHoldingsItems()) {
678 matchingProfile.setDiscardDeleteKeepHoldingItem(NO_MATCH_HOLDINGS_DISCARD_HOLDINGS_ITEMS);
679 }
680 } else if (key.equalsIgnoreCase(NO_MATCH_HOLDINGS_DELETE_ADD_HOLDINGS_ITEMS)) {
681 matchingProfile.setNoMatchHoldings_deleteAddHoldingsItems(Boolean.parseBoolean(value));
682 if (matchingProfile.isNoMatchHoldings_deleteAddHoldingsItems()) {
683 matchingProfile.setDiscardDeleteKeepHoldingItem(NO_MATCH_HOLDINGS_DELETE_ADD_HOLDINGS_ITEMS);
684 }
685 } else if (key.equalsIgnoreCase(NO_MATCH_HOLDINGS_RETAIN_ADD_HOLDINGS_ITEMS)) {
686 matchingProfile.setNoMatchHoldings_retainAddHoldingsItems(Boolean.parseBoolean(value));
687 if (matchingProfile.isNoMatchHoldings_retainAddHoldingsItems()) {
688 matchingProfile.setDiscardDeleteKeepHoldingItem(NO_MATCH_HOLDINGS_RETAIN_ADD_HOLDINGS_ITEMS);
689 }
690 } else if (key.equalsIgnoreCase(HOLDINGS_NOT_MATCHED_DISCARD_HOLDINGS)) {
691 matchingProfile.setHoldingsNotMatched_discardHoldings(Boolean.parseBoolean(value));
692 if (matchingProfile.isHoldingsNotMatched_discardHoldings()) {
693 matchingProfile.setIncomingHoldingNotMatched(HOLDINGS_NOT_MATCHED_DISCARD_HOLDINGS);
694 }
695
696 } else if (key.equalsIgnoreCase(HOLDINGS_NOT_MATCHED_ADD_HOLDINGS)) {
697 matchingProfile.setHoldingsNotMatched_addHoldings(Boolean.parseBoolean(value));
698 if (matchingProfile.isHoldingsNotMatched_addHoldings()) {
699 matchingProfile.setIncomingHoldingNotMatched(HOLDINGS_NOT_MATCHED_ADD_HOLDINGS);
700 }
701 } else if (key.equalsIgnoreCase(HOLDINGS_NOT_MATCHED_ADD_ITEMS)) {
702 matchingProfile.setHoldingsNotMatched_addItems(Boolean.parseBoolean(value));
703
704 } else if (key.equalsIgnoreCase(HOLDINGS_MATCHED_ADD_HOLDINGS)) {
705 matchingProfile.setHoldingsMatched_addHoldings(Boolean.parseBoolean(value));
706 if (matchingProfile.isHoldingsMatched_addHoldings()) {
707 matchingProfile.setIncomingHoldingMatched(HOLDINGS_MATCHED_ADD_HOLDINGS);
708 } else {
709 matchingProfile.setIncomingHoldingMatched(PROCESS_HOLDING_AND_ITEM);
710 }
711 } else if (key.equalsIgnoreCase(HOLDINGS_MATCHED_ADD_ITEMS)) {
712 matchingProfile.setHoldingsMatched_addItems(Boolean.parseBoolean(value));
713
714 } else if (key.equalsIgnoreCase(HOLDINGS_MATCHED_DISCARD_HOLDINGS)) {
715 matchingProfile.setHoldingsMatched_discardHoldings(Boolean.parseBoolean(value));
716 if (matchingProfile.isHoldingsMatched_discardHoldings()) {
717 matchingProfile.setIncomingHoldingMatchedProcessHolding(HOLDINGS_MATCHED_DISCARD_HOLDINGS);
718 }
719 } else if (key.equalsIgnoreCase(HOLDINGS_MATCHED_UPDATE_HOLDINGS)) {
720
721 matchingProfile.setHoldingsMatched_updateHoldings(Boolean.parseBoolean(value));
722 if (matchingProfile.isHoldingsMatched_updateHoldings()) {
723 matchingProfile.setIncomingHoldingMatchedProcessHolding(HOLDINGS_MATCHED_UPDATE_HOLDINGS);
724 }
725 } else if (key.equalsIgnoreCase(MATCH_ITEMS)) {
726 matchingProfile.setMatchItems(Boolean.parseBoolean(value));
727 if (matchingProfile.isMatchItems()) {
728 matchingProfile.setMatchIncomingItems(PERFORM_MATCHING_OF_ITEM);
729 } else {
730 matchingProfile.setMatchIncomingItems(NOT_PERFORM_MATCHING_OF_ITEM);
731 }
732 } else if (key.equalsIgnoreCase(NO_MATCH_ITEM_DISCARD_ITEMS)) {
733 matchingProfile.setNoMatchItem_discardItems(Boolean.parseBoolean(value));
734 if (matchingProfile.isNoMatchItem_discardItems()) {
735 matchingProfile.setDiscardDeleteKeepItem(NO_MATCH_ITEM_DISCARD_ITEMS);
736 }
737 } else if (key.equalsIgnoreCase(NO_MATCH_ITEM_DELETE_ADD_ITEMS)) {
738 matchingProfile.setNoMatchItem_deleteAddItems(Boolean.parseBoolean(value));
739 if (matchingProfile.isNoMatchItem_deleteAddItems()) {
740 matchingProfile.setDiscardDeleteKeepItem(NO_MATCH_ITEM_DELETE_ADD_ITEMS);
741 }
742 } else if (key.equalsIgnoreCase(NO_MATCH_ITEM_RETAIN_ADD_ITEMS)) {
743 matchingProfile.setNoMatchItem_retainAddItems(Boolean.parseBoolean(value));
744 if (matchingProfile.isNoMatchItem_retainAddItems()) {
745 matchingProfile.setDiscardDeleteKeepItem(NO_MATCH_ITEM_RETAIN_ADD_ITEMS);
746 }
747
748 } else if (key.equalsIgnoreCase(ITEM_NOT_MATCHED_DISCARD_ITEM)) {
749 matchingProfile.setItemNotMatched_discardItem(Boolean.parseBoolean(value));
750 if (matchingProfile.isItemNotMatched_discardItem()) {
751 matchingProfile.setIncomingItemNotMatchedProcessItem(ITEM_NOT_MATCHED_DISCARD_ITEM);
752 }
753 } else if (key.equalsIgnoreCase(ITEM_NOT_MATCHED_ADD_ITEM)) {
754 matchingProfile.setItemNotMatched_addItem(Boolean.parseBoolean(value));
755 if (matchingProfile.isItemNotMatched_addItem()) {
756 matchingProfile.setIncomingItemNotMatchedProcessItem(ITEM_NOT_MATCHED_ADD_ITEM);
757 }
758 } else if (key.equalsIgnoreCase(ITEM_MATCHED_ADD_ITEM)) {
759 matchingProfile.setItemMatched_addItem(Boolean.parseBoolean(value));
760 if (matchingProfile.isItemMatched_addItem()) {
761 matchingProfile.setIncomingItemMatchedProcessItem(ITEM_MATCHED_ADD_ITEM);
762 }
763 } else if (key.equalsIgnoreCase(ITEM_MATCHED_UPDATE_ITEM)) {
764 matchingProfile.setItemMatched_updateItem(Boolean.parseBoolean(value));
765 if (matchingProfile.isItemMatched_updateItem()) {
766 matchingProfile.setIncomingItemMatchedProcessItem(ITEM_MATCHED_UPDATE_ITEM);
767 }
768 }
769 }
770
771 return matchingProfile;
772 }
773
774
775 }