Package org.apache.abdera.model

Examples of org.apache.abdera.model.Element


    }

    @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)) {
                setText(type, 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) {
                }
View Full Code Here

    public Text setWrappedValue(String wrappedValue) {
        complete();
        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() {
        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() {
        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 != null && el.getAttributeValue(LANG) != null)
                return el.getAttributeValue(LANG);
        }
        return super.getLanguage();
    }
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

    public <T extends Element> T getFirstChild() {
        return (T)getWrapped((Element)this.getFirstElement());
    }

    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;
    }

    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

    public Element setName(String name) {
        complete();
        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

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.