diff --git a/code/reindexer/reindexer.jar b/code/reindexer/reindexer.jar index 5f5d4ff2f5..6fbaf46335 100644 Binary files a/code/reindexer/reindexer.jar and b/code/reindexer/reindexer.jar differ diff --git a/code/reindexer/src/org/aspen_discovery/format_classification/IlsRecordFormatClassifier.java b/code/reindexer/src/org/aspen_discovery/format_classification/IlsRecordFormatClassifier.java index 095cb2877d..4b27ec33a3 100644 --- a/code/reindexer/src/org/aspen_discovery/format_classification/IlsRecordFormatClassifier.java +++ b/code/reindexer/src/org/aspen_discovery/format_classification/IlsRecordFormatClassifier.java @@ -41,13 +41,20 @@ public LinkedHashSet getFormatsForRecord(org.marc4j.marc.Record reco } } + /** + * Retrieve a format from the specified fallback field. This is untranslated because it gets translated later. + * + * @param record + * @param printFormats + * @param settings + */ protected void getFormatFromFallbackField(org.marc4j.marc.Record record, LinkedHashSet printFormats, BaseIndexingSettings settings) { if (settings instanceof IndexingProfile) { IndexingProfile indexingProfile = (IndexingProfile)settings; Set fields = MarcUtil.getFieldList(record, indexingProfile.getFallbackFormatField()); for (String curField : fields) { if (indexingProfile.hasTranslation("format", curField.toLowerCase())) { - printFormats.add(indexingProfile.translateValue("format", curField)); + printFormats.add( curField); } } } diff --git a/code/reindexer/src/org/aspen_discovery/format_classification/MarcRecordFormatClassifier.java b/code/reindexer/src/org/aspen_discovery/format_classification/MarcRecordFormatClassifier.java index 7cbb9d959e..c4f95a2321 100644 --- a/code/reindexer/src/org/aspen_discovery/format_classification/MarcRecordFormatClassifier.java +++ b/code/reindexer/src/org/aspen_discovery/format_classification/MarcRecordFormatClassifier.java @@ -47,6 +47,9 @@ public LinkedHashSet getFormatsForRecord(org.marc4j.marc.Record reco if (settings instanceof IndexingProfile) { IndexingProfile profile = (IndexingProfile) settings; String formatLower = format.toLowerCase(); + if (profile.hasTranslation("format", formatLower)) { + formatInfo.format = profile.translateValue("format", formatLower); + } if (profile.hasTranslation("format_category", formatLower)) { formatInfo.formatCategory = profile.translateValue("format_category", formatLower); }else{ diff --git a/code/reindexer/src/org/aspen_discovery/reindexer/IlsRecordProcessor.java b/code/reindexer/src/org/aspen_discovery/reindexer/IlsRecordProcessor.java index 9a467d2f2d..89d8fc3542 100644 --- a/code/reindexer/src/org/aspen_discovery/reindexer/IlsRecordProcessor.java +++ b/code/reindexer/src/org/aspen_discovery/reindexer/IlsRecordProcessor.java @@ -6,6 +6,10 @@ import com.turning_leaf_technologies.marc.MarcUtil; import com.turning_leaf_technologies.strings.AspenStringUtils; import org.apache.logging.log4j.Logger; +import org.aspen_discovery.format_classification.IIIRecordFormatClassifier; +import org.aspen_discovery.format_classification.IlsRecordFormatClassifier; +import org.aspen_discovery.format_classification.KohaRecordFormatClassifier; +import org.aspen_discovery.format_classification.NashvilleRecordFormatClassifier; import org.marc4j.marc.*; import java.sql.Connection; @@ -54,6 +58,22 @@ abstract class IlsRecordProcessor extends MarcRecordProcessor { super.settings = this.settings; profileType = indexingProfileRS.getString("name"); + //Setup format classifier + switch (settings.getIndexingClass()) { + case "III": + formatClassifier = new IIIRecordFormatClassifier(logger); + break; + case "Koha": + formatClassifier = new KohaRecordFormatClassifier(logger); + break; + case "NashvilleCarlX": + formatClassifier = new NashvilleRecordFormatClassifier(logger); + break; + default: + formatClassifier = new IlsRecordFormatClassifier(logger); + break; + } + try { String pattern = indexingProfileRS.getString("nonHoldableITypes"); if (pattern != null && !pattern.isEmpty()) { @@ -1628,7 +1648,8 @@ public void loadPrintFormatInformation(RecordInfo recordInfo, org.marc4j.marc.Re largePrintCheck(recordInfo, record); return; } - } if (recordInfo.hasItemFormats() && !recordInfo.allItemsHaveFormats()){ + } + if (recordInfo.hasItemFormats() && !recordInfo.allItemsHaveFormats()){ //We're doing bib level formats, but we got some item level formats (probably eContent or something) loadPrintFormatFromBib(recordInfo, record); for (ItemInfo itemInfo : recordInfo.getRelatedItems()){ diff --git a/sites/template.linux/conf/crontab_settings.txt b/sites/template.linux/conf/crontab_settings.txt index 85cb8c8a07..17e4f61855 100644 --- a/sites/template.linux/conf/crontab_settings.txt +++ b/sites/template.linux/conf/crontab_settings.txt @@ -97,4 +97,6 @@ ###################################### # Run Clam AV Scans # ###################################### -00 3 * * * root truncate -s0 /var/log/aspen-discovery/clam_av.log; /bin/clamscan --recursive=yes --quiet -i --exclude-dir=/var/lib/mysql --exclude-dir=/sys --exclude-dir=/data/aspen-discovery/{sitename}/solr7/ --exclude-dir=/var/log/aspen-discovery/{sitename} --exclude-dir=/data/aspen-discovery/{sitename}/covers/small --exclude-dir=/data/aspen-discovery/{sitename}/covers/medium --exclude-dir=/data/aspen-discovery/{sitename}/covers/large --log=/var/log/aspen-discovery/clam_av.log \ No newline at end of file +00 3 * * * root truncate -s0 /var/log/aspen-discovery/clam_av.log; /bin/clamscan --recursive=yes --quiet -i --exclude-dir=/var/lib/mysql --exclude-dir=/sys --exclude-dir=/data/aspen-discovery/{sitename}/solr7/ --exclude-dir=/var/log/aspen-discovery/{sitename} --exclude-dir=/data/aspen-discovery/{sitename}/covers/small --exclude-dir=/data/aspen-discovery/{sitename}/covers/medium --exclude-dir=/data/aspen-discovery/{sitename}/covers/large --log=/var/log/aspen-discovery/clam_av.log + +# Debian needs a blank line at the end of cron, make sure to add additional cron lines above this.