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()) {