Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

1
0

dumper.py 997 B

123456789101112131415161718192021222324252627282930313233
  1. """
  2. Dumps ODML-Structures
  3. """
  4. def get_props(obj, props):
  5. out = []
  6. for p in props:
  7. if hasattr(obj, p):
  8. x = getattr(obj, p)
  9. if not x is None:
  10. out.append("%s=%s" % (p, repr(x)))
  11. return ", ".join(out)
  12. def dumpSection(section, indent=1):
  13. if section is None:
  14. return
  15. print("%*s*%s (%s)" % (indent, " ", section.name, get_props(section, ["type", "definition", "id", "link", "include", "repository", "mapping"])))
  16. for prop in section.properties:
  17. print("%*s:%s (%s)" % (indent + 1, " ", prop.name, get_props(prop, ["synonym", "definition", "mapping", "dependency", "dependencyValue"])))
  18. for value in prop.values:
  19. print("%*s:%s (%s)" % (indent + 3, " ", value.data, get_props(value, ["dtype", "unit", "uncertainty", "definition", "id", "defaultFileName"])))
  20. for sub in section.sections:
  21. dumpSection(sub, indent * 2)
  22. def dumpDoc(doc):
  23. for sec in doc:
  24. dumpSection(sec)