<?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>ClassOfInvolvementByReferenceDefinition</TemplateName>
	<defaultRdsId>8204B4DAEB544E158C6E597920020D3F</defaultRdsId>
	<Status>UPDATED NOV2023</Status>
	<TIPPredicate>coIsInvolvedByReferenceIn</TIPPredicate>
	<Description>Members of a Class are involved by reference in members of a ClassOfActivity, with Cardinalities</Description>
	<Example><![CDATA[API standard 1104 is involved by reference in a member of activity class 'Welding of Line CO_RZ17801' in the role of 'Applicable Standard'.]]></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>TemplateForClassOfActivity</SubClassOf>
	<Definition>[hasCardinalityOfActivity] member(s) of [hasActivityType] involve(s)-by-reference [hasCardinalityOfInvolved] member(s) of [EssentialType] class [hasInvolvedType] in a [hasInvolvementRole] Role</Definition>
	<ScopeNote>Although In ISO 15926 the cardinalities are the opposite of the customary cardinality, they have been defined here in that customary manner in the template signature (by reversing end1Cardinality and end2Cardinality).</ScopeNote>
	<AdminNote/>
	<LiftedAndLoweredGraph>CL-ACTIV-300-20231120.png</LiftedAndLoweredGraph>
	<LiftedTemplate>
	    	<LiftedTemplateElements><Ref>1</Ref><URI>http://data.15926.org/dm/ClassOfActivity</URI></LiftedTemplateElements>
	    	<LiftedTemplateElements><Ref>2</Ref><URI>http://data.15926.org/dm/Class</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>3</Ref><URI>http://data.15926.org/dm/Role</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>4</Ref><URI>http://data.15926.org/dm/Cardinality</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>5</Ref><URI>http://data.15926.org/dm/Cardinality</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>6</Ref><URI>http://data.15926.org/dm/ClassOfTemporalWholePart</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>7</Ref><URI>http://data.15926.org/dm/ClassOfActivity</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>8</Ref><URI>http://data.15926.org/dm/ClassOfInvolvementByReference</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>9</Ref><URI>http://data.15926.org/dm/RoleAndDomain</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>10</Ref><URI>http://data.15926.org/dm/SpecializationByDomain</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>11</Ref><URI>http://data.15926.org/dm/SpecializationByRole</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>12</Ref><URI>http://data.15926.org/dm/Class</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>13</Ref><URI>http://data.15926.org/dm/ClassOfTemporalWholePart</URI></LiftedTemplateElements>
	</LiftedTemplate>
	<PropertiesOfLoweredTemplate>
  		<TemplateSignature><RoleNo>1</RoleNo><RoleName>hasActivityType</RoleName><RoleObjectType>dm:ClassOfActivity</RoleObjectType><RoleExample/></TemplateSignature>
		<TemplateSignature><RoleNo>2</RoleNo><RoleName>hasInvolvedType</RoleName><RoleObjectType>dm:Class</RoleObjectType><RoleExample/></TemplateSignature>
		<TemplateSignature><RoleNo>3</RoleNo><RoleName>hasInvolvementRole</RoleName><RoleObjectType>dm:Role</RoleObjectType><RoleExample>use ID from RDL</RoleExample></TemplateSignature>
		<TemplateSignature><RoleNo>4</RoleNo><RoleName>hasCardinalityOfActivity</RoleName><RoleObjectType>dm:Cardinality</RoleObjectType><RoleExample>use ID from RDL</RoleExample></TemplateSignature>
		<TemplateSignature><RoleNo>5</RoleNo><RoleName>hasCardinalityOfInvolved</RoleName><RoleObjectType>dm:Cardinality</RoleObjectType><RoleExample>use ID from RDL</RoleExample></TemplateSignature>
	</PropertiesOfLoweredTemplate>
	<LoweredTemplateOWLcode>
    		<![CDATA[
		]]>
 	 </LoweredTemplateOWLcode>
	<LoweredTemplateFOLcode><![CDATA[ClassOfInvolvementByReferenceDefinition(hasActivityType, hasInvolvedType, hasInvolvementRole, hasCardinalityOfIActivity, hasCardinalityOfInvolved) <->
ClassOfActivity(hasActivityType) &
Class(hasInvolvedType) &
Role(hasInvolvementRole) &
Cardinality(hasCardinalityOfActivity) &
Cardinality(hasCardinalityOfInvolved) &
exists u1 exists u2 exists u3(
      ClassOfActivity(u1) &
      ClassOfTemporalWholePartTemplate(u1, hasActivityType) &
      ClassOfInvolvementByReferenceTriple(u4, u2, u1)&
      hasEnd1Cardinality(u4, hasCardinalityOfActivity) &
      hasEnd2Cardinality(u4, hasCardinalityOfInvolved) &
      RoleAndDomain(u2) &
      SpecializationByRoleTemplate(u2, hasInvolvementRole) &
      SpecializationByDomainTemplate(u2, u3) &
      Class(u3) &
      ClassOfTemporalWholePartTemplate(u3, hasInvolvedType)) .]]>
	</LoweredTemplateFOLcode>

<LoweredTemplateInstanceListing>
<![CDATA[GENERIC DEFINITION

tpl:ClassOfInvolvementByReferenceDefinition
      rdfs:subClassOf dm:Template ;
      rdfs:isDefinedBy  tpl:CL-ACTIV-300.xml ;
      tpl:hasActivityType dm:ClassOfActivity ;
      tpl:hasInvolvedType dm:Class ;
      tpl:hasInvolvementRole dm:Role ;
      tpl:hasCardinalityOfActivity dm:Cardinality ;
      tpl:hasCardinalityOfInvolved dm:Cardinality ;
      meta:valEffectiveDate xsd:dateTime .

# EXAMPLE - API standard 1104 is involved by reference in a member of activity class 'Welding of Line CO_RZ17801' in the role of 'Applicable Standard'.

ex:494ce008-7d3f-4cf5-89b7-7591e200d214
      rdf:type tpl:ClassOfInvolvementByReferenceDefinition ;
      tpl:hasActivityType rdl:RDS9651347 ; # WELDING
      tpl:hasInvolvedType api:RDS2229952 ; # API 1104
      tpl:hasInvolvementRole rdl:RDS2229953 ; # APPLICABLE STANDARD
      tpl:hasCardinalityOfActivity rdl:RDS222625 ; # ONE TO ONE
      tpl:hasCardinalityOfInvolved rdl:RDS222625 ; # ONE TO ONE
      meta:valEffectiveDate "2021-07-17T16:34:00Z"^^xsd:dateTime .
]]>
</LoweredTemplateInstanceListing>
</TemplateSpecification>
