def save(self, save_bundle): save_bundle = _ZIPFileLocator.save(self, save_bundle, False) for obj in save_bundle.get_db_objs(): klass = self.get_convert_klass(obj.vtType) klass.convert(obj) obj.locator = self return save_bundle
def load(self, klass=None): from core.vistrail.vistrail import Vistrail if klass is None: klass = Vistrail obj = _ZIPFileLocator.load(self, klass.vtType) klass.convert(obj) obj.locator = self return obj
def save_as(self, save_bundle, version=None): save_bundle = _ZIPFileLocator.save(self, save_bundle, True, version) for obj in save_bundle.get_db_objs(): klass = self.get_convert_klass(obj.vtType) klass.convert(obj) obj.locator = self # Need to update thumbnail cache since files have moved ThumbnailCache.getInstance().add_entries_from_files(save_bundle.thumbnails) return save_bundle
def save_as(self, save_bundle, version=None): save_bundle = _ZIPFileLocator.save(self, save_bundle, True, version) for obj in save_bundle.get_db_objs(): klass = self.get_convert_klass(obj.vtType) klass.convert(obj) obj.locator = self # Need to update thumbnail cache since files have moved ThumbnailCache.getInstance().add_entries_from_files( save_bundle.thumbnails) return save_bundle
def load(self, klass=None): from core.vistrail.vistrail import Vistrail if klass is None: klass = Vistrail save_bundle = _ZIPFileLocator.load(self, klass.vtType) for obj in save_bundle.get_db_objs(): klass = self.get_convert_klass(obj.vtType) klass.convert(obj) obj.locator = self return save_bundle
def __init__(self, filename, **kwargs): _ZIPFileLocator.__init__(self, filename, **kwargs)
def save_as(self, obj): klass = obj.__class__ obj = _ZIPFileLocator.save(self, obj, True) klass.convert(obj) obj.locator = self return obj
def __init__(self, filename): _ZIPFileLocator.__init__(self, filename)