예제 #1
0
 def load(self, klass=None):
     from vistrails.core.vistrail.vistrail import Vistrail
     if klass is None:
         klass = Vistrail
     obj = _XMLFileLocator.load(self, klass.vtType)
     klass.convert(obj)
     obj.locator = self
     return obj
예제 #2
0
 def load(self, klass=None):
     from vistrails.core.vistrail.vistrail import Vistrail
     if klass is None:
         klass = Vistrail
     obj = _XMLFileLocator.load(self, klass.vtType)
     klass.convert(obj)
     obj.locator = self
     return obj
예제 #3
0
 def save_as(self, obj, version=None):
     is_bundle = False
     if type(obj) == type(SaveBundle(None)):
         is_bundle = True
         save_bundle = obj
         obj = save_bundle.get_primary_obj()
     klass = obj.__class__
     obj = _XMLFileLocator.save(self, obj, True, version)
     klass.convert(obj)
     obj.locator = self
     if is_bundle:
         return SaveBundle(save_bundle.bundle_type, obj)
     return obj
예제 #4
0
 def save_as(self, obj, version=None):
     is_bundle = False
     if type(obj) == type(SaveBundle(None)):
         is_bundle = True
         save_bundle = obj
         obj = save_bundle.get_primary_obj()
     klass = obj.__class__
     obj = _XMLFileLocator.save(self, obj, True, version)
     klass.convert(obj)
     obj.locator = self
     if is_bundle:
         return SaveBundle(save_bundle.bundle_type, obj)
     return obj
예제 #5
0
 def __init__(self, filename, **kwargs):
     _XMLFileLocator.__init__(self, filename, **kwargs)
예제 #6
0
 def __init__(self, filename, **kwargs):
     _XMLFileLocator.__init__(self, filename, **kwargs)