/** * Print the _node contents with indentation and newline * * @param set * @param indent */ protected void printNode(final Set<T> set, final String indent) { _out.print(indent); printNode(set); _out.println(); }
/** * Print the _node contents with indentation and newline * * @param set * @param indent */ protected void printNode(final Set<T> set, final String indent) { _out.print(indent); printNode(set); _out.println(); }
@Override protected void printNode(final Set<OWLClass> set) { super.printNode(set); final Set<OWLNamedIndividual> instances = getDirectInstances(_taxonomyImpl, set.iterator().next()); if (instances.size() > 0) { _out.print(" - ("); boolean printed = false; for (final OWLNamedIndividual x : instances) { if (printed) _out.print(", "); else printed = true; printURI(_out, x); } _out.print(")"); } }
@Override protected void printNode(final Set<OWLClass> set) { super.printNode(set); final Set<OWLNamedIndividual> instances = getDirectInstances(_taxonomyImpl, set.iterator().next()); if (instances.size() > 0) { _out.print(" - ("); boolean printed = false; for (final OWLNamedIndividual x : instances) { if (printed) _out.print(", "); else printed = true; printURI(_out, x); } _out.print(")"); } }
@Override protected void printNode(final Set<OWLClass> set) { super.printNode(set); final Set<OWLNamedIndividual> instances = getDirectInstances(_taxonomyImpl, set.iterator().next()); if (instances.size() > 0) { _out.print(" - ("); boolean printed = false; for (final OWLNamedIndividual x : instances) { if (printed) _out.print(", "); else printed = true; printURI(_out, x); } _out.print(")"); } }
@Override protected void printNode(final Set<ATermAppl> set) super.printNode(set);
@Override protected void printNode(final Set<ATermAppl> set) super.printNode(set);
/** * Print the tree rooted at the given _node * * @param _node * @param indent */ protected void printTree(final Set<T> set, final String indent) { if (set.contains(_taxonomyImpl.getBottomNode().getName())) return; printNode(set, indent); final T c = set.iterator().next(); final Set<Set<T>> subs = ss(_taxonomyImpl.getSubs(c, true)); final Iterator<Set<T>> j = subs.iterator(); while (j.hasNext()) { final Set<T> eqs = j.next(); if (eqs.contains(c)) continue; printTree(s(eqs), indent + " "); } }
/** * Print the tree rooted at the given _node * * @param _node * @param indent */ protected void printTree(final Set<T> set, final String indent) { if (set.contains(_taxonomyImpl.getBottomNode().getName())) return; printNode(set, indent); final T c = set.iterator().next(); final Set<Set<T>> subs = ss(_taxonomyImpl.getSubs(c, true)); final Iterator<Set<T>> j = subs.iterator(); while (j.hasNext()) { final Set<T> eqs = j.next(); if (eqs.contains(c)) continue; printTree(s(eqs), indent + " "); } }
/** * Print the taxonomy as an indented tree */ protected void printTree() { final Set<T> top = new TreeSet<>(Comparators.stringComparator); top.add(_taxonomyImpl.getTop().getName()); top.addAll(_taxonomyImpl.getTop().getEquivalents()); printTree(top, " "); final Set<T> bottom = new TreeSet<>(Comparators.stringComparator); bottom.add(_taxonomyImpl.getBottomNode().getName()); bottom.addAll(_taxonomyImpl.getBottomNode().getEquivalents()); if (bottom.size() > 1) printNode(bottom, " "); }
/** * Print the taxonomy as an indented tree */ protected void printTree() { final Set<T> top = new TreeSet<>(Comparators.stringComparator); top.add(_taxonomyImpl.getTop().getName()); top.addAll(_taxonomyImpl.getTop().getEquivalents()); printTree(top, " "); final Set<T> bottom = new TreeSet<>(Comparators.stringComparator); bottom.add(_taxonomyImpl.getBottomNode().getName()); bottom.addAll(_taxonomyImpl.getBottomNode().getEquivalents()); if (bottom.size() > 1) printNode(bottom, " "); }