def get(object_id): logging.debug('datastore.get') if object_id.startswith('/'): return RawObject(object_id) metadata = dbus_helpers.get_properties(object_id) ds_object = DSObject(object_id, DSMetadata(metadata), None) # TODO: register the object for updates return ds_object
def get_metadata(self): if self._metadata is None and not self.object_id is None: metadata = DSMetadata(dbus_helpers.get_properties(self.object_id)) self._metadata = metadata return self._metadata