SameAs service module

From WandoraWiki
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
SameAs service is part of Wandora's embedded server. It is basically an API that returns all subject identifiers of a given topic. The topic is regocnized with a single subject identifier URI. Thus, the service returns all subject URIs that reify the same topic as the given one. SameAs API's endpoint is
+
SameAs service is part of Wandora's embedded server. It is basically an API that returns all subject identifiers of a given topic. The topic is regocnized with a single subject identifier URI. Thus, the service returns all subject URIs that reify the same topic. SameAs API's endpoint is
  
 
  http://127.0.0.1:8898/sameas
 
  http://127.0.0.1:8898/sameas

Revision as of 19:48, 19 August 2014

SameAs service is part of Wandora's embedded server. It is basically an API that returns all subject identifiers of a given topic. The topic is regocnized with a single subject identifier URI. Thus, the service returns all subject URIs that reify the same topic. SameAs API's endpoint is

http://127.0.0.1:8898/sameas

The service accepts uri parameter. The parameter should contain subject identifier URI of addressed topic, for example

http://127.0.0.1:8898/sameas/?uri=http://www.wandora.org/core/wandoraclass

The response is a JSON data structure similar to

[
  {  
    "uri": "http:\/\/www.wandora.org\/core\/wandoraclass",
    "numDuplicates": "2",
    "duplicates": [
      "http:\/\/www.wandora.org\/core\/wandoraclass",
      "http:\/\/wandora.org\/si\/core\/wandora-class"
    ]
  }
]

where the uri value is requested subject identifier URI and duplicates an array of subject URI of addressed topic. Notice, the requested subject URI is enclosed in duplicates also. Value of numDuplicates contains the number of duplicates.

The response format is compatible with the JSON format of sameas.org. Thus, applications using the JSON endpoint of sameas.org should be compatible with Wandora's SameAs service. Specifically, Wandora's Subject expander can be used with the SameAs service too.

Personal tools