|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.lang.FileFormat
org.openrdf.query.resultio.BooleanQueryResultFormat
public class BooleanQueryResultFormat
Represents the concept of a boolean query result serialization format.
Boolean query result formats are identified by a name and
can have one or more associated MIME types, zero or more associated file
extensions and can specify a (default) character encoding.
| Field Summary | |
|---|---|
static BooleanQueryResultFormat |
SPARQL
SPARQL Query Results XML Format. |
static BooleanQueryResultFormat |
TEXT
Plain text encoding using values "true" and "false" (case-insensitive). |
| Constructor Summary | |
|---|---|
BooleanQueryResultFormat(String name,
Collection<String> mimeTypes,
Charset charset,
Collection<String> fileExtensions)
Creates a new TupleQueryResultFormat object. |
|
BooleanQueryResultFormat(String name,
String mimeType,
Charset charset,
String fileExt)
Creates a new TupleQueryResultFormat object. |
|
BooleanQueryResultFormat(String name,
String mimeType,
String fileExt)
Creates a new TupleQueryResultFormat object. |
|
| Method Summary | |
|---|---|
static BooleanQueryResultFormat |
forFileName(String fileName)
Tries to determine the appropriate boolean file format for a file, based on the extension specified in a file name. |
static BooleanQueryResultFormat |
forFileName(String fileName,
BooleanQueryResultFormat fallback)
Tries to determine the appropriate boolean file format for a file, based on the extension specified in a file name. |
static BooleanQueryResultFormat |
forMIMEType(String mimeType)
Tries to determine the appropriate boolean file format based on the a MIME type that describes the content type. |
static BooleanQueryResultFormat |
forMIMEType(String mimeType,
BooleanQueryResultFormat fallback)
Tries to determine the appropriate boolean file format based on the a MIME type that describes the content type. |
static void |
register(BooleanQueryResultFormat format)
Registers the specified boolean query result format. |
static BooleanQueryResultFormat |
register(String name,
String mimeType,
String fileExt)
Registers the specified boolean query result format. |
static Collection<BooleanQueryResultFormat> |
values()
Returns all known/registered boolean query result formats. |
| Methods inherited from class info.aduna.lang.FileFormat |
|---|
equals, getCharset, getDefaultFileExtension, getDefaultMIMEType, getFileExtensions, getMIMETypes, getName, hasCharset, hasDefaultFileExtension, hasDefaultMIMEType, hasFileExtension, hashCode, hasMIMEType, matchFileName, matchFileName, matchMIMEType, matchMIMEType, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final BooleanQueryResultFormat SPARQL
public static final BooleanQueryResultFormat TEXT
| Constructor Detail |
|---|
public BooleanQueryResultFormat(String name,
String mimeType,
String fileExt)
name - The name of the format, e.g. "SPARQL/XML".mimeType - The MIME type of the format, e.g.
application/sparql-results+xml for the SPARQL/XML
format.fileExt - The (default) file extension for the format, e.g. srx
for SPARQL/XML.
public BooleanQueryResultFormat(String name,
String mimeType,
Charset charset,
String fileExt)
name - The name of the format, e.g. "SPARQL/XML".mimeType - The MIME type of the format, e.g.
application/sparql-results+xml for the SPARQL/XML
format.charset - The default character encoding of the format. Specify null
if not applicable.fileExt - The (default) file extension for the format, e.g. srx
for SPARQL/XML.
public BooleanQueryResultFormat(String name,
Collection<String> mimeTypes,
Charset charset,
Collection<String> fileExtensions)
name - The name of the format, e.g. "SPARQL/XML".mimeTypes - The MIME types of the format, e.g.
application/sparql-results+xml for the SPARQL/XML
format. The first item in the list is interpreted as the default
MIME type for the format.charset - The default character encoding of the format. Specify null
if not applicable.fileExtensions - The format's file extensions, e.g. srx for SPARQL/XML
files. The first item in the list is interpreted as the default
file extension for the format.| Method Detail |
|---|
public static Collection<BooleanQueryResultFormat> values()
public static BooleanQueryResultFormat register(String name,
String mimeType,
String fileExt)
name - The name of the format, e.g. "SPARQL/XML".mimeType - The MIME type of the format, e.g.
application/sparql-results+xml for the SPARQL/XML file
format.fileExt - The (default) file extension for the format, e.g. srx
for SPARQL/XML files.public static void register(BooleanQueryResultFormat format)
public static BooleanQueryResultFormat forMIMEType(String mimeType)
mimeType - A MIME type, e.g. "application/sparql-results+xml".
forMIMEType(String,BooleanQueryResultFormat),
#getMIMEType
public static BooleanQueryResultFormat forMIMEType(String mimeType,
BooleanQueryResultFormat fallback)
mimeType - a MIME type, e.g. "application/sparql-results+xml"fallback - a fallback TupleQueryResultFormat that will be returned by the
method if no match for the supplied MIME type can be found.
forMIMEType(String),
#getMIMETypepublic static BooleanQueryResultFormat forFileName(String fileName)
fileName - A file name.
forFileName(String,BooleanQueryResultFormat),
#getFileExtension
public static BooleanQueryResultFormat forFileName(String fileName,
BooleanQueryResultFormat fallback)
fileName - A file name.
forFileName(String),
#getFileExtension
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||