The service consists of a series of URI based API calls formatted by appending the call name and associated parameters to the main service URL. The returned data is a JSON structured string. The data model used for the returned data is shown in the following diagram:
At the bottom of the page is an API tester which allows you to experiment with some of these calls.
Call: <url>/?call=skos.suggest&pattern=moon&maxRows=100
Response is a JSON encoded array of NodeMatch, with an array of LiteralMatch as the nodeLinks attribute. As the match is performed against SKOS preferred and alternate labels, the type of returned nodes can be assumed to be SKOS Concepts, even if not made explicit in the nodeLinks. The response data is sorted in descending order of NodeMatch score, which is (currently) the average of LiteralMatch values for the node. Note the response does not contain full data for each node - just the labels with a non-zero match score.
[
{
"nodeID":"http://dewey.info/concept/en/edn/E22/22013353",
"score":1.0,
"nodeLinks": [
{"score":1.0,"literalValue":"Planets, sun, moon","linkType":"http://www.w3.org/2004/02/skos/core#prefLabel"}
]
},
{
"nodeID":"http://dewey.info/concept/en/edn/E22/2201335304",
"score":1.0,
"nodeLinks": [
{"score":1.0,"literalValue":"Special topics of planets, sun, moon","linkType":"http://www.w3.org/2004/02/skos/core#prefLabel"}
]
},
{
"nodeID":"http://dewey.info/concept/en/edn/E22/220133532",
"score":1.0,
"nodeLinks": [
{"score":1.0,"literalValue":"Moon","linkType":"http://www.w3.org/2004/02/skos/core#prefLabel"},
{"score":1.0,"literalValue":"Moon - astrology","linkType":"http://www.w3.org/2004/02/skos/core#altLabel"}
]
}
]
Call: <url>/?call=skos.suggest2&pattern1=moon&pattern2=lunar&20exploration
Response is a JSON encoded array of NodeMatch, same format as for the original call to skos.suggest
Call: <url>/?call=base.getnode&nodeID=http://dewey.info/concept/en/edn/E22/2201335304
The response is a JSON encoded Node structure (in this example a SKOS Concept, but could be any type):
{
"nodeID":"http://dewey.info/concept/en/edn/E22/2201335304",
"nodeLinks":[
{"linkTo":"http://www.w3.org/2004/02/skos/core#Concept", "linkType":"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"},
{"linkTo":"http://dewey.info/scheme/en/edn/E22","linkType":"http://www.w3.org/2004/02/skos/core#inScheme"},
{"literalValue":"Special topics of planets, sun, moon","linkType":"http://www.w3.org/2004/02/skos/core#prefLabel"},
{"literalValue":"1996-06-01T00:00:00.0-05:00","linkType":"http://purl.org/dc/terms/created"},
{"literalValue":"OCoLC-D","linkType":"http://purl.org/dc/terms/creator"},
{"literalValue":"1996-06-01T00:00:00.0-05:00","linkType":"http://purl.org/dc/terms/modified"},
{"linkTo":"http://dewey.info/concept/en/edn/E22/22013353042","linkType":"http://www.w3.org/2004/02/skos/core#narrower"},
{"linkTo":"http://dewey.info/concept/en/edn/E22/22013353044","linkType":"http://www.w3.org/2004/02/skos/core#narrower"},
{"linkTo":"http://dewey.info/concept/en/edn/E22/22013353","linkType":"http://www.w3.org/2004/02/skos/core#broader"}
]
}
Call: <url>/?call=base.getnodes&nodeIDS=http%3A//dewey.info/concept/en/edn/E22/2205514653,http%3A//dewey.info/concept/en/edn/E22/220551
The response is a JSON encoded array of Node (in this example SKOS Concepts, but could be any types):
[
{
"nodeID":"http://dewey.info/concept/en/edn/E22/2205514653",
"nodeLinks":[
{"linkTo":"http://www.w3.org/2004/02/skos/core#Concept","linkType":"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"},
...
{"literalValue":"Water temperatures - oceanography","linkType":"http://www.w3.org/2004/02/skos/core#altLabel"}
]
},
{
"nodeID":"http://dewey.info/concept/en/edn/E22/220551",
"nodeLinks":[
{"linkTo":"http://www.w3.org/2004/02/skos/core#Concept","linkType":"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"},
...
{"literalValue":"International Geophysical Year, 1957-1958","linkType":"http://www.w3.org/2004/02/skos/core#altLabel"}
]
}
]
The following example will make a call to skos.suggest with the entered term (initially 'moon') as the pattern parameter, and maxRows parameter preset to 100. The returned data is already sorted in descending order by overall score, and is parsed into a table for display. Note - multiple matches may occur within preferred and alternate labels.
Below are some examples using the various query operators. Copy and paste into the textbox to use. Alternatively enter your own query directly into the text box and click 'suggest':
Specifying a value for 'AOI' restricts suggestions to terms within specified subject areas. In the ID, the DDC Summary identifier is the 4th to 6th character of the numeric suffix e.g. http://dewey.info/concept/en/edn/E22/22052332. So e.g. Searching on moon, AOI 523 is Science > Astronomy > Specific celestial bodies & phenomena - therefore excluding suggestions about Astrology, Author names etc. See DDC Summaries for more details). This facilitates the implementation of some personalisation for suggestions.
Find: AOI:Clicking on any result link will make a call to base.getnode to show a detailed breakdown of the available information for the node. Clicking on a link within these node details will make a further call to base.getnode
Experimental alternative call to skos.suggest2. The returned data is again sorted in descending order by overall score.
Pattern1: