Commits

Sam Adams committed d887a91 Draft

support elsevier volume/supplement links

  • Participants
  • Parent commits 4a5e76b

Comments (0)

Files changed (2)

publishers/elsevier/src/main/java/wwmm/pubcrawler/crawlers/elsevier/parsers/ElsevierIssueLinkParser.java

     // /science/journal/00457949/62/part/P1
     // /science/journal/03770427/71-80/index/I1
     private static final Pattern VOLUME_PART =
-     Pattern.compile("/science/journal/([^/]+)/([^/]+)/(?:index|part)/([^/]+)");
+     Pattern.compile("/science/journal/([^/]+)/([^/]+)/(?:index|part|supp)/([^/]+)");
 
 
     public IssueLink parseIssueLink(final JournalId journalId, final String journalTitle, final URI url, final String link) {

publishers/elsevier/src/test/java/wwmm/pubcrawler/crawlers/elsevier/parsers/ElsevierIssueLinkParserTest.java

     }
 
     @Test
+    public void testParseVolumeSuppLink() {
+        assertEquals(new IssueId(JOURNAL, "116", "(S2)"), parser.parseIssueLink(JOURNAL, "TITLE", URI.create("http://foo.com/"), "/science/journal/00928674/116/supp/S2").getIssueId());
+    }
+
+    @Test
     public void testParseVolumeLink() {
         assertEquals(new IssueId(JOURNAL, "93", "-"), parser.parseIssueLink(JOURNAL, "TITLE", URI.create("http://foo.com/"), "/science/journal/00399140/93").getIssueId());
     }