Template:— resource_demand (res_dmnd)
Context:— UK_Defence
Date: 2009/04/17 11:42:30
Revision: 1.7
Template: resource_demand

XML references to the Template

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

resource_demand

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="resource_demand" context="UK_Defence" >
  <param name="id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="source_organization_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="lack_of_item_impact">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="demanding_organization_unit">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="demanding_person">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="demand_date">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="demanded_quantity">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="demanded_quantity_unit">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="demanded_quantity_si_unit">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="resource_demand">
  <param_in name="id" value=""/>
  <param_in name="source_organization_id" value=""/>
  <param_in name="lack_of_item_impact" value=""/>
  <param_in name="demanding_organization_unit" value=""/>
  <param_in name="demanding_person" value=""/>
  <param_in name="demand_date" value=""/>
  <param_in name="demanded_quantity" value=""/>
  <param_in name="demanded_quantity_unit" value=""/>
  <param_in name="demanded_quantity_si_unit" value=""/>
</template_example>

resource_demand
/resource_demand(id='', source_organization_id='', lack_of_item_impact='', demanding_organization_unit='', demanding_person='', demand_date='', demanded_quantity='', demanded_quantity_unit='', demanded_quantity_si_unit='')/

Path

-- Create the Activity to represent the resource_demand concept
Activity
Activity.id = '/IGNORE'
Activity.name = '/IGNORE'

-- Note the Activity_method is UNUSED
Activity_method
Activity_method.name = '/IGNORE'
Activity_method.purpose = '/IGNORE'
Activity.chosen_method -> Activity_method
%^resource_demand = Activity%

-- Demand_date
Date_or_date_time_assignment
Date_or_date_time_assignment.role = '/IGNORE'
Date_or_date_time_assignment.items -> ^resource_demand
Date_or_date_time_assignment.assigned_date -> @demand_date

-- [Optional 0:1 Lack of item impact]
/assigning_descriptor(
    descr=@lack_of_item_impact,
    class_name='Lack_of_item_impact',
    ecl_id='urn:plcs:rdl:uk_defence',
    is_assigned_to=^resource_demand)/

-- id
/identifier(
    items=^resource_demand,
    ID=@id,
    type='Resource_demand_identification_code',
    source_organization=@source_organization_id)/

-- Demanding Organization
Organization_or_person_in_organization_assignment
Organization_or_person_in_organization_assignment.role = '/IGNORE'
Organization_or_person_in_organization_assignment.items -> ^resource_demand
Organization_or_person_in_organization_assignment.assigned_entity -> @demanding_organization_unit

-- Demanding Person
-- Note this is a second instance or usage of Organization_or_person_in_organization_assignment - Graphical Instance cannot handle this
-- G.I. needs to know this is a new instance and not a reuse of the previous one
Organization_or_person_in_organization_assignment
Organization_or_person_in_organization_assignment.role = '/IGNORE'
Organization_or_person_in_organization_assignment.items -> ^resource_demand
Organization_or_person_in_organization_assignment.assigned_entity -> @demanding_person

-- Demanded_quantity
/assigning_resource_property(
    property_class_name='Activity_property',
    property_ecl_id='urn:plcs:rdl:uk_defence',
    described_element=^resource_demand)/
%^property_qty = $assigning_resource_property.property%
/resource_property_numeric(
    value=@demanded_quantity,
    unit=@demanded_quantity_unit,
    unit_ecl_id='urn:plcs:rdl:uk_defence',
    si_unit=@demanded_quantity_si_unit,
    context='Numerical_representation_context',
    context_ecl_id='urn:plcs:rdl:uk_defence',
    property=^property_qty)/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Activity.id '/IGNORE'
Activity.name '/IGNORE'
Activity_method.name '/IGNORE'
Activity_method.purpose '/IGNORE'
Date_or_date_time_assignment.role '/IGNORE'
Organization_or_person_in_organization_assignment.role '/IGNORE'
Organization_or_person_in_organization_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="resource_demand">
   <comment>
      Create the Activity to represent the resource_demand concept
   </comment>
   <instantiate
      entity="Activity"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Activity"
            attribute="id"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Activity"
            attribute="name"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Note the Activity_method is UNUSED
   </comment>
   <instantiate
      entity="Activity_method"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Activity_method"
            attribute="name"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Activity_method"
            attribute="purpose"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Activity"
            attribute="chosen_method"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Activity_method"
            context="UK_Defence">
            
         </express_entity>
      </source>
   </assign>
   <bind
      parameter="resource_demand">
      <express_entity
         entity="Activity"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <comment>
      Demand_date
   </comment>
   <instantiate
      entity="Date_or_date_time_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="role"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value="'/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <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="resource_demand">
            
         </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="demand_date">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      [Optional 0:1 Lack of item impact]
   </comment>
   <call_template
      name="assigning_descriptor"
      business_context="UK_Defence">
      <param_in
         name="descr"
         value="@lack_of_item_impact">
         
      </param_in>
      <param_in
         name="class_name"
         value="'Lack_of_item_impact'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="is_assigned_to"
         value="^resource_demand">
         
      </param_in>
   </call_template>
   <comment>
      id
   </comment>
   <call_template
      name="identifier"
      business_context="UK_Defence">
      <param_in
         name="items"
         value="^resource_demand">
         
      </param_in>
      <param_in
         name="ID"
         value="@id">
         
      </param_in>
      <param_in
         name="type"
         value="'Resource_demand_identification_code'">
         
      </param_in>
      <param_in
         name="source_organization"
         value="@source_organization_id">
         
      </param_in>
   </call_template>
   <comment>
      Demanding Organization
   </comment>
   <instantiate
      entity="Organization_or_person_in_organization_assignment"
      context="UK_Defence">
      
   </instantiate>
   <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>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="resource_demand">
            
         </bound_parameter>
      </source>
   </assign>
   <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="demanding_organization_unit">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Demanding Person
   </comment>
   <comment>
      Note this is a second instance or usage of Organization_or_person_in_organization_assignment - Graphical Instance cannot handle this
   </comment>
   <comment>
      G.I. needs to know this is a new instance and not a reuse of the previous one
   </comment>
   <instantiate
      entity="Organization_or_person_in_organization_assignment"
      context="UK_Defence">
      
   </instantiate>
   <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>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="resource_demand">
            
         </bound_parameter>
      </source>
   </assign>
   <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="demanding_person">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Demanded_quantity
   </comment>
   <call_template
      name="assigning_resource_property"
      business_context="UK_Defence">
      <param_in
         name="property_class_name"
         value="'Activity_property'">
         
      </param_in>
      <param_in
         name="property_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="described_element"
         value="^resource_demand">
         
      </param_in>
   </call_template>
   <bind
      parameter="property_qty">
      <template_instance
         template="assigning_resource_property"
         parameter="property">
         
      </template_instance>
   </bind>
   <call_template
      name="resource_property_numeric"
      business_context="UK_Defence">
      <param_in
         name="value"
         value="@demanded_quantity">
         
      </param_in>
      <param_in
         name="unit"
         value="@demanded_quantity_unit">
         
      </param_in>
      <param_in
         name="unit_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="si_unit"
         value="@demanded_quantity_si_unit">
         
      </param_in>
      <param_in
         name="context"
         value="'Numerical_representation_context'">
         
      </param_in>
      <param_in
         name="context_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="property"
         value="^property_qty">
         
      </param_in>
   </call_template>
</refpath>

© UK MOD 2010 — All rights reserved