Package org.apache.abdera.writer

Examples of org.apache.abdera.writer.StreamWriter.writeAttribute()


        }
        if (scheme == null && _category != null && !_category.scheme().equals(DEFAULT)) {
            scheme = _category.scheme();
        }
        if (scheme != null)
            sw.writeAttribute("scheme", scheme);

        String label = null;
        accessor = objectContext.getAccessor(Label.class, conventions);
        if (accessor != null) {
            Object value = eval(accessor, source);
View Full Code Here


        }
        if (label == null && _category != null && !_category.label().equals(DEFAULT)) {
            label = _category.label();
        }
        if (label != null)
            sw.writeAttribute("label", label);

        String term = null;
        accessor = objectContext.getAccessor(Value.class, conventions);
        if (accessor != null) {
            Object value = eval(accessor, source);
View Full Code Here

                term = toString(value);
        }
        if (term == null)
            term = toString(source);
        if (term != null)
            sw.writeAttribute("term", term);

        writeAttributes(source, objectContext, context, conventions);
        writeExtensions(source, objectContext, context, conventions);
    }
}
View Full Code Here

            if (mediatype == null) {
                MediaType mt = valueContext.getAnnotation(MediaType.class);
                mediatype = mt != null && !mt.value().equals(DEFAULT) ? mt.value() : null;
            }
            if (mediatype != null)
                sw.writeAttribute("type", mediatype);
        }

        switch (type) {
            case TEXT:
            case HTML:
View Full Code Here

        AccessibleObject[] accessors = objectContext.getAccessors(Attribute.class, conventions);
        for (AccessibleObject accessor : accessors) {
            QName qname = getQName(accessor);
            Object value = eval(accessor, source);
            if (value != null)
                sw.writeAttribute(qname, toString(value));
        }
    }

    protected boolean writeElement(Class<? extends Annotation> annotation,
                                   Serializer serializer,
View Full Code Here

        }
        if (rel == null && _link != null && !_link.rel().equals(DEFAULT)) {
            rel = _link.rel();
        }
        if (rel != null)
            sw.writeAttribute("rel", rel);

        String type = null;
        accessor = objectContext.getAccessor(MediaType.class, conventions);
        if (accessor != null) {
            Object value = eval(accessor, source);
View Full Code Here

        }
        if (type == null && _link != null && !_link.type().equals(DEFAULT)) {
            type = _link.type();
        }
        if (type != null)
            sw.writeAttribute("type", type);

        String title = null;
        accessor = objectContext.getAccessor(Title.class, conventions);
        if (accessor != null) {
            Object value = eval(accessor, source);
View Full Code Here

        }
        if (title == null && _link != null && !_link.title().equals(DEFAULT)) {
            title = _link.title();
        }
        if (title != null)
            sw.writeAttribute("title", title);

        String hreflang = null;
        accessor = objectContext.getAccessor(HrefLanguage.class, conventions);
        if (accessor != null) {
            Object value = eval(accessor, source);
View Full Code Here

        }
        if (hreflang == null && _link != null && !_link.hreflang().equals(DEFAULT)) {
            hreflang = _link.hreflang();
        }
        if (hreflang != null)
            sw.writeAttribute("hreflang", hreflang);

        String href = null;
        accessor = objectContext.getAccessor(Value.class, conventions);
        if (accessor != null) {
            Object value = eval(accessor, source);
View Full Code Here

                href = toString(value);
        }
        if (href == null)
            href = toString(source);
        if (href != null)
            sw.writeAttribute("href", href);

        writeAttributes(source, objectContext, context, conventions);
        writeExtensions(source, objectContext, context, conventions);
    }
}
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.