|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<GeoServerRESTPublisher.Format> it.geosolutions.geoserver.rest.GeoServerRESTPublisher.Format
public static enum GeoServerRESTPublisher.Format
Represents the format used to GET, PUT or POST information via REST. For example consider the resource "foo". To request a representation of foo as XML the request uri would end with "foo.xml". To request as JSON the request uri would end with "foo.json". When no format is specified the server will use its own internal format, usually html.
In a POST or PUT operation the format specifies 1) the representatin of the content being sent to the server, and 2) the representation of the response to be sent back. The former is specified with the Content-type header. To send a representation in XML, the content type "text/xml" or "application/xml" would be used. The latter is specified with the Accepts header as specified in the above paragraph describing a GET operation.
The following table defines the Content-type values for each format:
Enum Constant Summary | |
---|---|
HTML
|
|
JSON
|
|
SLD
|
|
XML
|
Method Summary | |
---|---|
String |
getContentType()
Gets the mime type from a format. |
static String |
getContentType(GeoServerRESTPublisher.Format f)
Gets the mime type from a format. |
String |
toString()
Returns a lowercase representation of the parameter. |
static GeoServerRESTPublisher.Format |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static GeoServerRESTPublisher.Format[] |
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 |
---|
public static final GeoServerRESTPublisher.Format XML
public static final GeoServerRESTPublisher.Format JSON
public static final GeoServerRESTPublisher.Format HTML
public static final GeoServerRESTPublisher.Format SLD
Method Detail |
---|
public static GeoServerRESTPublisher.Format[] values()
for (GeoServerRESTPublisher.Format c : GeoServerRESTPublisher.Format.values()) System.out.println(c);
public static GeoServerRESTPublisher.Format valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic static String getContentType(GeoServerRESTPublisher.Format f)
f
- the format key.
null
if not in the enum.public String getContentType()
f
- the format key.
null
if not in the enum.public String toString()
toString
in class Enum<GeoServerRESTPublisher.Format>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |