def load(self, klass=None):
     from 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
Example #2
0
 def load(self, klass=None):
     from 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
Example #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
 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
Example #5
0
 def __init__(self, filename, **kwargs):
     _XMLFileLocator.__init__(self, filename, **kwargs)
 def __init__(self, filename, **kwargs):
     _XMLFileLocator.__init__(self, filename, **kwargs)
Example #7
0
 def save_as(self, obj):
     klass = obj.__class__
     obj = _XMLFileLocator.save(self, obj, True)
     klass.convert(obj)
     obj.locator = self
     return obj
Example #8
0
 def __init__(self, filename):
     _XMLFileLocator.__init__(self, filename)