Closed vedina closed 9 years ago
I totally agree with this proposal. Just let me know when it is ready. If it returns the same structure, just without the dataEntry
property it'll be great.
The feature list per dataset exists since the definition of OpenTox API . It does not return structure, just feature list.
http://apps.ideaconsult.net:8080/data/dataset/1/feature
{
"feature": {
"http://apps.ideaconsult.net:8080/data/feature/1": {
"type": "Feature",
"title": "ALTNo1",
"units": "",
"isNominal": "false",
"isNumeric": "false",
"sameAs": "ALTNo1",
"isModelPredictionFeature": false,
"creator": "http://ec.europa.eu/consumers/cosmetics/cosing/",
"order": 1,
"source": {
"URI": "http://apps.ideaconsult.net:8080/data/dataset/cosmetic-ingredients-section1.xls",
"type": "Dataset"
},
"annotation": []
},
"http://apps.ideaconsult.net:8080/data/feature/2": {
"type": "Feature",
"title": "INN name",
"units": "",
"isNominal": "false",
"isNumeric": "false",
"sameAs": "http://www.opentox.org/api/1.1#ChemicalName",
"isModelPredictionFeature": false,
"creator": "http://ec.europa.eu/consumers/cosmetics/cosing/",
"order": 2,
"source": {
"URI": "http://apps.ideaconsult.net:8080/data/dataset/cosmetic-ingredients-section1.xls",
"type": "Dataset"
},
"annotation": []
},
"http://apps.ideaconsult.net:8080/data/feature/3": {
"type": "Feature",
"title": "ALTNo3",
"units": "",
"isNominal": "false",
"isNumeric": "false",
"sameAs": "ALTNo3",
"isModelPredictionFeature": false,
"creator": "http://ec.europa.eu/consumers/cosmetics/cosing/",
"order": 3,
"source": {
"URI": "http://apps.ideaconsult.net:8080/data/dataset/cosmetic-ingredients-section1.xls",
"type": "Dataset"
},
"annotation": []
}
}
}
The proposal is to be able to specify "http://apps.ideaconsult.net:8080/data/dataset/1/feature " optionally to jToxDataset component.
Documentation : https://github.com/ideaconsult/examples-ambit/blob/master/ambit-json-docs/feature.md
Ok, I am sorry. What I understood (and what is really needed) is a feature like this:
<baseUrl>/feature/list?dataset_uri=<dataset_uri>
So that, features for any dataset-like query could be retrieved - even if it is not just dataset retrieval query.
Otherwise, adding additional option to jToxCompound
for feature retrieval, instead of current (and automatic) page=0&size=1
query, is totally possible.
Let it be additional to the current and automatic (e.g. use the current approach if no option is specified).
If the option allows multiple URIs, will be great.
What is the idea of multiple URIs - to retrieve feature lists from all of them and merge afterwards?
Yes, similar to what OpenTox API supports
Ok, but multiple URIs will mean multiple queries in the beginning, just for the feature list, am I get it right?
Not necessary, it may be that one query returns multiple features , e.g. /dataset/1/feature returns multiple uri
Ok, but this is one feature URI. And my question was regarding you idea of having multiple feature URIs provided. By "feature URI" I mean - "feature retrieving URI".
How to use the featureURI parameter - it doesn't seem to work as below
<div class="jtox-toolkit" data-kit="compound"
data-configuration="config_dataset"
featureUri="http://localhost:8080/ambit2/bundle/12/property"
data-cross-domain="false"
data-show-export="yes"
data-on-details="onDetailedRow"
data-dataset-uri="http://localhost:8080/ambit2/bundle/12/matrix"
data-tabs-folded="true"
data-on-error="errorHandler"
data-jsonp="false">
</div>
nor as
<div class="jtox-toolkit" data-kit="compound"
data-featureUri="http://localhost:8080/ambit2/bundle/12/property"
Yes, it should be data-feature-uri
, this is the convention for all data-XXX
parameters - each dash is removed and next word - capitalized (after removing the initial data-
, of course).
Refer here: https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes
ok
Proposal to provide an explicit query for retrieve the dataset columns, instead of guessing from the first record. Not all datasets are supposed to have all features in the first record; and for some datasets the list of ffeatures is well knowm (/dataset/id have all feature list in /dataset/id/feature). Also could be faster.
For example here the data is very sparse and the first record has value for only one feature. But we can provide a query to retrieve all features.