'Dictionary access to metadata
Caches the full metadata dict after first call.'

@property
def metadata(self):

    if ((not hasattr(self, '_metadata')) or (self._metadata is None)):
        self._metadata = dict(((m.name, m.value) for m in self.metadata_set.all()))
    return self._metadata
