forked from D-Net/dnet-hadoop
test and fixed a problem with datacite namespaces
This commit is contained in:
parent
abcd3f5bf5
commit
408be3c632
|
@ -69,7 +69,7 @@ public abstract class AbstractMdRecordToOafMapper {
|
||||||
nsContext.put("datacite", "http://datacite.org/schema/kernel-3");
|
nsContext.put("datacite", "http://datacite.org/schema/kernel-3");
|
||||||
DocumentFactory.getInstance().setXPathNamespaceURIs(nsContext);
|
DocumentFactory.getInstance().setXPathNamespaceURIs(nsContext);
|
||||||
|
|
||||||
final Document doc = DocumentHelper.parseText(xml);
|
final Document doc = DocumentHelper.parseText(xml.replaceAll("http://datacite.org/schema/kernel-4", "http://datacite.org/schema/kernel-3"));
|
||||||
|
|
||||||
final String type = doc.valueOf("//dr:CobjCategory/@type");
|
final String type = doc.valueOf("//dr:CobjCategory/@type");
|
||||||
final KeyValue collectedFrom = keyValue(doc.valueOf("//oaf:collectedFrom/@id"), doc.valueOf("//oaf:collectedFrom/@name"));
|
final KeyValue collectedFrom = keyValue(doc.valueOf("//oaf:collectedFrom/@id"), doc.valueOf("//oaf:collectedFrom/@name"));
|
||||||
|
|
Loading…
Reference in New Issue