public Note addNoteToEntity(OWLEntity targetEntity, NoteContent noteContent, UserId author, long timestamp) {
try {
checkNotNull(targetEntity);
checkNotNull(noteContent);
checkNotNull(author);
AnnotatableThing target = getAnnotatableThing(targetEntity);
Note note = addNoteToTarget(target, noteContent, author, timestamp);
OWLEntityData entityData = DataFactory.getOWLEntityData(targetEntity, project.getRenderingManager().getBrowserText(targetEntity));
final NotePostedEvent evt = new NotePostedEvent(project.getProjectId(), Optional.of(entityData), new NoteDetails(note.getHeader(), note.getContent()));
project.getEventManager().postEvent(evt);
return note;