def main(out_fname, in_fnames):
    """main(out_fname: str, in_fnames: list<str>) -> None
    Combines all vistrails specified in in_fnames into a single vistrail
    by renumbering their ids

    """
    # FIXME this breaks when you use abstractions!
    (save_bundle, vt_save_dir) = io.open_bundle_from_zip_xml(DBVistrail.vtType, in_fnames[0])
    for in_fname in in_fnames[1:]:
        (new_save_bundle, new_save_dir) = io.open_bundle_from_zip_xml(DBVistrail.vtType, in_fname)
        db.services.vistrail.merge(save_bundle, new_save_bundle, "", True, vt_save_dir, new_save_dir)
    io.save_bundle_to_zip_xml(save_bundle, out_fname)
예제 #2
0
def main(out_fname, in_fnames):
    """main(out_fname: str, in_fnames: list<str>) -> None
    Combines all vistrails specified in in_fnames into a single vistrail
    by renumbering their ids

    """
    # FIXME this breaks when you use abstractions!
    (save_bundle,
     vt_save_dir) = io.open_bundle_from_zip_xml(DBVistrail.vtType,
                                                in_fnames[0])
    for in_fname in in_fnames[1:]:
        (new_save_bundle,
         new_save_dir) = io.open_bundle_from_zip_xml(DBVistrail.vtType,
                                                     in_fname)
        db.services.vistrail.merge(save_bundle, new_save_bundle, "", True,
                                   vt_save_dir, new_save_dir)
    io.save_bundle_to_zip_xml(save_bundle, out_fname)
 def load(self, type):
     fname = self._find_latest_temporary()
     if fname:
         from db.domain import DBVistrail
         obj = io.open_from_xml(fname, type)
         return SaveBundle(DBVistrail.vtType, obj)
     else:
         (save_bundle, tmp_dir) = io.open_bundle_from_zip_xml(type, self._name)
         self.tmp_dir = tmp_dir
         for obj in save_bundle.get_db_objs():
             obj.locator = self
         return save_bundle
예제 #4
0
 def load(self, type):
     fname = self._find_latest_temporary()
     if fname:
         from db.domain import DBVistrail
         obj = io.open_from_xml(fname, type)
         return SaveBundle(DBVistrail.vtType, obj)
     else:
         (save_bundle,
          tmp_dir) = io.open_bundle_from_zip_xml(type, self._name)
         self.tmp_dir = tmp_dir
         for obj in save_bundle.get_db_objs():
             obj.locator = self
         return save_bundle