Skip to content
Holly Becker edited this page Feb 16, 2016 · 3 revisions

Ideas

  • Store information in a sqlite DB (possibly in memory) to make querying for an object/metadata easier

  • Allow for lazy parsing so we don't have to load the whole file into memory and keep it there

  • Parsing: Iterate through fileSec to generate FSEntrys, because the structMap may not have all objects. Then go through structMap and build structmap structure from nested lists (or something else?) of the already-created structMaps

  • Add FSEntrys from structMap as needed, if fileSec dooesn't have everything?

  • Move parent/children out of the FSEntry into the METSDocument

  • Move type out of FSEntry into structMap structure

  • Allows multiple structMaps

  • Add create structmap functions

  • Move FSEntry parsing into FSEntry? An FSEntry is mostly collecting info from several mets structures

  • Original discussion here https://docs.google.com/document/d/1hJ9KrmnpRU-aQBD07dC7n21njN1bwYq-MxK0RUpHhV0/edit# (Access restricted)

Discussion

For attributes directly corresponding to XML elements, use python style naming (rights_basis) or XML style (rightsBasis) ?

  • Python
    • consistent with python styling
    • consistent with anything that doesn’t directly map to elements
    • inconsistent with the actual XML, have to do mental mapping between the two
  • XML
    • easy to see relation between attribute and originating tag
    • mismatches with rest of python code

Access things via dict (foo[‘value’]) or by attribute (foo.value) ?

  • dict-style
    • use .get(value, None) to get default values if it may not exist
    • easier to give access to (probably using dict internally anyway, just use wrapper for __get__)
  • attribute
    • less typing
    • probably harder to populate (maybe use @property?)
Clone this wiki locally