The code for metadata classes on branch Annotation-Main is currently not very clean. It needs refactoring and also some cleaning also. Some suggestions are:
make the main Metadata class as clean as possible by implementing only a few necessary interfaces. Do the other implementations inside the CVTerm, History, and Listofkeyvalue class wherever possible to make Metadata class look more clean and simple.
modify the code by using the dot syntax (object.attr) instead of dictionary syntax (object["attr"]) to access attributes wherever possible.
Remove the extra checks for attributes and make classes as simple as possible.
This will make the code easier to understand and much simpler.