file.setCHECKSUMTYPE(Checksumtype.MD5);
// FLocat: filename is as in records, or full URL
// FIXME: Duplicate filenames and characters illegal to
// local OS may cause problems
FLocat flocat = new FLocat();
flocat.setLOCTYPE(Loctype.URL);
if (fullURL)
{
flocat.setXlinkHref(bitstreamPID);
}
else
{
flocat.setXlinkHref(bitstreams[bits].getName());
}
// Add FLocat to File, and File to FileGrp
file.getContent().add(flocat);
fileGrp.getContent().add(file);