Class QueryResultFormats

    • Field Detail

      • XML

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

        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
      • JSON_BOOLEAN

        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

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

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

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

        public static QueryResultFormat register​(@Nonnull
                                                 java.lang.String theName,
                                                 @Nonnull
                                                 IRI theId,
                                                 @Nonnull
                                                 java.util.List<java.lang.String> theMimetypes,
                                                 @Nonnull
                                                 java.util.List<java.lang.String> theFileExtensions)
        Parameters:
        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