Template:— supply_node_resource (sup_node_res)
Context:— UK_Defence
Date: 2009/04/17 11:50:21
Revision: 1.3
Template: supply_node_resource

XML references to the Template

These can be cut and pasted into the XML as required.

supply_node_resource

Set up a hyperlink to the template definition.
<template_ref name="supply_node_resource" context="UK_Defence" />

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="supply_node_resource" context="UK_Defence" >
  <param name="ID">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="source_organization">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="related_supply_node">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="resource">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="valid_from">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="valid_to">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="supply_node_resource">
  <param_in name="ID" value=""/>
  <param_in name="source_organization" value=""/>
  <param_in name="related_supply_node" value=""/>
  <param_in name="resource" value=""/>
  <param_in name="valid_from" value=""/>
  <param_in name="valid_to" value=""/>
</template_example>

supply_node_resource
/supply_node_resource(ID='', source_organization='', related_supply_node='', resource='', valid_from='', valid_to='')/

Path

-- Resource
Organization_or_person_in_organization_assignment

-- Set the Organization_or_person_in_organization_assignment attribute role to be ignored
Organization_or_person_in_organization_assignment.role = '/IGNORE'

-- Assign the Organization_or_person_in_organization_assignment
Organization_or_person_in_organization_assignment.items -> @resource

-- Create the Detected_by parameter
Organization_or_person_in_organization_assignment.assigned_entity -> @related_supply_node
%^sup_node_res = Organization_or_person_in_organization_assignment%

-- ID
/identifier(
    ID=@ID,
    source_organization=@source_organization,
    type='Supply_node_resource_identifier',
    items=^sup_node_res)/

-- [optional Value from]
Date_or_date_time_assignment
Date_or_date_time_assignment.items -> ^sup_node_res
Date_or_date_time_assignment.assigned_date -> @valid_from
%^valid_from_date = Date_or_date_time_assignment%
/assigning_reference_data(
    items=^valid_from_date,
    class_name='Date_supply_node_resource_started',
    ecl_id='urn:plcs:rdl:uk_defence')/

-- [optional Value to]
Date_or_date_time_assignment
Date_or_date_time_assignment.items -> ^sup_node_res
Date_or_date_time_assignment.assigned_date -> @valid_to
%^valid_to_date = Date_or_date_time_assignment%
/assigning_reference_data(
    items=^valid_to_date,
    class_name='Date_supply_node_resource_ended',
    ecl_id='urn:plcs:rdl:uk_defence')/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Organization_or_person_in_organization_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="supply_node_resource">
   <comment>
      Resource
   </comment>
   <instantiate
      entity="Organization_or_person_in_organization_assignment"
      context="UK_Defence">
      
   </instantiate>
   <comment>
      Set the Organization_or_person_in_organization_assignment attribute role to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="role"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Assign the Organization_or_person_in_organization_assignment
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="resource">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Create the Detected_by parameter
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="assigned_entity"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="related_supply_node">
            
         </param_in_ref>
      </source>
   </assign>
   <bind
      parameter="sup_node_res">
      <express_entity
         entity="Organization_or_person_in_organization_assignment"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <comment>
      ID
   </comment>
   <call_template
      name="identifier"
      business_context="UK_Defence">
      <param_in
         name="ID"
         value="@ID">
         
      </param_in>
      <param_in
         name="source_organization"
         value="@source_organization">
         
      </param_in>
      <param_in
         name="type"
         value="'Supply_node_resource_identifier'">
         
      </param_in>
      <param_in
         name="items"
         value="^sup_node_res">
         
      </param_in>
   </call_template>
   <comment>
      [optional Value from]
   </comment>
   <instantiate
      entity="Date_or_date_time_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="sup_node_res">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="assigned_date"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="valid_from">
            
         </param_in_ref>
      </source>
   </assign>
   <bind
      parameter="valid_from_date">
      <express_entity
         entity="Date_or_date_time_assignment"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <call_template
      name="assigning_reference_data"
      business_context="UK_Defence">
      <param_in
         name="items"
         value="^valid_from_date">
         
      </param_in>
      <param_in
         name="class_name"
         value="'Date_supply_node_resource_started'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
   </call_template>
   <comment>
      [optional Value to]
   </comment>
   <instantiate
      entity="Date_or_date_time_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="sup_node_res">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="assigned_date"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="valid_to">
            
         </param_in_ref>
      </source>
   </assign>
   <bind
      parameter="valid_to_date">
      <express_entity
         entity="Date_or_date_time_assignment"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <call_template
      name="assigning_reference_data"
      business_context="UK_Defence">
      <param_in
         name="items"
         value="^valid_to_date">
         
      </param_in>
      <param_in
         name="class_name"
         value="'Date_supply_node_resource_ended'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
   </call_template>
</refpath>

© UK MOD 2010 — All rights reserved