Skip to content

Commit

Permalink
BXC-3284 update ID value
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharon Luong committed Nov 16, 2023
1 parent fe9c781 commit 36aea39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class ImageServerProxyService {
private static final Logger LOG = LoggerFactory.getLogger(ImageServerProxyService.class);
private CloseableHttpClient httpClient;
private String imageServerProxyBasePath;
private String baseIiifv3Path;

public void setHttpClientConnectionManager(HttpClientConnectionManager manager) {

Expand Down Expand Up @@ -78,7 +79,7 @@ public void getMetadata(String id, OutputStream outStream,
ImageService3 respData = iiifReader.readValue(httpResp.getEntity().getContent());
var iiifWriter = new ObjectMapper().writerFor(ImageService3.class);

respData.setID(new URI(URIUtil.join(imageServerProxyBasePath, id)));
respData.setID(new URI(URIUtil.join(baseIiifv3Path, id, "info.json")));

HttpEntity updatedRespData = EntityBuilder.create()
.setText(iiifWriter.writeValueAsString(respData))
Expand Down Expand Up @@ -148,4 +149,8 @@ public void setImageServerProxyBasePath(String fullPath) {
public String getImageServerProxyBasePath() {
return imageServerProxyBasePath;
}

public void setBaseIiifv3Path(String baseIiifv3Path) {
this.baseIiifv3Path = baseIiifv3Path;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@

<bean id="imageServerProxyService" class="edu.unc.lib.boxc.web.services.processing.ImageServerProxyService">
<property name="imageServerProxyBasePath" value="${iiif.imageServer.base.url}"/>
<property name="baseIiifv3Path" value="${services.api.url}iiif/v3/"/>
<property name="httpClientConnectionManager" ref="httpClientConnectionManager" />
</bean>

Expand Down

0 comments on commit 36aea39

Please sign in to comment.