<?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>ClassOfParticipationAndInvolvementByReferenceDefinition</TemplateName>
	<defaultRdsId>FADF5EE60FEB4E43994964EB5AA31411</defaultRdsId>
	<Status>UPDATED NOV2023</Status>
	<TIPPredicate>coParticipatesIn+isInvolvedIn</TIPPredicate>
	<Description>Members of a ClassOfActivity have members of a ClassOfPhysicalObject as a participant, and members of a Class involved by reference, each in their given Role</Description>
	<Example>Any member of ClassOfActivity [WELDING TO AWS D1.1] has a member of the [WELDER] class [AWS CERTIFIED WELDER] as a participant in the Role of [PERFORMER], and a member of the [INSTRUCTION] class [AWS D1.1] as an involved-by-reference object in the Role of [INSTRUCTION(role)].</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>Any member of [EssentialType] class [hasParticipantType] in a [hasParticipantRole] Role, and any member of [EssentialType] class [hasInvolvedType] in a [hasInvolvementRole] Role participate(d) in the same member of ClassOfActivity [hasActivityType]</Definition>
	<ScopeNote>This template does, via a shared ClassOfActivity, define a relationship between (2) and (5).</ScopeNote>
	<AdminNote>Removed both 'hasDefined' predicates</AdminNote>
	<LiftedAndLoweredGraph>CL-ACTIV-250-20231120.png</LiftedAndLoweredGraph>
	<LiftedTemplate>
		<LiftedTemplateElements><Ref>1</Ref><URI>http://data.15926.org/dm/ClassOfActivity</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>2</Ref><URI>lci:ClassOfPhysicalObject</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/Class</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>5</Ref><URI>http://data.15926.org/dm/Role</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/ClassOfTemporalWholePart</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>9</Ref><URI>http://data.15926.org/lci/ClassOfPhysicalObject</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/ParticipatingRoleAndDomain</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>12</Ref><URI>http://data.15926.org/dm/SpecializationByRole</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>13</Ref><URI>http://data.15926.org/dm/ClassOfParticipation</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>14</Ref><URI>http://data.15926.org/dm/ClassOfTemporalWholePart</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>15</Ref><URI>http://data.15926.org/dm/Class</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>16</Ref><URI>http://data.15926.org/dm/SpecializationByDomain</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>17</Ref><URI>http://data.15926.org/dm/RoleAndDomain</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>18</Ref><URI>http://data.15926.org/dm/SpecializationByRole</URI></LiftedTemplateElements>
		<LiftedTemplateElements><Ref>19</Ref><URI>http://data.15926.org/dm/ClassOfInvolvementByReference</URI></LiftedTemplateElements>
	</LiftedTemplate>
	<PropertiesOfLoweredTemplate>
	  	<TemplateSignature><RoleNo>1</RoleNo><RoleName>hasActivityType</RoleName><RoleObjectType>dm:ClassOfActivity</RoleObjectType><RoleExample/></TemplateSignature>
		<TemplateSignature><RoleNo>2</RoleNo><RoleName>hasParticipantType</RoleName><RoleObjectType>lci:ClassOfPhysicalObject</RoleObjectType><RoleExample/></TemplateSignature>
		<TemplateSignature><RoleNo>3</RoleNo><RoleName>hasParticipantRole</RoleName><RoleObjectType>dm:Role</RoleObjectType><RoleExample>use ID from RDL</RoleExample></TemplateSignature>
		<TemplateSignature><RoleNo>4</RoleNo><RoleName>hasInvolvedType</RoleName><RoleObjectType>dn:Class</RoleObjectType><RoleExample/></TemplateSignature>
		<TemplateSignature><RoleNo>5</RoleNo><RoleName>hasInvolvementRole</RoleName><RoleObjectType>dm:Role</RoleObjectType><RoleExample>use ID from RDL</RoleExample></TemplateSignature>
	</PropertiesOfLoweredTemplate>
	<LoweredTemplateOWLcode>
<![CDATA[
		]]>
 	 </LoweredTemplateOWLcode>
	<LoweredTemplateFOLcode><![CDATA[ClassOfParticipationAndInvolvementByReferenceDefinition(hasActivityType, hasParticipantType, hasParticipantRole, hasInvolvedType, hasInvolvementRole) <->
ClassOfActivity(hasActivityType) & 
ClassOfPhysicalObject(hasParticipantType) &
Role(hasParticipantRole) &
Class(hasInvolvedType) &
Role(hasInvolvementRole) &  
exists u1 exists u2 exists u3 exists u4 exists u5(
      ClassOfTemporalWholePartTemplate(u1, hasActivityType) &
      ClassOfActivity(u1) &
      ClassOfTemporalWholePartTemplate(u2, hasParticipantType) &
      ClassOfPhysicalObject(u2) &
      SpecializationByDomainTemplate(u3, u2) &
      ParticipatingRoleAndDomain(u3) &
      SpecializationByRoleTemplate(u3, hasParticipantRole) &
      ClassOfParticipationTemplate(u3, u1) &
      ClassOfTemporalWholePartTemplate(u4, hasInvolvedType) &
      Class(u4) &
      SpecializationByDomainTemplate(u5, u4) &
      RoleAndDomain(u5) &
      SpecializationByRoleTemplate(u5, hasInvolvementRole) &
      ClassOfInvolvementByReferenceTemplate(u5, u1)) .]]>
</LoweredTemplateFOLcode>

<LoweredTemplateInstanceListing>
<![CDATA[GENERIC DEFINITION

tpl:ClassOfParticipationAndInvolvementByReferenceDefinition
      rdfs:subClassOf dm:Template ;
      rdfs:isDefinedBy  tpl:CL-ACTIV-250.xml ;
      tpl:hasActivityType dm:ClassOfActivity ;
      tpl:hasParticipantType lci:ClassOfPhysicalObject ;
      tpl:hasParticipantRole dm:Role ;
      tpl:hasInvolvedType lci:Class ;
      tpl:hasInvolvementRole dm:Role ;
      meta:valEffectiveDate xsd:dateTime .

# EXAMPLE - Any member of ClassOfActivity [WELDING TO AWS D1.1] has a member of the [WELDER] class [AWS CERTIFIED WELDER] as a participant in the Role of [PERFORMER], and a member of the [INSTRUCTION] class [AWS D1.1] as an involved-by-reference object in the Role of [INSTRUCTION(role)].

ex:f175f71f-d23e-4d97-b937-50b7cad17671
      rdf:type tpl:ClassOfParticipationAndInvolvementByReferenceDefinition ;
      tpl:hasActivityType rdl:RDS2229974 ; # WELDING TO AWS D1.1
      tpl:hasParticipantType rdl:RDS2229956 ; # AWS CERTIFIED WELDER
      tpl:hasParticipantRole  rdl:RDS222365 ; # PERFROMER
      tpl:hasInvolvedType rdl:RDS2229955 ; # AWS D1.1
      tpl:hasInvolvementRole rdl:RDS2220036 ; # INSTRUCTION(role)
      meta:valEffectiveDate "2021-07-17T15:07:00Z"^^xsd:dateTime .
]]>
</LoweredTemplateInstanceListing>
</TemplateSpecification>
