fields, boolean elem
String itemTagName = manyAssociation ? resolveTagName(tagName, xmlAssociationMetadata) : tagName;
if (manyAssociation && xmlAssociationMetadata.isWrappedItems()) {
- w.writeText(tagName);
- w.writeMarkup("/");
+ sink.text(tagName);
+ sink.rawText("/");
}
if (isInnerAssociation(f)) {
- w.startElement("a");
- w.addAttribute("href", "#" + getAnchorName(itemTagName, assoc.getToClass()));
- w.writeText(itemTagName);
- w.endElement();
+ sink.link("#" + getAnchorName(itemTagName, assoc.getToClass()));
+ sink.text(itemTagName);
+ sink.link_();
} else if (ModelDefault.PROPERTIES.equals(f.getType())) {
if (xmlAssociationMetadata.isMapExplode()) {
- w.writeText("(key,value)");
+ sink.text("(key,value)");
} else {
- w.writeMarkup("key=value");
+ sink.rawText("key=value");
}
} else {
- w.writeText(itemTagName);
+ sink.text(itemTagName);
}
if (manyAssociation) {
- w.writeText("*");
+ sink.text("*");
}
} else {
- w.writeText(tagName);
+ sink.text(tagName);
}
- w.endElement(); // code
+ sink.monospaced_();
- w.endElement(); // td
+ sink.tableCell_();
// Type column
- w.startElement("td");
+ sink.tableCell();
- w.startElement("code");
+ sink.monospaced();
if (f instanceof ModelAssociation) {
ModelAssociation assoc = (ModelAssociation) f;
if (assoc.isOneMultiplicity()) {
- w.writeText(assoc.getTo());
+ sink.text(assoc.getTo());
} else {
- w.writeText(assoc.getType().substring("java.util.".length()));
+ sink.text(assoc.getType().substring("java.util.".length()));
if (assoc.isGenericType()) {
- w.writeText("<" + assoc.getTo() + ">");
+ sink.text("<" + assoc.getTo() + ">");
}
}
} else {
- w.writeText(f.getType());
+ sink.text(f.getType());
}
- w.endElement(); // code
+ sink.monospaced_();
- w.endElement(); // td
+ sink.tableCell_();
// Since column
if (showSinceColumn) {
- w.startElement("td");
+ sink.tableCell();
if (f.getVersionRange() != null) {
Version fromVersion = f.getVersionRange().getFromVersion();
if (fromVersion != null && fromVersion.greaterThan(firstVersion)) {
- w.writeMarkup(fromVersion.toString());
+ sink.rawText(fromVersion.toString());
}
}
- w.endElement();
+ sink.tableCell_();
}
// Description column
- w.startElement("td");
+ sink.tableCell();
if (manyAssociation) {
- w.writeMarkup("(Many) ");
+ sink.rawText("(Many) ");
}
- w.writeMarkup(getDescription(f));
+ writeMarkupViaSink(sink, getDescription(f));
// Write the default value, if it exists.
// But only for fields that are not a ModelAssociation
if (f.getDefaultValue() != null && !(f instanceof ModelAssociation)) {
- w.writeMarkup("Default value: ");
+ sink.rawText("
Default value: ");
- writeTextElement(w, "code", f.getDefaultValue());
+ sink.monospaced();
+ sink.text(f.getDefaultValue());
+ sink.monospaced_();
- w.writeMarkup("
");
+ sink.rawText("");
}
- w.endElement(); // td
+ sink.tableCell_();
- w.endElement(); // tr
+ sink.tableRow_();
}
- w.endElement(); // table
+ sink.rawText("