Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

Commit ae21d53

Browse files
author
sowerstl
committed
Update DataCite Kernel to 4.3; (DOECODE-802)
1 parent e440d1d commit ae21d53

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/main/java/gov/osti/doi/DataCite.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ private static void writeRelatedIdentifiers(XMLStreamWriter sw, List<RelatedIden
239239

240240

241241
/**
242-
* Write a Metadata DOI request. (Now supporting schema 4.0)
242+
* Write a Metadata DOI request. (Now supporting schema 4.3)
243243
*
244244
* SET THE DOI TO THE DESIRED VALUE FIRST!
245245
*
@@ -266,7 +266,7 @@ protected static String writeMetadata(DOECodeMetadata m) throws IOException, XML
266266
sw.writeDefaultNamespace("http://datacite.org/schema/kernel-4");
267267
sw.writeNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
268268
sw.writeAttribute("http://www.w3.org/2001/XMLSchema-instance", "schemaLocation",
269-
"http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd");
269+
"http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.3/metadata.xsd");
270270

271271
sw.writeStartElement("identifier");
272272
sw.writeAttribute("identifierType", "DOI");

src/main/java/gov/osti/entity/RelatedIdentifier.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ public enum RelationType implements Serializable {
9595
HasVersion("Has Version"),
9696
IsVersionOf("Is Version Of"),
9797
IsRequiredBy("Is Required By"),
98-
Requires("Requires");
98+
Requires("Requires"),
99+
Obsoletes("Obsoletes"),
100+
IsObsoletedBy("Is Obsoleted By");
99101

100102
private final String label;
101103
private RelationType inverse;
@@ -132,6 +134,8 @@ public enum RelationType implements Serializable {
132134
IsVersionOf.inverse = HasVersion;
133135
IsRequiredBy.inverse = Requires;
134136
Requires.inverse = IsRequiredBy;
137+
IsObsoletedBy.inverse = Obsoletes;
138+
Obsoletes.inverse = IsObsoletedBy;
135139
}
136140

137141
private RelationType(String label) {

0 commit comments

Comments
 (0)