Refactor with interface pattern, and throw exception for unsupported formats

Revised methods allow marshalling/unmarshalling from a list of XML nodes, allowing DataCategory to be incorporated seamlessly.
Factory pattern makes it easier to maintain createFromHrElements.
go/asl-tc-aosp

Bug: 287487923
Test: TODO in future CLs
Change-Id: I9fff3c1e28df74ef934da6355632c91e0ec91e79
13 files changed