Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
themeMidnight
firstline0
titleRègle Hauteur d'eau
linenumberstrue
<tns:cepRule xmlns:tns="http://www.gind.emac.fr/data/CepRules" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<tns:ruleName>tns:WaterLevelRule</tns:ruleName>
	<tns:streamDefinition>
		<![CDATA[
		define stream Event_WaterStationMeasures (id string, cityName string, stationName string, stationLat float, stationLong float, waterLevel float, waterFlow float); 
		 ]]>
	</tns:streamDefinition>
	<tns:rule>
		<![CDATA[
		 from Event_WaterStationMeasures[waterLevel > 3.0]
         select '${collaborationName}' as collaborationName, '${knowledgeSpaceName}' as knowledgeSpaceName, 
         		'{http://fr.emac.gind/crisis_objectives}Emerging Risk' as node__type, 
         		'name' as node__property0__name, str:concat('Flooding Risk at ', stationName) as node__property0__value, 
         		'similar concepts' as node__property1__name,                     '' as node__property1__value, 
         		'Impacted components' as node__property2__name,                  '' as node__property2__value, 
         		'similar concept of objective created' as node__property3__name, '' as node__property3__value, 
         		'opportunity_threaten' as node__role0, 
         		'emerging_risk' as node__role1,
         		'110' as node__position__x, 
         		'110' as node__position__y, 
         		'61' as node__dimension__width,
         		'61' as node__dimension__height,
         		'/##application_name##/webjars/gind/ioda/crisis_objectives/images/model/nodes/objectives/geoLoc/emergingRisk.png' as node__geoLocalisation__point__image,
         		stationLong as node__geoLocalisation__point__longitude,   
         		stationLat as node__geoLocalisation__point__latitude,  
         		'0.0' as node__geoLocalisation__point__altitude    
         insert into addNodeEvent;
         ]]>
	</tns:rule>

	<tns:eventAction>
		<tns:eventElementName xmlns:ns12="http://www.emac.gind.fr/EventType">ns12:addNodeEvent</tns:eventElementName>
		<tns:schemaDefinition>
			<tns:url>classpath://event/EventType.xsd</tns:url>
		</tns:schemaDefinition>
		<tns:topic xmlns:s="http://www.emac.gind.fr/EventType">s:addNodeTopic</tns:topic>
	</tns:eventAction>
	
	<tns:context>
		<tns:subscriptionsRequired>
			<tns:entry>
				<tns:topic xmlns:ns12="http://www.mines-albi.fr/loireFloodingTopic">ns12:WaterStationTopic</tns:topic>
				<tns:correspondingEvent xmlns:ns12="http://www.mines-albi.fr/loireFloodingEvent">ns12:Event_WaterStationMeasures</tns:correspondingEvent>
				<tns:endpointAddressToSubscribe>${eventProducerSimulatorBroker}</tns:endpointAddressToSubscribe>
			</tns:entry>
		</tns:subscriptionsRequired>
	</tns:context>
</tns:cepRule>

 

Extensions internes

typenamedescriptionargscomment
cypherCypherQuery??Performs a Neo4J query and returns a generic model

arg0 = query,
arg1 = collaborationName,
arg2 = knowledgeSpceName

overrides process method
cypherCountQueryPerforms a Neo4J query and returns a numberarg0 = query
arg1 = collaborationName,
arg2 = knowledgeSpceName

modelCountNodesGives the numbers of nodes of a modeloverrides execute method
model   
    
    
    
    
    
    
    
    arg0 = model 
modelFindNodeByPropertyFinds first node containing a given property valuearg0 = model,
arg1 = propertyName,
arg2 = propertyValue
 
modelFormatModelInJSONSerializes the model in JSONarg0 = model,
arg1 = type,
arg2 = template
 
modelGetIdGets the id of a given node/edgearg0 = BO (node or edge) 
modelGetRolesGets the roles of a given node/edge

arg0 = BO (node or edge)

 
nodeFindValuePropertyOnNodeGives the value of a given property from a given nodearg0 = node,
arg1 = propertyName
 
nodeGetOnNodeGives the value of a given field from a given nodearg0 = node,
arg1 = fieldName
 
utilGetGives the value of a given field from a given generic objectarg0 = object,
arg1 = fieldName
redundant?
utilRandBoundGives a given number (int or double)arg0 = min,
arg1 = max,
arg2 = type (int | double)
 
utilToStringReturns the String value of an objectarg0 = the object 
utilContainsListReturns yes if an element belongs to the given list

arg0 = the list

arg1 = the element

 
utilListIntersection  Returns the intersection of 2 given listsarg0 = list 1
arg1 = list 2 
 
     
     
     

 

 

A voir

...