本文整理了Java中org.dspace.content.Bitstream.getSequenceID()
方法的一些代码示例,展示了Bitstream.getSequenceID()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bitstream.getSequenceID()
方法的具体详情如下:
包路径:org.dspace.content.Bitstream
类名称:Bitstream
方法名:getSequenceID
[英]Get the sequence ID of this bitstream
[中]获取此位流的序列ID
代码示例来源:origin: org.dspace/dspace-xmlui-api
result.append("?sequence=").append(String.valueOf(bitstream.getSequenceID()));
return result.toString();
代码示例来源:origin: DSpace/DSpace
String itemMsg = "item - " + itemHandle + ": ";
String bsMsg = "bitstream - " + bitstream.getName() +
": SequenceId - " + bitstream.getSequenceID() + ": infected";
report(itemMsg + bsMsg);
results.add(bsMsg);
代码示例来源:origin: DSpace/DSpace
path.append(item.getHandle());
path.append("/");
path.append(bitstream.getSequenceID());
} else {
path.append("/retrieve/");
代码示例来源:origin: org.dspace/dspace-xmlui-api
/**
* Find the bitstream identified by a sequence number on this item.
*
* @param item A DSpace item
* @param sequence The sequence of the bitstream
* @return The bitstream or null if none found.
*/
private Bitstream findBitstreamBySequence(Item item, int sequence) throws SQLException
{
if (item == null)
{
return null;
}
Bundle[] bundles = item.getBundles();
for (Bundle bundle : bundles)
{
Bitstream[] bitstreams = bundle.getBitstreams();
for (Bitstream bitstream : bitstreams)
{
if (bitstream.getSequenceID() == sequence)
{
return bitstream;
}
}
}
return null;
}
代码示例来源:origin: org.dspace/dspace-xmlui-api
/**
* Find the bitstream identified by a sequence number on this item.
*
* @param item A DSpace item
* @param sequence The sequence of the bitstream
* @return The bitstream or null if none found.
*/
private Bitstream findBitstreamBySequence(Item item, int sequence) throws SQLException
{
if (item == null)
{
return null;
}
Bundle[] bundles = item.getBundles();
for (Bundle bundle : bundles)
{
Bitstream[] bitstreams = bundle.getBitstreams();
for (Bitstream bitstream : bitstreams)
{
if (bitstream.getSequenceID() == sequence)
{
return bitstream;
}
}
}
return null;
}
代码示例来源:origin: org.dspace/dspace-jspui-api
String link = hrq.getContextPath() + "/bitstream/" + item.getHandle() + "/" + original.getSequenceID() + "/" +
UIUtil.encodeBitstreamName(original.getName(), Constants.DEFAULT_ENCODING);
thumbFrag.append("<a target=\"_blank\" href=\"" + link + "\" />");
代码示例来源:origin: DSpace/DSpace
private void buildFullTextList(Item parentItem) {
// now get full text of any bitstreams in the TEXT bundle
// trundle through the bundles
List<Bundle> myBundles = parentItem.getBundles();
for (Bundle myBundle : emptyIfNull(myBundles)) {
if (StringUtils.equals(FULLTEXT_BUNDLE, myBundle.getName())) {
// a-ha! grab the text out of the bitstreams
List<Bitstream> bitstreams = myBundle.getBitstreams();
for (Bitstream fulltextBitstream : emptyIfNull(bitstreams)) {
fullTextStreams.add(new FullTextBitstream(sourceInfo, fulltextBitstream));
log.debug("Added BitStream: "
+ fulltextBitstream.getStoreNumber() + " "
+ fulltextBitstream.getSequenceID() + " "
+ fulltextBitstream.getName());
}
}
}
}
代码示例来源:origin: org.dspace/dspace-jspui-api
String link = hrq.getContextPath() + "/bitstream/" + item.getHandle() + "/" + original.getSequenceID() + "/" +
UIUtil.encodeBitstreamName(original.getName(), Constants.DEFAULT_ENCODING);
thumbFrag.append("<a target=\"_blank\" href=\"" + link + "\" />");
代码示例来源:origin: DSpace/DSpace
+ handle
+ "/"
+ String.valueOf(bitstream.getSequenceID())
+ "/"
+ URLEncoder.encode(bitstream.getName(), "UTF-8");
代码示例来源:origin: DSpace/DSpace
bitstream.getSequenceID() + "/" + bitstream.getName();
} else {
bsLink = bsLink + "/retrieve/" + bitstream.getID();
代码示例来源:origin: DSpace/DSpace
+ bitstream.getSequenceID() + "/"
+ Util.encodeBitstreamName(bitstream.getName(), Constants.DEFAULT_ENCODING);
} catch (UnsupportedEncodingException ex) {
代码示例来源:origin: DSpace/DSpace
bitstream.getSequenceID() + "/" + bitstream.getName();
} else {
bsLink = bsLink + "/retrieve/" + bitstream.getID() + "/" +
代码示例来源:origin: DSpace/DSpace
+ bitstream.getSequenceID() + "/";
代码示例来源:origin: DSpace/DSpace
@Override
public void delete(Context context, Bitstream bitstream) throws SQLException, AuthorizeException {
// changed to a check on delete
// Check authorisation
authorizeService.authorizeAction(context, bitstream, Constants.DELETE);
log.info(LogManager.getHeader(context, "delete_bitstream",
"bitstream_id=" + bitstream.getID()));
context.addEvent(new Event(Event.DELETE, Constants.BITSTREAM, bitstream.getID(),
String.valueOf(bitstream.getSequenceID()), getIdentifiers(context, bitstream)));
// Remove bitstream itself
bitstream.setDeleted(true);
update(context, bitstream);
//Remove our bitstream from all our bundles
final List<Bundle> bundles = bitstream.getBundles();
for (Bundle bundle : bundles) {
bundle.removeBitstream(bitstream);
}
//Remove all bundles from the bitstream object, clearing the connection in 2 ways
bundles.clear();
// Remove policies only after the bitstream has been updated (otherwise the current user has not WRITE rights)
authorizeService.removeAllPolicies(context, bitstream);
}
代码示例来源:origin: DSpace/DSpace
retrieveLink = path + "/bitstreams/" + bitstream.getID() + "/retrieve";
mimeType = bitstreamService.getFormat(context, bitstream).getMIMEType();
sequenceId = bitstream.getSequenceID();
CheckSum checkSum = new CheckSum();
checkSum.setCheckSumAlgorith(bitstream.getChecksumAlgorithm());
代码示例来源:origin: DSpace/DSpace
Constants.BITSTREAM, bitstream.getID(), String.valueOf(bitstream.getSequenceID()),
getIdentifiers(context, bundle)));
代码示例来源:origin: DSpace/DSpace
Constants.BITSTREAM, bitstream.getID(), String.valueOf(bitstream.getSequenceID()),
getIdentifiers(context, bundle)));
代码示例来源:origin: org.dspace/dspace-sword-api
bsLink = bsLink + "/bitstream/" + handle + "/" + bitstream.getSequenceID() + "/" + bitstream.getName();
代码示例来源:origin: DSpace/DSpace
if (bitstream.getSequenceID() > sequence) {
sequence = bitstream.getSequenceID();
if (stream.getSequenceID() < 0) {
stream.setSequenceID(sequence);
sequence++;
代码示例来源:origin: DSpace/DSpace
/**
* 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);
}
}
内容来源于网络,如有侵权,请联系作者删除!