Examples of LinkProcessor


Examples of com.sun.jersey.server.linking.impl.LinkProcessor

    public ContainerResponse filter(ContainerRequest request, ContainerResponse response) {
        Object entity  = response.getEntity();
        if (entity != null) {
            Class<?> entityClass = entity.getClass();
            LinkProcessor lhp = new LinkProcessor(entityClass);
            lhp.processLinkHeaders(entity, uriInfo, response.getHttpHeaders());
            RefProcessor lp = new RefProcessor(entityClass);
            lp.processLinks(entity, uriInfo);
        }
        return response;
    }
View Full Code Here

Examples of org.htmlparser.util.LinkProcessor

     * Overriding the constructor to accept the filter
     */
    public LinkScanner(String filter)
    {
        super(filter, MATCH_NAME, ENDERS, ENDTAG_ENDERS, false);
        processor = new LinkProcessor();
    }
View Full Code Here

Examples of org.htmlparser.util.LinkProcessor

            Hashtable table = tag.getAttributes();
            String relativeFrame = (String) table.get("SRC");
            if (relativeFrame == null)
                return "";
            else
                return (new LinkProcessor()).extract(relativeFrame, url);
        }
        catch (Exception e)
        {
            String msg;
            if (tag != null)
View Full Code Here

Examples of org.htmlparser.util.LinkProcessor

     * Overriding the default constructor
     */
    public ImageScanner()
    {
        super();
        processor = new LinkProcessor();
    }
View Full Code Here

Examples of org.htmlparser.util.LinkProcessor

    {
        createParser(
            "<IMG SRC=\"../abc/def/mypic.jpg\">",
            "http://www.yahoo.com/ghi?abcdefg");
        // Register the image scanner
        parser.addScanner(new ImageScanner("-i", new LinkProcessor()));
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node identified should be HTMLImageTag",
            node[0] instanceof ImageTag);
        ImageTag imageTag = (ImageTag) node[0];
View Full Code Here

Examples of org.htmlparser.util.LinkProcessor

            imageTag.getImageURL());
    }

    public void testEvaluate()
    {
        ImageScanner scanner = new ImageScanner("-i", new LinkProcessor());
        boolean retVal = scanner.evaluate("   img ", null);
        assertEquals(
            "Evaluation of IMG tag",
            new Boolean(true),
            new Boolean(retVal));
View Full Code Here

Examples of org.htmlparser.util.LinkProcessor

                    "img width=638 height=53 border=0 usemap=\"#m\" src=http://us.a1.yimg.com/us.yimg.com/i/ww/m5v5.gif alt=Yahoo",
                    ""));
        String link =
            "img width=638 height=53 border=0 usemap=\"#m\" src=http://us.a1.yimg.com/us.yimg.com/i/ww/m5v5.gif alt=Yahoo";
        String url = "c:\\cvs\\html\\binaries\\yahoo.htm";
        ImageScanner scanner = new ImageScanner("-i", new LinkProcessor());
        assertEquals(
            "Extracted Image Locn",
            "http://us.a1.yimg.com/us.yimg.com/i/ww/m5v5.gif",
            scanner.extractImageLocn(tag, url));
    }
View Full Code Here

Examples of org.htmlparser.util.LinkProcessor

        createParser(
            "<IMG width=1 height=1 alt=\"a\">",
            "http://www.yahoo.com/ghi?abcdefg");

        // Register the image scanner
        parser.addScanner(new ImageScanner("-i", new LinkProcessor()));
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node identified should be HTMLImageTag",
            node[0] instanceof ImageTag);
        ImageTag imageTag = (ImageTag) node[0];
View Full Code Here

Examples of org.htmlparser.util.LinkProcessor

    public void testRelativeImageScan() throws ParserException
    {
        createParser("<IMG SRC=\"mypic.jpg\">", "http://www.yahoo.com");

        // Register the image scanner
        parser.addScanner(new ImageScanner("-i", new LinkProcessor()));
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node identified should be HTMLImageTag",
            node[0] instanceof ImageTag);
        ImageTag imageTag = (ImageTag) node[0];
View Full Code Here

Examples of org.htmlparser.util.LinkProcessor

    public void testRelativeImageScan2() throws ParserException
    {
        createParser("<IMG SRC=\"abc/def/mypic.jpg\">", "http://www.yahoo.com");
        // Register the image scanner
        parser.addScanner(new ImageScanner("-i", new LinkProcessor()));
        parseAndAssertNodeCount(1);
        assertTrue(
            "Node identified should be HTMLImageTag",
            node[0] instanceof ImageTag);
        ImageTag imageTag = (ImageTag) node[0];
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.