stem
stem copied to clipboard
Add Descriptor validate() method
Our Descriptor class' construction and validation are coupled together, which complicates validation of individual descriptors (rather than whole files) as discussed on BridgeDB ticket 40006.
Stem evolved this way for performance. When read without validation we can lazily load content (parsing attributes on demand), whereas validation requires us to process the whole document up front.
We should move checks into a validate()
method so all descriptors can be checked regardless of how they were constructed.