StringBuffer buf = new StringBuffer();
buf.append("<html> <h1>" + this.name + " Component</h1>");
buf.append("<h2>Description:</h2> " + this.description);
for (int i = 0; i < this.inputs.size(); i++) {
ComponentDataPort port = this.inputs.get(i);
buf.append("<h3>Input" + (i + 1) + "</h3>");
buf.append("<strong>Name: </strong>");
buf.append("" + port.getName() + "<br>");
buf.append("<strong>Description: </strong>");
buf.append("" + port.getDescription());
}
for (int i = 0; i < this.outputs.size(); i++) {
ComponentDataPort port = this.outputs.get(i);
buf.append("<h3>Output" + (i + 1) + "</h3>");
buf.append("<strong>Name: </strong>");
buf.append("" + port.getName() + "<br>");
buf.append("<strong>Description: </strong>");
buf.append("" + port.getDescription());
}
buf.append("</html>");
return buf.toString();
}