protected void renderLinkForDirection(final String indentation, final boolean in) { final int total = in ? this.item.countIncomingLinks() : this.item.countOutgoingLinks(); if (total > 0) { this.stream.print(indentation); this.stream.print(" <div class=\""); this.stream.print(in ? "in" : "out"); this.stream.println("\">"); this.stream.print(indentation); this.stream.print(" <h6>"); this.stream.print(in ? "In" : "Out"); this.stream.print(": "); this.stream.print(total); this.stream.println("</h6>"); this.stream.print(indentation); this.stream.println(" <ul>"); final Stream<TracedLink> links = this.item.getTracedLinks().stream() .filter(in ? TracedLink::isIncoming : TracedLink::isOutgoing); final List<TracedLink> sortedLinks = sortLinkStreamById(links); renderLinkEntry(sortedLinks, indentation); this.stream.print(indentation); this.stream.println(" </ul>"); this.stream.print(indentation); this.stream.println(" </div>"); } }
protected void renderLinkForDirection(final String indentation, final boolean in) { final int total = in ? this.item.countIncomingLinks() : this.item.countOutgoingLinks(); if (total > 0) { this.stream.print(indentation); this.stream.print(" <div class=\""); this.stream.print(in ? "in" : "out"); this.stream.println("\">"); this.stream.print(indentation); this.stream.print(" <h6>"); this.stream.print(in ? "In" : "Out"); this.stream.print(": "); this.stream.print(total); this.stream.println("</h6>"); this.stream.print(indentation); this.stream.println(" <ul>"); final Stream<TracedLink> links = this.item.getTracedLinks().stream() .filter(in ? TracedLink::isIncoming : TracedLink::isOutgoing); final List<TracedLink> sortedLinks = sortLinkStreamById(links); renderLinkEntry(sortedLinks, indentation); this.stream.print(indentation); this.stream.println(" </ul>"); this.stream.print(indentation); this.stream.println(" </div>"); } }