webservicesdetails
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| webservicesdetails [2019/11/21 17:59] – créée sni | webservicesdetails [2019/11/22 16:03] (Version actuelle) – [7. Service : getSimilarityMapForRemainingItem] sylvain | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ====== | + | ====== |
| - | ====== Webservice function : ====== | + | ===== Webservice function : ===== |
| The Mkey+ webservice provides 7 functions. These functions can be queried using | The Mkey+ webservice provides 7 functions. These functions can be queried using | ||
| HTTP requests. They can be reached using URLs created with the webservice | HTTP requests. They can be reached using URLs created with the webservice | ||
| Ligne 12: | Ligne 12: | ||
| 4. / | 4. / | ||
| 5. / | 5. / | ||
| - | (BETA)<br /> | + | (BETA) |
| 6. / | 6. / | ||
| 7. / | 7. / | ||
| - | For instance, the URL to call the first function is: | + | For instance, the URL to call the first function is : http:// |
| - | http:// | + | |
| - | These functions return Json objects, and each element returned has a specific | + | These functions return Json objects, and each element returned has a specific name (see Development API). |
| - | name (see Development API). | + | |
| Ligne 31: | Ligne 29: | ||
| The webservice listen to GET query methods and the dataType must be Jsonp. | The webservice listen to GET query methods and the dataType must be Jsonp. | ||
| - | Here is an example of a JQuery javascript code snippet that calls one of MKey+ | + | Here is an example of a JQuery javascript code snippet that calls one of MKey+ function: |
| - | function: | + | < |
| - | < | + | var sddFileURL = http:// |
| + | $.ajax({ | ||
| + | url : webserviceURL + '/ | ||
| + | data : { | ||
| + | sddURL : sddFileURL, | ||
| + | withGlobalWeigth : true | ||
| + | }, | ||
| + | method : ' | ||
| + | dataType : ' | ||
| + | |||
| + | }).done(function(data) { | ||
| + | … response management … | ||
| + | } | ||
| + | </ | ||
| * using the standard javascript function JSON.stringify() | * using the standard javascript function JSON.stringify() | ||
| Ligne 41: | Ligne 52: | ||
| **Item:** This object represents an item which can be described in a knowledge base. | **Item:** This object represents an item which can be described in a knowledge base. | ||
| For taxonomists, | For taxonomists, | ||
| - | < | + | < |
| + | name : String, an item's name | ||
| + | alternativeName : String, an item's alternative name | ||
| + | detail : String, an item's detailed description | ||
| + | resourceIds : [long], the IDs of the resources associated to an item | ||
| + | id : long, an item's id, unique identifier generated sequentially by Mkey+ | ||
| + | } </ | ||
| **Descriptor: | **Descriptor: | ||
| Ligne 47: | Ligne 64: | ||
| categorical Descriptor), | categorical Descriptor), | ||
| Descriptor). | Descriptor). | ||
| - | < | + | < |
| + | name : String, a Descriptor' | ||
| + | detail : String, a Descriptor' | ||
| + | resourceIds : [long], the IDs of the resources associated to a Descriptor | ||
| + | stateIds : [long], the IDs of the states associated to a Descriptor | ||
| + | inapplicableState = [long], the states of a parent Descriptor | ||
| + | for which a Descriptor is inapplicable | ||
| + | isCategoricalType = Boolean, true if the Descriptor is a categorical | ||
| + | Descriptor, | ||
| + | isQuantitativeType = Boolean, true if the Descriptor is a quantitative | ||
| + | Descriptor, | ||
| + | isCalculatedType = Boolean, true if the Descriptor is a calculated | ||
| + | Descriptor, | ||
| + | id : long, this Descriptor' | ||
| + | by Mkey+ | ||
| + | }</ | ||
| **State**: this object is a component of categorical Descriptors, | **State**: this object is a component of categorical Descriptors, | ||
| Descriptor named "Color of the eye", its States could be " | Descriptor named "Color of the eye", its States could be " | ||
| - | < | + | < |
| + | name : String, a state' | ||
| + | detail : String, a state' | ||
| + | resourceIds : [long], the IDs of the resources associated to a state | ||
| + | id : long, a state' | ||
| + | }</ | ||
| **Resource**: | **Resource**: | ||
| which can be associated to several objects, such as Items, Descriptors, | which can be associated to several objects, such as Items, Descriptors, | ||
| etc... | etc... | ||
| - | < | + | < |
| + | name : String, a resource' | ||
| + | author : String, a resource' | ||
| + | type : String, a resource' | ||
| + | url : String, a resource' | ||
| + | legend : String, a resource' | ||
| + | keywords : String, a resource' | ||
| + | id : long, a resource' | ||
| + | Mkey+ | ||
| + | }</ | ||
| **DescriptionElement**: | **DescriptionElement**: | ||
| Ligne 63: | Ligne 109: | ||
| is a categorical Descriptor, or a QuantitativeMeasure object, if the Descriptor | is a categorical Descriptor, or a QuantitativeMeasure object, if the Descriptor | ||
| is a quantitative Descriptor. | is a quantitative Descriptor. | ||
| - | < | + | < |
| + | calculatedStates : [state], the calculated states representing an item's | ||
| + | | ||
| + | contextualWeight : int, the weigth of this description element | ||
| + | quantitativeMeasure : quantitativeMeasure, | ||
| + | -prensenting an item description | ||
| + | states : [state], the states representing an item's description | ||
| + | unknown : boolean, true if this description element is unkwnow | ||
| + | }</ | ||
| **QuantitativeMeasure**: | **QuantitativeMeasure**: | ||
| for a given quantitative Descriptor and Item, it contains the quantitative | for a given quantitative Descriptor and Item, it contains the quantitative | ||
| measures used to describe a specific Item for a given quantitative Descriptor. | measures used to describe a specific Item for a given quantitative Descriptor. | ||
| - | < | + | < |
| + | min : long, this QuantitativeMeasure' | ||
| + | max : long, this QuantitativeMeasure' | ||
| + | mean : long, this QuantitativeMeasure' | ||
| + | }</ | ||
| ===== 1. Service : getDescriptiveData ===== | ===== 1. Service : getDescriptiveData ===== | ||
| Ligne 78: | Ligne 136: | ||
| **parameter** (in the javascript before stringify): | **parameter** (in the javascript before stringify): | ||
| - | < | + | < |
| + | * withGlobalWeigth = Boolean | ||
| + | </ | ||
| **returns** : | **returns** : | ||
| - | < | + | < |
| + | -ancyTable, | ||
| - | * Items = [[item]], every item contained in the SDD | + | * Items = [item], every item contained in the SDD |
| - | * Descriptors = [[Descriptor]], every Descriptor contained in the SDD | + | * Descriptors = [Descriptor], |
| - | * States = [[state]], every states contained in the SDD | + | * States = [state], every states contained in the SDD |
| - | * Resources = [[resource]], every resources contained in the SDD | + | * Resources = [resource], every resources contained in the SDD |
| * descriptorsScoreMap = {Descriptor, | * descriptorsScoreMap = {Descriptor, | ||
| to each Descriptor its discriminant power. | to each Descriptor its discriminant power. | ||
| - | * DescriptorRootId = [[int]], ids of the node roots ( no dependency) | + | * DescriptorRootId = [int], ids of the node roots ( no dependency) |
| - | * InvertedDependencyTable = {long, | + | * InvertedDependencyTable = {long, |
| - | -tor which parent is the second long. | + | |
| ===== 2. Service : getJSONRemainingItemsAndRemainingDescriptorsScoreUsingIds ===== | ===== 2. Service : getJSONRemainingItemsAndRemainingDescriptorsScoreUsingIds ===== | ||
| Ligne 105: | Ligne 165: | ||
| **parameter** (in the javascript before stringify): | **parameter** (in the javascript before stringify): | ||
| - | < | + | |
| + | < | ||
| + | description = { | ||
| + | selectedStatesNames : [int] | ||
| + | quantitativeMeasure : {min=int, | ||
| + | } | ||
| + | remainingItemsID = [int] | ||
| + | discardedDescriptorsID = [int] | ||
| + | withScoreMap = boolean | ||
| + | withGlobalWeigth = boolean | ||
| + | </ | ||
| **returns** : | **returns** : | ||
| - | < | + | < |
| * remainingItems = [[item]], array of remaining items | * remainingItems = [[item]], array of remaining items | ||
| - | * discardedDescriptorsInIteration = [[Descriptor]], | + | * discardedDescriptorsInIteration = [[Descriptor]], |
| - | child descriptor can be discarded with its parents. | + | * descriptorsScoreMap = {Descriptor, |
| - | * descriptorsScoreMap = {Descriptor, | + | |
| - | to each Descriptor its discriminant power. | + | |
| Ligne 128: | Ligne 197: | ||
| **returns** : | **returns** : | ||
| - | < | + | < |
| - | * description = [[descriptionElement]], array of description elements describing | + | * description = [descriptionElement], |
| - | this item. | + | * innapDescriptorId = [int], array of inapplicable descriptor IDs |
| - | * innapDescriptorId = [[int]], array of inapplicable descriptor IDs | + | |
| Ligne 144: | Ligne 212: | ||
| **returns** : | **returns** : | ||
| - | | + | < |
| ===== 5. Service : changeDescriptionHistory ===== | ===== 5. Service : changeDescriptionHistory ===== | ||
| Ligne 153: | Ligne 221: | ||
| **parameter** (in the javascript before stringify): | **parameter** (in the javascript before stringify): | ||
| * SDDurl : String | * SDDurl : String | ||
| - | * descriptions : [[{ | + | * descriptions : [{selectedStatesNames : [int], quantitativeMeasure : {min=int, |
| - | | selectedStatesNames : [int]], | + | |
| - | | + | |
| - | }] | + | |
| **returns** : | **returns** : | ||
| - | < | + | < |
| * remainingItems = [[item]], array of remaining items | * remainingItems = [[item]], array of remaining items | ||
| - | * discardedDescriptorsInIteration = [[Descriptor]], | + | * discardedDescriptorsInIteration = [[Descriptor]], |
| - | child descriptor can be discarded with its parents. | + | * descriptorsScoreMap = {Descriptor, |
| - | * descriptorsScoreMap = {Descriptor, | + | * descriptions = [{selectedStatesNames: |
| - | to each Descriptor its discriminant power. | + | |
| - | * descriptions = [[{selectedStatesNames|: [int]], | + | |
| - | quantitativeMeasure : {min=int, | + | |
| - | }], the new description computed by the function. | + | |
| ===== 6. Service : getSimilarityMap ===== | ===== 6. Service : getSimilarityMap ===== | ||
| Ligne 175: | Ligne 236: | ||
| which have few difference with the descriptions given in parameter will have a | which have few difference with the descriptions given in parameter will have a | ||
| high score. | high score. | ||
| - | ** | + | |
| - | path :** / | + | **path :** / |
| **returns** : {similarityMap} | **returns** : {similarityMap} | ||
| - | * similarityMap = [[int,float]], int is the item ID and float the corresponding similarity score. | + | * similarityMap = [int, |
| ===== 7. Service : getSimilarityMapForRemainingItem ===== | ===== 7. Service : getSimilarityMapForRemainingItem ===== | ||
| Ligne 188: | Ligne 249: | ||
| tions given in parameter will have a high score. | tions given in parameter will have a high score. | ||
| - | / | + | **path :** / |
| - | **returns** : | + | **returns** : {similarityMap} |
| - | {similarityMap} | + | |
| - | * similarityMap = [[int,float]], int is the item ID and float the corresponding similarity score. | + | * similarityMap = [int, |
webservicesdetails.1574355544.txt.gz · Dernière modification : 2019/11/21 17:59 de sni