Skip to content

Commit

Permalink
Handling spaces in path names
Browse files Browse the repository at this point in the history
  • Loading branch information
escowles committed Jul 16, 2014
1 parent 6ae8940 commit 4dbd534
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Expand Up @@ -152,8 +152,13 @@ public boolean isCanonical() {
@Override
public Resource getSubject(final String absPath) throws RepositoryException {
resetTranslationChain();
LOGGER.debug("Creating RDF subject from identifier: {}", absPath);
return doForward(absPath);
if ( absPath != null && absPath.indexOf("%20") != -1 ) {
LOGGER.debug("Creating RDF subject from identifier with spaces: {}", absPath);
return doForward(absPath.replaceAll("%20"," "));
} else {
LOGGER.debug("Creating RDF subject from identifier: {}", absPath);
return doForward(absPath);
}
}

@Override
Expand Down
Expand Up @@ -122,7 +122,12 @@ public void addedStatement(final Statement s) {
skolemizedBnodeMap.put(subject.getId(), subjectNode);
}
} else {
subjectNode = session.getNode(subjects.getPathFromSubject(subject));
final String path = subjects.getPathFromSubject(subject);
if ( path != null && path.indexOf("%20") != -1 ) {
subjectNode = session.getNode(path.replaceAll("%20"," "));
} else {
subjectNode = session.getNode(path);
}
}

// special logic for handling rdf:type updates.
Expand Down

0 comments on commit 4dbd534

Please sign in to comment.