The Metadata class is there to have a single point of access to all metadata - both ra.xml and jboss-ra.xml. And a merge of thoese.
It also contains a simple method to validate the structure from a resource adapter level.
Feel free to move this functionality around, but document the structures in doc/developerguide/en/modules/metadata.xml