update to Gradle 8.7, update to ISO 26324:2022
This commit is contained in:
parent
a51b807e81
commit
fecd63f9ed
3 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,3 @@
|
||||||
group = org.xbib
|
group = org.xbib
|
||||||
name = standardnumber
|
name = standardnumber
|
||||||
version = 3.0.0
|
version = 3.1.0
|
||||||
|
|
|
@ -45,7 +45,7 @@ import java.util.regex.Pattern;
|
||||||
public class DOI extends StandardNumber implements Cloneable, Comparable<DOI> {
|
public class DOI extends StandardNumber implements Cloneable, Comparable<DOI> {
|
||||||
|
|
||||||
private static final Pattern DOI_PATTERN =
|
private static final Pattern DOI_PATTERN =
|
||||||
Pattern.compile("\\b10\\.\\d{4}([.][0-9]+)*/[a-z0-9/\\-.()<>_:;\\\\]+\\b");
|
Pattern.compile("\\b\\d+\\.\\d+([\\.][0-9]+)*/[a-z0-9/\\-.()<>_:;\\\\]+\\b");
|
||||||
|
|
||||||
private static final Pattern DOI_URI_PATTERN =
|
private static final Pattern DOI_URI_PATTERN =
|
||||||
Pattern.compile("\\b(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;\\(\\)]*[-a-zA-Z0-9+&@#/%=~_|]\\b");
|
Pattern.compile("\\b(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;\\(\\)]*[-a-zA-Z0-9+&@#/%=~_|]\\b");
|
||||||
|
|
|
@ -49,7 +49,6 @@ public class DOITests {
|
||||||
assertEquals("https://doi.org/10.1016/0032-3861(93)90481-o", doi.format());
|
assertEquals("https://doi.org/10.1016/0032-3861(93)90481-o", doi.format());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testClone() throws Exception {
|
public void testClone() throws Exception {
|
||||||
StandardNumber doi = StandardNumber.getInstance("doi")
|
StandardNumber doi = StandardNumber.getInstance("doi")
|
||||||
|
@ -67,4 +66,14 @@ public class DOITests {
|
||||||
assertEquals("10.1523/jneurosci.0638-07.2007", doi.normalizedValue());
|
assertEquals("10.1523/jneurosci.0638-07.2007", doi.normalizedValue());
|
||||||
assertEquals("https://doi.org/10.1523/jneurosci.0638-07.2007", doi.format());
|
assertEquals("https://doi.org/10.1523/jneurosci.0638-07.2007", doi.format());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testStrangeDoi() throws Exception {
|
||||||
|
String doi = "10.58221/mosp.v115i4.6790";
|
||||||
|
StandardNumber standardNumber = StandardNumber.getInstance("doi")
|
||||||
|
.set(doi)
|
||||||
|
.normalize().verify();
|
||||||
|
assertEquals("10.58221/mosp.v115i4.6790", standardNumber.normalizedValue());
|
||||||
|
assertEquals("https://doi.org/10.58221/mosp.v115i4.6790", standardNumber.format());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue