Package org.apache.wink.common.model.opensearch

Examples of org.apache.wink.common.model.opensearch.OpenSearchQuery


        // add URLs to OpenSearch
        openSearchDescription.addUrl(openSearchUrlForBrowsers);
        openSearchDescription.addUrl(openSearchUrl);

        // add OpenSearch Query element
        OpenSearchQuery openSearchQuery = new OpenSearchQuery();
        openSearchQuery.setRole(OpenSearchQuery.QueryRole.example.toString());
        openSearchQuery.setSearchTerms("Search Terms");
        openSearchDescription.addQuery(openSearchQuery);

        // add OpenSearch Images
        OpenSearchImage openSearchImage;
        openSearchImage =
View Full Code Here


        feed.setId("id");
        feed.setItemsPerPage(5);
        feed.setStartIndex(6);
        feed.setTotalResults(7);

        OpenSearchQuery query = new OpenSearchQuery();
        query.setSearchTerms("query 1");
        feed.addOpenSearchQuery(query);
        query = new OpenSearchQuery();
        query.setSearchTerms("query 2");
        feed.addOpenSearchQuery(query);

        feed.setLang("en-us");
        feed.setLogo("logo");
        AtomText rights = new AtomText();
View Full Code Here

        // add URLs to OpenSearch
        openSearchDescription.addUrl(openSearchUrlForBrowsers);
        openSearchDescription.addUrl(openSearchUrl);

        // add OpenSearch Query element
        OpenSearchQuery openSearchQuery = new OpenSearchQuery();
        openSearchQuery.setRole(OpenSearchQuery.QueryRole.example.toString());
        openSearchQuery.setSearchTerms("Search Terms");
        openSearchDescription.addQuery(openSearchQuery);

        // add OpenSearch Images
        OpenSearchImage openSearchImage;
        openSearchImage =
View Full Code Here

        // add URLs to OpenSearch
        openSearchDescription.addUrl(openSearchUrlForBrowsers);
        openSearchDescription.addUrl(openSearchUrl);

        // add OpenSearch Query element
        OpenSearchQuery openSearchQuery = new OpenSearchQuery();
        openSearchQuery.setRole(OpenSearchQuery.QueryRole.example.toString());
        openSearchQuery.setSearchTerms("Search Terms");
        openSearchDescription.addQuery(openSearchQuery);

        // add OpenSearch Images
        OpenSearchImage openSearchImage;
        openSearchImage =
View Full Code Here

        feed.setId("id");
        feed.setItemsPerPage(5);
        feed.setStartIndex(6);
        feed.setTotalResults(7);

        OpenSearchQuery query = new OpenSearchQuery();
        query.setSearchTerms("query 1");
        feed.addOpenSearchQuery(query);
        query = new OpenSearchQuery();
        query.setSearchTerms("query 2");
        feed.addOpenSearchQuery(query);

        feed.setLang("en-us");
        feed.setLogo("logo");
        AtomText rights = new AtomText();
View Full Code Here

        List<OpenSearchQuery> queryArray = openSearchDescriptor.getQuery();
        if (urlArray == null || urlArray.size() == 0) {
            assertFalse("Open Search Query is not defined", true);
        } else {
            OpenSearchQuery openSearchQuery = queryArray.get(0);
            assertEquals("Expected and actual values of  Count are not same ",
                         COUNT,
                         openSearchQuery.getCount().toString());
            assertEquals("Expected and actual values of  Input Encoding are not same ",
                         ENCODING,
                         openSearchQuery.getInputEncoding());
            assertEquals("Expected and actual values of  Language are not same ",
                         LANG,
                         openSearchQuery.getLanguage());
            assertEquals("Expected and actual values of  Output Encoding are not same ",
                         ENCODING,
                         openSearchQuery.getOutputEncoding());
            assertEquals("Expected and actual values of  QueryRole are not same ",
                         OpenSearchQuery.QueryRole.example.toString(),
                         openSearchQuery.getRole());
            assertEquals("Expected and actual values of  SearchTerms are not same ",
                         SEARCH_TERM,
                         openSearchQuery.getSearchTerms());
            assertEquals("Expected and actual values of  Start Index are not same ",
                         START_INDEX,
                         openSearchQuery.getStartIndex().toString());
            assertEquals("Expected and actual values of  StartPage are not same ",
                         START_PAGE,
                         openSearchQuery.getStartPage().toString());
            assertEquals("Expected and actual values of  Title are not same ",
                         TITLE,
                         openSearchQuery.getTitle());
            assertEquals("Expected and actual values of  TotalResults are not same ",
                         TOTAL_RESULT,
                         openSearchQuery.getTotalResults().toString());
        }
    }
View Full Code Here

        // add URLs to OpenSearch
        openSearchDescriptor.addUrl(openSearchUrlForBrowsers);
        openSearchDescriptor.addUrl(openSearchUrl);

        // add OpenSearch Query element
        OpenSearchQuery openSearchQuery = new OpenSearchQuery();
        openSearchQuery.setCount(new BigInteger("10"));
        openSearchQuery.setInputEncoding(ENCODING);
        openSearchQuery.setLanguage(LANG);
        openSearchQuery.setOutputEncoding(ENCODING);
        openSearchQuery.setRole(OpenSearchQuery.QueryRole.example.toString());
        openSearchQuery.setSearchTerms(SEARCH_TERM);
        openSearchQuery.setStartIndex(new BigInteger(START_INDEX));
        openSearchQuery.setStartPage(new BigInteger(START_PAGE));
        openSearchQuery.setTitle(TITLE);
        openSearchQuery.setTotalResults(new BigInteger(TOTAL_RESULT));
        openSearchDescriptor.addQuery(openSearchQuery);

        // add OpenSearch Images
        OpenSearchImage openSearchImage;
        openSearchImage =
View Full Code Here

        feed.setId("id");
        feed.setItemsPerPage(5);
        feed.setStartIndex(6);
        feed.setTotalResults(7);

        OpenSearchQuery query = new OpenSearchQuery();
        query.setSearchTerms("query 1");
        feed.addOpenSearchQuery(query);
        query = new OpenSearchQuery();
        query.setSearchTerms("query 2");
        feed.addOpenSearchQuery(query);

        feed.setLang("en-us");
        feed.setLogo("logo");
        AtomText rights = new AtomText();
View Full Code Here

TOP

Related Classes of org.apache.wink.common.model.opensearch.OpenSearchQuery

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.