static int countBitstreamByDesc(BundleName bundleName, Item item, String[] descList) { int count = 0; for (Bundle bundle : item.getBundles()) { if (!bundle.getName().equals(bundleName.name())) { continue; } for (Bitstream bit : bundle.getBitstreams()) { for (String desc : descList) { String bitDesc = bit.getDescription(); if (bitDesc == null) { continue; } if (bitDesc.equals(desc.trim())) { count++; } } } } return count; }
String description = bit.getDescription();
public void removeBitstream(Context context, Item item, Bitstream bitstream, boolean keep) throws SQLException, AuthorizeException, IOException { Bundle exempt = null; if (keep) { exempt = this.archiveBitstream(context, item, bitstream); } Iterator<Bundle> bundles = bitstream.getBundles() .iterator(); while (bundles.hasNext()) { Bundle bundle = bundles.next(); if (exempt != null && bundle.getID() != exempt.getID()) { bundles.remove(); bundleService .removeBitstream(context, bundle, bitstream); } } // there is nowhere in the metadata to say when this file was moved, so we // are going to drop it into the description SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); String desc = bitstream.getDescription(); String newDesc = "[Deleted on: " + sdf.format(new Date()) + "] "; if (desc != null) { newDesc += desc; } bitstream.setDescription(context, newDesc); bitstreamService.update(context, bitstream); }
String oldName = myName; String description = bitstream.getDescription(); if (!StringUtils.isEmpty(description)) { description = "\tdescription:" + description;
newBitstream.setDescription(context, bitstream.getDescription()); newBitstream.setFormat(context, bitstream.getFormat(context)); newBitstream.setSource(context, bitstream.getSource());
@Override public void additionalIndex(Context context, DSpaceObject dso, SolrInputDocument document) { if (dso instanceof Item) { Item item = (Item) dso; List<Bundle> bundles = item.getBundles(); if (bundles != null) { for (Bundle bundle : bundles) { String bundleName = bundle.getName(); if ((bundleName != null) && bundleName.equals(BUNDLE_NAME)) { List<Bitstream> bitstreams = bundle.getBitstreams(); if (bitstreams != null) { for (Bitstream bitstream : bitstreams) { document.addField(SOLR_FIELD_NAME_FOR_FILENAMES, bitstream.getName()); String description = bitstream.getDescription(); if ((description != null) && (!description.isEmpty())) { document.addField(SOLR_FIELD_NAME_FOR_DESCRIPTIONS, description); } } } } } } } } }
validityKey.append(bitstream.getName()); validityKey.append(bitstream.getSource()); validityKey.append(bitstream.getDescription()); validityKey.append(bitstream.getChecksum()); validityKey.append(bitstream.getChecksumAlgorithm());
/** * Add the bitstream metadata to the item * * @param item The item * @param bitstream The bitstream * @param type The type of bitstream * @throws SQLException An exception that provides information on a database access error or other errors. */ protected void addMetadata(Item item, Bitstream bitstream, String type) throws SQLException { String value = bitstream.getFormat(Curator.curationContext()).getMIMEType() + "##"; value += bitstream.getName() + "##"; value += bitstream.getSizeBytes() + "##"; value += item.getHandle() + "##"; value += bitstream.getSequenceID() + "##"; value += bitstream.getChecksum() + "##"; if (bitstream.getDescription() != null) { value += bitstream.getDescription(); } itemService.addMetadata(Curator.curationContext(), item, "dc", "format", type, "en", value); } }
description = bitstream.getDescription(); format = bitstreamService.getFormatDescription(context, bitstream); sizeBytes = bitstream.getSizeBytes();
dc.add(makeDC("title", "alternative", bsSource)); String bsDesc = bitstream.getDescription(); if (bsDesc != null) { dc.add(makeDC("description", null, bsDesc));
citedBitstream.setDescription(context, bitstream.getDescription());
row.addCell().addContent(bitstream.getDescription()); row.addCell().addContent(format);
String oname = bit.getSource(); String name = bit.getName(); String description = bit.getDescription();
String desc = bitstream.getDescription(); if ("".equals(desc) || desc == null) { desc = bitstream.getName();
String description = bitstream.getDescription();
String desc = primaryBitstream.getDescription(); out.print((desc != null) ? desc : ""); .print("</td><td headers=\"t2\" class=\"standard\">"); String desc = bitstreams[k].getDescription(); out.print((desc != null) ? desc : "");
String description = bitstream.getDescription(); String format = null; BitstreamFormat bitstreamFormat = bitstream.getFormat();
String url = makeBitstreamLink(item, bitstream); long bytes = bitstream.getSize(); String desc = bitstream.getDescription(); String algorithm = bitstream.getChecksumAlgorithm(); String checksum = bitstream.getChecksum();
description.setLabel(T_description); description.setHelp(T_description_help); description.setValue(bitstream.getDescription());
description.setLabel(T_description_label); description.setHelp(T_description_help); description.setValue(bitstream.getDescription());