Class AssessmentSequence<DOC extends Document>
- java.lang.Object
-
- gov.nist.secauto.decima.core.assessment.util.AssessmentSequence<DOC>
-
- Type Parameters:
DOC- the type of document that is the target of the assessment
- All Implemented Interfaces:
Assessment<DOC>
public class AssessmentSequence<DOC extends Document> extends Object implements Assessment<DOC>
This class provides support for a list of assessments that get evaluated in a series.
-
-
Constructor Summary
Constructors Constructor Description AssessmentSequence(List<? extends Assessment<DOC>> assessments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(DOC targetDocument, AssessmentResultBuilder builder)Executes the assessment, which then generates input into aAssessmentResultsusing the providedAssessmentResultBuilder.List<Assessment<DOC>>getAssessments()StringgetAssessmentType()Returns a stable identifier indicating the type of assessment being performed.List<Assessment<DOC>>getExecutableAssessments(DOC targetDocument)StringgetName(boolean includeDetail)Retrieves a human-readable label for the assessment.
-
-
-
Constructor Detail
-
AssessmentSequence
public AssessmentSequence(List<? extends Assessment<DOC>> assessments)
-
-
Method Detail
-
getAssessmentType
public String getAssessmentType()
Description copied from interface:AssessmentReturns a stable identifier indicating the type of assessment being performed.- Specified by:
getAssessmentTypein interfaceAssessment<DOC extends Document>- Returns:
- an identifier
-
getAssessments
public List<Assessment<DOC>> getAssessments()
-
getExecutableAssessments
public List<Assessment<DOC>> getExecutableAssessments(DOC targetDocument) throws AssessmentException
- Specified by:
getExecutableAssessmentsin interfaceAssessment<DOC extends Document>- Throws:
AssessmentException
-
execute
public void execute(DOC targetDocument, AssessmentResultBuilder builder) throws AssessmentException
Description copied from interface:AssessmentExecutes the assessment, which then generates input into aAssessmentResultsusing the providedAssessmentResultBuilder.- Specified by:
executein interfaceAssessment<DOC extends Document>- Parameters:
targetDocument- the XML document to assessbuilder- theAssessmentResultBuilderused to eventually generate aAssessmentResultsonce all assessments have been performed- Throws:
AssessmentException- if an error occurs while performing the assessment
-
getName
public String getName(boolean includeDetail)
Description copied from interface:AssessmentRetrieves a human-readable label for the assessment.- Specified by:
getNamein interfaceAssessment<DOC extends Document>- Parameters:
includeDetail- iftrue, include identifying details- Returns:
- a human-readable label for the assessment.
-
-