diff --git a/import/index_java/src/org/vufind/index/FormatCalculator.java b/import/index_java/src/org/vufind/index/FormatCalculator.java index 13aaee355ed..d383f96f097 100644 --- a/import/index_java/src/org/vufind/index/FormatCalculator.java +++ b/import/index_java/src/org/vufind/index/FormatCalculator.java @@ -284,6 +284,8 @@ protected String getFormatFromBibLevel(Record record, char recordType, char bibL break; // Serial case 's': + // For some materials, we may want to know if this is an online item: + boolean isOnline = (recordType == 'a' || recordType == 'm') && (get008Value(marc008, 23) == 'o'); // Look in 008 to determine what type of Continuing Resource // Make sure we have the applicable LDR/06: Language Material if (recordType == 'a') { @@ -291,13 +293,13 @@ protected String getFormatFromBibLevel(Record record, char recordType, char bibL case 'n': return "Newspaper"; case 'p': - return "Journal"; + return isOnline ? "eJournal" : "Journal"; default: break; } } - // Default to serial even if 008 is missing + // Default to serial even if 008 is missing (but use eJournal for online things) if (!isConferenceProceeding(record)) { - return "Serial"; + return isOnline ? "eJournal" : "Serial"; } break; } diff --git a/import/translation_maps/format_map.properties b/import/translation_maps/format_map.properties index e0f02003d34..e31364e5590 100644 --- a/import/translation_maps/format_map.properties +++ b/import/translation_maps/format_map.properties @@ -16,6 +16,7 @@ DataSet = Data Set DiscCartridge = Software Drawing = Photo eBook = eBook +eJournal = Journal Electronic = Electronic ElectronicResource = Software Filmstrip = Video diff --git a/import/translation_maps/format_map_level0.properties b/import/translation_maps/format_map_level0.properties index 2d479bd1473..39f1f1ce8a7 100644 --- a/import/translation_maps/format_map_level0.properties +++ b/import/translation_maps/format_map_level0.properties @@ -20,6 +20,7 @@ DataSet = 0/Software/ DiscCartridge = 0/Software/ Drawing = 0/Image/ eBook = 0/Book/ +eJournal = 0/Serial/ Electronic = 0/Electronic/ ElectronicResource = 0/Software/ Filmstrip = 0/Video/ diff --git a/import/translation_maps/format_map_level1.properties b/import/translation_maps/format_map_level1.properties index fbd927a0f7f..6e154ef602c 100644 --- a/import/translation_maps/format_map_level1.properties +++ b/import/translation_maps/format_map_level1.properties @@ -23,6 +23,7 @@ DataSet = 1/Software/Data Set/ DiscCartridge = 1/Software/Disc Cartridge/ Drawing = 1/Image/Drawing/ eBook = 1/Book/eBook/ +eJournal = 1/Serial/Journal/ #Electronic = 1/Electronic/?/ ElectronicResource = 1/Software/Other/ Filmstrip = 1/Video/Filmstrip/ diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AdvancedSearchTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AdvancedSearchTest.php index 11b4bfd68f7..59343f6bb9c 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AdvancedSearchTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AdvancedSearchTest.php @@ -277,7 +277,7 @@ public function testDefaultLimitSorting(): void $page = $this->goToAdvancedSearch($session); // By default, everything is sorted alphabetically: $this->assertEquals( - 'Article Book Book Chapter Conference Proceeding eBook Electronic Journal Microfilm Serial', + 'Article Book Book Chapter Conference Proceeding eBook Electronic Journal Microfilm', $this->findCssAndGetText($page, '#limit_format') ); // Change the language: @@ -286,7 +286,7 @@ public function testDefaultLimitSorting(): void $this->waitForPageLoad($page); // Still sorted alphabetically, even though in a different language: $this->assertEquals( - 'Artikel Buch Buchkapitel E-Book Elektronisch Mikrofilm Schriftenreihe Tagungsbericht Zeitschrift', + 'Artikel Buch Buchkapitel E-Book Elektronisch Mikrofilm Tagungsbericht Zeitschrift', $this->findCssAndGetText($page, '#limit_format') ); } @@ -313,7 +313,7 @@ public function testLimitSortingWithOrderOverride(): void $page = $this->goToAdvancedSearch($session); // By default, everything is sorted alphabetically: $this->assertEquals( - 'Book eBook Article Book Chapter Conference Proceeding Electronic Journal Microfilm Serial', + 'Book eBook Article Book Chapter Conference Proceeding Electronic Journal Microfilm', $this->findCssAndGetText($page, '#limit_format') ); // Change the language: @@ -322,7 +322,7 @@ public function testLimitSortingWithOrderOverride(): void $this->waitForPageLoad($page); // Still sorted alphabetically, even though in a different language: $this->assertEquals( - 'Buch E-Book Artikel Buchkapitel Elektronisch Mikrofilm Schriftenreihe Tagungsbericht Zeitschrift', + 'Buch E-Book Artikel Buchkapitel Elektronisch Mikrofilm Tagungsbericht Zeitschrift', $this->findCssAndGetText($page, '#limit_format') ); }