private RuleTypeDTO createRuleTypeDTO(Violation violation) throws RuleInstantionException, LanguageNotFoundException, RuleTypeNotFoundException { try { if (violationtypeFactory == null) { throw new LanguageNotFoundException(); } ViolationType violationtype = violationtypeFactory.createViolationType(violation.getViolationtypeKey()); RuleType rule = ruleFactory.generateRuleType(violation.getRuletypeKey()); RuleTypeDTO ruleDTO = ruleAssembler.createRuleTypeDTO(rule, violationtype); return ruleDTO; } catch (ViolationTypeNotFoundException e) { throw new ViolationTypeNotFoundException(); } }