Notes from chat with Duncan
- Keep metadata as part of the object
- Recursion problem coming up.
- Duncan has code using Matt’s java API
- If the EML isn’t valid, so what? Important for developers, users don’t care.
- what’s with the
do.call? This forces evaluation, can mess up lazyLoading, making for inefficient function handling.
- Schema to create S4 objects
- Create R objects first, and then toXML
- EML exists – metadata vs vertical
- metadata manual in, manual out
- data synthesis?
R object to XML
- Accept / identify losely defined fields (lists)
- Manually create a coercision method between R’s objects, e.g. “person” (attempt match of named elements to list slots automatically).
- Separate coersion methods for read and write.
XML to R object
- ParseEML - because it saves us a lot to know this is EML.
- Coerce into generic S4 R classes (class definitions from schema)
- Coerce automatically if element names are the same. Otherwise, manually coerce.
- Translations to other languages (e.g. python) can be automated.
- Then add higher level mapping manually.