本文整理了Java中org.dspace.content.Bitstream.getChecksumAlgorithm()
方法的一些代码示例,展示了Bitstream.getChecksumAlgorithm()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bitstream.getChecksumAlgorithm()
方法的具体详情如下:
包路径:org.dspace.content.Bitstream
类名称:Bitstream
方法名:getChecksumAlgorithm
[英]Get the algorithm used to calculate the checksum
[中]获取用于计算校验和的算法
代码示例来源:origin: DSpace/DSpace
@Override
public String getBitstreamProvenanceMessage(Context context, Item myitem)
throws SQLException {
// Get non-internal format bitstreams
List<Bitstream> bitstreams = itemService.getNonInternalBitstreams(context, myitem);
// Create provenance description
StringBuilder myMessage = new StringBuilder();
myMessage.append("No. of bitstreams: ").append(bitstreams.size()).append("\n");
// Add sizes and checksums of bitstreams
for (Bitstream bitstream : bitstreams) {
myMessage.append(bitstream.getName()).append(": ")
.append(bitstream.getSizeBytes()).append(" bytes, checksum: ")
.append(bitstream.getChecksum()).append(" (")
.append(bitstream.getChecksumAlgorithm()).append(")\n");
}
return myMessage.toString();
}
}
代码示例来源:origin: DSpace/DSpace
info.getID()).append("\n");
buf.append(msg("checksum-algorithm")).append(" = ").append(
info.getChecksumAlgorithm()).append("\n");
buf.append(msg("internal-id")).append(" = ").append(
info.getInternalId()).append("\n");
代码示例来源:origin: DSpace/DSpace
String cka = bitstream.getChecksumAlgorithm();
if (cks != null && cka != null) {
Element fixity = new Element("fixity", PREMIS_NS);
代码示例来源:origin: org.dspace/dspace-xmlui-api
validityKey.append(bitstream.getDescription());
validityKey.append(bitstream.getChecksum());
validityKey.append(bitstream.getChecksumAlgorithm());
validityKey.append(bitstream.getSize());
validityKey.append(bitstream.getUserFormatDescription());
代码示例来源:origin: DSpace/DSpace
String alg = fixity.getChildTextTrim("messageDigestAlgorithm", PREMIS_NS);
String md = fixity.getChildTextTrim("messageDigest", PREMIS_NS);
String b_alg = bitstream.getChecksumAlgorithm();
String b_md = bitstream.getChecksum();
if (StringUtils.equals(alg, b_alg)) {
代码示例来源:origin: DSpace/DSpace
List<Bundle> bundles = myBitstream.getBundles();
long size = myBitstream.getSizeBytes();
String checksum = myBitstream.getChecksum() + " (" + myBitstream.getChecksumAlgorithm() + ")";
int assetstore = myBitstream.getStoreNumber();
代码示例来源:origin: DSpace/DSpace
sequenceId = bitstream.getSequenceID();
CheckSum checkSum = new CheckSum();
checkSum.setCheckSumAlgorith(bitstream.getChecksumAlgorithm());
checkSum.setValue(bitstream.getChecksum());
this.setCheckSum(checkSum);
代码示例来源:origin: org.dspace/dspace-oai-api
this.makeDCElement("identifier", "URI", url, metadata);
this.makeUKDCTermsElement("checksum",
bitstreams[k].getChecksumAlgorithm(),
bitstreams[k].getChecksum(), metadata);
代码示例来源:origin: DSpace/DSpace
String csType = logoBs.getChecksumAlgorithm();
String cs = logoBs.getChecksum();
if (cs != null && csType != null) {
代码示例来源:origin: DSpace/DSpace
if (bitstream.getChecksumAlgorithm() == null) {
mostRecentChecksum.setChecksumAlgorithm("MD5");
} else {
mostRecentChecksum.setChecksumAlgorithm(bitstream.getChecksumAlgorithm());
代码示例来源:origin: DSpace/DSpace
@Override
public Bitstream clone(Context context, Bitstream bitstream)
throws SQLException {
// Create a new bitstream with a new ID.
Bitstream clonedBitstream = bitstreamDAO.create(context, new Bitstream());
// Set the internal identifier, file size, checksum, and
// checksum algorithm as same as the given bitstream.
clonedBitstream.setInternalId(bitstream.getInternalId());
clonedBitstream.setSizeBytes(bitstream.getSizeBytes());
clonedBitstream.setChecksum(bitstream.getChecksum());
clonedBitstream.setChecksumAlgorithm(bitstream.getChecksumAlgorithm());
clonedBitstream.setFormat(bitstream.getBitstreamFormat());
try {
//Update our bitstream but turn off the authorization system since permissions
//haven't been set at this point in time.
context.turnOffAuthorisationSystem();
update(context, clonedBitstream);
} catch (AuthorizeException e) {
log.error(e);
//Can never happen since we turn off authorization before we update
} finally {
context.restoreAuthSystemState();
}
return clonedBitstream;
}
代码示例来源:origin: DSpace/DSpace
String cka = bit.getChecksumAlgorithm();
String oname = bit.getSource();
String name = bit.getName();
代码示例来源:origin: DSpace/DSpace
String csType = bitstream.getChecksumAlgorithm();
String cs = bitstream.getChecksum();
if (auth && cs != null && csType != null) {
代码示例来源:origin: org.dspace/dspace-xmlui-api
String checksumType = bitstream.getChecksumAlgorithm();
String checksum = bitstream.getChecksum();
long size = bitstream.getSize();
代码示例来源:origin: org.dspace/dspace-xmlui-api
long bytes = bitstream.getSize();
String desc = bitstream.getDescription();
String algorithm = bitstream.getChecksumAlgorithm();
String checksum = bitstream.getChecksum();
内容来源于网络,如有侵权,请联系作者删除!