Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Implement ID/CURIE<->URI expansion and contraction #14

Open
cmungall opened this Issue Nov 22, 2016 · 5 comments

Comments

Projects
None yet
4 participants
Owner

cmungall commented Nov 22, 2016

We want to be able to expand and contract URIs using either a simple yaml curie map or a JSON-LD file. The latter provides certain advantages such as being a standard, and also allow recursive application of rules.

Doing this using a yaml map should be very easy. However, we end up implementing this code multiple times, it might be worth abstracting this into a separate java library. This could live in the org.prefixcommons space. Having a common library might be useful in other ways - e.g. centralization of validation etc.

These are some places where this is already implemented:

Member

balhoff commented Nov 28, 2016

@cmungall anything missing from the interface specified here?

https://github.com/phenopackets/phenopacket-reference-implementation/blob/master/src/main/java/org/phenopackets/api/util/ContextUtil.java

One thing I see is maybe passing a collection of identifiers to expand all at once, getting back a Map with the results.

Any thoughts on the type vs. value nuances for expansion? (e.g. monarch-initiative/owlsim-v3#24 (comment)) Enforcing that distinction is where my code deviates somewhat from ROBOT.

I think it would be easy to add a function for creating a JSON-LD context from a simple YAML prefix map.

Owner

cmungall commented Nov 28, 2016

For the general purpose module @jguyenx is writing we'd want to avoid all the JSON-LD edge cases and have a straightforward transform that is independent of where we are in the document.

I think your code is a good starting point, we may be able to reuse it directly

jnguyenx commented Dec 6, 2016

Here's my first draft:
https://github.com/prefixcommons/curie-util

Let me know what you think.

@dougli1sqrd dougli1sqrd was assigned by cmungall May 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment