Template:— supply_items_list (sup_itm_lst)
Context:— UK_Defence
Date: 2010/03/15 13:38:27
Revision: 1.7
Template: supply_items_list

XML references to the Template

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

supply_items_list

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="supply_items_list" 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="name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="type">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="supply_list_item">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="supply_items_list">
  <param_in name="id" value=""/>
  <param_in name="source_organization" value=""/>
  <param_in name="name" value=""/>
  <param_in name="type" value=""/>
  <param_in name="supply_list_item" value=""/>
</template_example>

supply_items_list
/supply_items_list(id='', source_organization='', name='', type='', supply_list_item='')/

Path

-- Create the relationship entity
/representing_resource_item_relationship(
    class_name='Supply_list_membership',
    ecl_id='urn:plcs:rdl:uk_defence')/
%^supply_list_relationship = $representing_resource_item_relationship.res_item_rel%

-- Create the Resource item to represent the head/top of the list
/representing_resource_item(
    res_item_id=@id,
    res_item_id_class='Supply_item_list_identification_code',
    res_item_id_ecl_id='urn:plcs:rdl:uk_defence',
    res_item_id_org_id=@source_organization,
    res_item_id_org_id_class='Organization_name_or_identification_code',
    res_item_id_org_id_ecl_id='urn:plcs:rdl:uk_defence')/

-- re-direct the output from the call
%^supply_item_list = $representing_resource_item.res_item%
/assigning_reference_data(
    items=^supply_item_list,
    class_name='Supply_item_list',
    ecl_id='urn:plcs:rdl:uk_defence')/

-- Name
/identifier(
    ID=@name,
    source_organization=@source_organization,
    type='Name',
    items=^supply_item_list)/
/assigning_descriptor(
    descr=@type,
    class_name='Supply_item_list_type',
    ecl_id='urn:plcs:rdl:uk_defence',
    is_assigned_to=^supply_item_list)/

-- Map the input parameters to those for rep_prom_usg, first is the top item
^supply_list_relationship.related -> @supply_list_item
^supply_list_relationship.relating -> ^supply_item_list

XML representation of path

<refpath
   template="supply_items_list">
   <comment>
      Create the relationship entity
   </comment>
   <call_template
      name="representing_resource_item_relationship"
      business_context="UK_Defence">
      <param_in
         name="class_name"
         value="'Supply_list_membership'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
   </call_template>
   <bind
      parameter="supply_list_relationship">
      <template_instance
         template="representing_resource_item_relationship"
         parameter="res_item_rel">
         
      </template_instance>
   </bind>
   <comment>
      Create the Resource item to represent the head/top of the list
   </comment>
   <call_template
      name="representing_resource_item"
      business_context="UK_Defence">
      <param_in
         name="res_item_id"
         value="@id">
         
      </param_in>
      <param_in
         name="res_item_id_class"
         value="'Supply_item_list_identification_code'">
         
      </param_in>
      <param_in
         name="res_item_id_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="res_item_id_org_id"
         value="@source_organization">
         
      </param_in>
      <param_in
         name="res_item_id_org_id_class"
         value="'Organization_name_or_identification_code'">
         
      </param_in>
      <param_in
         name="res_item_id_org_id_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
   </call_template>
   <comment>
      re-direct the output from the call
   </comment>
   <bind
      parameter="supply_item_list">
      <template_instance
         template="representing_resource_item"
         parameter="res_item">
         
      </template_instance>
   </bind>
   <call_template
      name="assigning_reference_data"
      business_context="UK_Defence">
      <param_in
         name="items"
         value="^supply_item_list">
         
      </param_in>
      <param_in
         name="class_name"
         value="'Supply_item_list'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
   </call_template>
   <comment>
      Name
   </comment>
   <call_template
      name="identifier"
      business_context="UK_Defence">
      <param_in
         name="ID"
         value="@name">
         
      </param_in>
      <param_in
         name="source_organization"
         value="@source_organization">
         
      </param_in>
      <param_in
         name="type"
         value="'Name'">
         
      </param_in>
      <param_in
         name="items"
         value="^supply_item_list">
         
      </param_in>
   </call_template>
   <call_template
      name="assigning_descriptor"
      business_context="UK_Defence">
      <param_in
         name="descr"
         value="@type">
         
      </param_in>
      <param_in
         name="class_name"
         value="'Supply_item_list_type'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="is_assigned_to"
         value="^supply_item_list">
         
      </param_in>
   </call_template>
   <comment>
      Map the input parameters to those for rep_prom_usg, first is the top item
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="supply_list_relationship.related">
            
         </bound_parameter>
      </target>
      <source>
         <param_in_ref
            name="supply_list_item">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="supply_list_relationship.relating">
            
         </bound_parameter>
      </target>
      <source>
         <bound_parameter
            name="supply_item_list">
            
         </bound_parameter>
      </source>
   </assign>
</refpath>

© UK MOD 2010 — All rights reserved