private static void dumpKnowledge(IModelObject o, List<String> ret, int indent) {
if (o instanceof IKnowledgeObject) {
if (ret.isEmpty()) {
ret.add("NAMESPACE,ID,ID (hierarchy),DOMAIN,CORE TYPE,DESCRIPTION");
}
IConcept domain = ((IKnowledgeObject) o).getType().getDomain();
IKnowledge coretp = NS.getCoreType((IKnowledgeObject) o);
IKnowledge type = ((IKnowledgeObject) o).getType();
String id = o.getId();
String ns = o.getNamespace().getId();
String in = StringUtils.repeat("*", indent) + o.getId();
String dm = domain == null ? "N/A" : domain.toString();
String ct = coretp == null ? "N/A" : coretp.getLocalName();
String cm = type.getMetadata().getString(IMetadata.DC_COMMENT);
ret.add(ns + "," + id + "," + in + "," + dm + "," + ct + "," + cm);
for (IModelObject oo : o.getChildren()) {
dumpKnowledge(oo, ret, indent + 1);
}
}
}