Use dcterms.type in FixJpgJpgThumbnails script
We are now using dcterms.type instead of dc.type.
This commit is contained in:
parent
1497ebb476
commit
823ed25c44
|
@ -84,7 +84,7 @@ public class FixJpgJpgThumbnails {
|
|||
private static void processItem(Context context, Item item) throws SQLException, AuthorizeException, IOException {
|
||||
// Some bitstreams like Infographics are large JPGs and put in the ORIGINAL bundle on purpose so we shouldn't
|
||||
// swap them.
|
||||
List<MetadataValue> itemTypes = itemService.getMetadataByMetadataString(item, "dc.type");
|
||||
List<MetadataValue> itemTypes = itemService.getMetadataByMetadataString(item, "dcterms.type");
|
||||
boolean itemHasInfographic = false;
|
||||
for (MetadataValue itemType: itemTypes) {
|
||||
if (itemType.getValue().equals("Infographic")) {
|
||||
|
@ -120,7 +120,7 @@ public class FixJpgJpgThumbnails {
|
|||
originalName.equalsIgnoreCase(StringUtils.removeEndIgnoreCase(thumbnailName, ".jpg"))
|
||||
&& ("Generated Thumbnail".equals(thumbnailBitstream.getDescription()) || "IM Thumbnail".equals(thumbnailBitstream.getDescription()))
|
||||
&& !itemHasInfographic
|
||||
&& originalBitstreamBytes < 100000
|
||||
//&& originalBitstreamBytes < 100000
|
||||
) {
|
||||
System.out.println(item.getHandle() + ": replacing " + thumbnailName + " with " + originalName);
|
||||
|
||||
|
|
Loading…
Reference in New Issue