# Saved by TopBraid on Sat Aug 01 15:43:26 CDT 2009 # baseURI: http://sparqlmotion.org/examples/DBPediaCallingCodesTBS3 # imports: http://topbraid.org/sparqlmotionlib @prefix : . @prefix dbp: . @prefix owl: . @prefix rdf: . @prefix rdfs: . @prefix sm: . @prefix sml: . @prefix sp: . @prefix spin: . @prefix spl: . @prefix xsd: . rdf:type owl:Ontology ; owl:imports ; owl:versionInfo "Created with TopBraid Composer"^^xsd:string . :ConstructResponse rdf:type sml:BindLiteralVariable ; rdfs:label "Construct response"^^xsd:string ; sm:next :FindByCallingCode_module ; sm:outputVariable "text"^^xsd:string ; sml:datatype xsd:string ; sml:template "{?callingCode} is the calling code of {?label}."^^xsd:string . :FindByCallingCode rdf:type spin:Function ; rdfs:comment "http://localhost:8083/tbl/actions?action=sparqlmotion&id=FindByCallingCode&callingCode=61"^^xsd:string ; rdfs:label "Find by calling code"^^xsd:string ; rdfs:subClassOf spin:Functions ; spin:constraint [ rdf:type spl:Argument ; spl:predicate :callingCode ; spl:valueType xsd:integer ; sm:next :GetCallingCodeFromDBPedia ] ; sm:returnModule :FindByCallingCode_module . :FindByCallingCode_module rdf:type sml:ReturnText ; rdfs:comment "http://localhost:8083/tbl/actions?action=sparqlmotion&id=FindByCallingCode&callingCode=61"^^xsd:string ; rdfs:label "Find by calling code"^^xsd:string . :GetCallingCodeFromDBPedia rdf:type sml:BindBySelect ; rdfs:label "Get country from DBPedia"^^xsd:string ; sm:next :ConstructResponse ; sml:selectQuery [ rdf:type sp:Select ; sp:from ; sp:resultVariables (_:b1) ; sp:where ([ sp:object [ sp:varName "callingCode"^^xsd:string ] ; sp:predicate dbp:callingCode ; sp:subject _:b2 ] [ sp:object _:b1 ; sp:predicate rdfs:label ; sp:subject _:b2 ]) ] . :callingCode rdf:type owl:DatatypeProperty ; rdfs:label "calling code"^^xsd:string . _:b1 sp:varName "label"^^xsd:string . _:b2 sp:varName "country"^^xsd:string .