コード例 #1
0
  protected void preXMLTableOfContentsCreate(XSOMSchemaTreeWalker sw, XMLTreeOutputWalker tw) {

    TreeNode root = sw.getRoot();
    TreeNode node = tw.findNode(root, "namedCache", "infinispan");
    node.detach();

    PruneTreeWalker ptw = new PruneTreeWalker("property");
    ptw.postOrderTraverse(root);
  }
コード例 #2
0
 protected boolean postVisitNode(TreeNode n) {
   // generate table for properties as well
   if (n.hasChild("properties")) {
     generatePropertiesTableRows(getStringBuilder(), n);
   }
   return super.postVisitNode(n);
 }
コード例 #3
0
 private void generatePropertiesTableRows(StringBuilder sb, TreeNode n) {
   Field field = findField(n.getBeanClass(), "properties");
   if (field != null) {
     Map<String, String> description = findDescription(field);
     if (!description.isEmpty()) {
       sb.append("<table class=\"bodyTable\"> ");
       sb.append("<tr class=\"a\"><th>Property</th><th>Description</th></tr>\n");
       for (Entry<String, String> e : description.entrySet()) {
         sb.append("<tr class=\"b\">");
         sb.append("<td>").append(e.getKey()).append("</td>\n");
         sb.append("<td>").append(e.getValue()).append("</td>\n");
         sb.append("</tr>\n");
       }
       sb.append("</table>\n");
     }
   }
 }
コード例 #4
0
 protected boolean preVisitNode(TreeNode n) {
   return n.getName().equals("properties");
 }
コード例 #5
0
 public void visitNode(TreeNode treeNode) {
   if (treeNode.getName().equals(pruneNodeName)) {
     treeNode.detach();
   }
 }