@Override
protected RuleResultType generateRuleResultBase(RuleResult result) {
RuleResultType retval = testResultData.addNewRuleResult();
Rule rule = result.getRule();
// Attributes
retval.setIdref(rule.getId());
retval.setRole(RuleImpl.mapRole(rule.getRole()));
retval.setSeverity(RuleImpl.mapSeverity(rule.getSeverity()));
retval.setTime(Calendar.getInstance());
Version version = rule.getVersion();
if (version != null) {
retval.setVersion(version.getValue());
}
retval.setWeight(rule.getWeight());
for (Ident ident : rule.getIdents()) {
IdentType node = retval.addNewIdent();
node.setSystem(ident.getSystem().toString());
node.setStringValue(ident.getValue());
}