interface.py 959 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. from __future__ import absolute_import
  2. # Copyright (c) 2010-2019 openpyxl
  3. from abc import abstractproperty
  4. from openpyxl.compat.abc import ABC
  5. class ISerialisableFile(ABC):
  6. """
  7. Interface for Serialisable classes that represent files in the archive
  8. """
  9. @abstractproperty
  10. def id(self):
  11. """
  12. Object id making it unique
  13. """
  14. pass
  15. @abstractproperty
  16. def _path(self):
  17. """
  18. File path in the archive
  19. """
  20. pass
  21. @abstractproperty
  22. def _namespace(self):
  23. """
  24. Qualified namespace when serialised
  25. """
  26. pass
  27. @abstractproperty
  28. def _type(self):
  29. """
  30. The content type for the manifest
  31. """
  32. @abstractproperty
  33. def _rel_type(self):
  34. """
  35. The content type for relationships
  36. """
  37. @abstractproperty
  38. def _rel_id(self):
  39. """
  40. Links object with parent
  41. """