Skip to content

Commit

Permalink
Fix: OAI namespace must end with slash
Browse files Browse the repository at this point in the history
  • Loading branch information
claussni committed Oct 4, 2016
1 parent ef3bc0a commit 4cf37bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<groupId>de.qucosa</groupId>
<artifactId>qucosa-sword-filehandler</artifactId>
<version>1.4.4</version>
<version>1.4.5-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Qucosa SWORD 1.3 Filehandler</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class QucosaMETSFileHandler extends DefaultFileHandler {
public static final String QUCOSA_CMODEL = "qucosa:CModel";
private static final Logger log = Logger.getLogger(QucosaMETSFileHandler.class);
private static final String DEFAULT_COLLECTION_PID = "qucosa:all";
public static final Namespace NS_OAI = Namespace.getNamespace("oai", "http://www.openarchives.org/OAI/2.0/");

private final XPathQuery XPATH_ATTACHMENTS;

Expand Down Expand Up @@ -270,7 +271,7 @@ private Relationship buildRelationships(DepositCollection deposit, METSContainer
private void addOaiItemId(String depositId, ExtendedRelationship target) {
if (depositId == null || depositId.isEmpty()) return;
String oaiItemId = String.format("oai:%s:%s", "qucosa:de", depositId);
target.addLiteral(Namespace.getNamespace("oai", "http://www.openarchives.org/OAI/2.0"), "itemID", oaiItemId);
target.addLiteral(NS_OAI, "itemID", oaiItemId);
}

private void addDocumentRelations(METSContainer source, Relationship target) {
Expand Down

0 comments on commit 4cf37bd

Please sign in to comment.