public function replaceNote(Note $noteToReplace, Note $note)
{
$edamNote = $noteToReplace->getEdamNote();
$edamNote->title = $note->title;
$edamNote->content = $note->content;
$edamNote->attributes = $note->attributes;
$edamNote->resources = $note->resources;
$uploaded_note = $noteToReplace->noteStore->updateNote($noteToReplace->authToken, $edamNote);
$uploaded_note->content = $note->content;
$en_note = new Note($uploaded_note);
$en_note->setSaved(true);
return $en_note;
}