com.hp.hpl.jena.reasoner
Class StandardValidityReport

java.lang.Object
  extended by com.hp.hpl.jena.reasoner.StandardValidityReport
All Implemented Interfaces:
ValidityReport

public class StandardValidityReport
extends Object
implements ValidityReport

Default implementation of ValidityReport which simply stores a list of precomputed Report records.

Version:
$Revision: 1.1 $ on $Date: 2009-06-29 08:55:50 $
Author:
Dave Reynolds

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.hp.hpl.jena.reasoner.ValidityReport
ValidityReport.Report
 
Constructor Summary
StandardValidityReport()
           
 
Method Summary
 void add(boolean error, String type, String description)
          Add a new error report
 void add(boolean error, String type, String description, Object extension)
          Add a new error report
 void add(ValidityReport.Report report)
          Add a new error report
 Iterator<ValidityReport.Report> getReports()
          Return an iterator over the separate ValidityReport.Report records.
 boolean isClean()
          Returns true if the model is both valid (logically consistent) and no warnings were generated.
 boolean isValid()
          Returns true if no logical inconsistencies were detected (in which case there will be at least one error Report included).
 int size()
          Return a count of the number of warning or error reports generated by the validation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardValidityReport

public StandardValidityReport()
Method Detail

add

public void add(boolean error,
                String type,
                String description)
Add a new error report

Parameters:
error - true if the report is an error, false if it is just a warning
type - a string giving a reasoner-dependent classification for the report
description - a textual description of the problem

add

public void add(boolean error,
                String type,
                String description,
                Object extension)
Add a new error report

Parameters:
error - true if the report is an error, false if it is just a warning
type - a string giving a reasoner-dependent classification for the report
description - a textual description of the problem
extension - Optional argument with extension data about the reported error

add

public void add(ValidityReport.Report report)
Add a new error report

Parameters:
report - a ValidityReport.Report to add, can be null

isValid

public boolean isValid()
Returns true if no logical inconsistencies were detected (in which case there will be at least one error Report included). Warnings may still be present. As of Jena 2.2 we regard classes which can't be instantiated as warnings rather than errors.

Specified by:
isValid in interface ValidityReport

isClean

public boolean isClean()
Returns true if the model is both valid (logically consistent) and no warnings were generated.

Specified by:
isClean in interface ValidityReport

size

public int size()
Return a count of the number of warning or error reports generated by the validation.


getReports

public Iterator<ValidityReport.Report> getReports()
Return an iterator over the separate ValidityReport.Report records.

Specified by:
getReports in interface ValidityReport


Licenced under the Apache License, Version 2.0