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

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


            if (mtaccessor != null) {
                Object mtvalue = eval(mtaccessor, contentValue);
                mediatype = mtvalue != null ? toString(mtvalue) : null;
            }
            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);
        }
View Full Code Here


        if (accessor != null) {
            Object value = BaseSerializer.eval(accessor, object);
            ctype = value != null ? BaseSerializer.toString(value) : null;
        }
        if (ctype == null) {
            MediaType content_type = objectContext.getAnnotation(MediaType.class);
            if (content_type != null && !content_type.value().equals(BaseSerializer.DEFAULT)) {
                ctype = content_type.value();
            }
        }
        return ctype;
    }
View Full Code Here

            Object value = eval(accessor, source);
            if (value != null)
                type = toString(value);
        }
        if (type == null) {
            MediaType _type = objectContext.getAnnotation(MediaType.class);
            if (_type != null && !_type.value().equals(DEFAULT)) {
                type = _type.value();
            }
        }
        if (type == null && _link != null && !_link.type().equals(DEFAULT)) {
            type = _link.type();
        }
View Full Code Here

      if (mtaccessor != null) {
        Object mtvalue = eval(mtaccessor,contentValue);
        mediatype = mtvalue != null ? toString(mtvalue) : null;
      }
      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);
      }
     
View Full Code Here

      Object value = eval(accessor, source);
      if (value != null)
        type = toString(value);
    }
    if (type == null) {
      MediaType _type = objectContext.getAnnotation(MediaType.class);
      if (_type != null && !_type.value().equals(DEFAULT)) {
        type = _type.value();
      }
    }
    if (type == null && _link != null && !_link.type().equals(DEFAULT)) {
      type = _link.type();
    }
View Full Code Here

    if (accessor != null) {
      Object value = BaseSerializer.eval(accessor, object);
      ctype = value != null ? BaseSerializer.toString(value) : null;
    }
    if (ctype == null) {
      MediaType content_type = objectContext.getAnnotation(MediaType.class);
      if (content_type != null && !content_type.value().equals(BaseSerializer.DEFAULT)) {
        ctype = content_type.value();
      }
    }
    return ctype;
  }
View Full Code Here

TOP

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

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.