Demo:Databank page documentation

The Demo namespace is set up as an prototype for managing documentation associated with URIs used as names as described in the Shared Names initiative. Each page in the namespace is set to manage some space of names. An example is Demo:Databank/Pubmed, which is used to construct responses for the names of pubmed record names of the form http://demo.sharedname.org/n/r/pmid/16899496 .

The page has several components, marked by the use of MediaWiki Templates.

  • Template:PurlPattern is a perl regular expression pattern that is matched against the URI that was request. Capture groups can be used on the rest of the page as they would be in perl - $1, $2, etc.
  • Template:PurlHtml This section marks the HTML documentation for the name.
  • Template:PurlRdf This section marks the RDF or OWL documentation for the name. Right now it needs to be RDF/XML, but plans are to let it be in other syntaxes, or to be constructed using templates or forms that capture common patterns, which will be translated by the script to a uniform format (probably RDF/XML)
  • Template:PurlResponseAbout This constructs the name (another URI) for the metadata about the URI. Currently this URI is http://purl.org/about/<the path below purl.org in the original URI>

To configure this on the PURL side one sets up a redirect (partial redirect in the case of Entrez gene) to the, handler, which fetches the appropriate page from the wiki, grabs the section needed for a response, substitutes the matched portion of the URI in the template, and responds.

Some notes

  • From the OWL point of view, the metadata, named as http://demo.sharedname.org/n/about/.... is an OWL ontology of that name. You should be able to open http://demo.sharedname.org/n/about/pmid/16899496 in Protege and find it to be a valid OWL-DL ontology.
  • The ontology should give at least a type to URI it is about, and as much other information as would be useful. Keep in mind that the ontology documents how to use the name.
  • In the case where the URI being documented names a document such as a web page or a record in a specific format, the URI would redirect straight to the document. To discover the name of the metadata, you have to either know the rule (prepend /about/ to the purl path) or wait until we can add a link: header.
  • In the case where the URI being documented doesn't name a document, or where a two step process of finding the document is tolerable, the URI response is a 303 redirect to the metadata. Currently the response is html with a link rel=meta to the RDF metadata in the head of the html. That will change soon to a direct link to the RDF, with a stylesheet that converts that to HTML for browsing.

The Pubmed example

The PURLs we've set up are:

  • /n/asn/pmid/
    • http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&retmode=asn.1&id=
  • /n/medline/pmid/
    • http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&retmode=medline&id=
  • /n/html/pmid/
    • http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=full_report&list_uids=
  • /n/r/pmid/
    • http://sw.neurocommons.org/cgi-bin/wiki303.pl?show=html&ref=record/ncbi_gene/
  • /n/xml/pmid/
    • http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&retmode=xml&id=
  • /n/about/pmid/
    • http://sw.neurocommons.org/cgi-bin/wiki303.pl?ref=

The Metadata conveys the fact that there are records in specific formats that are encodings of this record: XML, ASN.1, HTML, Medline each of which have their own names (URIS) that are PURLS (see above list).