コード例 #1
0
 def process(self, pair):
     start, stop = pair
     #_p("Processing {} {}".format(start, stop))
     #self.total += 1
     rsp = client.EntityFilter(self.query, start=start, stop=stop)
     for card in rsp:
         if (hasattr(card, 'positiontype') is True) and\
              (card.positiontype.get('cid') == '12166'):
             continue
         g = client.to_graph(card, models.Position)
         self.graph += g
         del g
コード例 #2
0
 def process(self, pair):
     start, stop = pair
     #_p("Processing {} {}".format(start, stop))
     #self.total += 1
     rsp = client.EntityFilter(self.query, start=start, stop=stop)
     for ety in rsp:
         item = client.Entity('Person', ety.cid)
         # FH people only
         if hasattr(item, 'fhpersontype'):
             if item.fhpersontype['cid'] == '6019159':
                 g = client.to_graph(item, models.Person)
                 self.graph += g
コード例 #3
0
 def get_total(self):
     rsp = client.EntityFilter(self.query, start=0, stop=1)
     total = rsp.number
     logging.info("Total positions found: {}.".format(total))
     return total
コード例 #4
0
ファイル: utils.py プロジェクト: rcascioFHCRC/fhutch-vivo1.9
 def process(self, pair):
     start, stop = pair
     logging.info("Processing set {} to {}.".format(start, stop))
     rsp = client.EntityFilter(self.query, start=start, stop=stop)
     for ety in rsp:
         self.graph += client.to_graph(ety, self.vmodel)