play-commons-constants.1.0.source-code.play-epsparql-iccs-aishub-01.templ.eprq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of play-commons-constants Show documentation
Show all versions of play-commons-constants Show documentation
Some constants of important, shared values for the platform
#
# 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)
}