Closed minottic closed 2 years ago
@nitrosx what do you think of the data model change? Do you know who is using that? I want to make sure it is not a disruptive change (as I renamed pid
to id
and added another pid
which is not anymore the join key)
@minottic I'm not sure who is already using techniques at the moment. I have not heard of anybody doing that.
What would be the worst case scenario?
Possible solutions:
I would go for 1, as this is fairly new. Then we could look into improving the pid management
thoughts?
@nitrosx ok. One easy solution could be not to rename pid
to id
and just add another field, let's say panetId
. In this way there will be no possible backward compatibility problem. I can do that today if you agree
@minottic I like this solution. Let's go with this one.
One last question: what is exactly the pid and panetid and their relation? From your code, it looks like that what you call panetid(currently pid) is the URL of the technique on the PaNET site. If that's the case, I wonder if we can keep pid as it is and rename the second term URL or something meaningful.
@nitrosx yes, I can call it panetURL, no problem! For example the field ID in the link will be the content of panetURL (or how we call it) https://bioportal.bioontology.org/ontologies/PANET/?p=classes&conceptid=http%3A%2F%2Fpurl.org%2Fpan-science%2FPaNET%2FPaNET01184&jump_to_nav=true
@minottic : so that is the technique ID that you assigned to this technique on PaNET, but it is in the shape of URL. If you use that URL, it will take you to the file containing the technique definition (https://expands-eu.github.io/ExPaNDS-experimental-techniques-ontology/index-en.html#http://purl.org/pan-science/PaNET/PaNET01184) which assign to this specific field the name IRI.
So it is both an ID and a URL. Pick which one you like the best: panetURL or panetID.
@nitrosx here is the change
@nitrosx I have update the documentation. Apparently I cannot merge. Thanks for the help!
No worries. I do it
This PR should enable the use and results of the pan-ontologies-api microservice (https://github.com/ExPaNDS-eu/pan-ontologies-api).
To make it work, I had to add an extra field in the techniques collection (I renamed the old pid to id and added again pid which now contains the value from PaNET). This was needed as the filter on the a property which has the flag
"id": true,
doesn't seem to work in Loopback on ahasAndBelongsToMany
relation, or at least I couldn't figure out how to make it work.