if (bitstream.equals(bundle.getPrimaryBitstream())) { primary = "\tprimary:true ";
@Override public Thumbnail getThumbnail(Context context, Item item, boolean requireOriginal) throws SQLException { Bitstream thumbBitstream; List<Bundle> originalBundles = getBundles(item, "ORIGINAL"); Bitstream primaryBitstream = null; if (CollectionUtils.isNotEmpty(originalBundles)) { primaryBitstream = originalBundles.get(0).getPrimaryBitstream(); } if (primaryBitstream != null) { if (primaryBitstream.getFormat(context).getMIMEType().equals("text/html")) { return null; } thumbBitstream = bitstreamService .getBitstreamByName(item, "THUMBNAIL", primaryBitstream.getName() + ".jpg"); } else { if (requireOriginal) { primaryBitstream = bitstreamService.getFirstBitstream(item, "ORIGINAL"); } thumbBitstream = bitstreamService.getFirstBitstream(item, "THUMBNAIL"); } if (thumbBitstream != null) { return new Thumbnail(thumbBitstream, primaryBitstream); } return null; }
if (candidate.equals(bundle.getPrimaryBitstream())) { // is primary -> use this one if (isPublic(candidate)) { return candidate;
authorizeService.addPolicies(c, bitstreamPolicies, bitstreamNew); if (nativeBundle.getPrimaryBitstream() != null && nativeBundle.getPrimaryBitstream() .equals(nativeBitstream)) { bundleNew.setPrimaryBitstreamID(bitstreamNew);
if (bitstream.equals(bundle.getPrimaryBitstream())) { bundle.unsetPrimaryBitstreamID();
if ((bName != null) && bName.equals("ORIGINAL")) { isContentBundle = true; primaryBitstream = bundle.getPrimaryBitstream();