attachmentURLs[i]);
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
MimeType mimeType;
if ((urlAttachmentContentTypes[i] != null)
&& (!urlAttachmentContentTypes[i].equals(""))) {
try {
mimeType = new MimeType(
urlAttachmentContentTypes[i]);
} catch (MimeTypeParseException e) {
throw new HandlerException("Invalid MimeType",
e);
}
} else {
mimeType = null;
}
attachmentsSet.add(new Attachment(labels,
attachmnetTargetURL, mimeType, width, height,
attachmentMode[i].equals("inline"),
attachmentLanguage, position, summmaryViews[i]
.equals("true")));
/*
* Resource attachmentTarget =
* model.createResource(attachmnetTargetURL.toString());
* ItemUtil.addAttachment(target, attachmentTarget,
* urlAttachmentContentTypes[i], attachmentLabels[i],
* width, height, attachmentMode[i].equals("inline"));
*/
}
// urlIter++;
} else {
if ((attachmentContent != null)
&& (attachmentContent[i] != null)
&& (attachmentContent[i].length > 0)) {
String fileName = fileNames[i];
MimeType mimeType;
mimeType = fileContentTypes[i];
try {
attachmentsSet.add(new Attachment(model, hashStore,
new URL(target.getURI()), labels,
attachmentContent[i], fileName, mimeType,