[Bio] / FigWebServices / save_to_attributes.cgi Repository:
ViewVC logotype

Diff of /FigWebServices/save_to_attributes.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4, Thu Jan 18 19:21:52 2007 UTC revision 1.5, Thu Jan 18 21:31:49 2007 UTC
# Line 32  Line 32 
32          print "Press the back button <p>";          print "Press the back button <p>";
33          exit;          exit;
34  }  }
35  print "$peg<p>";  #print "$peg<p>";
36  #print $curated_journals;  #print $curated_journals;
37    
38  my @pubmed_r_attributes = $fig->get_attributes($peg, "PUBMED_CURATED_RELEVANT");  my @pubmed_r_attributes = $fig->get_attributes($peg, "PUBMED_CURATED_RELEVANT");
# Line 67  Line 67 
67                  #Check to see if the pmid is already in the attributes for this peg                  #Check to see if the pmid is already in the attributes for this peg
68                  #If it is then we exit                  #If it is then we exit
69                  next if ($to_add =~ /PMID/);                  next if ($to_add =~ /PMID/);
70                  print "ADD PMID is $to_add<p>";                  #print "ADD PMID is $to_add<p>";
71    
72                  if( $pmid2key{$to_add} ne "") {                  if( $pmid2key{$to_add} ne "") {
73                          print "PMID:$to_add is already in the attribute database<p>";                          print "PMID:$to_add is already in the attribute database<p>";
# Line 77  Line 77 
77                          my $add_title = &FigWebServices::SeedComponents::PubMed::pmid_to_title($to_add);                          my $add_title = &FigWebServices::SeedComponents::PubMed::pmid_to_title($to_add);
78                          my $add_url = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=$to_add";                          my $add_url = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=$to_add";
79                          $fig->add_attribute($peg, "PUBMED_CURATED_RELEVANT", "$name,$to_add,$add_title", $add_url);                          $fig->add_attribute($peg, "PUBMED_CURATED_RELEVANT", "$name,$to_add,$add_title", $add_url);
80                          print "Added to attributes as PUBMED_CURATED_RELEVANT, $name,$to_add, $add_title<p>";                          #print "Added to attributes as PUBMED_CURATED_RELEVANT, $name,$to_add, $add_title<p>";
81                          $pmid2whom{$to_add} = $name;                          $pmid2whom{$to_add} = $name;
82                          $pmid2key{$to_add} = "PUBMED_CURATED_RELEVANT";                          $pmid2key{$to_add} = "PUBMED_CURATED_RELEVANT";
83                  }                  }
# Line 106  Line 106 
106    
107          if (! $pmid2key{$curated_pmid})          if (! $pmid2key{$curated_pmid})
108          {          {
109                  print "Doesn't exist $pmid2key{$curated_pmid}";                  #print "Doesn't exist $pmid2key{$curated_pmid}";
110                  $fig->add_attribute($peg, $curated_key, "$name,$curated_pmid,$value", $url);                  $fig->add_attribute($peg, $curated_key, "$name,$curated_pmid,$value", $url);
111                  print "Doesn't exist - ADD $peg, $curated_key, $name,$curated_pmid, $value <p>";                  #print "Doesn't exist - ADD $peg, $curated_key, $name,$curated_pmid, $value <p>";
112                  $pmid2whom{$curated_pmid} = $name;                  $pmid2whom{$curated_pmid} = $name;
113                  $pmid2key{$curated_pmid} = $curated_key;                  $pmid2key{$curated_pmid} = $curated_key;
114    
# Line 123  Line 123 
123                  $fig->delete_attribute($peg,$pmid2key{$curated_pmid},$pmid2value{$curated_pmid},$delete_url);                  $fig->delete_attribute($peg,$pmid2key{$curated_pmid},$pmid2value{$curated_pmid},$delete_url);
124                  $fig->add_attribute($peg,$curated_key,"$name,$curated_pmid,$value",$url);                  $fig->add_attribute($peg,$curated_key,"$name,$curated_pmid,$value",$url);
125    
126                  print "ADD $peg, $curated_key, $name,$curated_pmid, $value <p>";                  #print "ADD $peg, $curated_key, $name,$curated_pmid, $value <p>";
127                  print "DELETE $pmid2key{$curated_pmid} $pmid2value{$curated_pmid}<p>";                  #print "DELETE $pmid2key{$curated_pmid} $pmid2value{$curated_pmid}<p>";
128                  #Update the hash                  #Update the hash
129                  $pmid2whom{$curated_pmid} = $name;                  $pmid2whom{$curated_pmid} = $name;
130                  $pmid2key{$curated_pmid} = $curated_key;                  $pmid2key{$curated_pmid} = $curated_key;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3