3-96 Oracle Complex Event Processing Getting Started
wlevs:adapter id=BusStopArrivalPub provider=httppub beans
3.8.6 Oracle Spatial Example Component Configuration File
The Oracle Spatial application uses five processors: three to handle the three data feeds, one that joins the resulting events, and one that generates summarized results.
These XML files contain the Oracle CEP queries executed against input events. This sample uses the Oracle CQL language. For additional information and samples about
using Oracle CEP query languages, see:
■
Oracle Complex Event Processing CQL Language Reference.
■
Oracle Complex Event Processing EPL Language Reference.
Example 3–4 shows the component configuration file used in the Oracle Spatial
sample application. The processor element contains the Oracle CQL views and queries that use the Oracle
Spatial to process geometric data using Oracle CEP.
Example 3–4 Oracle Spatial Example Component Configuration File
?xml version=1.0 encoding=UTF-8? n1:config
xsi:schemaLocation=http:www.bea.comnswlevsconfigapplication wlevs_application_ config.xsd
xmlns:n1=http:www.bea.comnswlevsconfigapplication xmlns:xsi=http:www.w3.org2001XMLSchema-instance
http-pub-sub-adapter nameBusPosPubname
server-urlhttp:localhost:9002pubsubserver-url channelbusbusposchannel
event-typeBusPosPubEventevent-type http-pub-sub-adapter
http-pub-sub-adapter nameBusStopPubname
server-urlhttp:localhost:9002pubsubserver-url channelbusbusstopchannel
event-typeBusStopPubEventevent-type http-pub-sub-adapter
http-pub-sub-adapter nameBusStopArrivalPubname
server-urlhttp:localhost:9002pubsubserver-url channelbusbusstoparrivalchannel
event-typeBusStopArrivalEventevent-type http-pub-sub-adapter
Note: Oracle EPL is superseded by Oracle CQL.
Note:
For more information about data cartridges, see:
■
Introduction to Data Cartridges in the Oracle Complex Event Processing CQL Language Reference
■
Oracle Spatial in the Oracle Complex Event Processing CQL Language Reference
Oracle CEP Samples 3-97
processor nameProcessorname
rules view id=BusPosGeomStream
select bus.busId as busId, bus.seq as seq, com.oracle.cep.cartridge.spatial.Geometry.createPoint8307, bus.longitude,
bus.latitude as geom from BusPosStream as bus
view query id=BusArrival
ISTREAM select systimestamp as incidentTime, bus.busId as busId, busstop.seq as stopSeq
from BusPosGeomStream[NOW] as bus, BusStopRelation as busstop where CONTAINspatialbusstop.geom, bus.geom, 0.0d = true and
bus.busId = busstop.busId query
query id=BusStopOut select busId, seq as id, com.oracle.cep.sample.spatial.OrdsHelper.getOrdsgeom as
coords from BusStopRelation query
query id=BusPosOut select systimestamp as lastTime, busId, longitude, latitude from BusPosStream
query rules
processor channel
nameBusStopArrivalChannelname selectorBusArrivalselector
channel channel
nameBusPosChannelname selectorBusPosOutselector
channel channel
nameBusStopChannelname selectorBusStopOutselector
channel n1:config
3.9 Foreign Exchange FX Example