Package org.vietspider.token.attribute

Examples of org.vietspider.token.attribute.Attributes.indexOf()


    params.add(newPair);
  }

  public String getAttribute(HTMLNode node, String name) {
    Attributes attrs = node.getAttributes();
    int idx = attrs.indexOf(name);
    if(idx < 0) return null;
    return attrs.get(idx).getValue();
  }

  public String getAttribute(Attributes attrs, String name) {
View Full Code Here


    return SUCCESSFULL;
  }

  public String getAttribute(HTMLNode node, String name) {
    Attributes attrs = node.getAttributes();
    int idx = attrs.indexOf(name);
    if(idx < 0) return null;
    return attrs.get(idx).getValue();
  }

  public String getAttribute(Attributes attrs, String name) {
View Full Code Here

    return !error;
  }

  private String getAttribute(HTMLNode node, String name) {
    Attributes attrs = node.getAttributes();
    int idx = attrs.indexOf(name);
    if(idx < 0) return null;
    return attrs.get(idx).getValue();
  }

  private String getAttribute(Attributes attrs, String name) {
View Full Code Here

  }
 
  public Attribute getAttribute(HTMLNode node){
    if(node.isNode(nodeName) || (nodeName.length() == 1 && nodeName.charAt(0) == '*')){
      Attributes attrs = node.getAttributes();  
      int idx = attrs.indexOf(attrName);
      if(idx > -1) return attrs.get(idx);
    }
    return null;
  }
 
View Full Code Here

    Iterator<String> iter = keys.iterator();
    while(iter.hasNext()){
      String key = iter.next();
      if(node.isNode(key) || (key.length() == 1 && key.charAt(0) == '*')){
        Attributes attrs = node.getAttributes();  
        int idx = attrs.indexOf(map.get(key));
        if(idx > -1) return attrs.get(idx);
      }
    }
    return null;
  }
View Full Code Here

  private void createFullSingleLink(HTMLNode node,
      String nodeName, String attrName, URL home, ValueVerifier verifier)   {
    Attribute attr = null;
    if(node.isNode(nodeName) || (nodeName.length() == 1 && nodeName.charAt(0) == '*')) {
      Attributes attrs = node.getAttributes()
      int idx = attrs.indexOf(attrName);
      if(idx < 0return;
      attr = attrs.get(idx);
      String value = attr.getValue();
      if(verifier != null && !verifier.verify(value)) return;
      value  = urlCreator.createURL(home, value);     
View Full Code Here

  private void createFullSingleLink(HTMLNode node,
      String nodeName, String attrName, URL home, ValueVerifier verifier)   {
    Attribute attr = null;
    if(node.isNode(nodeName) || (nodeName.length() == 1 || nodeName.charAt(0) == '*')) {
      Attributes attrs = node.getAttributes()
      int idx = attrs.indexOf(attrName);
      if(idx < 0return;
      attr = attrs.get(idx);
      String value = attr.getValue();
      if(verifier != null && !verifier.verify(value)) return;
      value  = urlCreator.createURL(home, value);     
View Full Code Here

  }
 
  public Attribute getAttribute(HTMLNode node, String nodeName, String attrName){
    if(node.isNode(nodeName) || (nodeName.length() == 1 && nodeName.charAt(0) == '*')){
      Attributes attrs = node.getAttributes();  
      int idx = attrs.indexOf(attrName);
      if(idx > -1) return attrs.get(idx);
    }
    return null;
  }
 
View Full Code Here

    Iterator<String> iter = keys.iterator();
    while(iter.hasNext()){
      String key = iter.next();
      if(node.isNode(key) || (key.length() == 1 && key.charAt(0) == '*')){
        Attributes attrs = node.getAttributes();  
        int idx = attrs.indexOf(map.get(key));
        if(idx > -1) return attrs.get(idx);
      }
    }
    return null;
  }
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.