Open kerimoyle opened 4 years ago
Not sure I see the connection between #669 and parsing? Or quite what it means for automatically generated ids to be the same?
One option in 669 is to set the automatic ids in the Annotator
using the Printer
and then reparsing into a model. If that were the case then I'd want the parser to "update" rather than "append to" the model. We don't currently have that functionality (except it sounds like we do when you read the function names in the parser).
I'm struggling to understand the need for three different functions here:
parseModel
which always creates a newModel
instance from a string,updateModel
which is only ever called fromparseModel
, and simply callsloadModel
which always creates new entities inside the newly created model.I don't get it ... why do we have an
updateModel
method, is private, used exactly once (inparseModel
), and doesn't do what its name suggests (it naively appends, rather than updating) ... what am I missing? Why do we have it?I'd like to change the
updateModel
function to one which:Annotator
can use it.This is related to #669 as it would be cleanest to make use of the serialisation functions in the
Printer
so that even automatically-generated ids are the same, whether they are constructed inAnnotator
or thePrinter
.Thoughts? @nickerso @agarny @hsorby