Package org.apache.abdera.ext.serializer.annotation

Examples of org.apache.abdera.ext.serializer.annotation.Category


                           ObjectContext objectContext,
                           SerializationContext context,
                           Conventions conventions) {

        StreamWriter sw = context.getStreamWriter();
        Category _category = objectContext.getAnnotation(Category.class);

        String scheme = null;
        AccessibleObject accessor = objectContext.getAccessor(Scheme.class, conventions);
        if (accessor != null) {
            Object value = eval(accessor, source);
            if (value != null)
                scheme = toString(value);
        }
        if (scheme == null) {
            Scheme _scheme = objectContext.getAnnotation(Scheme.class);
            if (_scheme != null && !_scheme.value().equals(DEFAULT)) {
                scheme = _scheme.value();
            }
        }
        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);
            if (value != null)
                label = toString(value);
        }
        if (label == null) {
            Label _label = objectContext.getAnnotation(Label.class);
            if (_label != null && !_label.value().equals(DEFAULT)) {
                label = _label.value();
            }
        }
        if (label == null && _category != null && !_category.label().equals(DEFAULT)) {
            label = _category.label();
        }
        if (label != null)
            sw.writeAttribute("label", label);

        String term = null;
View Full Code Here


    ObjectContext objectContext,
    SerializationContext context,
    Conventions conventions) {
   
    StreamWriter sw = context.getStreamWriter();
    Category _category = objectContext.getAnnotation(Category.class);
   
    String scheme = null;
    AccessibleObject accessor = objectContext.getAccessor(Scheme.class, conventions);
    if (accessor != null) {
      Object value = eval(accessor, source);
      if (value != null)
        scheme = toString(value);
    }
    if (scheme == null) {
      Scheme _scheme = objectContext.getAnnotation(Scheme.class);
      if (_scheme != null && !_scheme.value().equals(DEFAULT)) {
        scheme = _scheme.value();
      }
    }
    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);
      if (value != null)
        label = toString(value);
    }
    if (label == null) {
      Label _label = objectContext.getAnnotation(Label.class);
      if (_label != null && !_label.value().equals(DEFAULT)) {
        label = _label.value();
      }
    }
    if (label == null && _category != null && !_category.label().equals(DEFAULT)) {
      label = _category.label();
    }
    if (label != null)
      sw.writeAttribute("label", label);
   
    String term = null;
View Full Code Here

TOP

Related Classes of org.apache.abdera.ext.serializer.annotation.Category

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.