//
// determine if this is an acceptable file format
if (!swordConfig.isAcceptableContentType(context, deposit.getContentType(), collection))
{
log.error("Unacceptable content type detected: " + deposit.getContentType() + " for collection " + collection.getID());
throw new SWORDErrorException(ErrorCodes.ERROR_CONTENT,
"Unacceptable content type in deposit request: " + deposit.getContentType());
}
// determine if this is an acceptable packaging type for the deposit
// if not, we throw a 415 HTTP error (Unsupported Media Type, ERROR_CONTENT)
if (!swordConfig.isSupportedMediaType(deposit.getPackaging(), this.collection))
{
log.error("Unacceptable packaging type detected: " + deposit.getPackaging() + "for collection" + collection.getID());
throw new SWORDErrorException(ErrorCodes.ERROR_CONTENT,
"Unacceptable packaging type in deposit request: " + deposit.getPackaging());
}
String tempDir = swordConfig.getTempDir();
String tempFile = tempDir + "/" + swordService.getTempFilename();