|
6 | 6 | import com.turning_leaf_technologies.marc.MarcUtil;
|
7 | 7 | import com.turning_leaf_technologies.strings.AspenStringUtils;
|
8 | 8 | import org.apache.logging.log4j.Logger;
|
| 9 | +import org.aspen_discovery.format_classification.IIIRecordFormatClassifier; |
| 10 | +import org.aspen_discovery.format_classification.IlsRecordFormatClassifier; |
| 11 | +import org.aspen_discovery.format_classification.KohaRecordFormatClassifier; |
| 12 | +import org.aspen_discovery.format_classification.NashvilleRecordFormatClassifier; |
9 | 13 | import org.marc4j.marc.*;
|
10 | 14 |
|
11 | 15 | import java.sql.Connection;
|
@@ -54,6 +58,22 @@ abstract class IlsRecordProcessor extends MarcRecordProcessor {
|
54 | 58 | super.settings = this.settings;
|
55 | 59 | profileType = indexingProfileRS.getString("name");
|
56 | 60 |
|
| 61 | + //Setup format classifier |
| 62 | + switch (settings.getIndexingClass()) { |
| 63 | + case "III": |
| 64 | + formatClassifier = new IIIRecordFormatClassifier(logger); |
| 65 | + break; |
| 66 | + case "Koha": |
| 67 | + formatClassifier = new KohaRecordFormatClassifier(logger); |
| 68 | + break; |
| 69 | + case "NashvilleCarlX": |
| 70 | + formatClassifier = new NashvilleRecordFormatClassifier(logger); |
| 71 | + break; |
| 72 | + default: |
| 73 | + formatClassifier = new IlsRecordFormatClassifier(logger); |
| 74 | + break; |
| 75 | + } |
| 76 | + |
57 | 77 | try {
|
58 | 78 | String pattern = indexingProfileRS.getString("nonHoldableITypes");
|
59 | 79 | if (pattern != null && !pattern.isEmpty()) {
|
@@ -1628,7 +1648,8 @@ public void loadPrintFormatInformation(RecordInfo recordInfo, org.marc4j.marc.Re
|
1628 | 1648 | largePrintCheck(recordInfo, record);
|
1629 | 1649 | return;
|
1630 | 1650 | }
|
1631 |
| - } if (recordInfo.hasItemFormats() && !recordInfo.allItemsHaveFormats()){ |
| 1651 | + } |
| 1652 | + if (recordInfo.hasItemFormats() && !recordInfo.allItemsHaveFormats()){ |
1632 | 1653 | //We're doing bib level formats, but we got some item level formats (probably eContent or something)
|
1633 | 1654 | loadPrintFormatFromBib(recordInfo, record);
|
1634 | 1655 | for (ItemInfo itemInfo : recordInfo.getRelatedItems()){
|
|
0 commit comments