Examples of FOMFactory


Examples of org.apache.abdera.parser.stax.FOMFactory

 
  /**
   * 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

Examples of org.apache.abdera.parser.stax.FOMFactory

   * Sets the content for this entry
   * @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

Examples of org.apache.abdera.parser.stax.FOMFactory

  /**
   * 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

Examples of org.apache.abdera.parser.stax.FOMFactory

   * Sets the content for this entry
   * @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

Examples of org.apache.abdera.parser.stax.FOMFactory

   * @throws MimeTypeParseException
* @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

Examples of org.apache.abdera.parser.stax.FOMFactory

  public void addContributor(Person person) {
    addChild((OMElement)person);
  }

  public Person addContributor(String name) {
    FOMFactory fomfactory = (FOMFactory) this.factory;
    Person person = fomfactory.newContributor(this);
    person.setName(name);
    return person;
  }
View Full Code Here

Examples of org.apache.abdera.parser.stax.FOMFactory

  public Person addContributor(
    String name,
    String email,
    String uri)
      {
    FOMFactory fomfactory = (FOMFactory) this.factory;
    Person person = fomfactory.newContributor(this);
    person.setName(name);
    person.setEmail(email);
    person.setUri(uri);
    return person;
  }
View Full Code Here

Examples of org.apache.abdera.parser.stax.FOMFactory

    if (id != null) {
      if (normalize) id.setNormalizedValue(value);
      else id.setValue(value);
      return id;
    } else {
      FOMFactory fomfactory = (FOMFactory) factory;
      IRIElement iri = fomfactory.newID(this);
      iri.setValue((normalize) ? URIHelper.normalize(value) : value);
      return iri;
    }
  }
View Full Code Here

Examples of org.apache.abdera.parser.stax.FOMFactory

  public Link addLink(String href) {
    return addLink(href, null);
  }
 
  public Link addLink(String href, String rel) {
    FOMFactory fomfactory = (FOMFactory) factory;
    Link link = fomfactory.newLink(this);
    link.setHref(href);
    if (rel != null) link.setRel(rel);
    return link;   
  }
View Full Code Here

Examples of org.apache.abdera.parser.stax.FOMFactory

    String type,
    String title,
    String hreflang,
    long length)
     {
    FOMFactory fomfactory = (FOMFactory) factory;
    Link link = fomfactory.newLink(this);
    link.setHref(href);
    link.setRel(rel);
    link.setMimeType(type);
    link.setTitle(title);
    link.setHrefLang(hreflang);
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.