Package org.eclipse.rdf4j.sail.shacl
Class ShaclSailValidationReportHelper
- java.lang.Object
-
- org.eclipse.rdf4j.sail.shacl.ShaclSailValidationReportHelper
-
@InternalUseOnly public class ShaclSailValidationReportHelper extends java.lang.Object
- Since:
- 4.0.0
-
-
Field Summary
Fields Modifier and Type Field Description private static WriterConfig
WRITER_CONFIG
-
Constructor Summary
Constructors Constructor Description ShaclSailValidationReportHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Optional<Model>
getValidationReport(java.lang.Throwable t)
Looks for aValidationException
starting with the specified throwable and working back through the cause references, and returns the validation report as aModel
if one is found.static java.util.Optional<java.lang.String>
getValidationReportAsString(java.lang.Throwable t)
Finds a validation report usinggetValidationReport(Throwable)
and returns aString
containing the pretty-printed report.static void
printValidationReport(java.lang.Throwable t, java.io.OutputStream out)
Finds a validation report usinggetValidationReport(Throwable)
and pretty-prints it to the specified output stream.
-
-
-
Field Detail
-
WRITER_CONFIG
private static final WriterConfig WRITER_CONFIG
-
-
Method Detail
-
getValidationReportAsString
public static java.util.Optional<java.lang.String> getValidationReportAsString(java.lang.Throwable t)
Finds a validation report usinggetValidationReport(Throwable)
and returns aString
containing the pretty-printed report.- Parameters:
t
- theThrowable
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(java.lang.Throwable t, java.io.OutputStream out)
Finds a validation report usinggetValidationReport(Throwable)
and pretty-prints it to the specified output stream.- Parameters:
t
- theThrowable
to start searching for a validation report atout
- the output stream to print to
-
getValidationReport
public static java.util.Optional<Model> getValidationReport(java.lang.Throwable t)
Looks for aValidationException
starting with the specified throwable and working back through the cause references, and returns the validation report as aModel
if one is found.- Parameters:
t
- theThrowable
to start the search at- Returns:
- an optional with the validation report, or empty.
-
-