deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.framework.util
Class MimeTypeMapper

java.lang.Object
  extended by org.deegree.framework.util.MimeTypeMapper

public class MimeTypeMapper
extends Object

Helper class to check for supported mime types.

Version:
$Revision: 18195 $
Author:
Axel Schaefer, Andreas Poth, last edited by: $Author: mschneider $

Constructor Summary
MimeTypeMapper()
           
 
Method Summary
static boolean isImageType(String contentType)
          Returns true if the submitted content type is an image type.
static boolean isKnownImageType(String contentType)
          Returns true if the submitted image content type is known by deegree.
static boolean isKnownMimeType(String contentType)
          Returns true if the submitted content type is known by the deegree OWS implementations.
static boolean isKnownOGCType(String contentType)
           
static boolean isOGCType(String contentType)
          Returns true if the submitted content type is defined by the OGC.
static String toMimeType(String contentType)
          maps a 'simple' format name like gif, jpg or text to the corresponding mime type --> e.g. image/gif, image/jpeg or text/plain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MimeTypeMapper

public MimeTypeMapper()
Method Detail

isOGCType

public static boolean isOGCType(String contentType)
Returns true if the submitted content type is defined by the OGC.

Parameters:
contentType - mime type to check
Returns:
true if the contentType starts with "application/vnd.ogc", false otherwise

isImageType

public static boolean isImageType(String contentType)
Returns true if the submitted content type is an image type.

Parameters:
contentType - mime type to check
Returns:
true if the contenttype starts with 'image', false otherwise

isKnownImageType

public static boolean isKnownImageType(String contentType)
Returns true if the submitted image content type is known by deegree.

Parameters:
contentType - mime type to check
Returns:
true if the content type denotes an image mime-type known by deegree, false otherwise

isKnownMimeType

public static boolean isKnownMimeType(String contentType)
Returns true if the submitted content type is known by the deegree OWS implementations.

Parameters:
contentType - mime type to check
Returns:
true if the mime type is known by deegree, false otherwise

isKnownOGCType

public static boolean isKnownOGCType(String contentType)
Parameters:
contentType -
Returns:
true if the submitted content type is a mime type defined by a OGC specification

toMimeType

public static String toMimeType(String contentType)
maps a 'simple' format name like gif, jpg or text to the corresponding mime type --> e.g. image/gif, image/jpeg or text/plain

Parameters:
contentType -
Returns:
the mapped content type.

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org