Research Article

Seamless Integration of RESTful Services into the Web of Data

Listing 1

An exemplary JSON representation and its corresponding SEREDASj description.
        Instance  Data
     http://example.com/event/e48909
{
 "id": "e48909",
 "name": "Dick Clark's New Year's Rockin' Eve",
 "startdate": "2011-12-31",
 "enddate": "2012-01-01",
 "performers": [
  { "id": "p84098", "name": "Lady Gaga",
    "birthdate": "1986-03-28" }
 ]
}
       SEREDASj Description
     http://example.com/models/event.json
{
 "meta": {
  "prefixes": {
   "owl": "http://www.w3.org/2002/07/owl#",
   "so": "http://schema.org/",
   "ex": "http://example.com/onto#",
   "iana": "http://www.iana.org/link-relations/"
  },
  "links": {
   "/person/ { id } ": {
    "mediaType": "application/json",
    "seredasjDescription": "person.json",
    "semantics": {
     "owl:sameAs": "<#properties/performers>"
    },
    "variables": {
     "id": {
      "binding": "#properties/performers/id",
      "model": "[ex:id]"
     }
    },
    "requestDescription": "person-createupdate.json"
   },
   "/events/search { ?query } ": {
    "mediaType": "application/json",
    "seredasjDescription": "eventlist.json",
    "semantics": {
     "[iana:relation]": "[iana:search]" } ,
    "variables": {
     "query": { "model": "[so:name]" }
    }
   }
  }
 },
 "type": "object",
 "model": "[so:Event]",
 "properties": {
  "id": {
   "type": "string", "model": "[ex:id]" } ,
  "name": {
   "type": "string", "model": "[so:name]" } ,
  "startdate": {
   "type": "string", "model": "[so:startDate]" } ,
  "enddate": {
   "type": "string", "model": "[so:endDate]" } ,
  "performers": {
   "type": "array",
   "model": "[so:performers]",
   "items": {
    "type": "object", "model": "[so:Person]",
    "properties": {
     "id": {
      "type": "string", "model": "[ex:id]" } ,
     "name": {
      "type": "string", "model": "[so:name]" } ,
     "birthdate": {
      "type": "string", "model": "[so:birthDate]" }
    }
   }
  }
 }
}