Class ResultSetMgr

    • Constructor Summary

      Constructors 
      Constructor Description
      ResultSetMgr()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String asString​(boolean result, Lang lang)
      Generate a string in the specified language/syntax for a SPARQL boolean result.
      static java.lang.String asString​(ResultSet resultSet, Lang lang)
      Generate a string in the specified language/syntax for a SPARQL result set.
      static ResultSet parse​(java.lang.String uri, Lang hintLang, Context context)
      Read ResultSet.
      static ResultSet read​(java.io.InputStream input)
      Read from a URL (including filenames) and produce a ResultSet.
      static ResultSet read​(java.io.InputStream input, Lang lang)
      Read from an InputStream and produce a ResultSet; the stream is expect to use syntax lang.
      static ResultSet read​(java.lang.String urlOrFilename)
      Read from a URL (including filenames) and produce a ResultSet.
      static ResultSet read​(java.lang.String urlOrFilename, Lang lang)
      Read from a URL (including filenames) and produce a ResultSet; the stream is expect to use syntax lang.
      static boolean readBoolean​(java.io.InputStream input)
      Read a boolean result from the URI
      static boolean readBoolean​(java.io.InputStream input, Lang lang)
      Read a boolean result from the URI; the input is expect to use syntax lang
      static boolean readBoolean​(java.lang.String urlOrFilename)
      Read a boolean result from the URI
      static boolean readBoolean​(java.lang.String urlOrFilename, Lang lang)
      Read a boolean result from the URI; the input is expect to use syntax lang
      static void write​(java.io.OutputStream output, boolean result, Lang lang)
      Write a SPARQL boolean result to the output stream in the specified language/syntax.
      static void write​(java.io.OutputStream output, ResultSet resultSet, Lang lang)
      Write a SPARQL result set to the output stream in the specified language/syntax.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResultSetMgr

        public ResultSetMgr()
    • Method Detail

      • read

        public static ResultSet read​(java.lang.String urlOrFilename)
        Read from a URL (including filenames) and produce a ResultSet. Note that returned result set may stream and so the input stream be read while the ResultSet is used.

        See ResultSetFactory.copyResults(ResultSet) for a ResultSet that is detached from the InputStream.

        Parameters:
        urlOrFilename -
        Returns:
        ResultSet
      • read

        public static ResultSet read​(java.lang.String urlOrFilename,
                                     Lang lang)
        Read from a URL (including filenames) and produce a ResultSet; the stream is expect to use syntax lang. Note that returned result set may stream and so the input stream be read while the ResultSet is used. See ResultSetFactory.copyResults(ResultSet) for a ResultSet that is detached from the InputStream.
        Parameters:
        urlOrFilename -
        lang -
        Returns:
        ResultSet
      • read

        public static ResultSet read​(java.io.InputStream input)
        Read from a URL (including filenames) and produce a ResultSet. Note that returned result set may stream and so the input stream be read while the ResultSet is used.

        See ResultSetFactory.copyResults(ResultSet) for a ResultSet that is detached from the InputStream.

        Parameters:
        input -
        Returns:
        ResultSet
      • read

        public static ResultSet read​(java.io.InputStream input,
                                     Lang lang)
        Read from an InputStream and produce a ResultSet; the stream is expect to use syntax lang. Note that returned result set may stream and so the input stream be read while the ResultSet is used. See ResultSetFactory.copyResults(ResultSet) for a ResultSet that is detached from the InputStream.
        Parameters:
        input -
        lang -
        Returns:
        ResultSet
      • readBoolean

        public static boolean readBoolean​(java.lang.String urlOrFilename)
        Read a boolean result from the URI
        Parameters:
        urlOrFilename -
        Returns:
        boolean
      • readBoolean

        public static boolean readBoolean​(java.lang.String urlOrFilename,
                                          Lang lang)
        Read a boolean result from the URI; the input is expect to use syntax lang
        Parameters:
        urlOrFilename -
        lang -
        Returns:
        boolean
      • readBoolean

        public static boolean readBoolean​(java.io.InputStream input)
        Read a boolean result from the URI
        Parameters:
        input -
        Returns:
        boolean
      • readBoolean

        public static boolean readBoolean​(java.io.InputStream input,
                                          Lang lang)
        Read a boolean result from the URI; the input is expect to use syntax lang
        Parameters:
        input -
        lang -
        Returns:
        boolean
      • parse

        public static ResultSet parse​(java.lang.String uri,
                                      Lang hintLang,
                                      Context context)
        Read ResultSet.
        Parameters:
        uri - URI to read from (includes file: and a plain file name).
        hintLang - Hint for the syntax
        context - Content object to control reading process.
      • write

        public static void write​(java.io.OutputStream output,
                                 ResultSet resultSet,
                                 Lang lang)
        Write a SPARQL result set to the output stream in the specified language/syntax.
        Parameters:
        output -
        resultSet -
        lang -
      • write

        public static void write​(java.io.OutputStream output,
                                 boolean result,
                                 Lang lang)
        Write a SPARQL boolean result to the output stream in the specified language/syntax.
        Parameters:
        output -
        result -
        lang -
      • asString

        public static java.lang.String asString​(ResultSet resultSet,
                                                Lang lang)
        Generate a string in the specified language/syntax for a SPARQL result set.
        Parameters:
        resultSet -
        lang -
      • asString

        public static java.lang.String asString​(boolean result,
                                                Lang lang)
        Generate a string in the specified language/syntax for a SPARQL boolean result.
        Parameters:
        result -
        lang -