*/
@Override
public MetsHdr makeMetsHdr(Context context, DSpaceObject dso,
PackageParameters params)
{
MetsHdr metsHdr = new MetsHdr();
// Note: we specifically do not add a CREATEDATE to <metsHdr>
// as for AIPs we want md5 checksums to be identical if no content
// has changed. Adding a CREATEDATE changes checksum each time.
// Add a LASTMODDATE for items
if (dso.getType() == Constants.ITEM)
{
metsHdr.setLASTMODDATE(((Item) dso).getLastModified());
}
// Agent Custodian - name custodian, the DSpace Archive, by handle.
Agent agent = new Agent();
agent.setROLE(Role.CUSTODIAN);
agent.setTYPE(Type.OTHER);
agent.setOTHERTYPE("DSpace Archive");
Name name = new Name();
name.getContent()
.add(new PCData(Site.getSiteHandle()));
agent.getContent().add(name);
metsHdr.getContent().add(agent);
// Agent Creator - name creator, which is a specific version of DSpace.
Agent agentCreator = new Agent();
agentCreator.setROLE(Role.CREATOR);
agentCreator.setTYPE(Type.OTHER);
agentCreator.setOTHERTYPE("DSpace Software");
Name creatorName = new Name();
creatorName.getContent()
.add(new PCData("DSpace " + Util.getSourceVersion()));
agentCreator.getContent().add(creatorName);
metsHdr.getContent().add(agentCreator);
return metsHdr;
}