Package org.eclipse.rdf4j.query.resultio
Class QueryResultFormat
java.lang.Object
org.eclipse.rdf4j.common.lang.FileFormat
org.eclipse.rdf4j.query.resultio.QueryResultFormat
- Direct Known Subclasses:
BooleanQueryResultFormat
,TupleQueryResultFormat
The base class of all file formats that represent the results of queries. Currently this includes tuple and boolean
queries.
- Author:
- Peter Ansell
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final IRI
Local constant for tuple formats for SPARQL Results CSV.protected static final IRI
Local constant reused across boolean and tuple formats for SPARQL Results JSON.protected static final IRI
Local constant for tuple formats for SPARQL Results TSV.protected static final IRI
Local constant reused across boolean and tuple formats for SPARQL Results XML. -
Constructor Summary
ConstructorDescriptionQueryResultFormat
(String name, String mimeType, Charset charset, String fileExt) QueryResultFormat
(String name, String mimeType, Charset charset, Collection<String> fileExtensions) QueryResultFormat
(String name, Collection<String> mimeTypes, Charset charset, Collection<String> fileExtensions) QueryResultFormat
(String name, Collection<String> mimeTypes, Charset charset, Collection<String> fileExtensions, IRI standardURI) -
Method Summary
Methods inherited from class org.eclipse.rdf4j.common.lang.FileFormat
equals, getCharset, getDefaultFileExtension, getDefaultMIMEType, getFileExtensions, getMIMETypes, getName, hasCharset, hasDefaultFileExtension, hasDefaultMIMEType, hasFileExtension, hashCode, hasMIMEType, matchFileName, matchMIMEType, toString
-
Field Details
-
SPARQL_RESULTS_XML_URI
Local constant reused across boolean and tuple formats for SPARQL Results XML. -
SPARQL_RESULTS_JSON_URI
Local constant reused across boolean and tuple formats for SPARQL Results JSON. -
SPARQL_RESULTS_CSV_URI
Local constant for tuple formats for SPARQL Results CSV. -
SPARQL_RESULTS_TSV_URI
Local constant for tuple formats for SPARQL Results TSV.
-
-
Constructor Details
-
QueryResultFormat
- Parameters:
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.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 files.
-
QueryResultFormat
public QueryResultFormat(String name, String mimeType, Charset charset, Collection<String> fileExtensions) - Parameters:
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.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.
-
QueryResultFormat
public QueryResultFormat(String name, Collection<String> mimeTypes, Charset charset, Collection<String> fileExtensions) - Parameters:
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.
-
QueryResultFormat
public QueryResultFormat(String name, Collection<String> mimeTypes, Charset charset, Collection<String> fileExtensions, IRI standardURI) - Parameters:
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 Details
-
hasStandardURI
public boolean hasStandardURI()- Returns:
- True if a standard URI has been assigned to this format by a standards organisation.
-
getStandardURI
- Returns:
- The standard URI that has been assigned to this format by a standards organisation or null if it does not currently have a standard URI.
-