// Create simple structMap: initial div represents the Item,
// and user-visible content bitstreams are in its child divs.
StringBuffer dmdIds = new StringBuffer();
for (int i = 0; i < dmdId.length; ++i)
dmdIds.append(" "+dmdId[i]);
StructMap structMap = new StructMap();
structMap.setID(gensym("struct"));
structMap.setTYPE("LOGICAL");
structMap.setLABEL("DSpace");
Div div0 = new Div();
div0.setID(gensym("div"));
div0.setTYPE("DSpace Item");
div0.setDMDID(dmdIds.substring(1));
if (licenseID != null)
div0.setADMID(licenseID);
// if there is a primary bitstream, add FPTR to it.
if (primaryBitstreamFileID != null)
{
Fptr fptr = new Fptr();
fptr.setFILEID(primaryBitstreamFileID);
div0.getContent().add(fptr);
}
// add DIV for each content bitstream
div0.getContent().addAll(contentDivs);
structMap.getContent().add(div0);
// Does subclass have something to add to structMap?
addStructMap(context, item, params, mets);
mets.getContent().add(structMap);