Package org.htmlparser.filters

Examples of org.htmlparser.filters.HasParentFilter


 
  private void parseShippedList(Node queue, List<MovieItem> items) {
    NodeFilter discFilter = new CssClassFilter("or");
    NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
        new AndFilter(new NodeClassFilter(LinkTag.class),
            new HasParentFilter(new CssClassFilter("qt"))),
        new AndFilter(new NodeClassFilter(ImageTag.class),
            new CssClassFilter("star")),
        new CssClassFilter("ec"),
        new CssClassFilter("e"),
        new CssClassFilter("ee")
View Full Code Here


 
  private void parseMovieQueue(Node queue, List<MovieItem> items) {
    NodeFilter discFilter = new CssClassFilter("bd");
    NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
        new AndFilter(new NodeClassFilter(LinkTag.class),
            new HasParentFilter(new CssClassFilter("stc"))),
           
        new AndFilter(new NodeClassFilter(ImageTag.class),
            new CssClassFilter("star")),
           
        new CssClassFilter("ec"),
View Full Code Here

      );
     
 
      NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
          new AndFilter(new NodeClassFilter(LinkTag.class),
              new HasParentFilter(new CssClassFilter("list-title"))),
          new CssClassFilter("list-titleyear"),
          new CssClassFilter("list-mpaa"),
          new AndFilter(new NodeClassFilter(ImageTag.class),
              new CssClassFilter("star"))
          });
View Full Code Here

      });
     
 
      NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
          new AndFilter(new NodeClassFilter(LinkTag.class),
              new HasParentFilter(new CssClassFilter("searchDisplay"))),
          new AndFilter(new NodeClassFilter(Span.class),
              new HasParentFilter(new CssClassFilter("searchDisplay"))),
          new AndFilter(new NodeClassFilter(ImageTag.class),
              new CssClassFilter("star"))
          });
 
      parser.extractAllNodesThatMatch(searchCollector);
View Full Code Here

          new HasChildFilter(new HasChildFilter(new CssClassFilter("searchDisplay")))
      );

      NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
          new AndFilter(new NodeClassFilter(LinkTag.class),
              new HasParentFilter(new HasParentFilter(new CssClassFilter("searchDisplay")))),
          new AndFilter(new NodeClassFilter(TextNode.class),
              new HasParentFilter(new CssClassFilter("searchSmallText"))),
          new AndFilter(new NodeClassFilter(ImageTag.class),
              new CssClassFilter("star"))
          });

      NodeList discs = parser.extractAllNodesThatMatch(discFilter);
View Full Code Here

            }
            parser.setURL(url);

            NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
                    new AndFilter(
                            new HasParentFilter(new HasAttributeFilter("href",
                                    "/catalog/movieDetails/" + item.getMovieId())),
                            new NodeClassFilter(ImageTag.class)
                    ),

                    new CssClassFilter("bvr-rating"),
View Full Code Here

    NodeFilter discFilter = new CssClassFilter("disc");

        NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
                new CssClassFilter("bvr-qremove"),
                new AndFilter(new NodeClassFilter(LinkTag.class),
                        new HasParentFilter(new CssClassFilter("title"))),
                new CssClassFilter("mpaa"),
                new CssClassFilter("bvr-rating"),
                new AndFilter(new NodeClassFilter(LinkTag.class),
                        new CssClassFilter("availability")),
                new CssClassFilter("shipped"),
View Full Code Here

          log.debug("Searching url " + searchUrl);
        }
        parser.setURL(searchUrl);

      NodeCollector searchCollector = new NodeCollector(new NodeFilter[] {
          new HasParentFilter(new HasAttributeFilter("id", "tabHeader2")),
          new CssClassFilter("movie"),
      });
       
        parser.extractAllNodesThatMatch(searchCollector);
        Node moviesTab = searchCollector.getNode(0);
View Full Code Here

                    {
                        case '+':
                            ret = new AdjacentFilter (ret);
                            break;
                        case '>':
                            ret = new HasParentFilter (ret);
                            break;
                        default: // whitespace
                            ret = new HasAncestorFilter (ret);
                    }
                    nextToken ();
View Full Code Here

     */
    public TableColumn[] getColumns ()
    {
        NodeList kids;
        NodeClassFilter cls;
        HasParentFilter recursion;
        NodeFilter filter;
        TableColumn[] ret;

        kids = getChildren ();
        if (null != kids)
        {
            cls = new NodeClassFilter (TableRow.class);
            recursion = new HasParentFilter (null);
            filter = new OrFilter (
                        new AndFilter (
                            cls,
                            new IsEqualFilter (this)),
                        new AndFilter ( // recurse up the parent chain
                            new NotFilter (cls), // but not past the first row
                            recursion));
            recursion.setParentFilter (filter);
            kids = kids.extractAllNodesThatMatch (
                // it's a column, and has this row as it's enclosing row
                new AndFilter (
                    new NodeClassFilter (TableColumn.class),
                    filter), true);
View Full Code Here

TOP

Related Classes of org.htmlparser.filters.HasParentFilter

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.