Package org.apache.abdera.model

Examples of org.apache.abdera.model.Element


  @Override
  public IRI getBaseUri()
    throws IRISyntaxException {
      if (Type.XHTML.equals(type)) {
        Element el = getValueElement();
        if (el != null) {
          if (el.getAttributeValue(BASE) != null) {
            if (getAttributeValue(BASE) != null)
              return super.getBaseUri().resolve(
                el.getAttributeValue(BASE));
            else
              return _getUriValue(el.getAttributeValue(BASE));
          }
        }
      }
      return super.getBaseUri();
  }
View Full Code Here


  @Override
  public IRI getResolvedBaseUri()
    throws IRISyntaxException {
      if (Type.XHTML.equals(type)) {
        Element el = getValueElement();
        if (el != null) {
          if (el.getAttributeValue(BASE) != null) {
            return super.getResolvedBaseUri().resolve(
              el.getAttributeValue(BASE));
          }
        }
      }
      return super.getResolvedBaseUri();
  }
View Full Code Here

  }
 
  @Override
  public String getLanguage() {
    if (Type.XHTML.equals(type)) {
      Element el = getValueElement();
      if (el.getAttributeValue(LANG) != null)
        return el.getAttributeValue(LANG);
    }
    return super.getLanguage();
  }
View Full Code Here

      } else if (Type.HTML.equals(type)) {
        super.setText(value);
      } else if (Type.XHTML.equals(type)) {
        IRI baseUri = null;
        value = "<div xmlns=\"" + XHTML_NS + "\">" + value + "</div>";
        Element element = null;
        try {
          baseUri = getResolvedBaseUri();
          element = _parse(value, baseUri);
        } catch (Exception e) {}
        if (element != null && element instanceof Div)
View Full Code Here

  }

  public void setWrappedValue(String wrappedValue) {
    if (Type.XHTML.equals(type)) {
      IRI baseUri = null;
      Element element = null;
      try {
        baseUri = getResolvedBaseUri();
        element = _parse(wrappedValue, baseUri);
      } catch (Exception e) {}
     
View Full Code Here

  @Override
  public IRI getBaseUri()
    throws IRISyntaxException {
      if (Type.XHTML.equals(type)) {
        Element el = getValueElement();
        if (el != null) {
          if (el.getAttributeValue(BASE) != null) {
            if (getAttributeValue(BASE) != null)
              return super.getBaseUri().resolve(
                el.getAttributeValue(BASE));
            else
              return _getUriValue(el.getAttributeValue(BASE));
          }
        }
      }
      return super.getBaseUri();
  }
View Full Code Here

  @Override
  public IRI getResolvedBaseUri()
    throws IRISyntaxException {
      if (Type.XHTML.equals(type)) {
        Element el = getValueElement();
        if (el != null) {
          if (el.getAttributeValue(BASE) != null) {
            return super.getResolvedBaseUri().resolve(
              el.getAttributeValue(BASE));
          }
        }
      }
      return super.getResolvedBaseUri();
  }
View Full Code Here

  }
 
  @Override
  public String getLanguage() {
    if (Type.XHTML.equals(type)) {
      Element el = getValueElement();
      if (el.getAttributeValue(LANG) != null)
        return el.getAttributeValue(LANG);
    }
    return super.getLanguage();
  }
View Full Code Here

    return (T)getWrapped((Element)this.getFirstElement());
  }
 
  @SuppressWarnings("unchecked")
  public <T extends Element>T getPreviousSibling(QName qname) {
    Element el = getPreviousSibling();
    while (el != null) {
      OMElement omel = (OMElement) el;
      if (omel.getQName().equals(qname))
        return (T)getWrapped((Element)omel);
      el = el.getPreviousSibling();
    }
    return null;
  }
View Full Code Here

    return null;
  }
 
  @SuppressWarnings("unchecked")
  public <T extends Element>T getNextSibling(QName qname) {
    Element el = getNextSibling();
    while (el != null) {
      OMElement omel = (OMElement) el;
      if (omel.getQName().equals(qname))
        return (T)getWrapped((Element)omel);
      el = el.getNextSibling();
    }
    return null;
  }
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.