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();
}
if (type != null)
sw.writeAttribute("type", type);