Examples of MetaNode


Examples of com.cardence.lawshelf.html.MetaNode

        this.addMetaNodesToSection(value);
        this.sectionStart(commentHtml);

      } else if (type.equals("field-start")) {
        this.fieldStart(value);
        this.startMetaNode(new MetaNode(value, "comment"));

      } else if (type.equals("field-end")) {
        this.fieldEnd(value);
        this.endMetaNode(value);
View Full Code Here

Examples of com.cardence.lawshelf.html.MetaNode

    if (this.workingCommentStack.isEmpty()) {
      if (debugMode) {
        System.out.println("ERROR: Why is the working stack empty? need to end node [" + name + "]");
      }
    } else {
      MetaNode thisNode = this.workingCommentStack.pop();
      if (!thisNode.getName().equals(name)) {
        if (debugMode) {
          System.out.println("ERROR: Why is the last item on the stack not me? me=[" + name
              + "]; last item = [" + thisNode.getName() + "]");
        }
      } else {
        // looks good!
        MetaNode priorNode = this.workingCommentStack.peek();
        if (priorNode == null) {
          // add to toplevel list
          this.toplevelList.add(thisNode);
        } else {
          // add to prior node as child
          priorNode.addChild(thisNode);
        }
      }
    }
  }
View Full Code Here

Examples of com.cardence.lawshelf.html.MetaNode

    } else {
      if (newTitle == null) {
        // this only happens at the end of the document
      } else {
        // init the next one
        MetaNode sectionNode = this.sectionMetaNodeList.get((this.sectionMetaNodeList.size() - 1));
        if (sectionNode.getType().equals("section")) {
          sectionNode.setName(newTitle);
        }
      }

    }
  }
View Full Code Here

Examples of com.cardence.lawshelf.html.MetaNode

      // this only happens at the beginning of the document
    } else {
      // not the first one
      // copy the working stack into the
      // previously created node
      MetaNode sectionToFinish = this.sectionMetaNodeList.get(this.sectionMetaNodeList.size() - 1);
      sectionToFinish.setChildren(this.toplevelList);
      this.toplevelList = new ArrayList<MetaNode>();
    }

    if (nextTitle == null) {
      // this only happens at the end of the document
    } else {
      // init the next one
      MetaNode sectionNode = new MetaNode("", "section");
      this.sectionMetaNodeList.add(sectionNode);
    }

  }
View Full Code Here

Examples of com.cardence.lawshelf.html.MetaNode

    }

  }

  private void foundMetaNodeElement(String tagname, String html, String text, Map<String, String> attributeMap) {
    MetaNode node = this.getCurrentMetaNode();
    if (node == null) {
      if (debugMode) {
        log.debug("Why is this node null for tagname: " + tagname);
      }
    } else {
      if (node.getName().equals("statute")) {
        String classname = attributeMap.get("class");
        if (classname != null) {
          this.statuteElementMetaNodeClassPairs.add(tagname + ", " + classname);

          if (debugMode && elementcount++ % 25 == 0) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.