}
private void handleDocs(Annotation[] anns, StringBuilder sb) {
for (Annotation a : anns) {
if (a.annotationType() == Description.class) {
Description d = (Description)a;
sb.append("<doc");
if (d.lang().length() > 0) {
sb.append(" xml:lang=\"" + d.lang() + "\"");
}
if (d.title().length() > 0) {
sb.append(" title=\"" + d.title() + "\"");
}
sb.append(">");
if (d.value().length() > 0) {
sb.append(d.value());
} else if (d.docuri().length() > 0) {
InputStream is = null;
if (d.docuri().startsWith(CLASSPATH_PREFIX)) {
String path = d.docuri().substring(CLASSPATH_PREFIX.length());
is = ResourceUtils.getClasspathResourceStream(path, SchemaHandler.class,
BusFactory.getDefaultBus());
if (is != null) {
try {
sb.append(IOUtils.toString(is));