Package com.stardog.stark.query.io
Class QueryResultFormats
java.lang.Object
com.stardog.stark.query.io.QueryResultFormats
Utilities for QueryResultFormat
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Michael Grove
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final QueryResultFormatBinary query result format for select query resultsstatic final QueryResultFormatQuery result format for csv encoded query resultsstatic final QueryResultFormatQuery result format for JSON encoded query resultsstatic final QueryResultFormatQuery result format for JSON encoded query resultsstatic final QueryResultFormatText-based query result format for boolean query resultsstatic final QueryResultFormatText-based table format for select query results.static final QueryResultFormatQuery result format for tsv encoded query resultsstatic final QueryResultFormatQuery result format for SPARQL/XML encoded query resultsstatic final QueryResultFormatQuery result format for SPARQL/XML boolean encoded query results -
Method Summary
Modifier and TypeMethodDescriptionReturn only the supported boolean query formatsstatic Optional<QueryResultFormat> static Optional<QueryResultFormat> forFileName(String thePath) static Optional<QueryResultFormat> Return theformatfor the given mime-type.static Optional<QueryResultFormat> forMimeBoolean(String theMime) Return theformatfor the given mime-type.static Optional<QueryResultFormat> forMimeSelect(String theMime) Return theformatfor the given mime-type.static voidregister(QueryResultFormat theFormat) Add a newQueryResultFormatstatic QueryResultFormatAdd a newQueryResultFormatReturn only the supported select query formats
-
Field Details
-
XML
Query result format for SPARQL/XML encoded query results -
XML_BOOLEAN
Query result format for SPARQL/XML boolean encoded query results -
JSON
Query result format for JSON encoded query results -
JSON_BOOLEAN
Query result format for JSON encoded query results -
TSV
Query result format for tsv encoded query results -
CSV
Query result format for csv encoded query results -
TEXT
Text-based query result format for boolean query results -
TEXT_TABLE
Text-based table format for select query results. -
BINARY
Binary query result format for select query results
-
-
Method Details
-
forFile
- Parameters:
thePath- the file to be parsed- Returns:
- the `QueryResultFormat`
- See Also:
-
forFileName
-
forMime
Return theformatfor the given mime-type.- Parameters:
theMime- the mime-type- Returns:
- the `QueryResultFormat`
- See Also:
-
forMimeSelect
Return theformatfor the given mime-type.- Parameters:
theMime- the mime-type- Returns:
- the `QueryResultFormat`
- See Also:
-
selectFormats
Return only the supported select query formats- Returns:
- the formats for select queries
-
booleanFormats
Return only the supported boolean query formats- Returns:
- the formats for boolean queries
-
forMimeBoolean
Return theformatfor the given mime-type.- Parameters:
theMime- the mime-type- Returns:
- the `QueryResultFormat`
- See Also:
-
register
Add a newQueryResultFormat- Parameters:
theFormat- the format
-
register
public static QueryResultFormat register(@Nonnull String theName, @Nonnull IRI theId, @Nonnull List<String> theMimetypes, @Nonnull List<String> theFileExtensions) Add a newQueryResultFormat- Parameters:
theName- the human-friendly name of the formattheId- the IRI of the formattheMimetypes- the list of supported mimetypes. There must be *at least* `1`, and the first element in the list is taken to be the default mimetypetheFileExtensions- the list of supported extensions. There must be *at least* `1`, and the first element in the list is taken to be the default extension
-