Class QueryResultFormats

    • Field Detail

      • XML

        public static final QueryResultFormat XML
        Query result format for SPARQL/XML encoded query results

        public static final QueryResultFormat XML_BOOLEAN
        Query result format for SPARQL/XML boolean encoded query results
      • JSON

        public static final QueryResultFormat JSON
        Query result format for JSON encoded query results

        public static final QueryResultFormat JSON_BOOLEAN
        Query result format for JSON encoded query results
      • TSV

        public static final QueryResultFormat TSV
        Query result format for tsv encoded query results
      • CSV

        public static final QueryResultFormat CSV
        Query result format for csv encoded query results
      • TEXT

        public static final QueryResultFormat TEXT
        Text-based query result format for boolean query results
      • TEXT_TABLE

        public static final QueryResultFormat TEXT_TABLE
        Text-based table format for select query results.
      • BINARY

        public static final QueryResultFormat BINARY
        Binary query result format for select query results
    • Method Detail

      • forFile

        public static java.util.Optional<QueryResultFormat> forFile​(@Nonnull
                                                                    java.nio.file.Path thePath)
        Return the format for the file denoted by the given Path.
        thePath - the file to be parsed
        the `QueryResultFormat`
        See Also:
      • forFileName

        public static java.util.Optional<QueryResultFormat> forFileName​(@Nonnull
                                                                        java.lang.String thePath)
      • booleanFormats

        public static SupportedFileFormats<QueryResultFormat> booleanFormats()
        Return only the supported boolean query formats
        the formats for boolean queries
      • register

        public static QueryResultFormat register​(@Nonnull
                                                 java.lang.String theName,
                                                 IRI theId,
                                                 java.util.List<java.lang.String> theMimetypes,
                                                 java.util.List<java.lang.String> theFileExtensions)
        theName - the human-friendly name of the format
        theId - the IRI of the format
        theMimetypes - the list of supported mimetypes. There must be *at least* `1`, and the first element in the list is taken to be the default mimetype
        theFileExtensions - 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