continue;
}
Entry dsEntry = m_feed.addEntry();
Datastream latestCreated = null;
long latestCreateTime = -1;
for (Datastream v : m_obj.datastreams(dsid)) {
Datastream dsv = DOTranslationUtility.setDatastreamDefaults(v);
// Keep track of the most recent datastream version
if (dsv.DSCreateDT.getTime() > latestCreateTime) {
latestCreateTime = dsv.DSCreateDT.getTime();
latestCreated = dsv;
}
Entry dsvEntry = m_feed.addEntry();
dsvEntry.setId(m_pid.toURI() + "/" + dsv.DatastreamID + "/"
+ DateUtility.convertDateToString(dsv.DSCreateDT));
dsvEntry.setTitle(dsv.DSVersionID);
dsvEntry.setUpdated(dsv.DSCreateDT);
ThreadHelper.addInReplyTo(dsvEntry, m_pid.toURI() + "/"
+ dsv.DatastreamID);
String altIds =
DOTranslationUtility.oneString(dsv.DatastreamAltIDs);
if (altIds != null && !altIds.equals("")) {
dsvEntry.addCategory(MODEL.ALT_IDS.uri, altIds, null);
}
if (dsv.DSFormatURI != null && !dsv.DSFormatURI.equals("")) {
dsvEntry.addCategory(MODEL.FORMAT_URI.uri,
dsv.DSFormatURI,
null);
}
dsvEntry.addCategory(MODEL.LABEL.uri, dsv.DSLabel == null ? ""
: dsv.DSLabel, null);
// include checksum if it has a value
String csType = dsv.getChecksumType();
if (csType != null && csType.length() > 0
&& !csType.equals(Datastream.CHECKSUMTYPE_DISABLED)) {
dsvEntry.addCategory(MODEL.DIGEST_TYPE.uri, csType, null);
dsvEntry.addCategory(MODEL.DIGEST.uri,
dsv.getChecksum(),
null);
}
// include size if it's non-zero
if (dsv.DSSize != 0) {