Examples of NodeVisitor


Examples of com.gistlabs.mechanize.document.node.NodeVisitor

  public List<JsonLink> findRecursive(JsonNode node) {
    if (node==null) throw new NullPointerException(String.format("root=%s", node));

    final List<JsonLink> result = new ArrayList<JsonLink>();
   
    node.visit(new NodeVisitor() {

      @Override
      public boolean beginNode(Node node) {
        findOn((JsonNode)node, result);
        return true;
View Full Code Here

Examples of dk.brics.xact.NodeVisitor

    SequenceNode top = new SequenceNode(top_contents, x.getOrigin());
    xg.addNode(top);
    pending.add(new PendingNode(x, top));
    while (!pending.isEmpty()) {
      final PendingNode m = pending.pop();
      m.node.visitBy(new NodeVisitor() {

        private void push(Node n, SequenceNode parent) {
          if (n != null)
            pending.push(new PendingNode(n, parent));
        }
View Full Code Here

Examples of dk.brics.xact.NodeVisitor

    final Stack<Node> stack = new Stack<Node>(); // using heap stack, avoids deep recursive calls
    if (e.getFirstChild() != null)
      stack.push(e.getFirstChild());
    while (!stack.isEmpty()) {
      Node n = stack.pop();
      n.visitBy(new NodeVisitor() {
        @Override
        public void visit(Text n) {
          printEscaped(b, n.getString(), false);
          if (n.getNextSibling() != null)
            stack.push(n.getNextSibling());
View Full Code Here

Examples of dk.brics.xact.NodeVisitor

        final XML.XHTMLMode xhtmlDoctype = XML.getXHTMLDoctype();
        while (!stack.isEmpty()) {
      final Entry en = stack.pop();
      switch (en.kind) {
      case START_NODE:
        en.node.visitBy(new NodeVisitor() {
          @Override
          public void visit(Text n) {
            if (en.afterBlock) {
              p.append(linebreak).append(en.indent);
            }
View Full Code Here

Examples of dk.brics.xact.NodeVisitor

        final Entry en = stack.pop();
        switch (en.kind) {

        case START_NODE:
          try {
            en.node.visitBy(new NodeVisitor() {

              @Override
              public void visit(Text n) {
                String s = n.getString();
                try {
View Full Code Here

Examples of name.abuchen.portfolio.ui.views.taxonomy.TaxonomyModel.NodeVisitor

    private void updateChart()
    {
        final Map<InvestmentVehicle, VehicleBuilder> vehicle2builder = new HashMap<InvestmentVehicle, VehicleBuilder>();
        final Map<TaxonomyNode, SeriesBuilder> node2series = new HashMap<TaxonomyNode, SeriesBuilder>();

        getModel().visitAll(new NodeVisitor()
        {
            @Override
            public void visit(TaxonomyNode node)
            {
                if (node.isClassification())
View Full Code Here

Examples of net.sourceforge.htmlunit.corejs.javascript.ast.NodeVisitor

        try {
            final CompilerEnvirons environs = new CompilerEnvirons();
            environs.initFromContext(contextFactory_.enterContext());
            final AstNode root = new Parser(environs).parse(sourceCode, sourceName, lineNo_);
            final Map<Integer, Integer> strings = new TreeMap<Integer, Integer>();
            root.visit(new NodeVisitor() {

                public boolean visit(final AstNode node) {
                    if (node instanceof StringLiteral) {
                        strings.put(node.getAbsolutePosition() + 1, node.getLength() - 2);
                    }
View Full Code Here

Examples of org.gatein.api.navigation.NodeVisitor

    @Managed
    public ModelObject getNavigation(@ManagedContext OperationContext context,
                                     @MappedAttribute("scope") String scopeAttribute,
                                     @MappedAttribute("showAll") String showAllAttribute) {
        NodeVisitor visitor = Nodes.visitChildren();
        int scope = 0;
        if (scopeAttribute != null) {
            scope = Integer.parseInt(scopeAttribute);
            visitor = Nodes.visitNodes(scope);
        }
View Full Code Here

Examples of org.gatein.api.navigation.NodeVisitor

    }

    @Managed("{path: .*}")
    public ModelObject getNode(@MappedPath("path") String path, @MappedAttribute("scope") String scopeAttribute,
                               @MappedAttribute("showAll") String showAllAttribute, @ManagedContext OperationContext context) {
        NodeVisitor visitor = Nodes.visitChildren();
        int scope = 0;
        if (scopeAttribute != null) {
            scope = Integer.parseInt(scopeAttribute);
            visitor = Nodes.visitNodes(scope);
        }
View Full Code Here

Examples of org.htmlparser.visitors.NodeVisitor

    if (DebugFile.trace) {
      DebugFile.writeln("Begin HtmlMimeBodyPart.addClickThroughRedirector("+sRedirectorUrl+")");
      DebugFile.incIdent();
    }
   
    final NodeVisitor linkVisitor = new NodeVisitor() {

        public void visitTag(Tag tag) {
            // Process any tag/node in your HTML
            String name = tag.getTagName();
            // Set the Link's target to _blank if the href is external
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.