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 aErrorHandler
that is capable of asserting any SAX errors as a DecimaTestResult
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
error(SAXParseException ex)
void
fatalError(SAXParseException ex)
XMLDocument
getAssessedDocument()
Retieve the document this handler is reporting issues for.SchemaAssessment
getSchemaAssessment()
Retrieve the assessment this handler supports.void
warning(SAXParseException ex)
-
-
-
Constructor Detail
-
AssessmentSAXErrorHandler
public AssessmentSAXErrorHandler(SchemaAssessment schemaAssessment, XMLDocument assessedDocument, String derivedRequirementId, AssessmentResultBuilder builder, SAXLocationXPathResolver saxLocationXPathResolver)
Constructs aErrorHandler
that 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
- theAssessmentResultBuilder
to use to post theTestResult
tosaxLocationXPathResolver
- 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:
warning
in interfaceErrorHandler
- Throws:
SAXException
-
error
public void error(SAXParseException ex) throws SAXException
- Specified by:
error
in interfaceErrorHandler
- Throws:
SAXException
-
fatalError
public void fatalError(SAXParseException ex) throws SAXException
- Specified by:
fatalError
in interfaceErrorHandler
- Throws:
SAXException
-
-