rapidly integrating services into the linked data cloud · overview 12 service integrator linked...
TRANSCRIPT
![Page 1: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/1.jpg)
Information Sciences Institute
Rapidly Integrating Services into the Linked Data Cloud
Mohsen Taheriyan, Craig Knoblock, Pedro Szekely, Jose Luis Ambite
11th International Semantic Web Conference (ISWC 2012) Boston, USA
![Page 2: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/2.jpg)
2
dbpedia.org
![Page 3: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/3.jpg)
Current temperature 73°F Wind 10 mph SW Humidity 51% Dew Point 54°
Live weather
dbpedia.org Not in
3
![Page 4: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/4.jpg)
Current temperature 73°F Wind 10 mph SW Humidity 51% Dew Point 54°
Events Transparent Cities 5/1/2012 REDCAT Theater Saving Our Sons : A Community Conversatio… …
Events
4
dbpedia.org Not in
![Page 5: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/5.jpg)
Current temperature 73°F Wind 10 mph SW Humidity 51% Dew Point 54°
Events Transparent Cities 5/1/2012 REDCAT Theater Saving Our Sons : A Community Conversatio… …
Twitter Feed Los Angeles becomes the largest U.S. city to ban.. Plastic grocery bags will now be banned in … …
Live Twi/er Feed
5
dbpedia.org Not in
![Page 6: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/6.jpg)
Current temperature 73°F Wind 10 mph SW Humidity 51% Dew Point 54°
Events Transparent Cities 5/1/2012 REDCAT Theater Saving Our Sons : A Community Conversatio… …
Twitter Feed Los Angeles becomes the largest U.S. city to ban.. Plastic grocery bags will now be banned in … …
The information is available in Web APIs
6
![Page 7: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/7.jpg)
Web APIs
7
API Protocols, 02/10/2012
API Data Formats, 03/08/2011
API G
row
th, 08/23/2012
7000 APIs: growth all times versus last year
2011 2012
XML JSON
65 RDF (Oct 2012)
![Page 8: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/8.jpg)
The Problem
JSON/XML
RDF RDF
API Invocation
8
![Page 9: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/9.jpg)
neighbourhood?
Motivation Example
9
Invocation Example
XML Response
Most of the Web APIs do not consume or produce linked data (RDF)
For most of the Web APIs, only a textual description is available
Lowering
Lifting
<http://sws.geonames.org/5145067/> a gn:Feature ; wgs84:lat "40.78343" ; wgs84:long "-73.96625" .
RDF Inp
ut
<http://sws.geonames.org/5145067/> gn:neighbour [
a gn:Feature ; gn:name "Woodside"; gn:nearby [ a gn:Feature ; gn:name “…-Queens"; gn:parentCountry [ …
Linked
RDF
![Page 10: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/10.jpg)
Outline
• Rapidly Integrating APIs with the LD – Building API Semantic Model – Representing API Descriptions – Building Linked APIs
• Evaluation • Related Work • Conclusion & Future Work
![Page 11: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/11.jpg)
Outline
• Rapidly Integrating APIs with the LD – Building API Semantic Model – Representing API Descriptions – Building Linked APIs
• Evaluation • Related Work
• Conclusion & Future Work
![Page 12: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/12.jpg)
Overview
12
ServiceIntegrator
LinkedDataUser
Karma ModelingServicesSourcesWeb API
Modeler
Linked APIRepository
lowering
lifting
Karma Web Server RDF
JSONXML
Web APIs
REST Services
SPARQL
examples
![Page 13: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/13.jpg)
The Semantic Model
13
http://api.geonames.org/neighbourhood? lat=40.78343&lng=-73.96625&username=demo
wgs84 geonames
SubClass Data Property Object Property
gn:neighbour
<geonames>
<neighbourhood>
<name>Central Park</name>
<city>New York City-Manhattan</city>
<countryCode>US</countryCode>
<countryName>United States</countryName>
</neighbourhood>
</geonames>
SpatialThing
parentCountry
lat
Feature neighbour
alt
long
nearby fcode
parentFeature
countryCode name
Feature
wgs84:lat wgs84:long
Feature gn:name
Feature
gn:nearby gn:name
Feature
gn:parentCountry gn:name
gn:countryCode
![Page 14: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/14.jpg)
The Semantic Model
14
http://api.geonames.org/neighbourhood? lat=40.78343&lng=-73.96625&username=demo
wgs84 geonames
SubClass Data Property Object Property
gn:neighbour
<geonames>
<neighbourhood>
<name>Central Park</name>
<city>New York City-Manhattan</city>
<countryCode>US</countryCode>
<countryName>United States</countryName>
</neighbourhood>
</geonames>
SpatialThing
parentCountry
lat
Feature neighbour
alt
long
nearby fcode
parentFeature
countryCode name
Feature
wgs84:lat wgs84:long
Feature gn:name
Feature
gn:nearby gn:name
Feature
gn:parentCountry gn:name
gn:countryCode
v1
v2
v3
v4
![Page 15: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/15.jpg)
Semi-Automatically Modeling APIs
Karma Modeling
Invoking APIs
Annotating Attributes
Extracting Relationships
15
Examples of API Request
URLs
API Semantic
Model
Domain Ontology
Previous Work on Modeling
Static Sources
![Page 16: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/16.jpg)
Invoking APIs
16
Examples of API Invocation URLs
Input Attributes Output Attributes
• User provides examples of the API request URLs • Karma extracts the input values from the sample request URLs • Karma invokes the API and extracts the output attributes from the
API response (XML/JSON)
![Page 17: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/17.jpg)
• A CRF-based model to assign a Semantic Type to each column from its data
• Semantic Type – Ontology Class – Data Property + Domain
Annotating Inputs and Outputs [Goel, Knoblock, Lerman, 2012]
17
wgs84 geonames
SubClass Data Property Object Property
SpatialThing
parentCountry
lat
Feature
neighbour
alt long
name
nearby
fcode
parentFeature
countryCode (wgs84:lat, gn:Feature)
(wgs84:long, gn:Feature)
(gn:countryCode, gn:Feature)
(gn:name, gn:Feature)
![Page 18: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/18.jpg)
Extracting Relationships [Knoblock et al., ESWC 2012]
wgs84:lat
wgs84:long
gn:countryCode Feature
gn:name
Feature gn:name
Feature gn:name
Feature
neighbour nearby
parentCountry parentFeature
SpatialThing
• Construct a graph from semantic types and ontology graph
• Select minimal tree that connects all semantic types – A customized Steiner tree algorithm
![Page 19: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/19.jpg)
wgs84:lat
wgs84:long
gn:countryCode Feature
gn:name
Feature gn:name
Feature gn:name
Feature
neighbour nearby
parentCountry parentFeature
SpatialThing
• Construct a graph from semantic types and ontology graph
• Select minimal tree that connects all semantic types – A customized Steiner tree algorithm
neighbour
nearby
parentCountry
Extracting Relationships [Knoblock et al., ESWC 2012]
![Page 20: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/20.jpg)
API Semantic Model in Karma
20
![Page 21: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/21.jpg)
Outline
• Rapidly Integrating APIs with the LD – Building API Semantic Model – Representing API Descriptions – Building Linked APIs
• Evaluation • Related Work
• Conclusion & Future Work
![Page 22: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/22.jpg)
Service Modeling Ontology
22
km:Service swrl:Atom
swrl:IndividualPropertyAtom swrl:ClassAtom
km:Attribute
km:Model
km:Input
km:Output
rdfs:Class rdf:Property
swrl:Variable
km:hasInput
km:hasOutput
swrl:classPredicate swrl:propertyPredicate
km:hasMandatoryAttribute
km:hasOptionalAttribute
argument1
km:hasAttribute
km:hasModel
argument2
km:hasAtom
SubClass SubProperty Data Property Object Property
rest:isGroundedIn
km:hasName
rest:hasAddress
rest:hasMethod
km:hasName
rdfs: http://www.w3.org/2000/01/rdf-schema# swrl: http://www.w3.org/2003/11/swrl# rest: http://purl.org/hRESTS/current# km: http://isi.edu/integration/karma/ontologies/model/current#
![Page 23: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/23.jpg)
Example: Service Description
23
km:Service h/p://<karma server>/services/ 5C5CB6AB-‐1689-‐4A96-‐0B70-‐96C6A54F3D70#
lat
p1
.../neighbourhood?lat={p1}&... GET neighbourhood hasName hasAddress hasMethod
name
km:A4ribute in_lat
km:Input input
km:Output output
swrl:Variable v1
swrl:Variable v2
swrl:CAtom atom1
swrl:PAtom atom2
km:Model inputModel
km:Model outputModel
km:A4ribute out_name
isGroundedIn
hasName
hasAttribute
hasAttribute
hasModel
hasModel
arg1
arg1
arg2 swrl:CAtom atom3
swrl:PAtom atom5
swrl:PAtom atom4
arg2
arg1
arg2
arg1 wgs84:lat
gn:Feature
gn:name
gn:neighbour
gn:Feature
arg1
hasAtom
class
class property
property
property
hasAtom
atom
2
atom
4 at
om5
v1 atom1
v2 atom3
links the output to the input by neighbour relationship
![Page 24: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/24.jpg)
Example: Service Description (N3)
24
@prefix : <http://<karma server>/services/5C5CB6AB-1689-4A96-0B70-96C6A54F3D70#> . ... : a km:Service; km:hasName "neighbourhood" ;
hrests:hasAddress "http://api.geonames.org/neighbourhood?lat={p1}&lng={p2}& username={p3}" ^^ hrests:URITemplate ; hrests:hasMethod "GET"; km:hasInput :input; km:hasOutput :output.
:input a km:Input; km:hasAttribute :in lat, ... ; km:hasModel :inputModel. :in lat a km:Attribute; km:hasName "lat" ;
hrests:isGroundedIn "p1"^^rdf:PlainLiteral. ... :feature1 a swrl:Variable . :inputModel a km:Model; km:hasAtom [ a swrl:ClassAtom ;
swrl:classPredicate gn:Feature; swrl:argument1 :feature1 ];
km:hasAtom [ a swrl:IndividualPropertyAtom; swrl:propertyPredicate wgs84:lat; swrl:argument1 :feature1; swrl:argument2 :in lat];
:output a km:Output; km:hasAttribute :out name, ... ; km:hasModel :outputModel. :out name a km:Attribute; km:hasName "name" . ... :feature2 a swrl:Variable . :outputModel a km:Model; km:hasAtom [ a swrl:ClassAtom ;
swrl:classPredicate gn:Feature; swrl:argument1 :feature2] ;
km:hasAtom [ a swrl:IndividualPropertyAtom ; swrl:propertyPredicate gn:neighbour; swrl:argument1 :feature1 ; swrl:argument2 :feature2];
km:hasAtom [ a swrl:IndividualPropertyAtom ; swrl:propertyPredicate gn:name ; swrl:argument1 :feature2 ; swrl:argument2 :out name];
![Page 25: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/25.jpg)
Service Discovery
• Finds all services that take latitude and longitude as inputs
25
SELECT ?service WHERE {
?service km:hasInput [km:hasAttribute ?i1, ?i2].
?service km:hasInput [km:hasModel [km:hasAtom
[swrl:propertyPredicate wgs84:lat; swrl:argument2 ?i1],
[swrl:propertyPredicate wgs84:long; swrl:argument2 ?i2]]]
}
![Page 26: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/26.jpg)
SELECT ?s WHERE {
?s km:hasInput [km:hasAttribute ?i1, ?i2]. ?s km:hasOutput [km:hasAttribute ?o1]. ?s km:hasInput [km:hasModel [km:hasAtom [swrl:classPredicate gn:Feature; swrl:arg1 ?f1], [swrl:propertyPredicate wgs84:lat; swrl:arg1 ?f1; swrl:arg2 ?i1], [swrl:propertyPredicate wgs84:long; swrl:arg1 ?f1; swrl:arg2 ?i2]]]. ?s km:hasOutput [km:hasModel [km:hasAtom [swrl:classPredicate gn:Feature; swrl:arg1 ?f2], [swrl:propertyPredicate gn:neighbour; swrl:arg1 ?f1; swrl:arg2 ?f2]]]}
Service Discovery
• Find services that return the neighbor feature given the latitude and longitude
26
![Page 27: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/27.jpg)
Outline
• Rapidly Integrating APIs with the LD – Building API Semantic Model – Representing API Descriptions – Building Linked APIs
• Evaluation • Related Work
• Conclusion & Future Work
![Page 28: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/28.jpg)
Invoking Linked APIs (GET)
28
Linked APIRepository
LinkedDataUser
@prefix : <h/p://<karma server>/services/5C5CB6AB-‐1689-‐4A96-‐0B70-‐96C6A54F3D70#> . : a km:Service; km:hasName "neighbourhood" ;
hrests:hasAddress "h/p://api.geonames.org/neighbourhood?lat={p1}&lng={p2}& username={p3}" ^^ hrests:URITemplate ; hrests:hasMethod "GET"; km:hasInput :input; km:hasOutput :output.
:input a km:Input; km:hasA4ribute :in lat, ... ; km:hasModel :inputModel. :in lat a km:A/ribute; km:hasName "lat" ; hrests:isGroundedIn "p1"^^rdf:PlainLiteral. :feature1 a swrl:Variable . :inputModel a km:Model; km:hasAtom [ a swrl:ClassAtom ;
swrl:classPredicate gn:Feature; swrl:argument1 :feature1 ];
km:hasAtom [ a swrl:IndividualPropertyAtom; swrl:propertyPredicate wgs84:lat; swrl:argument1 :feature1; swrl:argument2 :in lat];
:output a km:Output; km:hasA/ribute :out name, ... ; km:hasModel :outputModel. :out name a km:A/ribute; km:hasName "name" . :feature2 a swrl:Variable . :outputModel a km:Model; km:hasAtom [ a swrl:ClassAtom ;
swrl:classPredicate gn:Feature; swrl:argument1 :feature2] ;
km:hasAtom [ a swrl:IndividualPropertyAtom ; swrl:propertyPredicate gn:neighbour; swrl:argument1 :feature1 ; swrl:argument2 :feature2];
km:hasAtom [ a swrl:IndividualPropertyAtom ; swrl:propertyPredicate gn:name ; swrl:argument1 :feature2 ; swrl:argument2 :out name];
http://<karma server>/services/{id}
HTTP GET
![Page 29: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/29.jpg)
Invoking Linked APIs (POST)
29
Linked APIRepository
LinkedDataUser
XML/JSON
lifting RDF
Web APIs
REST Services
lowering HTTP POST
RDF
/services/{id} Invocation URL
![Page 30: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/30.jpg)
Lowering
30
Attribute Value
in_lat 40.74538
in_lng -73.90541
http://api.geonames.org/neighbourhood? lat40.74538&lng=-73.90541
Invocation URL
Attribute Value GroundedIn
in_lat 40.74538 p1
in_lng -73.90541 p2
<http://sws.geonames.org/5145067/> a gn:Feature ; wgs84:lat "40.74538" ; wgs84:long "-73.90541" .
Input Data (RDF)
API Description (RDF)
:inputModel a km:Model; km:hasAtom
[ a swrl:ClassAtom ; swrl:argument1 :v1 ; swrl:classPredicate gn:Feature ] ;
km:hasAtom [ a swrl:IndividualPropertyAtom ; swrl:argument1 :v1 ; swrl:argument2 :in_lat ; swrl:propertyPredicate wgs84:lat ] ;
...
:in_lat a km:Attribute; km:hasName "lat" ; hrests:isGroundedIn "p1“
...
... hrests:hasAddress “http://api.geonames.org/neighbourhood? lat={p1}&lng={p2}”
![Page 31: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/31.jpg)
Lowering
31
Attribute Value
in_lat 40.74538
in_lng -73.90541
in_username demo
1
http://api.geonames.org/neighbourhood? lat40.74538&lng=-73.90541&username=demo
Invocation URL
Attribute Value GroundedIn
in_lat 40.74538 p1
in_lng -73.90541 p2
in_username demo p3
2
3
API Description (RDF)
:inputModel a km:Model; km:hasAtom
[ a swrl:ClassAtom ; swrl:argument1 :v1 ; swrl:classPredicate gn:Feature ] ;
km:hasAtom [ a swrl:IndividualPropertyAtom ; swrl:argument1 :v1 ; swrl:argument2 :in_lat ; swrl:propertyPredicate wgs84:lat ] ;
...
:in_lat a km:Attribute; km:hasName "lat" ; hrests:isGroundedIn "p1“
...
... hrests:hasAddress “http://api.geonames.org/neighbourhood? lat={p1}&lng={p2}&username={p3}”
<http://sws.geonames.org/5145067/> a gn:Feature ; wgs84:lat "40.74538" ; wgs84:long "-73.90541" .
<http://.../services/...D70#in_username> km:hasValue “demo” .
Inp
ut R
DF
Authentication
![Page 32: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/32.jpg)
Lifting
32
<geonames> <neighbourhood> <countryCode>US</countryCode> <countryName>United States</countryName> <city>New York City-Queens</city> <name>Woodside</name>
... </neighbourhood> </geonames>
AP
I Resp
on
se XM
L
Attribute Value URI
countryCode US :out_countryCode
countryName United States :out_countryName
city ...-Queens :out_city
name Woodside :out_name
:out_countryCode a km:Attribute; km:hasName “countryCode" ;
.... :outputModel a km:Model;
km:hasAtom [ a swrl:IndividualPropertyAtom ; swrl:argument1 :v1 ; swrl:argument2 :v2; swrl:propertyPredicate gn:neighbour ] ;
km:hasAtom [ a swrl:ClassAtom ; swrl:argument1 :v2 ; swrl:classPredicate gn:Feature ] ;
km:hasAtom [ a swrl:IndividualPropertyAtom ; swrl:argument1 :v2 ; swrl:argument2 :out_name; swrl:propertyPredicate gn:name ] ;
…
API Description (RDF)
<http://sws.geonames.org/5145067/> gn:neighbour [
a gn:Feature ; gn:name "Woodside"; gn:nearby [ a gn:Feature ; gn:name “…-Queens"; gn:parentCountry [ …
Lin
ked
Ou
tpu
t
![Page 33: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/33.jpg)
Outline
• Rapidly Integrating APIs with the LD – Building API Semantic Model – Representing API Descriptions – Building Linked APIs
• Evaluation • Related Work • Conclusion & Future Work
![Page 34: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/34.jpg)
Evaluation
34 Average 4 minutes to build a linked API
Geonames API #Examples #Columns Time (min) neighbourhood 3 10 6 neighbours 2 9 5 children 2 10 3 sibling 1 9 3 ocean 2 3 1 findNearby 3 11 3 findNearbyPostalCodes 3 11 7 findNearbyPOIsOSM 3 7 3 findNearestAddress 3 14 6 findNearestIntersectionOSM 3 8 3 postalCodeCountryInfo 1 5 2
Total 26 97 42
![Page 35: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/35.jpg)
Related Work
• Linked Services [Pedrinaci & Domingue, 2010] – Annotates inputs and outputs by concepts from
ontologies – Publishes service descriptions into the LOD cloud using
Minimal Service Model (MSM) – Cannot represent relationships between service attributes
• Linked Open Services (LOS) [Krummenacher & Norton & Marte, 2010] , Linked Data Services (LIDS) [Speiser & Harth, 2010] – SPARQL graph patterns to describe inputs and outputs – Service discovery is not straightforward
• RESTdesc [Verborgh et at, 2012] – N3 logical rules to capture API functionality
35
![Page 36: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/36.jpg)
Related Work
• Linked Services [Pedrinaci & Domingue, 2010] – Annotates inputs and outputs by concepts from
ontologies – Publishes service descriptions into the LOD cloud using
Minimal Service Model (MSM) – Cannot represent relationships between service attributes
• Linked Open Services (LOS) [Krummenacher & Norton & Marte, 2010] , Linked Data Services (LIDS) [Speiser & Harth, 2010] – SPARQL graph patterns to describe inputs and outputs – Service discovery is not straightforward
• RESTdesc [Verborgh et at, 2012] – N3 logical rules to capture API functionality
36
Karma semi-‐automakcally builds service descripkons and the modeling process does not
require experkse in SW technologies
![Page 37: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/37.jpg)
Discussion
• Rapidly build rich semantic models of services
• Publish service descriptions into the LD cloud
• Provide strong support for service discovery and composition
• Build linked APIs that consume and produce linked data
37
![Page 38: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/38.jpg)
Future Work
• Apply our approach on REST-like URLs – http://www.ex.com/weather/CA/Los Angeles
• Compose data and services in Karma
38
S1(address à street, city, state, zipcode,)
S2(city, stateà temperature, windspeed, …)
S3(zipcode, distanceà hotel, ranking)
Composition
![Page 39: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/39.jpg)
More Information
• More information/papers/software/demos: – http://www.isi.edu/integration/karma/
• Contact – Mohsen Taheriyan: [email protected] – Craig Knoblock: [email protected] – Pedro Szekely: [email protected] – Jose Luis Ambite: [email protected]
39
![Page 40: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/40.jpg)
Information Sciences Institute
Backup Slides
![Page 41: Rapidly Integrating Services into the Linked Data Cloud · Overview 12 Service Integrator Linked Data User Karma Modeling Services Web API Sources Modeler Linked API ... • Karma](https://reader034.vdocuments.net/reader034/viewer/2022042810/5f9987c136d7854d5e474c48/html5/thumbnails/41.jpg)
V2
V9
V1
2
1 1
1
1
1
V3 V4
V5 V6
V7
V8
9
2 8
1/2 10 1/2
V2
V1
4
V3
V4
4
4
4
4
4 V2
V1
4
V3
V4
4
4
V2
V9
V1
2
1 1
1
1
1
V3 V4
V5 V6
V7
V8
2
1/2 1/2
V2
V9
V1
2
1 1
1
1
V3 V4
V5 V6
V7
V8
2
1/2 1/2
V2
V9
V1
2
1 1
1
1
V3 V4
V5 V6
2
4. Compute MST 3. replace each link with the corresponding shortest path in original G
5. remove extra links until all leaves are Steiner nodes
2. Compute MST 1. construct the complete graph (Nodes: Steiner Nodes, Links Weights: shortest path from each pair in original G)
Steiner nodes: {V1, V2, V3, V4}
Steiner Tree Algorithm
41