All Downloads are FREE. Search and download functionalities are using the official Maven repository.

play-commons-constants.1.0.source-code.play-epsparql-contextualized-latitude-01-query.eprq Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
PREFIX rdf:    
PREFIX uctelco: 
PREFIX geo:    
PREFIX :       

CONSTRUCT {
    :e rdf:type :ContextualizedLatitudeEvent .
    :e :stream .
	:e :location [ geo:lat ?Latitude1; geo:long ?Longitude1 ] .
	:e uctelco:phoneNumber ?bob .
	:e uctelco:phoneNumber ?alice .
    :e :message "Alice and Bob are close to a where someone tweeted." .
}
WHERE {
    WINDOW {
        EVENT ?id1 {
            ?e1 rdf:type :TwitterEvent .
            ?e1 :stream  .
			?e1 :twitterName ?someone .
			?e1 :location [ geo:lat ?Latitude1; geo:long ?Longitude1 ] .
            }
        SEQ
        EVENT ?id2 {
            ?e2 rdf:type :UcTelcoGeoLocation .
            ?e2 :stream  .
			?e2 :location [ geo:lat ?Latitude2; geo:long ?Longitude2 ] .
			?e2 uctelco:phoneNumber ?alice .
            }
			FILTER (abs(?Latitude1 - ?Latitude2) < 0.1 && abs(?Longitude1 - ?Longitude2) < 0.5)
        SEQ
        EVENT ?id3 {
            ?e3 rdf:type :UcTelcoGeoLocation .
            ?e3 :stream  .
			?e3 :location [ geo:lat ?Latitude3; geo:long ?Longitude3 ] .
			?e3 uctelco:phoneNumber ?bob .
            }
            FILTER (abs(?Latitude2 - ?Latitude3) < 0.1 && abs(?Longitude2 - ?Longitude3) < 0.5
				&& ?alice != ?bob)
    } ("PT120M"^^xsd:duration, sliding)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy