Package org.eclipse.rdf4j.sail.shacl

## Class ShaclSailValidationReportHelper

- java.lang.Object
- - org.eclipse.rdf4j.sail.shacl.ShaclSailValidationReportHelper

-     @InternalUseOnly
      public class ShaclSailValidationReportHelper
      extends Object

  Since:
    4.0.0
  Author:
    Florian Kleedorfer

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ShaclSailValidationReportHelper()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Optional<Model>` | `getValidationReport​(Throwable t)` | Looks for a `ValidationException` starting with the specified throwable and working back through the cause references, and returns the validation report as a `Model` if one is found.
    `static Optional<String>` | `getValidationReportAsString​(Throwable t)` | Finds a validation report using `getValidationReport(Throwable)` and returns a `String` containing the pretty-printed report.
    `static void` | `printValidationReport​(Throwable t, OutputStream out)` | Finds a validation report using `getValidationReport(Throwable)` and pretty-prints it to the specified output stream.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ShaclSailValidationReportHelper

          public ShaclSailValidationReportHelper()

  - ### Method Detail

    - #### getValidationReportAsString

          public static Optional<String> getValidationReportAsString​(Throwable t)

      Finds a validation report using `getValidationReport(Throwable)` and returns a `String` containing the pretty-printed report.
      Parameters:
        `t` - the `Throwable` to start searching for a validation report at
      Returns:
        an Optional with the pretty-printed report if one is found, empty otherwise.

    - #### printValidationReport

          public static void printValidationReport​(Throwable t,
                                                   OutputStream out)

      Finds a validation report using `getValidationReport(Throwable)` and pretty-prints it to the specified output stream.
      Parameters:
        `t` - the `Throwable` to start searching for a validation report at
        `out` - the output stream to print to

    - #### getValidationReport

          public static Optional<Model> getValidationReport​(Throwable t)

      Looks for a `ValidationException` starting with the specified throwable and working back through the cause references, and returns the validation report as a `Model` if one is found.
      Parameters:
        `t` - the `Throwable` to start the search at
      Returns:
        an optional with the validation report, or empty.