Class TupleQueryResultFormat
java.lang.Object
org.eclipse.rdf4j.common.lang.FileFormat
org.eclipse.rdf4j.query.resultio.QueryResultFormat
org.eclipse.rdf4j.query.resultio.TupleQueryResultFormat
Represents the concept of an tuple query result serialization format. Tuple 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.- Author:
- Arjohn Kampman
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TupleQueryResultFormatBinary RDF results table format.static final TupleQueryResultFormatSPARQL Query Result CSV Format.static final TupleQueryResultFormatSPARQL Query Results JSON Format.static final TupleQueryResultFormatSPARQL-star Query Results JSON Format (like SPARQL JSON but with RDF-star support).static final TupleQueryResultFormatstatic final TupleQueryResultFormatSPARQL Query Results XML Format.static final TupleQueryResultFormatSPARQL-star Query Results XML Format (like SPARQL/XML but with native RDF-star support).static final TupleQueryResultFormatSPARQL Query Result TSV Format.static final TupleQueryResultFormatSPARQL-star Query Results TSV Format (like SPARQL TSV but with RDF-star support).static final TupleQueryResultFormatFields inherited from class QueryResultFormat
SPARQL_RESULTS_CSV_URI, SPARQL_RESULTS_JSON_URI, SPARQL_RESULTS_TSV_URI, SPARQL_RESULTS_XML_URIModifier and TypeFieldDescriptionprotected static final IRILocal constant for tuple formats for SPARQL Results CSV.protected static final IRILocal constant reused across boolean and tuple formats for SPARQL Results JSON.protected static final IRILocal constant for tuple formats for SPARQL Results TSV.protected static final IRILocal constant reused across boolean and tuple formats for SPARQL Results XML. -
Constructor Summary
ConstructorsConstructorDescriptionTupleQueryResultFormat(String name, String mimeType, String fileExt) Creates a new TupleQueryResultFormat object.TupleQueryResultFormat(String name, String mimeType, String fileExt, boolean supportsRDFStar) Creates a new TupleQueryResultFormat object.TupleQueryResultFormat(String name, String mimeType, Charset charset, String fileExt) Creates a new TupleQueryResultFormat object.TupleQueryResultFormat(String name, String mimeType, Charset charset, String fileExt, boolean supportsRDFStar) Creates a new TupleQueryResultFormat object.TupleQueryResultFormat(String name, Collection<String> mimeTypes, Charset charset, Collection<String> fileExtensions) Creates a new TupleQueryResultFormat object.TupleQueryResultFormat(String name, Collection<String> mimeTypes, Charset charset, Collection<String> fileExtensions, boolean supportsRDFStar) Creates a new TupleQueryResultFormat object.TupleQueryResultFormat(String name, Collection<String> mimeTypes, Charset charset, Collection<String> fileExtensions, IRI standardURI) Creates a new TupleQueryResultFormat object.TupleQueryResultFormat(String name, Collection<String> mimeTypes, Charset charset, Collection<String> fileExtensions, IRI standardURI, boolean supportsRDFStar) Creates a new TupleQueryResultFormat object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn true if the TupleQueryResultFormat supports the encoding of RDF-star triples natively.Methods inherited from class QueryResultFormat
getStandardURI, hasStandardURIMethods inherited from class FileFormat
equals, getCharset, getDefaultFileExtension, getDefaultMIMEType, getFileExtensions, getMIMETypes, getName, hasCharset, hasDefaultFileExtension, hasDefaultMIMEType, hasFileExtension, hashCode, hasMIMEType, matchFileName, matchMIMEType, toStringModifier and TypeMethodDescriptionbooleanCompares FileFormat objects based on theirname, ignoring case.Get the (default) charset for this file format.Gets the default file name extension for this file format.Gets the default MIME type for this file format.Gets the file format's file extensions.Gets the file format's MIME types.getName()Gets the name of this file format.booleanChecks if the FileFormat has a (default) charset.booleanhasDefaultFileExtension(String extension) Checks if the specified file name extension matches the FileFormat's default file name extension.booleanhasDefaultMIMEType(String mimeType) Checks if the specified MIME type matches the FileFormat's default MIME type.booleanhasFileExtension(String extension) Checks if the FileFormat's file extension is equal to the specified file extension.inthashCode()booleanhasMIMEType(String mimeType) Checks if specified MIME type matches one of the FileFormat's MIME types.static <FF extends FileFormat>
Optional<FF> matchFileName(String fileName, Iterable<FF> fileFormats) Tries to match the specified file name with the file extensions of the supplied file formats.static <FF extends FileFormat>
Optional<FF> matchMIMEType(String mimeType, Iterable<FF> fileFormats) Tries to match the specified MIME type with the MIME types of the supplied file formats.toString()
-
Field Details
-
SPARQL
SPARQL Query Results XML Format. -
SPARQL_STAR
SPARQL-star Query Results XML Format (like SPARQL/XML but with native RDF-star support). -
BINARY
Binary RDF results table format. -
JSON
SPARQL Query Results JSON Format. -
JSON_STAR
SPARQL-star Query Results JSON Format (like SPARQL JSON but with RDF-star support). -
CSV
SPARQL Query Result CSV Format. -
TSV
SPARQL Query Result TSV Format. -
TSV_STAR
SPARQL-star Query Results TSV Format (like SPARQL TSV but with RDF-star support). -
XSLX
-
ODS
-
-
Constructor Details
-
TupleQueryResultFormat
Creates a new TupleQueryResultFormat object.- 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.fileExt- The (default) file extension for the format, e.g. srx for SPARQL/XML.
-
TupleQueryResultFormat
public TupleQueryResultFormat(String name, String mimeType, String fileExt, boolean supportsRDFStar) Creates a new TupleQueryResultFormat object.- 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.fileExt- The (default) file extension for the format, e.g. srx for SPARQL/XML.supportsRDFStar- True if the TupleQueryResultFormat supports the encoding of RDF-star triples natively and false otherwise.- Since:
- 3.2.0
-
TupleQueryResultFormat
Creates a new TupleQueryResultFormat object.- 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.fileExt- The (default) file extension for the format, e.g. srx for SPARQL/XML.
-
TupleQueryResultFormat
public TupleQueryResultFormat(String name, String mimeType, Charset charset, String fileExt, boolean supportsRDFStar) Creates a new TupleQueryResultFormat object.- 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.fileExt- The (default) file extension for the format, e.g. srx for SPARQL/XML.supportsRDFStar- True if the TupleQueryResultFormat supports the encoding of RDF-star triples natively and false otherwise.- Since:
- 3.2.0
-
TupleQueryResultFormat
public TupleQueryResultFormat(String name, Collection<String> mimeTypes, Charset charset, Collection<String> fileExtensions) Creates a new TupleQueryResultFormat object.- 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.
-
TupleQueryResultFormat
public TupleQueryResultFormat(String name, Collection<String> mimeTypes, Charset charset, Collection<String> fileExtensions, boolean supportsRDFStar) Creates a new TupleQueryResultFormat object.- 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.supportsRDFStar- True if the TupleQueryResultFormat supports the encoding of RDF-star triples natively and false otherwise.- Since:
- 3.2.0
-
TupleQueryResultFormat
public TupleQueryResultFormat(String name, Collection<String> mimeTypes, Charset charset, Collection<String> fileExtensions, IRI standardURI) Creates a new TupleQueryResultFormat object.- 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.standardURI- 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.- Since:
- 3.2.0
-
TupleQueryResultFormat
public TupleQueryResultFormat(String name, Collection<String> mimeTypes, Charset charset, Collection<String> fileExtensions, IRI standardURI, boolean supportsRDFStar) Creates a new TupleQueryResultFormat object.- 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.standardURI- 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.supportsRDFStar- True if the TupleQueryResultFormat supports the encoding of RDF-star triples natively and false otherwise.- Since:
- 3.2.0
-
-
Method Details
-
supportsRDFStar
public boolean supportsRDFStar()Return true if the TupleQueryResultFormat supports the encoding of RDF-star triples natively.- Since:
- 3.2.0
-