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

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


        openSearchQuery.setRole(OpenSearchQuery.QueryRole.example.toString());
        openSearchQuery.setSearchTerms("Search Terms");
        openSearchDescription.addQuery(openSearchQuery);

        // add OpenSearch Images
        OpenSearchImage openSearchImage;
        openSearchImage =
            OpenSearchUtils.createOpenSearchImage(MediaTypeUtils.IMAGE_JPEG, openSearchUrlBuilder
                .toString() + "splash.jpg");
        openSearchDescription.addNewImage(openSearchImage);
View Full Code Here


     */
    public static OpenSearchImage createOpenSearchImage(String mediaTypeString, String url) {
        if (mediaTypeString == null) {
            throw new NullPointerException("mediaType parameter is null");
        }
        OpenSearchImage image = new OpenSearchImage();
        MediaType mediaType = MediaType.valueOf(mediaTypeString);
        if (MediaTypeUtils.equalsIgnoreParameters(MediaTypeUtils.IMAGE_X_ICON, mediaType) || MediaTypeUtils
            .equalsIgnoreParameters(MediaTypeUtils.IMAGE_VND, mediaType)) {
            image.setHeight(ICON_SIZE);
            image.setWidth(ICON_SIZE);
            image.setType(mediaTypeString);
            image.setValue(url);
        } else if (MediaTypeUtils.equalsIgnoreParameters(MediaTypeUtils.IMAGE_PNG, mediaType) || MediaTypeUtils
            .equalsIgnoreParameters(MediaTypeUtils.IMAGE_JPEG_TYPE, mediaType)) {
            image.setHeight(IMG_SIZE);
            image.setWidth(IMG_SIZE);
            image.setType(mediaTypeString);
            image.setValue(url);
        } else {
            image.setHeight(IMG_SIZE);
            image.setWidth(IMG_SIZE);
            image.setType(MediaTypeUtils.IMAGE_PNG.toString());
            image.setValue(url);
        }
        return image;
    }
View Full Code Here

     */
    public static OpenSearchImage createOpenSearchImage(String mediaTypeString, String url) {
        if (mediaTypeString == null) {
            throw new NullPointerException(Messages.getMessage("variableIsNull", "mediaTypeString")); //$NON-NLS-1$ //$NON-NLS-2$
        }
        OpenSearchImage image = new OpenSearchImage();
        MediaType mediaType = MediaType.valueOf(mediaTypeString);
        if (MediaTypeUtils.equalsIgnoreParameters(MediaTypeUtils.IMAGE_X_ICON, mediaType) || MediaTypeUtils
            .equalsIgnoreParameters(MediaTypeUtils.IMAGE_VND, mediaType)) {
            image.setHeight(ICON_SIZE);
            image.setWidth(ICON_SIZE);
            image.setType(mediaTypeString);
            image.setValue(url);
        } else if (MediaTypeUtils.equalsIgnoreParameters(MediaTypeUtils.IMAGE_PNG, mediaType) || MediaTypeUtils
            .equalsIgnoreParameters(MediaTypeUtils.IMAGE_JPEG_TYPE, mediaType)) {
            image.setHeight(IMG_SIZE);
            image.setWidth(IMG_SIZE);
            image.setType(mediaTypeString);
            image.setValue(url);
        } else {
            image.setHeight(IMG_SIZE);
            image.setWidth(IMG_SIZE);
            image.setType(MediaTypeUtils.IMAGE_PNG.toString());
            image.setValue(url);
        }
        return image;
    }
View Full Code Here

        openSearchQuery.setRole(OpenSearchQuery.QueryRole.example.toString());
        openSearchQuery.setSearchTerms("Search Terms");
        openSearchDescription.addQuery(openSearchQuery);

        // add OpenSearch Images
        OpenSearchImage openSearchImage;
        openSearchImage =
            OpenSearchUtils.createOpenSearchImage(MediaTypeUtils.IMAGE_JPEG, openSearchUrlBuilder
                .toString() + "splash.jpg");
        openSearchDescription.addNewImage(openSearchImage);
View Full Code Here

     */
    public static OpenSearchImage createOpenSearchImage(String mediaTypeString, String url) {
        if (mediaTypeString == null) {
            throw new NullPointerException("mediaType parameter is null");
        }
        OpenSearchImage image = new OpenSearchImage();
        MediaType mediaType = MediaType.valueOf(mediaTypeString);
        if (MediaTypeUtils.equalsIgnoreParameters(MediaTypeUtils.IMAGE_X_ICON, mediaType) || MediaTypeUtils
            .equalsIgnoreParameters(MediaTypeUtils.IMAGE_VND, mediaType)) {
            image.setHeight(ICON_SIZE);
            image.setWidth(ICON_SIZE);
            image.setType(mediaTypeString);
            image.setValue(url);
        } else if (MediaTypeUtils.equalsIgnoreParameters(MediaTypeUtils.IMAGE_PNG, mediaType) || MediaTypeUtils
            .equalsIgnoreParameters(MediaTypeUtils.IMAGE_JPEG_TYPE, mediaType)) {
            image.setHeight(IMG_SIZE);
            image.setWidth(IMG_SIZE);
            image.setType(mediaTypeString);
            image.setValue(url);
        } else {
            image.setHeight(IMG_SIZE);
            image.setWidth(IMG_SIZE);
            image.setType(MediaTypeUtils.IMAGE_PNG.toString());
            image.setValue(url);
        }
        return image;
    }
View Full Code Here

     */
    public static OpenSearchImage createOpenSearchImage(String mediaTypeString, String url) {
        if (mediaTypeString == null) {
            throw new NullPointerException(Messages.getMessage("variableIsNull", "mediaTypeString")); //$NON-NLS-1$ //$NON-NLS-2$
        }
        OpenSearchImage image = new OpenSearchImage();
        MediaType mediaType = MediaType.valueOf(mediaTypeString);
        if (MediaTypeUtils.equalsIgnoreParameters(MediaTypeUtils.IMAGE_X_ICON_TYPE, mediaType) || MediaTypeUtils
            .equalsIgnoreParameters(MediaTypeUtils.IMAGE_VND_TYPE, mediaType)) {
            image.setHeight(ICON_SIZE);
            image.setWidth(ICON_SIZE);
            image.setType(mediaTypeString);
            image.setValue(url);
        } else if (MediaTypeUtils.equalsIgnoreParameters(MediaTypeUtils.IMAGE_PNG_TYPE, mediaType) || MediaTypeUtils
            .equalsIgnoreParameters(MediaTypeUtils.IMAGE_JPEG_TYPE, mediaType)) {
            image.setHeight(IMG_SIZE);
            image.setWidth(IMG_SIZE);
            image.setType(mediaTypeString);
            image.setValue(url);
        } else {
            image.setHeight(IMG_SIZE);
            image.setWidth(IMG_SIZE);
            image.setType(MediaTypeUtils.IMAGE_PNG_TYPE.toString());
            image.setValue(url);
        }
        return image;
    }
View Full Code Here

        openSearchQuery.setRole(OpenSearchQuery.QueryRole.example.toString());
        openSearchQuery.setSearchTerms("Search Terms");
        openSearchDescription.addQuery(openSearchQuery);

        // add OpenSearch Images
        OpenSearchImage openSearchImage;
        openSearchImage =
            OpenSearchUtils.createOpenSearchImage(MediaTypeUtils.IMAGE_JPEG, openSearchUrlBuilder
                .toString() + "splash.jpg");
        openSearchDescription.addNewImage(openSearchImage);
View Full Code Here

        openSearchQuery.setTitle(TITLE);
        openSearchQuery.setTotalResults(new BigInteger(TOTAL_RESULT));
        openSearchDescriptor.addQuery(openSearchQuery);

        // add OpenSearch Images
        OpenSearchImage openSearchImage;
        openSearchImage =
            OpenSearchUtils.createOpenSearchImage(MediaTypeUtils.IMAGE_JPEG, openSearchUrlBuilder
                .toString() + "splash.jpg");
        openSearchDescriptor.addNewImage(openSearchImage);
        return openSearchDescriptor;
View Full Code Here

TOP

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

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.