getSpecimenid()); $location = LocationManager::getBySpecimenid($record->getSpecimenid()); $fullrecord->setProcessid(trim($record->getProcessid())); $fullrecord->setSampleid(trim($record->getSampleid())); $fullrecord->setFieldnum(trim($record->getFieldnum())); $fullrecord->setCatalognum(trim($record->getCatalognum())); $fullrecord->setVoucher(trim($details->getVouchertype())); $fullrecord->setTaxid(trim($record->getTaxid())); $fullrecord->setName(trim($record->getTaxon())); switch ($record->getTaxonRank()) { case 2: $fullrecord->setRank("phylum"); break; case 5: $fullrecord->setRank("class"); break; case 8: $fullrecord->setRank("order"); break; case 11: $fullrecord->setRank("family"); break; case 12: $fullrecord->setRank("subfamily"); break; case 14: $fullrecord->setRank("genus"); break; case 17: $fullrecord->setRank("species"); break; } $fullrecord->setReproduction(trim($details->getReproduction())); $fullrecord->setSex(trim($details->getSex())); $fullrecord->setLifestage(trim($details->getLifestage())); $fullrecord->setCollectors(trim($details->getCollectors())); $fullrecord->setCollectiondate(trim($details->getCollectiondate())); $fullrecord->setLat(trim($location->getLat())); $fullrecord->setLon(trim($location->getLon())); $fullrecord->setCoordsource(trim($location->getSource())); $fullrecord->setRegion(trim($location->getRegion())); $fullrecord->setExactsite(trim($location->getSite())); $fullrecord->setLastupdated(trim($details->getLastUpdated())); if ($location) { $geopolid = $location->getGeopol(); if ($geopolid) { $geopol = GeoPolManager::getById($geopolid); if ($geopol) { if (strcmp($geopol->getRank(), "country") == 0) { $fullrecord->setCountry(trim($geopol->getName())); } else { $fullrecord->setProvince(trim($geopol->getName())); $parent = GeoPolManager::getById($geopol->getParentid()); $fullrecord->setCountry(trim($parent->getName())); } } } } if ($notesid = $details->getNotes()) { $fullrecord->setNotes(trim(NotesManager::getById($notesid))); } if ($identifierid = $details->getIdentifier()) { $person = PersonManager::getById($identifierid); $fullrecord->setIdentifier(trim($person->getFullname())); } if ($instid = $record->getInst()) { $inst = InstManager::getById($instid); $fullrecord->setInst(trim($inst->getName())); } $fullrecords[] = $fullrecord; return $fullrecord; } } ?>