ref #1924 use colon as after author and year operator
authorAndreas Müller <a.mueller@bgbm.org>
Mon, 17 May 2021 17:15:45 +0000 (19:15 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Mon, 17 May 2021 17:15:45 +0000 (19:15 +0200)
cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/cache/reference/ReferenceDefaultCacheStrategy.java
cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/cache/reference/ReferenceDefaultCacheStrategyTest.java

index 876c7287f65369d1080841ae2b6dfc8b0351b0b1..bb547378b70ee716cc8f5ac6c2b0a40bc816c14b 100644 (file)
@@ -62,7 +62,7 @@ public class ReferenceDefaultCacheStrategy
     //book\r
 \r
     //(book?) section\r
-    private String afterSectionAuthor = ", ";\r
+    private String afterSectionAuthor = ": ";\r
 \r
     //in reference\r
     private String biblioInSeparator = UTF8.EN_DASH + " In: "; //#9529\r
index 1ac731aec83d0dfb94f76a24b0239a9785479195..d25e76de185ca7a5dee5602364fae4b817ff99bb 100644 (file)
@@ -283,23 +283,23 @@ public class ReferenceDefaultCacheStrategyTest {
         bookSection1.setInBook(book1);
         bookSection1.setAuthorship(sectionTeam1);
         book1.setDatePublished(VerbatimTimePeriod.NewVerbatimInstance(1975));
-        Assert.assertEquals("Unexpected title cache.", "Section Author, My chapter. "+UTF8.EN_DASH+" In: Book Author, My book. 1975", bookSection1.getTitleCache());
+        Assert.assertEquals("Unexpected title cache.", "Section Author: My chapter. "+UTF8.EN_DASH+" In: Book Author, My book. 1975", bookSection1.getTitleCache());
 
         book1.setDatePublished((VerbatimTimePeriod)null);
         bookSection1.setDatePublished(VerbatimTimePeriod.NewVerbatimInstance(1976));
         bookSection1.setTitleCache(null, false);
         book1.setTitleCache(null, false);
-        Assert.assertEquals("Unexpected title cache.", "Section Author, My chapter. "+UTF8.EN_DASH+" In: Book Author, My book. 1976", bookSection1.getTitleCache());
+        Assert.assertEquals("Unexpected title cache.", "Section Author: My chapter. "+UTF8.EN_DASH+" In: Book Author, My book. 1976", bookSection1.getTitleCache());
         //with in-ref year (ignore if there is ref year)
         book1.setDatePublished(VerbatimTimePeriod.NewVerbatimInstance(1977));
         bookSection1.setTitleCache(null, false);
         book1.setTitleCache(null, false);
-        Assert.assertEquals("Unexpected title cache.", "Section Author, My chapter. "+UTF8.EN_DASH+" In: Book Author, My book. 1976", bookSection1.getTitleCache());
+        Assert.assertEquals("Unexpected title cache.", "Section Author: My chapter. "+UTF8.EN_DASH+" In: Book Author, My book. 1976", bookSection1.getTitleCache());
         //with series part
         bookSection1.setTitleCache(null, false);
         book1.setTitleCache(null, false);
         book1.setSeriesPart("2");
-        Assert.assertEquals("Unexpected title cache.", "Section Author, My chapter. "+UTF8.EN_DASH+" In: Book Author, My book, ser. 2. 1976", bookSection1.getTitleCache());
+        Assert.assertEquals("Unexpected title cache.", "Section Author: My chapter. "+UTF8.EN_DASH+" In: Book Author, My book, ser. 2. 1976", bookSection1.getTitleCache());
         //without section title
         bookSection1.setTitle(null);
         bookSection1.setTitleCache(null, false);
@@ -310,15 +310,15 @@ public class ReferenceDefaultCacheStrategyTest {
         //#6496, 9529, 9530
         bookSection1.setPages("33-38");
         bookSection1.setTitleCache(null, false);
-        Assert.assertEquals("Unexpected title cache.", "Section Author, My chapter, pp. 33-38. "+UTF8.EN_DASH+" In: Book Author, My book, ser. 2. 1976", bookSection1.getTitleCache());
+        Assert.assertEquals("Unexpected title cache.", "Section Author: My chapter, pp. 33-38. "+UTF8.EN_DASH+" In: Book Author, My book, ser. 2. 1976", bookSection1.getTitleCache());
         bookSection1.setPages("v");
         bookSection1.setTitleCache(null, false);
-        Assert.assertEquals("Unexpected title cache.", "Section Author, My chapter, p. v. "+UTF8.EN_DASH+" In: Book Author, My book, ser. 2. 1976", bookSection1.getTitleCache());
+        Assert.assertEquals("Unexpected title cache.", "Section Author: My chapter, p. v. "+UTF8.EN_DASH+" In: Book Author, My book, ser. 2. 1976", bookSection1.getTitleCache());
         bookSection1.setPages(null);
 
         bookSection1.setInBook(null);
         bookSection1.setTitleCache(null, false);
-        Assert.assertEquals("Unexpected title cache.", "Section Author, My chapter. "+UTF8.EN_DASH+" In: - undefined book -. 1976", bookSection1.getTitleCache());
+        Assert.assertEquals("Unexpected title cache.", "Section Author: My chapter. "+UTF8.EN_DASH+" In: - undefined book -. 1976", bookSection1.getTitleCache());
     }
 
     @Test
@@ -330,15 +330,15 @@ public class ReferenceDefaultCacheStrategyTest {
         bookSection1.setInBook(book1);
         bookSection1.setAuthorship(sectionTeam1);
         book1.setDatePublished(VerbatimTimePeriod.NewVerbatimInstance(1975));
-        Assert.assertEquals("Unexpected title cache.", "Section Author, My chapter. "+UTF8.EN_DASH+" In: Book Author, My book. 1975", bookSection1.getTitleCache());
+        Assert.assertEquals("Unexpected title cache.", "Section Author: My chapter. "+UTF8.EN_DASH+" In: Book Author, My book. 1975", bookSection1.getTitleCache());
         book1.setDatePublished((VerbatimTimePeriod)null);
         bookSection1.setDatePublished(VerbatimTimePeriod.NewVerbatimInstance(1976));
-        Assert.assertEquals("Unexpected title cache.", "Section Author, My chapter. "+UTF8.EN_DASH+" In: Book Author, My book. 1976", bookSection1.getTitleCache());
+        Assert.assertEquals("Unexpected title cache.", "Section Author: My chapter. "+UTF8.EN_DASH+" In: Book Author, My book. 1976", bookSection1.getTitleCache());
         book1.setDatePublished(VerbatimTimePeriod.NewVerbatimInstance(1977));
-        Assert.assertEquals("Unexpected title cache.", "Section Author, My chapter. "+UTF8.EN_DASH+" In: Book Author, My book. 1976", bookSection1.getTitleCache());
+        Assert.assertEquals("Unexpected title cache.", "Section Author: My chapter. "+UTF8.EN_DASH+" In: Book Author, My book. 1976", bookSection1.getTitleCache());
 
         bookSection1.setInBook(null);
-        Assert.assertEquals("Unexpected title cache.", "Section Author, My chapter. "+UTF8.EN_DASH+" In: - undefined book -. 1976", bookSection1.getTitleCache());
+        Assert.assertEquals("Unexpected title cache.", "Section Author: My chapter. "+UTF8.EN_DASH+" In: - undefined book -. 1976", bookSection1.getTitleCache());
     }
 
     @Test
@@ -358,7 +358,7 @@ public class ReferenceDefaultCacheStrategyTest {
         bookSection.setInBook(book);
         bookSection.setAuthorship(sectionTeam);
         bookSection.setPages("222-251");
-        Assert.assertEquals("Chaudhary S. A., 73. Hedypnois - 87. Crepis, pp. 222-251. "+UTF8.EN_DASH+" In: Chaudhary S. A.(ed.), Flora of the Kingdom of Saudi Arabia 2(3). 2000", bookSection.getTitleCache());
+        Assert.assertEquals("Chaudhary S. A.: 73. Hedypnois - 87. Crepis, pp. 222-251. "+UTF8.EN_DASH+" In: Chaudhary S. A.(ed.), Flora of the Kingdom of Saudi Arabia 2(3). 2000", bookSection.getTitleCache());
 
     }
 
@@ -471,8 +471,8 @@ public class ReferenceDefaultCacheStrategyTest {
 
         //only inref has volume
         generic1.setVolume(null);
-        Assert.assertEquals("Authorteam, My generic. "+UTF8.EN_DASH+" In: InRefAuthor, My InRef 9. 1883"+SEP+"1884", generic1.getTitleCache());
-        Assert.assertEquals("AT., My generic. "+UTF8.EN_DASH+" In: InRefAuthor, My InRef 9. 1883"+SEP+"1884", generic1.getAbbrevTitleCache());
+        Assert.assertEquals("Authorteam: My generic. "+UTF8.EN_DASH+" In: InRefAuthor, My InRef 9. 1883"+SEP+"1884", generic1.getTitleCache());
+        Assert.assertEquals("AT.: My generic. "+UTF8.EN_DASH+" In: InRefAuthor, My InRef 9. 1883"+SEP+"1884", generic1.getAbbrevTitleCache());
    }
 
 // ********************************** WEB PAGE ********************************************/