LSIDs are a type of globally unique identifier that emerged from the life sciences community. It was adopted by several taxonomic databases in the mid 2000’s. When a LSID is resolved it returns information about the entity identified by that LSID (e.g., a taxonomic name), typically in RDF.
For a variety of reasons the adoption of LSIDs has been limited. They are non-trivial to set up, require specialised software to resolve (such as this resolver), and return RDF rather than human-readable content. However, because LSID servers still exist it is useful to have a LSID resolver.
This code supports resolving LSIDs and returning metadata as RDF in various forms: JSON-LD, N-triples, and RDF/XML.
You can also get RDF directly in one of two ways:
-
Append a file extension to the LSID (e.g., “.nt” for N-Triples).
-
Content negotiation (e.g., “application/ld+json” for JSON-LD).
Simply unpack the source code in a web-accessible directory. Make sure that the cache directory is writable by the web browser, e.g.
chmod 777 cache
Make sure that the RewriteBase directive in the .htaccess file corresponds to the base URL for the web server hosting the resolver.
Want this to be as clean and JSON-like as possible. Struggling to handle IPNI and nomenclatural codes.
Following JSON-LD will recreate triples with nomenclatural code as URI, other examples (e.g., “botanical” by itself) don’t work.
“nomenclaturalCode”: “http://rs.tdwg.org/ontology/voc/TaxonName#nomenclaturalCode”,
“tn”: “http://rs.tdwg.org/ontology/voc/TaxonName#”,
“botanical”: “tn:botanical”,
“nomenclaturalCode”: { “@id” : “tn:botanical”},