Class XMLResultBuilder
- java.lang.Object
-
- gov.nist.secauto.decima.xml.assessment.result.XMLResultBuilder
-
public class XMLResultBuilder extends Object
-
-
Constructor Summary
Constructors Constructor Description XMLResultBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbuildProperties(org.jdom2.Element root, Map<String,String> properties)protected voidbuildRequirements(org.jdom2.Element root, AssessmentResults results)protected voidbuildResults(org.jdom2.Element root, AssessmentResults results, Map<String,String> systemIdToSubjectIdMap)protected Map<String,String>buildSubjects(org.jdom2.Element root, AssessmentResults results)org.jdom2.DocumentnewDocument(AssessmentResults results)Creates a new JDOMDocumentbased on the providedAssessmentResults.voidwrite(AssessmentResults results, OutputStream out)Writes a provided set ofAssessmentResultsto the providedOutputStreamas an XML document.
-
-
-
Method Detail
-
write
public void write(AssessmentResults results, OutputStream out) throws IOException
Writes a provided set ofAssessmentResultsto the providedOutputStreamas an XML document.- Parameters:
results- the results of an assessment to useout- theOutputStreamto write the XML results to- Throws:
IOException- if an error occurs while writing to the providedOutputStream
-
buildSubjects
protected Map<String,String> buildSubjects(org.jdom2.Element root, AssessmentResults results)
-
buildProperties
protected void buildProperties(org.jdom2.Element root, Map<String,String> properties)
-
buildRequirements
protected void buildRequirements(org.jdom2.Element root, AssessmentResults results)
-
buildResults
protected void buildResults(org.jdom2.Element root, AssessmentResults results, Map<String,String> systemIdToSubjectIdMap)
-
newDocument
public org.jdom2.Document newDocument(AssessmentResults results)
Creates a new JDOMDocumentbased on the providedAssessmentResults.- Parameters:
results- the results of an assessment to use- Returns:
- a JDOM
Documentcontaining an XML representation of the results
-
-