Examples of URLResourceWithParams


Examples of org.carrot2.util.resource.URLResourceWithParams

    @Test
    public void testFileResourceUrlWithParameters() throws Exception
    {
        String url = "http://search.carrot2.org?q=test";
        check("resource", url, new URLResourceWithParams(new URL(url)));
    }
View Full Code Here

Examples of org.carrot2.util.resource.URLResourceWithParams

    public void testRemoteUrl() throws MalformedURLException
    {
        String base = System.getProperty("carrot2.xml.feed.url.base");
        assumeTrue("carrot2.xml.feed.url.base property undefined.", !Strings.isNullOrEmpty(base));

        IResource xml = new URLResourceWithParams(new URL(base + "&q=${query}&results=${results}"));
        final String query = "apple computer";

        processingAttributes.put(AttributeUtils.getKey(XmlDocumentSource.class, "xml"),
            xml);
        processingAttributes.put(AttributeNames.QUERY, query);
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.