Package org.apache.abdera.parser.stax

Examples of org.apache.abdera.parser.stax.FOMFactory.newContent()


  /**
   * Sets the content for this entry as @type="text"
   */
  public Content setContent(String value) {
    FOMFactory factory = (FOMFactory) this.factory;
    Content content = factory.newContent();
    content.setValue(value);
    setContentElement(content);
    return content;
  }
 
View Full Code Here


  /**
   * Sets the content for this entry
   */
  public Content setContent(String value, Content.Type type) {
    FOMFactory factory = (FOMFactory) this.factory;
    Content content = factory.newContent(type);
    content.setValue(value);
    setContentElement(content);
    return content;
  }
 
View Full Code Here

  /**
   * 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;
  }
 
View Full Code Here

   * @throws MimeTypeParseException
   */
  public Content setContent(Element element, String mediaType){
    try {
      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);
View Full Code Here

   * Sets the content for this entry
   * @throws MimeTypeParseException
   */
  public Content setContent(DataHandler dataHandler, String mediatype) {
    FOMFactory factory = (FOMFactory) this.factory;
    Content content = factory.newContent(Content.Type.MEDIA);
    content.setDataHandler(dataHandler);
    if (mediatype != null) content.setMimeType(mediatype);
    setContentElement(content);
    return content;
  }
View Full Code Here

   * @throws MimeTypeParseException
   */
  public Content setContent(String value, String mediatype){
    try {
      FOMFactory factory = (FOMFactory) this.factory;
      Content content = factory.newContent(new MimeType(mediatype));
      content.setValue(value);
      setContentElement(content);
      return content;
    } catch (javax.activation.MimeTypeParseException e) {
      throw new org.apache.abdera.util.MimeTypeParseException(e);
View Full Code Here

* @throws IRISyntaxException
   */
  public Content setContent(IRI uri, String mediatype) {
    try {
      FOMFactory factory = (FOMFactory) this.factory;
      Content content = factory.newContent(new MimeType(mediatype));
      content.setSrc(uri.toString());
      setContentElement(content);
      return content;
    } catch (javax.activation.MimeTypeParseException e) {
      throw new org.apache.abdera.util.MimeTypeParseException(e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.