doi’s solved (at least for now)

Yesterday’s post discussed some difficulties with processing doi’s and reviewing the generated OWL file in Protege.  It looks like I’ve resolved the problem for now.  The trick is first to declare the doi prefix (mapping to “http://dx.doi.org/”) using the owl format for the ontology:

OWLOntologyFormat format = manager.getOntologyFormat(ontology);
format.asPrefixOWLOntologyFormat().setPrefix("doi", "http://dx.doi.org/");

followed by generating the IRIs for the publications using two-argument version of IRI.create(), specifying the prefix as the “http” string (not “doi”). 

Note that Protege displays URIs/IRIs without prefixes, which mean the doi’s will display (unless overridden) as, for example: 10.1636%2F0161-8202%282000%29028%5B0097%3AHDLHAB%5D2.0.CO%3B2

Not the prettiest, and I’ll probably override these with an rdfs:label once I decide on something (and probably generate it on the arachadmin side to be read from the database).

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s