Interface SQWRLResultGenerator

    • Method Detail

      • addColumns

        void addColumns​(@NonNull java.util.List<@NonNull java.lang.String> columnNames)
                 throws SQWRLException
        Parameters:
        columnNames - A list of column names
        Throws:
        SQWRLException - If an error occurs during column addition
      • addColumn

        void addColumn​(@NonNull java.lang.String columnName)
                throws SQWRLException
        Parameters:
        columnName - A column name
        Throws:
        SQWRLException - If an error occurs during column addition
      • addAggregateColumn

        void addAggregateColumn​(@NonNull java.lang.String columnName,
                                @NonNull java.lang.String aggregateFunctionName)
                         throws SQWRLException
        Parameters:
        columnName - A column name
        aggregateFunctionName - The name of an aggregate function
        Throws:
        SQWRLException - If an error occurs during column addition
      • setOrderByColumn

        void setOrderByColumn​(int orderedColumnIndex,
                              boolean ascending)
                       throws SQWRLException
        Parameters:
        orderedColumnIndex - The 0-based index of an order column
        ascending - Order ascending or descending
        Throws:
        SQWRLException - If an error occurs
      • isOrdered

        boolean isOrdered()
        Returns:
        True of the result is ordered
      • isOrderedAscending

        boolean isOrderedAscending()
        Returns:
        True if the result is ordered ascending
      • setIsDistinct

        void setIsDistinct()
        Indicate that duplicate columns should be removed
      • addColumnDisplayName

        void addColumnDisplayName​(@NonNull java.lang.String columnName)
                           throws SQWRLException
        Parameters:
        columnName - The name of a column
        Throws:
        SQWRLException - If an error occurs during display name addition
      • getCurrentNumberOfColumns

        int getCurrentNumberOfColumns()
                               throws SQWRLException
        Returns:
        The current number of result columns
        Throws:
        SQWRLException - If the result is already configured
      • isConfigured

        boolean isConfigured()
        Returns:
        True if the result is configured
      • configured

        void configured()
                 throws SQWRLException
        Indicate that the result is configured
        Throws:
        SQWRLException - If the result is already configured
      • addRow

        void addRow​(@NonNull java.util.List<@NonNull SQWRLResultValue> resultValues)
             throws SQWRLException
        Add a row to the result.
        Parameters:
        resultValues - A list of SQWRL result values
        Throws:
        SQWRLException - If an error occurs during row addition
      • openRow

        void openRow()
              throws SQWRLException
        Open a row for incremental cell addition
        Throws:
        SQWRLException - If an error occurs opening the row
      • isRowOpen

        boolean isRowOpen()
        Returns:
        True if a row is open
      • isPrepared

        boolean isPrepared()
        Returns:
        True if the result is prepared
      • prepared

        void prepared()
               throws SQWRLException
        Indicate that the result is prepared
        Throws:
        SQWRLException - If the result is not yet configured or is already prepared
      • setLimit

        void setLimit​(int limit)
      • setNth

        void setNth​(int nth)
        Parameters:
        nth - 1-based index
      • setNotNth

        void setNotNth​(int nth)
        Exclude the nth result row
        Parameters:
        nth - 1-based index
      • setFirst

        void setFirst​(int n)
        Exclude all but the first n result rows.
        Parameters:
        n - Number of rows to retain
      • setLast

        void setLast()
        Exclude all but the last result row
      • setLast

        void setLast​(int n)
        Exclude all but the last n result rows
        Parameters:
        n - Number of rows to retain
      • setNotFirst

        void setNotFirst​(int n)
        Exclude the first n result rows
        Parameters:
        n - Number of rows to exclude
      • setNotLast

        void setNotLast​(int n)
        Exclude the last n result rows
        Parameters:
        n - Number of rows to exclude
      • setNthSlice

        void setNthSlice​(int nth,
                         int sliceSize)
        Parameters:
        nth - 1-based index
        sliceSize - size of the slice
      • setNotNthSlice

        void setNotNthSlice​(int nth,
                            int sliceSize)
        Parameters:
        nth - 1-based index
        sliceSize - size of the slice
      • setNthLastSlice

        void setNthLastSlice​(int nth,
                             int sliceSize)
        Parameters:
        nth - 1-based index
        sliceSize - size of the slice
      • setNotNthLastSlice

        void setNotNthLastSlice​(int nth,
                                int sliceSize)
        Parameters:
        nth - 1-based index
        sliceSize - size of the slice