Package org.htmlparser.tags

Examples of org.htmlparser.tags.LinkTag


                if (ATT_IS_IMAGE.equalsIgnoreCase(tag.getAttribute(ATT_TYPE))) {
                    // then we need to download the binary
                    binUrlStr = tag.getAttribute(ATT_SRC);
                }
            } else if (tag instanceof LinkTag) {
                LinkTag link = (LinkTag) tag;
                if (link.getChild(0) instanceof ImageTag) {
                    ImageTag img = (ImageTag) link.getChild(0);
                    binUrlStr = img.getImageURL();
                }
            } else if (tag instanceof ScriptTag) {
                binUrlStr = tag.getAttribute(ATT_SRC);
            } else if (tag instanceof FrameTag) {
View Full Code Here


                if (ATT_IS_IMAGE.equalsIgnoreCase(tag.getAttribute(ATT_TYPE))) {
                    // then we need to download the binary
                    binUrlStr = tag.getAttribute(ATT_SRC);
                }
            } else if (tag instanceof LinkTag) {
                LinkTag link = (LinkTag) tag;
                if (link.getChild(0) instanceof ImageTag) {
                    ImageTag img = (ImageTag) link.getChild(0);
                    binUrlStr = img.getImageURL();
                }
            } else if (tag instanceof ScriptTag) {
                binUrlStr = tag.getAttribute(ATT_SRC);
            } else if (tag instanceof FrameTag) {
View Full Code Here

      disc.collectInto(info, infoCollector);

      int i=0;

      //parse out all the information
      LinkTag titleLink = (LinkTag)infoCollector.getNode(i++);
      String movieId = null;
      Matcher matcher = movieIdPattern.matcher(titleLink.getLink());
      if (matcher.matches()) {
        movieId = matcher.group(1);
      } else {
        //not a valid movie
        continue;
      }
     
      String title = titleLink.getLinkText();

      int rating = -1;
      ImageTag ratingNode = (ImageTag)infoCollector.getNode(i++);
      if (ratingNode != null) {
        String ratingStr = ratingNode.getImageURL();
View Full Code Here

      disc.collectInto(info, infoCollector);

      int i=0;

      //parse out all the information
      LinkTag titleLink = (LinkTag)infoCollector.getNode(i++);
      String movieId = null;
      Matcher matcher = movieIdPattern.matcher(titleLink.getLink());
      if (matcher.matches()) {
        movieId = matcher.group(1);
      } else {
        //not a valid movie
        continue;
      }
     
      String title = titleLink.getLinkText();

      int rating = -1;
      ImageTag ratingNode = (ImageTag)infoCollector.getNode(i++);
      if (ratingNode != null) {
        String ratingStr = ratingNode.getImageURL();
View Full Code Here

        disc.collectInto(info, infoCollector);
 
        int i=0;
 
        //parse out all the information
        LinkTag titleLink = (LinkTag)infoCollector.getNode(i++);
        String movieId = null;
        Matcher matcher = movieIdPattern.matcher(titleLink.getLink());
        if (matcher.matches()) {
          movieId = matcher.group(1);
        } else {
          //not a valid movie
          continue;
        }
       
        String title = titleLink.getLinkText();
 
        String year = NodeUtils.getTextData(infoCollector.getNode(i++));
        year = year.replaceAll("\\((\\d*)\\)", "$1");
 
        String mpaa = NodeUtils.getTextData(infoCollector.getNode(i++));
View Full Code Here

 
        int i=0;
 
        //parse out all the information
        NodeList linkNodes = infoCollector.getNodeList(i++);
        LinkTag titleLink = (LinkTag)linkNodes.elementAt(0);
        String movieId = null;
        Matcher matcher = movieIdPattern.matcher(titleLink.getLink());
        if (matcher.matches()) {
          movieId = matcher.group(1);
        } else {
          //not a valid movie
          continue;
        }
       
        String title = titleLink.getLinkText();
        String mpaa = NodeUtils.getTextData(linkNodes.elementAt(1));
 
        String year = NodeUtils.getTextData(infoCollector.getNode(i++));
        year = year.replaceAll("\\((\\d*)\\)", "$1");
 
View Full Code Here

        int i=0;

        //parse out all the information
        NodeList links = infoCollector.getNodeList(i++);
        LinkTag titleLink = (LinkTag)links.elementAt(0);
        LinkTag mpaaLink = (LinkTag)links.elementAt(1);
        String movieId = null;
        Matcher matcher = movieIdPattern.matcher(titleLink.getLink());
        if (matcher.matches()) {
          movieId = matcher.group(1);
        } else {
          //not a valid movie
          continue;
        }
       
        String title = titleLink.getLinkText();
        String mpaa = mpaaLink.getLinkText();

        String year = NodeUtils.getTextData(infoCollector.getNode(i++));
        year = year.replaceAll("\\((\\d*)\\)", "$1");

        int rating = -1;
View Full Code Here

        NodeList list = new NodeList();
        disc.collectInto(list, removeFilter);
                String queueId = null;
                boolean discSet = false;
                if (list.size() == 1) {
                  LinkTag removeNode = (LinkTag)list.elementAt(0);
                    queueId = removeNode.getLink();
                    discSet = queueId.indexOf("setId") != -1;
                    int index = queueId.lastIndexOf('=');
                    if (index != -1) {
                        queueId = queueId.substring(index+1);
                    }
View Full Code Here

     
      int i=0;
      //parse out all the information
            String queueId = null;
            boolean discSet = false;
            LinkTag removeNode = (LinkTag)infoCollector.getNode(i++);
            if (removeNode != null) {
                queueId = removeNode.getLink();
                discSet = queueId.indexOf("setId") != -1;
                index = queueId.lastIndexOf('=');
                if (index != -1) {
                    queueId = queueId.substring(index+1);
                }
            }
            LinkTag titleNode = (LinkTag)infoCollector.getNode(i++);
            String movieId = titleNode.getLink();
            index = movieId.lastIndexOf('/');
            if (index != -1) {
                movieId = movieId.substring(index+1);
            }
            String title = NodeUtils.getTextData(titleNode);
View Full Code Here

      }
     
        Category parent = null;
      NodeIterator iter = links.elements();
        while (iter.hasMoreNodes()) {
          LinkTag link = (LinkTag)iter.nextNode();
          Category category = new Category();
          category.setTitle(NodeUtils.getTextData(link));
          category.setId(link.getLink().replaceAll(".*/movieGenres/(.*?)", "$1"));
           
            if (category.getId().indexOf('/') == -1) {
                //it is a root category
                parent = category;
            }
View Full Code Here

TOP

Related Classes of org.htmlparser.tags.LinkTag

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.