<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="xsl-for-template-specification.xsl"?>
<TemplateSpecification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xml-schema-for-template-specification.xsd">
	<TemplateName>FunctionalMappingOf4ExpressReals</TemplateName>
	<defaultRdsId>FFD31C3ED8DA459993C2D7E0D51BDA1A</defaultRdsId>
	<Status>UPDATED MAR2023</Status>
	<TIPPredicate>equationWithFourRealsInputs</TIPPredicate><Description>Equation with four instances of ExpressReal as inputs and one instance of ExpressReal as result.</Description>
	<Example>A warehouse has four temperature measurements and a calculated average of that.</Example>
	<Notes>At instantiation of this template it is mandatory to add meta:valEffectiveDate with the dateTime that the represented information became effective.</Notes>
	<SubClassOf>TemplateForFunctionOfClass</SubClassOf><Definition>[hasInput1], [hasInput2], [hasInput3] and [hasInput4] are mapped to [hasFunction] resulting in [hasResult]</Definition><ScopeNote>The inputs may come for query results. Actually this template defies the principle that ISO 15926 deals with facts only. Here the fact is being calculated instead of just recorded. Instead of this template use another one with the result only as instance of dm:Property or dm:IndirectProperty.</ScopeNote><AdminNote/><LiftedAndLoweredGraph>CL-FUNC-300-20220110.png</LiftedAndLoweredGraph>
	<LiftedTemplate>
	    	
	    	<LiftedTemplateElements><Ref>1</Ref>
	    		<URI>dm:ExpressReal</URI>
	    	</LiftedTemplateElements>
	    	<LiftedTemplateElements><Ref>2</Ref>
	    		<URI>dm:ExpressReal</URI>
	    	</LiftedTemplateElements>
	<LiftedTemplateElements><Ref>3</Ref><URI>dm:ExpressReal</URI></LiftedTemplateElements><LiftedTemplateElements><Ref>4</Ref><URI>dm:ExpressReal</URI></LiftedTemplateElements><LiftedTemplateElements><Ref>5</Ref><URI>dm:ExpressReal</URI></LiftedTemplateElements><LiftedTemplateElements><Ref>6</Ref><URI>dm:ClassOfFunctionalMapping</URI></LiftedTemplateElements><LiftedTemplateElements><Ref>7</Ref><URI>dm:MultidimensionalObject</URI></LiftedTemplateElements><LiftedTemplateElements><Ref>8</Ref><URI>dm:FunctionalMapping</URI></LiftedTemplateElements><LiftedTemplateElements><Ref>9</Ref><URI>dm:Classification</URI></LiftedTemplateElements></LiftedTemplate>
	<PropertiesOfLoweredTemplate>
    		
    		
    		
  	<TemplateSignature><RoleNo>1</RoleNo><RoleName>hasInput1</RoleName><RoleObjectType>dm:ExpressReal</RoleObjectType><RoleExample/></TemplateSignature><TemplateSignature><RoleNo>2</RoleNo><RoleName>hasInput2</RoleName><RoleObjectType>dm:ExpressReal</RoleObjectType><RoleExample/></TemplateSignature><TemplateSignature><RoleNo>3</RoleNo><RoleName>hasInput3</RoleName><RoleObjectType>dm:ExpressReal</RoleObjectType><RoleExample/></TemplateSignature><TemplateSignature><RoleNo>4</RoleNo><RoleName>hasInput4</RoleName><RoleObjectType>dm:ExpressReal</RoleObjectType><RoleExample/></TemplateSignature><TemplateSignature><RoleNo>5</RoleNo><RoleName>hasResult</RoleName><RoleObjectType>dm:ExpressReal</RoleObjectType><RoleExample/></TemplateSignature><TemplateSignature><RoleNo>6</RoleNo><RoleName>hasFunction</RoleName><RoleObjectType>dm:ClassOfFunctionalMapping</RoleObjectType><RoleExample>use ID from RDL</RoleExample></TemplateSignature></PropertiesOfLoweredTemplate>
	<LoweredTemplateOWLcode>
    		<![CDATA[
		]]>
 	 </LoweredTemplateOWLcode>
	<LoweredTemplateFOLcode><![CDATA[FunctionalMappingOf4ExpressReals(hasInput1, hasInput2, hasResult, hasInput3, hasInput4, hasFunction) <-> 
ExpressReal(hasInput1) &
ExpressReal(hasInput2) &
ExpressReal(hasInput3) &
ExpressReal(hasInput4) &
ExpressReal(hasResult) &
ClassOfFunctionalMapping(hasFunction) &
exists u1 exists u2(
      MultidimensionalObject(u1) &
      hasElement1(u1, hasInput1) &
      hasElement2(u1, hasInput2) &
      hasElement1(u1, hasInput3) &
      hasElement2(u1, hasInput4) &
      FunctionalMappingTriple(u2, u1, hasResult) &
      ClassificationTemplate(u2, hasFunction)) .]]>
</LoweredTemplateFOLcode>

<LoweredTemplateInstanceListing>
<![CDATA[GENERIC DEFINITION

tpl:FunctionalMappingOf4ExpressReals
      rdfs:subClassOf dm:Template ;
      rdfs:isDefinedBy  tpl:CL-FUNC-300.xml ;
      tpl:hasInput1 xsd:decimal  ;
      tpl:hasInput2 xsd:decimal  ;
      tpl:hasInput3 xsd:decimal  ;
      tpl:hasInput4 xsd:decimal  ;
      tpl:hasResult xsd:decimal  ;
      tpl:hasFunction dm:ClassOfFunctionalMapping ;
      meta:valEffectiveDate xsd:dateTime .

# EXAMPLE - A warehouse has four temperature measurements and a calculated average of that.

ex:bcad3a8d-a2b6-4e24-a278-4143d4756a16
      rdf:type tpl:FunctionalMappingOf4ExpressReals ;
      tpl:hasInput1 "16.9"^^xsd:decimal ;
      tpl:hasInput2 "17.5"^^xsd:decimal ;
      tpl:hasInput3 "17.3"^^xsd:decimal ;
      tpl:hasInput4 "19.0"^^xsd:decimal ;
      tpl:hasResult "17.675"^^xsd:decimal ;
      tpl:hasFunction rdl:RDS11567220 ; # FUNCTION AVER
      meta:valEffectiveDate "2021-08-17T14:43:00Z"^^xsd:dateTime .
]]>
</LoweredTemplateInstanceListing>
</TemplateSpecification>
