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

play-commons-constants.1.0.source-code.play-epsparql-iccs-aishub-01.templ.eprq Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
#
# Title: High Speed craft is speeding
# Description:  Emit an event when you detect a Vessel event with average speed> 10 Knots during the past 5 minutes AND vessel type = �High Speed�
#
# TODO: Which stream should the complex event be in? New topic needed?
# TODO: AVG must be tested in EP-SPARQL
# TOTO: stefan: does this work with events of varying ?speed but identical ?mmsi? my syntax seems ambiguous. do we need to extend EP-SPARQL?
#

PREFIX ais:    
PREFIX rdf:    
PREFIX geo:    
PREFIX xsd:    
PREFIX :       

CONSTRUCT {
    :e rdf:type :HighSpeedCraftIsSpeeding .
    :e :stream  .
	:e ais:MMSI ?mmsi .
	:e ais:speed ?speed .
}
WHERE {
    WINDOW {
        EVENT ?id1 {
            ?e1 rdf:type :VesselEvent .
			?e1 :stream  .
			?e1 ais:speed ?speed .
			?e1 ais:shipType "High Speed" .
			?e1 ais:MMSI ?mmsi .
            }
    } ("PT5M"^^xsd:duration, sliding)
	BIND(AVG(?speed) AS ?avgSpeed)
	FILTER (?avgSpeed > 10)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy