Package org.apache.abdera.model

Examples of org.apache.abdera.model.Element


   * @param element The parent element
   * @param child The XML QName of the child element
   * @return The directionally-wrapped text of the child element
   */
  public static <T extends Element>String getBidiChildText(T element, QName child) {
    Element el = element.getFirstChild(child);
    return (el != null) ? getBidiText(getDirection(el),el.getText()) : null;
  }
View Full Code Here


  }

  public Element setName(String name) {
    if (name != null) {
      FOMFactory fomfactory = (FOMFactory) factory;
      Element el = fomfactory.newName(null);
      el.setText(name);
      _setChild(NAME, (OMElement)el);
      return el;
    } else {
      _removeChildren(NAME, false);
      return null;
View Full Code Here

      return null;
    }
  }
 
  public String getName() {
    Element name = getNameElement();
    return (name != null) ? name.getText() : null;
  }
View Full Code Here

  }

  public Element setEmail(String email) {
    if (email != null) {
      FOMFactory fomfactory = (FOMFactory) factory;
      Element el = fomfactory.newEmail(null);
      el.setText(email);
      _setChild(EMAIL, (OMElement)el);
      return el;
    } else {
      _removeChildren(EMAIL, false);
      return null;
View Full Code Here

      return null;
    }
  }
 
  public String getEmail() {
    Element email = getEmailElement();
    return (email != null) ? email.getText() : null;
  }
View Full Code Here

    return (T)addExtension(new QName(namespace, localpart, prefix));
  }

  public Element addSimpleExtension(QName qname, String value) {
    FOMFactory fomfactory = (FOMFactory) factory;
    Element el = fomfactory.newElement(qname, this);
    el.setText(value);
    String prefix = qname.getPrefix();
    if (prefix != null) {
      declareNS(prefix, qname.getNamespaceURI());
    }
    return el;
View Full Code Here

          prefix),
        value);
  }
 
  public String getSimpleExtension(QName qname) {
    Element el  = getExtension(qname);
    return (el != null) ? el.getText() : null;
  }
View Full Code Here

  public List<Category> getCategories(String scheme) throws IRISyntaxException {
    return FOMHelper.getCategories(this, scheme);
  }
 
  public void addCategory(Category category) {
    Element el = category.getParentElement();
    if (el != null && el instanceof Categories) {
      Categories cats = category.getParentElement();
      category = (Category) category.clone();
      try {
        if (category.getScheme() == null && cats.getScheme() != null)
View Full Code Here

            reportError("Atom feed can only be created from a collection wrapper", null);
        } else if (!isFeed && isCollection) {
            reportError("Atom entry can only be created from a single object", null);
        }
       
        Element atomElement = null;
        try {
            if (isFeed && !isCollection) {
                atomElement = createFeedFromCollectionWrapper(o);
            } else if (!isFeed && !isCollection) {
                atomElement = createEntryFromObject(o, clazz);
View Full Code Here

        case OMNode.DTD_NODE:
          OMDocType doctype = (OMDocType) node;
          factory.createOMDocType(omdoc, doctype.getValue());
          break;
        case OMNode.ELEMENT_NODE:
          Element el = (Element) node;
          omdoc.addChild((OMNode) el.clone());
          break;
        case OMNode.PI_NODE:
          OMProcessingInstruction pi = (OMProcessingInstruction) node;
          factory.createOMProcessingInstruction(omdoc, pi.getTarget(), pi.getValue());
          break;
View Full Code Here

TOP

Related Classes of org.apache.abdera.model.Element

Copyright © 2018 www.massapicom. 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.