mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 06:53:09 +00:00
Reverted manifest thumbnail image.
This commit is contained in:
@@ -99,7 +99,7 @@ public class ManifestService extends AbstractResourceService {
|
|||||||
// images in the ORIGINAL bundle will be used.
|
// images in the ORIGINAL bundle will be used.
|
||||||
List<Bundle> bundles = utils.getIiifBundle(item, IIIF_BUNDLE);
|
List<Bundle> bundles = utils.getIiifBundle(item, IIIF_BUNDLE);
|
||||||
List<Bitstream> bitstreams = utils.getBitstreams(bundles);
|
List<Bitstream> bitstreams = utils.getBitstreams(bundles);
|
||||||
List<Bundle> thumbnailBundle = utils.getBundle(item, "THUMBNAIL");
|
// List<Bundle> thumbnailBundle = utils.getBundle(item, "THUMBNAIL");
|
||||||
Info info = utils.validateInfoForManifest(utils.getInfo(context, item, IIIF_BUNDLE), bitstreams);
|
Info info = utils.validateInfoForManifest(utils.getInfo(context, item, IIIF_BUNDLE), bitstreams);
|
||||||
manifestGenerator.setIdentifier(getManifestId(item.getID()));
|
manifestGenerator.setIdentifier(getManifestId(item.getID()));
|
||||||
manifestGenerator.setLabel(item.getName());
|
manifestGenerator.setLabel(item.getName());
|
||||||
@@ -108,7 +108,7 @@ public class ManifestService extends AbstractResourceService {
|
|||||||
addSearchService(item);
|
addSearchService(item);
|
||||||
addMetadata(item.getMetadata());
|
addMetadata(item.getMetadata());
|
||||||
addViewingHint(bitstreams.size());
|
addViewingHint(bitstreams.size());
|
||||||
addThumbnail(thumbnailBundle, context);
|
addThumbnail(bundles, context);
|
||||||
addSequence(item, bitstreams, context, info);
|
addSequence(item, bitstreams, context, info);
|
||||||
addRanges(info, item.getID().toString());
|
addRanges(info, item.getID().toString());
|
||||||
addSeeAlso(item);
|
addSeeAlso(item);
|
||||||
@@ -223,9 +223,9 @@ public class ManifestService extends AbstractResourceService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds thumbnail to the manifest. Uses the thumbnail in DSpace thumbnail bundle.
|
* Adds thumbnail to the manifest. Uses first image in bundle.
|
||||||
* @param bundles contain the THUMBNAIL bundle
|
* @param bundles image bundles
|
||||||
* @param context DSpac context
|
* @param context DSpace context
|
||||||
*/
|
*/
|
||||||
private void addThumbnail(List<Bundle> bundles, Context context) {
|
private void addThumbnail(List<Bundle> bundles, Context context) {
|
||||||
List<Bitstream> bitstreams = utils.getBitstreams(bundles);
|
List<Bitstream> bitstreams = utils.getBitstreams(bundles);
|
||||||
|
@@ -105,7 +105,7 @@ public class IIIFRestRepositoryIT extends AbstractControllerIntegrationTest {
|
|||||||
|
|
||||||
try (InputStream is = IOUtils.toInputStream(bitstreamContent, CharEncoding.UTF_8)) {
|
try (InputStream is = IOUtils.toInputStream(bitstreamContent, CharEncoding.UTF_8)) {
|
||||||
bitstream2 = BitstreamBuilder
|
bitstream2 = BitstreamBuilder
|
||||||
.createBitstream(context, publicItem1, is, "THUMBNAIL")
|
.createBitstream(context, publicItem1, is, IIIFBundle)
|
||||||
.withName("Bitstream2")
|
.withName("Bitstream2")
|
||||||
.withMimeType("image/jpeg")
|
.withMimeType("image/jpeg")
|
||||||
.build();
|
.build();
|
||||||
@@ -119,7 +119,7 @@ public class IIIFRestRepositoryIT extends AbstractControllerIntegrationTest {
|
|||||||
.andExpect(jsonPath("$.@context", is("http://iiif.io/api/presentation/2/context.json")))
|
.andExpect(jsonPath("$.@context", is("http://iiif.io/api/presentation/2/context.json")))
|
||||||
.andExpect(jsonPath("$.service.profile", is("http://iiif.io/api/search/0/search")))
|
.andExpect(jsonPath("$.service.profile", is("http://iiif.io/api/search/0/search")))
|
||||||
.andExpect(jsonPath("$.thumbnail.@id", Matchers.containsString("/iiif/2/"
|
.andExpect(jsonPath("$.thumbnail.@id", Matchers.containsString("/iiif/2/"
|
||||||
+ bitstream2.getID())))
|
+ bitstream1.getID())))
|
||||||
.andExpect(jsonPath("$.sequences[0].canvases[0].@id",
|
.andExpect(jsonPath("$.sequences[0].canvases[0].@id",
|
||||||
Matchers.containsString("/iiif/" + publicItem1.getID() + "/canvas/c0")))
|
Matchers.containsString("/iiif/" + publicItem1.getID() + "/canvas/c0")))
|
||||||
.andExpect(jsonPath("$.sequences[0].canvases[0].label", is("Page 1")))
|
.andExpect(jsonPath("$.sequences[0].canvases[0].label", is("Page 1")))
|
||||||
|
Reference in New Issue
Block a user