int refHeight = ent.getRefHeight();
int x = (ent.getX() + ent.getWidth()) - (refHeight * 2 / 3);
int y = ent.getY() + Constant.SPACING_FOR_COMPONENT_OF_REFERENCE;
for (String ref : setRefOrder(ent)) {
ReferenceArtifact refer = new ReferenceArtifact();
Element polygon = refer.addElement(doc, svgNS, x, y, refHeight);
Element child = polygon;
if (baseURL != null) {
String url = baseURL + "/components/" + ent.getName() + "/services/" + ref;
child = createLink(polygon, url);
}
Element text = Text.addTextElement(doc, svgNS, x, y - Constant.SPACING_FOR_TEXT, ref);
svgRoot.appendChild(child);
svgRoot.appendChild(text);
y += (refHeight + Constant.SPACING_FOR_COMPONENT_OF_REFERENCE);
refer.setName(ref);
refer.setContainerName(ent.getName());
refs.add(refer);
}
}