# Saved by TopBraid on Tue Mar 11 20:47:47 PDT 2008 # baseURI: http://sparqlmotion.org/examples/DBPediaCallingCodes # imports: http://topbraid.org/sparqlmotionlib @prefix : . @prefix rdfs: . @prefix sm: . @prefix dbp: . @prefix sml: . @prefix owl: . @prefix xsd: . @prefix rdf: . a owl:Ontology ; owl:imports ; owl:versionInfo "Created with TopBraid Composer"^^xsd:string . :ConstructResponse a sml:BindLiteralVariable ; rdfs:label "Construct response"^^xsd:string ; sm:next :FindByCallingCode ; sm:outputVariable "text"^^xsd:string ; sml:datatype xsd:string ; sml:template "{?callingCode} is the calling code of {?label}."^^xsd:string . :FindByCallingCode a sml:ReturnText ; rdfs:label "Find by calling code"^^xsd:string . :GetCallingCodeFromDBPedia a sml:BindBySelect ; rdfs:label "Get country from DBPedia"^^xsd:string ; sm:next :ConstructResponse ; sml:selectQuery """SELECT ?label FROM WHERE { ?country dbp:callingCode ?callingCode . ?country rdfs:label ?label . }"""^^xsd:string . :GetCountryName a sml:BindWithParameter ; rdfs:label "Get calling code"^^xsd:string ; sm:next :GetCallingCodeFromDBPedia ; sm:outputVariable "callingCode"^^xsd:string ; sm:range xsd:integer .