Esempio n. 1
0
 def create_mashup_entity(self, trail_id, mashup, action):
     entity = MashupEntity(mashup)
     self.children.append(entity)
     entity.parent = self
     vt_version = mashup.version
     if self.vistrail.has_notes(vt_version):
         plain_notes = extract_text(self.vistrail.get_notes(vt_version))
         entity.description = plain_notes
     else:
         entity.description = ''
     entity.user = action.user
     entity.mod_time = action.date
     entity.create_time = action.date
     scheme, rest = self.url.split('://', 1)
     url = 'http://' + rest
     url_tuple = urlparse.urlsplit(url)
     query_str = url_tuple[3]
     if query_str == '':
         query_str = 'mashuptrail=%s&mashup=%s' % (trail_id, action.id)
     else:
         query_str += '&mashuptrail=%s&mashup=%s' % (trail_id, action.id)
     url_tuple = (scheme, url_tuple[1], url_tuple[2], query_str,
                  url_tuple[4])
     entity.url = urlparse.urlunsplit(url_tuple)
     # entity.url = self.url + '?workflow_id=%s' % action.id
     return entity
 def create_mashup_entity(self, trail_id, mashup, action):
     entity = MashupEntity(mashup)
     self.children.append(entity)
     entity.parent = self
     vt_version = mashup.version
     if self.vistrail.has_notes(vt_version):
         plain_notes = extract_text(self.vistrail.get_notes(vt_version))
         entity.description = plain_notes
     else:
         entity.description = ''
     entity.user = action.user
     entity.mod_time = action.date
     entity.create_time = action.date
     scheme, rest = self.url.split('://', 1)
     url = 'http://' + rest
     url_tuple = urlparse.urlsplit(url)
     query_str = url_tuple[3]
     if query_str == '':
         query_str = 'mashuptrail=%s&mashup=%s' %(trail_id, action.id)
     else:
         query_str += '&mashuptrail=%s&mashup=%s' %(trail_id, action.id)
     url_tuple = (scheme, url_tuple[1], url_tuple[2], query_str,
                  url_tuple[4])
     entity.url = urlparse.urlunsplit(url_tuple)
     # entity.url = self.url + '?workflow_id=%s' % action.id
     return entity
Esempio n. 3
0
 def create_mashup_entity(self, trail_id, mashup, action):
     entity = MashupEntity(mashup)
     self.children.append(entity)
     entity.parent = self
     vt_version = mashup.version
     if self.vistrail.has_notes(vt_version):
         plain_notes = extract_text(self.vistrail.get_notes(vt_version))
         entity.description = plain_notes
     else:
         entity.description = ''
     entity.user = action.user
     entity.mod_time = action.date
     entity.create_time = action.date
     locator = BaseLocator.from_url(self.url)
     locator.kwargs['mashuptrail'] = trail_id
     locator.kwargs['mashup'] = action.id
     entity.url = locator.to_url()
     return entity
Esempio n. 4
0
 def create_mashup_entity(self, trail_id, mashup, action):
     entity = MashupEntity(mashup)
     self.children.append(entity)
     entity.parent = self
     vt_version = mashup.version
     if self.vistrail.has_notes(vt_version):
         plain_notes = extract_text(self.vistrail.get_notes(vt_version))
         entity.description = plain_notes
     else:
         entity.description = ''
     entity.user = action.user
     entity.mod_time = action.db_date
     entity.create_time = action.db_date
     locator = BaseLocator.from_url(self.url)
     locator.kwargs['mashuptrail'] = trail_id
     locator.kwargs['mashup'] = action.id
     entity.url = locator.to_url()
     return entity