linikujp / owltools

Automatically exported from code.google.com/p/owltools
0 stars 0 forks source link

Change IRI -> shortform convention in MolecularModelJsonRenderer #89

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
MolecularModelJsonRenderer has:

{{{
    // TODO - fix for individuals
    private String getId(OWLNamedObject i) {
        return graph.getIdentifier(i).replaceAll(":", "_");
    }
}}}

This is a bit of an unholy mix of the graph objects IRI -> ID mapping plus an 
ad-hoc replacement.

The translation should make use of:

http://geneontology.org/contexts/core.jsonld

And where multiple shortenings are possible, an explicit prefix should be 
preferred over @base.

In practical terms, this means:

 * GO class URLs are shortened to normal OBO-style IDs, e.g. GO:nnnnnnn
 * All other class URLs are encoded likewise
 * The model IRIs and individual IRIs are shortened to a standard <db>:<prefix> type ID, e.g. gomodel:XYZ-nnn-nnn-nnn

Original issue reported on code.google.com by cmung...@gmail.com on 22 Jan 2014 at 12:08