# Saved by TopBraid on Mon Mar 24 13:29:38 PDT 2008 # baseURI: http://sparqlmotion.org/examples/calaisFromNewsfeed # imports: http://topbraid.org/sparqlmotionlib @prefix : . @prefix rdfs: . @prefix sm: . @prefix sml: . @prefix owl: . @prefix xsd: . @prefix rdf: . @prefix rss: . a owl:Ontology ; owl:imports ; owl:versionInfo "Created with TopBraid Composer"^^xsd:string . :CollectAllNewsItems a sml:ConcatenateText ; rdfs:label "Collect all news items"^^xsd:string ; sm:next :ExtractCountries ; sm:outputVariable "text"^^xsd:string ; sml:selectQuery """SELECT ?label WHERE { ?item a rss:item . ?item rss:description ?label }"""^^xsd:string ; sml:separator """ """^^xsd:string . :DisplayCountriesOnMap a sml:CreateMap ; rdfs:label "Display countries on map"^^xsd:string ; sml:selectQuery """SELECT ?country WHERE {?country ?lat }"""^^xsd:string . :ExtractCountries a sml:CallCalais ; rdfs:label "Extract countries from Calais"^^xsd:string ; sm:next :IterateOverAllCountries . :GetCountryFromGeonames a sml:ImportRDFFromURL ; rdfs:label "Get country from geonames"^^xsd:string ; sml:url "http://ws.geonames.org/search?type=rdf&maxRows=1&featureCode=PCLI&name_equals={?countryLabel}"^^xsd:string . :ImportNYTNewsfeed a sml:ImportNewsFeed ; rdfs:label "Import NYT newsfeed"^^xsd:string ; sm:next :CollectAllNewsItems ; sml:url "http://www.nytimes.com/services/xml/rss/nyt/WorldBusiness.xml"^^xsd:string . :IterateOverAllCountries a sml:IterateOverSelect ; rdfs:label "Iterate over all countries"^^xsd:string ; sm:body :GetCountryFromGeonames ; sm:next :DisplayCountriesOnMap ; sml:selectQuery """SELECT ?countryLabel WHERE { ?country a . ?country ?countryLabel . }"""^^xsd:string .