Enum ResultSetMediaType
- java.lang.Object
-
- java.lang.Enum<ResultSetMediaType>
-
- edu.cornell.mannlib.vitro.webapp.controller.api.sparqlquery.ResultSetMediaType
-
- All Implemented Interfaces:
Serializable,Comparable<ResultSetMediaType>
public enum ResultSetMediaType extends Enum<ResultSetMediaType>
The supported media types for SPARQL queries that return a Result Set (i.e., SELECT and ASK).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Collection<String>contentTypes()static ResultSetMediaTypefromContentType(String contentType)StringgetContentType()StringgetExtension()StringgetJenaResponseFormat()StringgetRdfServiceFormat()booleanisNativeFormat()static ResultSetMediaTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ResultSetMediaType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TEXT
public static final ResultSetMediaType TEXT
-
CSV
public static final ResultSetMediaType CSV
-
TSV
public static final ResultSetMediaType TSV
-
XML
public static final ResultSetMediaType XML
-
JSON
public static final ResultSetMediaType JSON
-
-
Method Detail
-
values
public static ResultSetMediaType[] 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 (ResultSetMediaType c : ResultSetMediaType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ResultSetMediaType 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 nameNullPointerException- if the argument is null
-
contentTypes
public static Collection<String> contentTypes()
-
fromContentType
public static ResultSetMediaType fromContentType(String contentType) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getContentType
public String getContentType()
-
isNativeFormat
public boolean isNativeFormat()
-
getRdfServiceFormat
public String getRdfServiceFormat()
-
getJenaResponseFormat
public String getJenaResponseFormat()
-
getExtension
public String getExtension()
-
-