From Open API to Semantic Specifications and Code Adapters

11 downloads 0 Views 1MB Size Report
Generate Adapter. Code. Adapter. Code. Semi-automatic support to create groundings. RESTful API can be invoked like Semantic Web Service schema.org.
From Open API to Semantic Specifications and Code Adapters Simon Schwichtenberg, Christian Gerth, Gregor Engels

Problem Statement OWL-S

Service ServiceRequest Request

Service Offer Service Grounding

Semantic specifications and groundings are usually not available Costly to create manually

Open API 2

Solution Approach schema.org 3. Align Ad-hoc and Schema.org Ontology 2. Extract Ad-hoc Ontology

1. Translate Operation Signatures

OWL-S

Service Offer

Open API

Adapter Code

4.Generate Adapter Code

Semi-automatic support to create groundings RESTful API can be invoked like Semantic Web Service

3

Syntactic Lufthansa Open API Operations Input Parameters Open API

Output Parameters 4

Semantic Specifications OWL-S

Service ServiceRequest Request

Service Offer

Links enable semantic reasoning Open API 5

Semantic Specifications OWL-S

Service ServiceRequest Request

Service Offer Schema.org

6

Service Grounding 1. Invoke

Service ServiceRequest Request

OWL-S

Service Offer 4. Respond 3. Lifting Translation

2. Lowering Translation

Open API 7

Solution Approach schema.org 3. Align Ad-hoc and Schema.org Ontology 2. Extract Ad-hoc Ontology

1. Translate Operation Signatures

OWL-S

Service Offer

Open API

Adapter Code

4.Generate Adapter Coder

8

Translate Operation Signatures referencesAirportsNearestLatitudeLongitudeGet

OWL-S

latitude

Atomic Process longitude

lang

Input

Open API

AirportResource

Output

9

Extract Ad-hoc Ontology JSON Response

Ad-hoc Ontology Airport Resource Airports LocationType String

Airports

Airport

Airport

Position

CountryCode CityCode AirportCode String

String

String

Position

Coordinate Latitude

Number

Coordinate Longitude

Number

10

Align Ad-hoc and Global Ontology Ad-hoc Ontology Airport Resource Airports LocationType

Airports

Airport

Airport

Position

String

Text

Text

Text

name

name

iataCode

City

String

Airport

String

Number

Number latitude geo

Coordinate Latitude

CountryCode CityCode AirportCode

String

Country

Position

Geo Coordinate

Coordinate Longitude

Number

Number

longitude

Schema.org 11

Reconcile Operation Signatures

Open API

OWL-S

(Integer, Integer, String) → AirportResource

(GeoCoordinates, Language) → Airport

Aligned to schema.org

12

Generate Adapter Code New operation signature typed over schema.org Lowering Translation (Semantic to Syntactic) Call actual Open API operation

Lifting Translation (Syntactic to Semantic)

13

Generate Adapter Code

14

Generate Adapter Code Alignment pair: latitude ↔ Latitude

Alignment pair: AirportCode ↔ iataCode 15

Problem

Conclusion ●

Semantic specifications suitable for service discovery



Syntactic specifications required for service invocation



Usually only syntactic specifications are available



Solution





Manual creation of semantic specifications and groundings is costly. Generate adapters to translate between semantic and syntactic API calls. RESTful APIs can be used like Semantic Web Services.

OWL-S

Service Offer

Adapter Code

Open API

16

Suggest Documents