Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/diogok/simple-digir

Tool (class and UI) to simplify search on DIGIR server
https://github.com/diogok/simple-digir

Last synced: about 2 months ago
JSON representation

Tool (class and UI) to simplify search on DIGIR server

Awesome Lists containing this project

README

        

SimpleDigir

This is a PHP library, php webservice wrapper and simple interface for performing searchs on DIGIR services.

DIGIR is a (old, bad and ugly) protocol for interchange of biological data in the Darwin Core format, and it's widely adopted. A nice list of Digir servers can be found at http://bigdig.ecoforge.net/wiki/ProviderStatus .

This library provides a wrapper for easily performing search on a digir server.

Usage:

setResource('GBIF')->filter("ScientificName","like","Quercus%")->getResult();
foreach($records as $record) {
echo $record->Species ;
}
?>

You can also list the resources of a digir server:

setResource("*")->getResults();
foreach($recs as $rec) {
echo $rec->code. " : " .$rec->name;
}
?>

Also there is a small query interface (very fragile).
getResults();
$records = DigirQuery::create("SELECT * from 'http://url.of/digi.php'.'name_of_resource'")->getResults();
$records = DigirQuery::create("SELECT * from 'http://url.of/digir.php'.'name_of_resouece' WHERE ScientificName like 'Quercus%'")->getResult();
?>

There is a simple interface on index.php build using Sencha (extJs), you can test it in http://diogok.net/digir and the service.php can receive a query by post and return it as json.