Package dk.brics.xmlgraph

Examples of dk.brics.xmlgraph.Node.process()


   */
  private XMLGraph safeCloneGraph(XMLGraph xg) {
      final XMLGraph output = xg.clone();
      for (int i=0; i<xg.getNodes().size(); i++) {
          Node node = output.getNode(i);
          node.process(new NodeProcessor<Object>() {
              @Override
              public Object process(AttributeNode n) {
                  n.setName(n.getName().clone(), output);
                  return this;
              }
View Full Code Here


  final public Automaton apply(XMLGraph g) {
    graph = g;
    Automaton result = Automaton.makeEmpty();
    for (int root : g.getRoots()) {
      Node node = g.getNode(root);
      Automaton c = node.process(proc);
      result = result.union(c);
    }
    return result;
  }
  private Processor proc = new Processor();
View Full Code Here

          return EPresence.UNKNOWN;
        }
        EPresence result = EPresence.EMPTY;
        for (int index : n.getContents()) {
          Node child = xg.getNode(index);
          EPresence p = child.process(this);
          if (result.maybeNonEmpty() && p.maybeNonEmpty())
            malformed[0] = true; // many roots
          result = result.concat(p);
        }
        open.remove(n);
View Full Code Here

        if (!open.add(n))
          return EPresence.UNKNOWN;
        EPresence result = EPresence.BOTTOM;
        for (int index : n.getContents()) {
          Node child = xg.getNode(index);
          EPresence p = child.process(this);
          result = result.leastUpperBound(p);
        }
        open.remove(n);
        return result;
      }
View Full Code Here

        Set<ElementNode> forms = new HashSet<ElementNode>();
        for (XMLGraph xg : ret2xg.values()) {
            NodeProcessor<Set<ElementNode>> isInFormActionChecker = new IsInFormActionChecker(
                    xg);
            Node node = xg.getNode(gap.getIndex());
            final Set<ElementNode> parentForms = node
                    .process(isInFormActionChecker);
            forms.addAll(parentForms);
        }
        return forms;
    }
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.