return pathHelper;
}
protected void doViewRelationships(String code) {
try {
Concept c = terminology.lookupConcept(code);
if(c != null){
StringBuffer str = new StringBuffer();
// narrower concepts
str.append("<h3>Direct Children of <font color=green>"+c.getName()+" ("+c.getCode()+")</font></h3>");
str.append("<ul>");
for(Concept a: c.getChildrenConcepts()){
String h = "<a href=\""+a.getCode()+"\">"+a.getCode()+"</a>";
str.append("<li><b>"+a.getName()+"</b> ("+h+") "+Arrays.toString(a.getSemanticTypes())+"</li>");
}
str.append("</ul>");
str.append("<h3>Direct Parents of <font color=green>"+c.getName()+" ("+c.getCode()+")</font></h3>");
for(Concept a: c.getParentConcepts()){
String h = "<a href=\""+a.getCode()+"\">"+a.getCode()+"</a>";
str.append("<li><b>"+a.getName()+"</b> ("+h+") "+Arrays.toString(a.getSemanticTypes())+"</li>");
}
str.append("</ul>");
// ancestry
str.append("<h3>All Ancestors of <font color=green>"+c.getName()+" ("+c.getCode()+") </font></h3>");
Map<Concept,Integer> ancestors = getPathHelper().getAncestors(c);
if(ancestors != null && !ancestors.isEmpty()){
for(Concept a: ancestors.keySet()){
try {
a.initialize();