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;