Package telemeta :: Package models :: Module dublincore :: Class Resource
[hide private]
[frames] | no frames]

Class Resource

source code

object --+
         |
        Resource

Represent a Dublin Core resource

Instance Methods [hide private]
 
__init__(self, *args)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
flatten(self)
Convert the resource to a dictionary with element names as keys.
source code
 
to_list(self)
Convert the resource to unqualified dublin core, as a list of the form: [(key, value), ...]
source code
 
add(self, *elements) source code
 
__unicode__(self) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

flatten(self)

source code 
Convert the resource to a dictionary with element names as keys.

Warnings: 
- refinements are lost during this conversion,
- if there are several occurences of the same element, only the first is 
used, others are lost.
- all values are converted to strings