Examples of ImageTag


Examples of org.htmlparser.tags.ImageTag

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

        int rating = -1;
        ImageTag ratingNode = (ImageTag)infoCollector.getNode(i++);
        if (ratingNode != null) {
          String ratingStr = ratingNode.getImageURL();
          matcher = ratingPattern.matcher(ratingStr);
          if (matcher.matches()) {
            rating = Integer.parseInt(matcher.group(1));
          }
        }
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

            NodeList all = parser.extractAllNodesThatMatch(infoCollector);

            if (all.size() >= 3) {
                int i=0;
                //get the icon
                ImageTag icon = (ImageTag)infoCollector.getNode(i++);
                item.setIconUrl(icon.getImageURL().replace("&&", "&"));

                //get the description
                NodeList list = infoCollector.getNodeList(i++);
                item.setSummary(NodeUtils.getTextData(list.elementAt(list.size()-1)));
               
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

                    });
            parser.extractAllNodesThatMatch(infoCollector);
           
          int i=0;
            //get the icon
            ImageTag icon = (ImageTag)infoCollector.getNode(i++);
            item.setIconUrl(icon.getImageURL());
           
            //strip off the query params
            int index = item.getIconUrl().indexOf('?');
            if (index != -1) {
                item.setIconUrl(item.getIconUrl().substring(0, index)+ "?wid=130&hei=182&cvt=jpeg");
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

           
            //save off the title and image
            item.setTitle(NodeUtils.getTextData(infoCollector.getNode(i++)));

            //get the icon
            ImageTag icon = (ImageTag)infoCollector.getNode(i++);
            item.setIconUrl(icon.getImageURL().replace("&&", "&"));
           
            //strip off the query params
            int index = item.getIconUrl().indexOf('?');
            if (index != -1) {
                item.setIconUrl(item.getIconUrl().substring(0, index)+ "?wid=130&hei=182&cvt=jpeg");
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

                        throw new HTMLParseException(e1);
                    }
                }
                else if (node instanceof ImageTag)
                {
                    ImageTag image= (ImageTag)node;
                    binUrlStr= image.getImageURL();
                }
                else if (node instanceof AppletTag)
                {
                    AppletTag applet= (AppletTag)node;
                    binUrlStr= applet.getAppletClass();
                }
                else if (node instanceof InputTag)
                {
                    InputTag input= (InputTag)node;
                    // we check the input tag type for image
                    String strType= input.getAttribute("type");
                    if (strType != null && strType.equalsIgnoreCase("image"))
                    {
                        // then we need to download the binary
                        binUrlStr= input.getAttribute("src");
                    }
        } else if (node instanceof LinkTag){
          LinkTag link = (LinkTag)node;
          if (link.getChild(0) instanceof ImageTag){
            ImageTag img = (ImageTag)link.getChild(0);
            binUrlStr = img.getImageURL();
          }
        } else if (node instanceof ScriptTag){
          ScriptTag script = (ScriptTag)node;
          binUrlStr = script.getAttribute("src");
        } else if (node instanceof FrameTag){
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

                    }
                } catch (MalformedURLException e1) {
                    throw new HTMLParseException(e1);
                }
            } else if (tag instanceof ImageTag) {
                ImageTag image = (ImageTag) tag;
                binUrlStr = image.getImageURL();
            } else if (tag instanceof AppletTag) {
                // look for applets

                // This will only work with an Applet .class file.
                // Ideally, this should be upgraded to work with Objects (IE)
                // and archives (.jar and .zip) files as well.
                AppletTag applet = (AppletTag) tag;
                binUrlStr = applet.getAppletClass();
            } else if (tag instanceof InputTag) {
                // we check the input tag type for image
                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) {
                binUrlStr = tag.getAttribute(ATT_SRC);
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

                    }
                } catch (MalformedURLException e1) {
                    throw new HTMLParseException(e1);
                }
            } else if (tag instanceof ImageTag) {
                ImageTag image = (ImageTag) tag;
                binUrlStr = image.getImageURL();
            } else if (tag instanceof AppletTag) {
            // look for applets

            // This will only work with an Applet .class file.
            // Ideally, this should be upgraded to work with Objects (IE)
            // and archives (.jar and .zip) files as well.
                AppletTag applet = (AppletTag) tag;
                binUrlStr = applet.getAppletClass();
            } else if (tag instanceof InputTag) {
                // we check the input tag type for image
                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) {
                binUrlStr = tag.getAttribute(ATT_SRC);
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

                    }
                } catch (MalformedURLException e1) {
                    throw new HTMLParseException(e1);
                }
            } else if (tag instanceof ImageTag) {
                ImageTag image = (ImageTag) tag;
                binUrlStr = image.getImageURL();
            } else if (tag instanceof AppletTag) {
                // look for applets

                // This will only work with an Applet .class file.
                // Ideally, this should be upgraded to work with Objects (IE)
View Full Code Here

Examples of org.htmlparser.tags.ImageTag

          StyleTag styleTag = (StyleTag) tag;
          if ( styleTag.getChildCount() > 0 ) {
            styleTag.removeChild( 0 );
          }
        } else if ( "img".equalsIgnoreCase( name ) && tag instanceof ImageTag ) {
          ImageTag imageTag = (ImageTag) tag;
          imageTag.setImageURL( "NOIMAGE" );
        }
      }

    };
View Full Code Here

Examples of org.rendersnake.tag.ImageTag

public class Canvas {

  public StringWriter out = new StringWriter();
 
  public ImageTag img() {
    return new ImageTag(out);
  }
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.