public String toStringWithDescriptions() { StringBuilder builder = new StringBuilder(); builder.append("CompositeSearchResult [containingConcept="); String containingConceptDesc = null; if (containingConcept != null) { try { containingConceptDesc = OTFUtility.getDescriptionIfConceptExists(containingConcept.getConceptNid()); } catch (Exception e) { containingConceptDesc = "{nid=" + containingConcept.getConceptNid() + "}"; } } builder.append(containingConceptDesc); builder.append(", matchingComponentNid_="); builder.append(matchingComponentNid_); String matchingComponentDesc = null; if (matchingComponentNid_ != 0) { try { ComponentChronicleBI<?> cc = OTFUtility.getComponentChronicle(matchingComponentNid_); matchingComponentDesc = cc.toUserString(); } catch (Exception e) { // NOOP } } if (matchingComponentDesc != null) { builder.append(", matchingComponent="); builder.append(matchingComponentDesc); } builder.append(", bestScore="); builder.append(bestScore); builder.append(", numMatchingComponents="); List<Integer> matchingComponentNids = new ArrayList<>(); for (ComponentVersionBI matchingComponent : getMatchingComponents()) { matchingComponentNids.add(matchingComponent != null ? matchingComponent.getNid() : null); } builder.append(matchingComponentNids); builder.append("]"); return builder.toString(); }