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 void
buildProperties(org.jdom2.Element root, Map<String,String> properties)
protected void
buildRequirements(org.jdom2.Element root, AssessmentResults results)
protected void
buildResults(org.jdom2.Element root, AssessmentResults results, Map<String,String> systemIdToSubjectIdMap)
protected Map<String,String>
buildSubjects(org.jdom2.Element root, AssessmentResults results)
org.jdom2.Document
newDocument(AssessmentResults results)
Creates a new JDOMDocument
based on the providedAssessmentResults
.void
write(AssessmentResults results, OutputStream out)
Writes a provided set ofAssessmentResults
to the providedOutputStream
as an XML document.
-
-
-
Method Detail
-
write
public void write(AssessmentResults results, OutputStream out) throws IOException
Writes a provided set ofAssessmentResults
to the providedOutputStream
as an XML document.- Parameters:
results
- the results of an assessment to useout
- theOutputStream
to 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 JDOMDocument
based on the providedAssessmentResults
.- Parameters:
results
- the results of an assessment to use- Returns:
- a JDOM
Document
containing an XML representation of the results
-
-