org.deegree.gml
Enum GMLVersion

java.lang.Object
  extended by java.lang.Enum<GMLVersion>
      extended by org.deegree.gml.GMLVersion
All Implemented Interfaces:
Serializable, Comparable<GMLVersion>

public enum GMLVersion
extends Enum<GMLVersion>

Enum type for the GML versions that are differerentiated in deegree's GML subsystem.

Version:
$Revision: $, $Date: $
Author:
Markus Schneider, last edited by: $Author: schneider $

Enum Constant Summary
GML_2
          GML 2 versions (any in the range from 2.0.0 to 2.1.2)
GML_30
          GML 3.0 versions (either 3.0.0 or 3.0.1)
GML_31
          GML 3.1 versions (either 3.1.0 or 3.1.1)
GML_32
          GML 3.2 versions (3.2.1)
 
Method Summary
static GMLVersion fromMimeType(String mimeType, GMLVersion defaultVersion)
          This method creates a GMLVersion from the given mimetype.
 String getMimeType()
          Returns the mime type for this GML version.
 String getMimeTypeOldStyle()
          Returns the mime type for this GML version (deprecated style).
 String getNamespace()
          Returns the namespace for elements from this GML version.
 String toString()
           
static GMLVersion valueOf(String name)
          Returns the enum constant of this type with the specified name.
static GMLVersion[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GML_2

public static final GMLVersion GML_2
GML 2 versions (any in the range from 2.0.0 to 2.1.2)


GML_30

public static final GMLVersion GML_30
GML 3.0 versions (either 3.0.0 or 3.0.1)


GML_31

public static final GMLVersion GML_31
GML 3.1 versions (either 3.1.0 or 3.1.1)


GML_32

public static final GMLVersion GML_32
GML 3.2 versions (3.2.1)

Method Detail

values

public static GMLVersion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (GMLVersion c : GMLVersion.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static GMLVersion valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getNamespace

public String getNamespace()
Returns the namespace for elements from this GML version.

Returns:
the namespace, never null

getMimeType

public String getMimeType()
Returns the mime type for this GML version.

Returns:
the mime type, never null

getMimeTypeOldStyle

public String getMimeTypeOldStyle()
Returns the mime type for this GML version (deprecated style).

Returns:
the mime type (deprecated style), never null

fromMimeType

public static GMLVersion fromMimeType(String mimeType,
                                      GMLVersion defaultVersion)
This method creates a GMLVersion from the given mimetype. Expected is following format: 'some/type'; subtype=gml/x.y.z. If the mime does not comply the defaultversion is returned. This method uses version negotiation, e.g. if the given version equals or is larger then a version the next possible gml version will be used, e.g. gml/3.2.0 will match to GML_32 (gml/3.2.1), gml/3.0.9 (none existing) will match to GML_31.

Parameters:
mimeType - to be parsed
defaultVersion - to be used if the mime type is not compliant with above rules, may be null
Returns:
the GMLVersion of the mime type or the default version.

toString

public String toString()
Overrides:
toString in class Enum<GMLVersion>


Copyright © 2011. All Rights Reserved.