Skip to content

Commit

Permalink
Adding logs and testing without space being encoded.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaladay committed Oct 10, 2024
1 parent 426d393 commit 128e90c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ private String getRdf(String url) throws NotFoundException {
}

protected URI buildId(String path) throws URISyntaxException {
System.out.print("\n\n\nDEBUG: buildId(" + path + "), str = " + encodeSpaces(getIiifServiceUrl() + FORWARD_SLASH + getManifestType().getName() + FORWARD_SLASH + path) + ", URI is " + (new URI(encodeSpaces(getIiifServiceUrl() + FORWARD_SLASH + getManifestType().getName() + FORWARD_SLASH + path))) + "\n\n\n");
return new URI(encodeSpaces(getIiifServiceUrl() + FORWARD_SLASH + getManifestType().getName() + FORWARD_SLASH + path));
}

Expand Down Expand Up @@ -368,8 +369,11 @@ private String getResourceId(String url) throws URISyntaxException {
String id;
try {
id = resourceResolver.lookup(url);
System.out.print("\n\n\nDEBUG: getResourceId for " + url + ", from lookup is " + id + "\n\n\n");
} catch (NotFoundException e) {
id = resourceResolver.create(url);
logger.info("NotFoundException for url " + url + " is ...", e);
System.out.print("\n\n\nDEBUG: getResourceId for " + url + ", from failed lookup now creating is " + id + "\n\n\n");
}
return id;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/tamu/iiif/utility/StringUtility.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static String decode(String value) {
}

public static String encodeSpaces(String value) {
return value.replace(" ", "%20");
return value;
}

}

0 comments on commit 128e90c

Please sign in to comment.