class DataModelerServiceHelper {

    public List<ValidationMessage> toValidationMessage(final List<DataModelerError> errors) {
        final List<ValidationMessage> validationMessages = new ArrayList<>();
        ValidationMessage validationMessage;

        if (errors == null) {
            return validationMessages;
        }
        for (DataModelerError error : errors) {
            validationMessage = new ValidationMessage();
            validationMessage.setPath(error.getFile());
            validationMessage.setText(error.getMessage());
            validationMessage.setColumn(error.getColumn());
            validationMessage.setLine(error.getLine());
            validationMessage.setId(error.getId());
            if (error.getLevel() != null) {
                validationMessage.setLevel(error.getLevel());
            }
            validationMessages.add(validationMessage);
        }
        return validationMessages;
    }

    public  DataModelerServiceHelper();
    @Inject public  DataModelerServiceHelper(final KieModuleService moduleService,
                                    final @Named("ioStrategy") IOService ioService,
                                    final CommentedOptionFactory commentedOptionFactory);

}