relates to #8.
for example, whatever functions I write to get annotations and get geographic coverage would be very similar at their core:
- loop through each EML document in a corpus
- if there's a X element at the dataset level, parse and record it
- loop through each entity group and then each entity in a group, if there's a X element at the entity level,parse and record it
- within each entity loop through each attribute, if there's a X element at the attribute level parse and record it
X can be:
methods
coverage
annotations
(any others)
I'd like to not write the same function over and over again, and not have to edit all these separate text files for any sort of editing or debugging. A possible solution is to have the shell function(s), e.g. get_annotations(), actually call or return a template function which takes a function from the parse_() family as an argument.
relates to #8.
for example, whatever functions I write to get annotations and get geographic coverage would be very similar at their core:
X can be:
methods
coverage
annotations
(any others)
I'd like to not write the same function over and over again, and not have to edit all these separate text files for any sort of editing or debugging. A possible solution is to have the shell function(s), e.g. get_annotations(), actually call or return a template function which takes a function from the parse_() family as an argument.