docs: public void printSubgraph( Node node,
                                 String lead,
                                 int depthOfSubgraph,
                                 int maxDepthOfSubgraph ) throws RepositoryException {
          int currentDepth = node.getDepth() - depthOfSubgraph + 1;
          if (currentDepth > maxDepthOfSubgraph) return;
          if (lead == null) lead = "";
          String nodeLead = lead + createString(' ', (currentDepth - 1) * 2);
  
          StringBuilder sb = new StringBuilder();
          sb.append(nodeLead);
          if (node.getDepth() == 0) {
              sb.append("/");
          } else {
              sb.append(node.getName());
              if (node.getIndex() != 1) {
                  sb.append('[').append(node.getIndex()).append(']');
              }
          }
          sb.append(" jcr:primaryType=" + node.getPrimaryNodeType().getName());
          boolean referenceable = node.isNodeType("mix:referenceable");
          if (node.getMixinNodeTypes().length != 0) {
              sb.append(" jcr:mixinTypes=[");
              boolean first = true;
              for (NodeType mixin : node.getMixinNodeTypes()) {
                  if (first) first = false;
                  else sb.append(',');
                  sb.append(mixin.getName());
              }
              sb.append(']');
          }
          if (referenceable) {
              sb.append(" jcr:uuid=" + node.getIdentifier());
          }
          print(sb);
  
          List<String> propertyNames = new LinkedList<String>();
          for (PropertyIterator iter = node.getProperties(); iter.hasNext();) {
              Property property = iter.nextProperty();
              String name = property.getName();
              if (name.equals("jcr:primaryType") || name.equals("jcr:mixinTypes") || name.equals("jcr:uuid")) continue;
              propertyNames.add(property.getName());
          }
          Collections.sort(propertyNames);
          for (String propertyName : propertyNames) {
              Property property = node.getProperty(propertyName);
              sb = new StringBuilder();
              sb.append(nodeLead).append("  - ").append(propertyName).append('=');
              int type = property.getType();
              boolean binary = type == PropertyType.BINARY;
              if (property.isMultiple()) {
                  sb.append('[');
                  boolean first = true;
                  for (Value value : property.getValues()) {
                      if (first) first = false;
                      else sb.append(',');
                      if (binary) {
                          sb.append(value.getBinary());
                      } else {
                          sb.append(getStringValue(value, type));
                      }
                  }
                  sb.append(']');
              } else {
                  Value value = property.getValue();
                  if (binary) {
                      sb.append(value.getBinary());
                  } else {
                      sb.append(getStringValue(value, type));
                  }
              }
              print(sb);
          }
  
          if (currentDepth < maxDepthOfSubgraph) {
              for (NodeIterator iter = node.getNodes(); iter.hasNext();) {
                  Node child = iter.nextNode();
                  printSubgraph(child, lead, depthOfSubgraph, maxDepthOfSubgraph);
              }
          }
      }