Package org.vietspider.html

Examples of org.vietspider.html.NodeConfig


          close(childImpl);
        }
      }
    }

    NodeConfig config = node.getConfig();
    if(config.children().length > 0 || config.children_types().length > 0){
      Iterator<HTMLNode> iter =  node.childIterator();//node.getChildren().iterator();
      while(iter.hasNext()){
        HTMLNode child = iter.next();       
        if(HTML.isChild(node, child.getConfig())) continue;       
        iter.remove();
        if(config.move() == MoveType.INSERT) insert(node, child);
//        if(config.move() == MoveType.ADD) node.getParent().addChild(child);
      }
    }   

    if(config.move() != MoveType.HEADER) return;
   
    NodeImpl header = null;
    if(service.getRootNode().getChildren().size() > 0){
      header = (NodeImpl)service.getRootNode().getChildren().get(0);
    }
View Full Code Here


  public NodeImpl(char[] value, Name name, int type){
    super(name);
    this.type = type;
    children = new NodeList();
    NodeConfig config = HTML.getConfig(name);
    if(config.end() != Tag.FORBIDDEN && type == TypeToken.TAG) isOpen = true;
    setValue(value);
  }
View Full Code Here

        document.setDoctype(temp);
        temp = tokens.pop();
        continue;
      }
     
      NodeConfig config = temp.getConfig();
     
      if(config.hidden()) {
        setter.add(creator.getLast(), temp);
      } else if(temp.getType() == TypeToken.CLOSE) {
        closer.close(config);
      } else if(temp.getType() == TypeToken.TAG) {
        setter.add(temp);     
View Full Code Here

      return null;
    }
  }

  static public NodeConfig getConfig(Name key) {
    NodeConfig config  = mapConfig.get(key);
    if(config != null) return config;
  
    if(refConfig == null || refConfig.get() == null ) loadNodeConfigs();
    NodeConfig [] configs = refConfig.get();
    int low = 0;
    int high = configs.length-1;

    while (low <= high) {
      int mid = (low + high) >> 1;
      config = configs[mid];
      int cmp = config.name().compareTo(key);
 
      if (cmp < 0) low = mid + 1;
      else if (cmp > 0) high = mid - 1;
      else {
        config = configs[mid];
View Full Code Here

TOP

Related Classes of org.vietspider.html.NodeConfig

Copyright © 2018 www.massapicom. 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.