use of org.mycore.datamodel.ifs2.MCRStoredMetadata in project mycore by MyCoRe-Org.
the class MCRXMLMetadataManager method create.
/**
* Stores metadata of a new MCRObject in the persistent store.
*
* @param mcrid the MCRObjectID
* @param xml the xml metadata of the MCRObject
* @param lastModified the date of last modification to set
* @return the stored metadata as IFS2 object
*/
public MCRStoredMetadata create(MCRObjectID mcrid, MCRContent xml, Date lastModified) throws IOException {
MCRStoredMetadata sm;
try {
sm = getStore(mcrid).create(xml, mcrid.getNumberAsInteger());
} catch (JDOMException e) {
throw new MCRPersistenceException("Error while storing object: " + mcrid, e);
}
sm.setLastModified(lastModified);
MCRConfiguration.instance().systemModified();
return sm;
}
Aggregations