Class AssessmentSAXErrorHandler
- java.lang.Object
-
- gov.nist.secauto.decima.xml.assessment.schema.AssessmentSAXErrorHandler
-
- All Implemented Interfaces:
ErrorHandler
public class AssessmentSAXErrorHandler extends Object implements ErrorHandler
-
-
Constructor Summary
Constructors Constructor Description AssessmentSAXErrorHandler(SchemaAssessment schemaAssessment, XMLDocument assessedDocument, String derivedRequirementId, AssessmentResultBuilder builder, SAXLocationXPathResolver saxLocationXPathResolver)Constructs aErrorHandlerthat is capable of asserting any SAX errors as a DecimaTestResult.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(SAXParseException ex)voidfatalError(SAXParseException ex)XMLDocumentgetAssessedDocument()Retieve the document this handler is reporting issues for.SchemaAssessmentgetSchemaAssessment()Retrieve the assessment this handler supports.voidwarning(SAXParseException ex)
-
-
-
Constructor Detail
-
AssessmentSAXErrorHandler
public AssessmentSAXErrorHandler(SchemaAssessment schemaAssessment, XMLDocument assessedDocument, String derivedRequirementId, AssessmentResultBuilder builder, SAXLocationXPathResolver saxLocationXPathResolver)
Constructs aErrorHandlerthat is capable of asserting any SAX errors as a DecimaTestResult.- Parameters:
schemaAssessment- the assessment this handler supportsassessedDocument- the XML document target of the SAX operationderivedRequirementId- the derived requirement to associate the SAX errors/warnings withbuilder- theAssessmentResultBuilderto use to post theTestResulttosaxLocationXPathResolver- an XPathResolver to use to lookup error locations
-
-
Method Detail
-
getSchemaAssessment
public SchemaAssessment getSchemaAssessment()
Retrieve the assessment this handler supports.- Returns:
- the schemaAssessment
-
getAssessedDocument
public XMLDocument getAssessedDocument()
Retieve the document this handler is reporting issues for.- Returns:
- the assessedDocument
-
warning
public void warning(SAXParseException ex) throws SAXException
- Specified by:
warningin interfaceErrorHandler- Throws:
SAXException
-
error
public void error(SAXParseException ex) throws SAXException
- Specified by:
errorin interfaceErrorHandler- Throws:
SAXException
-
fatalError
public void fatalError(SAXParseException ex) throws SAXException
- Specified by:
fatalErrorin interfaceErrorHandler- Throws:
SAXException
-
-