Beispiel #1
0
//$ids=array(101954);
/*
$ids=array(101964);
$ids=array(102054);
$ids=array(102056);

$ids=array(78401);

$ids = array(14515);
*/
$ids = array(105389);
$ids = array(110934);
$ids = array(117848);
foreach ($ids as $reference_id) {
    echo $reference_id . "\n";
    $specimens = specimens_from_db($reference_id);
    if (count($specimens) == 0) {
        $specimens = specimens_from_reference($reference_id);
    }
    echo "Specimens:\n";
    print_r($specimens);
    $nm = bhl_names_in_reference_by_page($reference_id);
    $nm->names;
    // Get majority rule taxon (what paper is about)
    $tags = array();
    foreach ($nm->names as $name) {
        $tags[] = $name->namestring;
    }
    $paths = get_paths($tags);
    $majority_rule = majority_rule_path($paths);
    $expanded = expand_path($majority_rule);
Beispiel #2
0
 function Retrieve()
 {
     if ($this->id != 0) {
         $this->object = db_retrieve_reference($this->id);
         $this->in_bhl = db_reference_from_bhl($this->id);
     }
     // Geocoding?
     if ($this->in_bhl) {
         if (!bhl_has_been_geocoded($this->id)) {
             bhl_geocode_reference($this->id);
         }
         $this->localities = bhl_localities_for_reference($this->id);
     }
     // Specimens?
     if ($this->in_bhl) {
         if (!specimens_has_been_parsed($this->id)) {
             specimens_from_reference($this->id);
         }
         $this->specimens = specimens_from_db($this->id);
     }
     return $this->object;
 }