/gdata/dublincore/data.py

http://radioappz.googlecode.com/ · Python · 78 lines · 23 code · 29 blank · 26 comment · 0 complexity · 068a0b21ca3a8096b8ac7324ab9df3e9 MD5 · raw file

  1. #!/usr/bin/python
  2. #
  3. # Copyright (C) 2009 Google Inc.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. """Contains the data classes of the Dublin Core Metadata Initiative (DCMI) Extension"""
  17. __author__ = 'j.s@google.com (Jeff Scudder)'
  18. import atom.core
  19. DC_TEMPLATE = '{http://purl.org/dc/terms/}%s'
  20. class Creator(atom.core.XmlElement):
  21. """Entity primarily responsible for making the resource."""
  22. _qname = DC_TEMPLATE % 'creator'
  23. class Date(atom.core.XmlElement):
  24. """Point or period of time associated with an event in the lifecycle of the resource."""
  25. _qname = DC_TEMPLATE % 'date'
  26. class Description(atom.core.XmlElement):
  27. """Account of the resource."""
  28. _qname = DC_TEMPLATE % 'description'
  29. class Format(atom.core.XmlElement):
  30. """File format, physical medium, or dimensions of the resource."""
  31. _qname = DC_TEMPLATE % 'format'
  32. class Identifier(atom.core.XmlElement):
  33. """An unambiguous reference to the resource within a given context."""
  34. _qname = DC_TEMPLATE % 'identifier'
  35. class Language(atom.core.XmlElement):
  36. """Language of the resource."""
  37. _qname = DC_TEMPLATE % 'language'
  38. class Publisher(atom.core.XmlElement):
  39. """Entity responsible for making the resource available."""
  40. _qname = DC_TEMPLATE % 'publisher'
  41. class Rights(atom.core.XmlElement):
  42. """Information about rights held in and over the resource."""
  43. _qname = DC_TEMPLATE % 'rights'
  44. class Subject(atom.core.XmlElement):
  45. """Topic of the resource."""
  46. _qname = DC_TEMPLATE % 'subject'
  47. class Title(atom.core.XmlElement):
  48. """Name given to the resource."""
  49. _qname = DC_TEMPLATE % 'title'