Outils pour utilisateurs

Outils du site


webservicesdetails

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
webservicesdetails [2019/11/21 17:59] – créée sniwebservicesdetails [2019/11/22 16:03] (Version actuelle) – [7. Service : getSimilarityMapForRemainingItem] sylvain
Ligne 1: Ligne 1:
-====== WebServicesDetails ======+====== MKey WebServices Details ======
  
-====== 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. /identification/removeSDD    4. /identification/removeSDD
    5. /identification/changeDescriptionHistory    5. /identification/changeDescriptionHistory
-(BETA)<br />+(BETA)
    6. /identification/getSimilarityMap    6. /identification/getSimilarityMap
    7. /identification/getSimilarityMapForRemainingItem    7. /identification/getSimilarityMapForRemainingItem
   
-For instance, the URL to call the first function is:  +For instance, the URL to call the first function is : http://mkey.services.identificationkey.fr/identification/getDescriptiveData
-http://mkey.services.identificationkey.fr/identification/getDescriptiveData+
  
-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:  +<code>var webserviceURL = http://mkey.services.identificationkey.fr 
-<code>0@@</code>+  var sddFileURL = http://yourServer.com/yourSddFile.xml 
 +  $.ajax({ 
 +   url : webserviceURL + '/identification/getDescriptiveData', 
 +   data : { 
 +       sddURL : sddFileURL, 
 +       withGlobalWeigth : true 
 + }, 
 + method : 'GET', 
 + dataType : 'jsonp' 
 + 
 +  }).done(function(data) { 
 +  … response management … 
 +  } 
 +</code>
  
   * 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, it usually is a taxon. For taxonomists, it usually is a taxon.
-<code>1@@</code>+<code>
 + 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+ 
 +</code>
  
 **Descriptor:** This object is a tool that serves to describe Items, essentialy a  **Descriptor:** This object is a tool that serves to describe Items, essentialy a 
Ligne 47: Ligne 64:
 categorical Descriptor), or a Quantitative Measure (If it is a quantitative categorical Descriptor), or a Quantitative Measure (If it is a quantitative
 Descriptor). Descriptor).
-<code>2@@</code>+<code>
 + name : String, a Descriptor's name 
 + detail : String, a Descriptor's detailed description 
 + 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, false otherwise 
 + isQuantitativeType = Boolean, true if the Descriptor is a quantitative 
 + Descriptor, false otherwise 
 + isCalculatedType = Boolean, true if the Descriptor is a calculated 
 + Descriptor, false otherwise 
 + id : long, this Descriptor's id, an unique identifier generated sequentially  
 + by Mkey+ 
 +}</code>
  
 **State**: this object is a component of categorical Descriptors, e.g. for a  **State**: this object is a component of categorical Descriptors, e.g. for a 
 Descriptor named "Color of the eye", its States could be "Blue", "Black", etc... Descriptor named "Color of the eye", its States could be "Blue", "Black", etc...
-<code>3@@</code>+<code>
 + name : String, a state's name 
 + detail : String, a state's detailed description 
 + resourceIds : [long], the IDs of the resources associated to a state 
 + id : long, a state's id, an unique identifier generated sequentially by Mkey+ 
 +}</code>
  
 **Resource**: this object is a storage object, and is used to store media resources, **Resource**: this object is a storage object, and is used to store media resources,
 which can be associated to several objects, such as Items, Descriptors, States,  which can be associated to several objects, such as Items, Descriptors, States, 
 etc... etc...
-<code>4@@</code>+<code>
 + name : String, a resource's name 
 + author : String, a resource's author 
 + type : String, a resource's media type ("video","image","sound"
 + url : String, a resource's url 
 + legend : String, a resource's legend 
 + keywords : String, a resource's keywords 
 + id : long, a resource's id, an unique identifier generated sequentially by  
 + Mkey+ 
 +}</code>
  
 **DescriptionElement**: This object stores the description of an Item, according to  **DescriptionElement**: This object stores the description of an Item, according to 
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.
-<code>5@@</code>+<code>
 + calculatedStates : [state], the calculated states representing an item's  
 +    description 
 + contextualWeight : int, the weigth of this description element 
 + quantitativeMeasure : quantitativeMeasure, the quantitative measure re- 
 +                              -prensenting an item description 
 + states : [state], the states representing an item's description 
 + unknown : boolean, true if this description element is unkwnow 
 +}</code>
  
 **QuantitativeMeasure**: This object is associated to a DescriptionElement object, **QuantitativeMeasure**: This object is associated to a DescriptionElement object,
 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.
-<code>6@@</code>+<code>
 + min : long, this QuantitativeMeasure's minimum value 
 + max : long, this QuantitativeMeasure's maximum 
 + mean : long, this QuantitativeMeasure's mean 
 +}</code>
  
 ===== 1. Service : getDescriptiveData ===== ===== 1. Service : getDescriptiveData =====
Ligne 78: Ligne 136:
  
 **parameter** (in the javascript before stringify): **parameter** (in the javascript before stringify):
-<code>7@@</code>+<code>* SDDurl = String 
 +* withGlobalWeigth = Boolean 
 +</code>
  
 **returns** : **returns** :
-<code>8@@</code>+<code>{descriptorsScoreMap,Items,Descriptors,States,Resources,DescriptorRootId,Depend- 
 +-ancyTable,InverteddependencyTable}</code>
  
  
-  * 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], every Descriptor contained in the SDD 
-  * 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,float}, an associative map, which associates   * descriptorsScoreMap = {Descriptor,float}, an associative map, which associates
  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,long}, the first long is the ID of the descrip- +  * InvertedDependencyTable = {long,long}, the first long is the ID of the descriptor which parent is the second 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):
-<code>9@@</code>+ 
 +<code>SDDurl = String 
 +description = { 
 + selectedStatesNames : [int] 
 + quantitativeMeasure : {min=int,max=int,mean=int}  
 +
 +remainingItemsID = [int] 
 +discardedDescriptorsID = [int] 
 +withScoreMap = boolean 
 +withGlobalWeigth = boolean 
 +</code>
  
 **returns** : **returns** :
-<code>10@@</code>+<code>{discardedDescriptorsInIteration,remainingItems,descriptorScoreMap}</code> 
   * remainingItems = [[item]], array of remaining items   * remainingItems = [[item]], array of remaining items
-  * discardedDescriptorsInIteration = [[Descriptor]], array of discarded descriptor,  +  * discardedDescriptorsInIteration = [[Descriptor]], array of discarded descriptor, child descriptor can be discarded with its parents. 
- child descriptor can be discarded with its parents. +  * descriptorsScoreMap = {Descriptor,float}, an associative map, which associates to each Descriptor its discriminant power.
-  * descriptorsScoreMap = {Descriptor,float}, an associative map, which associates +
- to each Descriptor its discriminant power.+
  
  
Ligne 128: Ligne 197:
  
 **returns** : **returns** :
-<code>11@@</code>+<code>{description,innapDescriptorId}</code>
  
-  * description = [[descriptionElement]], array of description elements describing +  * description = [descriptionElement], array of description elements describing this item. 
- this item. +  * innapDescriptorId = [int], array of inapplicable descriptor IDs
-  * innapDescriptorId = [[int]], array of inapplicable descriptor IDs+
  
  
Ligne 144: Ligne 212:
  
 **returns** : **returns** :
-  nothing+<code>nothing</code>
  
 ===== 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,max=int,mean=int}}]
- |   selectedStatesNames : [int]], +
-     quantitativeMeasure : {min=int,max=int,mean=int}  +
-          }]+
  
 **returns** : **returns** :
-<code>12@@</code>+<code>{discardedDescriptors,remainingItems,descriptorScoreMap,descriptions}</code>
  
   * remainingItems = [[item]], array of remaining items   * remainingItems = [[item]], array of remaining items
-  * discardedDescriptorsInIteration = [[Descriptor]], array of discarded descriptor,  +  * discardedDescriptorsInIteration = [[Descriptor]], array of discarded descriptor, child descriptor can be discarded with its parents. 
- child descriptor can be discarded with its parents. +  * descriptorsScoreMap = {Descriptor,float}, an associative map, which associates to each Descriptor its discriminant power. 
-  * descriptorsScoreMap = {Descriptor,float}, an associative map, which associates +  * descriptions = [{selectedStatesNames: [int],quantitativeMeasure : {min=int,max=int,mean=int}}], the new description computed by the function.
- to each Descriptor its discriminant power. +
-  * descriptions = [[{selectedStatesNames|: [int]], +
-    quantitativeMeasure : {min=int,max=int,mean=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 :** /identification/getSimilarityMap+**path :** /identification/getSimilarityMap
  
 **returns** : {similarityMap} **returns** : {similarityMap}
  
-  * similarityMap = [[int,float]], int is the item ID and float the corresponding similarity score.+  * similarityMap = [int,float], int is the item ID and float the corresponding similarity score.
  
 ===== 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.
  
-/identification/getSimilarityMapForRemainingItem+**path :** /identification/getSimilarityMapForRemainingItem
  
-**returns** : +**returns** : {similarityMap}
-{similarityMap}+
  
-  * similarityMap = [[int,float]], int is the item ID and float the corresponding similarity score.+  * similarityMap = [int,float], int is the item ID and float the corresponding similarity score.
webservicesdetails.1574355544.txt.gz · Dernière modification : 2019/11/21 17:59 de sni

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki