/** * Sets the content for this entry */ public Content setContent(Element value) { FOMFactory factory = (FOMFactory)this.factory; Content content = factory.newContent(); content.setValueElement(value); setContentElement(content); return content; }
/** * Sets the content for this entry * * @throws MimeTypeParseException */ public Content setContent(Element element, String mediaType) { try { if (MimeTypeHelper.isText(mediaType)) throw new IllegalArgumentException(); FOMFactory factory = (FOMFactory)this.factory; Content content = factory.newContent(new MimeType(mediaType)); content.setValueElement(element); setContentElement(content); return content; } catch (javax.activation.MimeTypeParseException e) { throw new org.apache.abdera.util.MimeTypeParseException(e); } }