constraint.setConstraint(check.getConstraint().toString());
constraint.setType( check.isErrorCheck() ? ConstraintType.ERROR : ConstraintType.WARNING );
constraint.setMessage( check.getMsg().toString() );
// make a new FileReference
FileLineReference line = factory.createFileLineReference();
line.setFile(fr);
line.setLine(check.getLine());
constraint.setReference(line);
// add this constraint
identifier.getConstraints().add(constraint);
}