Template:— recommended_document (rec_doc)
Context:— UK_Defence
Date: 2009/04/17 11:15:01
Revision: 1.6
Template: recommended_document

XML references to the Template

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

recommended_document

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="recommended_document" context="UK_Defence" >
  <param name="context">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="source_organization">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="location">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="quantity">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="related_document">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="recommended_document">
  <param_in name="context" value=""/>
  <param_in name="id" value=""/>
  <param_in name="source_organization" value=""/>
  <param_in name="location" value=""/>
  <param_in name="quantity" value=""/>
  <param_in name="related_document" value=""/>
</template_example>

recommended_document
/recommended_document(context='', id='', source_organization='', location='', quantity='', related_document='')/

Path

-- required resource
Required_resource_by_specification
%^doc_req_res_spec = Required_resource_by_specification%

-- document resource item
/representing_resource_item_realization(
    res_item_id='',
    res_item_id_class='',
    res_item_id_ecl_id='urn:plcs:rdl:std',
    res_item_id_org_id='',
    res_item_id_org_id_class='',
    res_item_id_org_id_ecl_id='urn:plcs:rdl:std',
    res_item_items=@related_document)/
%^doc_res_item = $representing_resource_item_realization.res_item%

-- required resource resource item
Required_resource_by_resource_item
Required_resource_by_resource_item.resource_item -> ^doc_res_item
%^doc_req_res_item = Required_resource_by_resource_item%

-- relate required resources specification and resource item
/representing_required_resource_relationship(
    req_res_rel_class_name='Required_resource_relationship',
    req_res_rel_ecl_id='urn:plcs:rdl:std',
    relating_req_res=^doc_req_res_spec,
    related_req_res=^doc_req_res_item)/

-- assign a quantity to the required resource and classify it
/assigning_resource_property(
    property_class_name='Estimated_quantity',
    property_ecl_id='urn:plcs:rdl:uk_defence',
    described_element=^doc_req_res_spec)/
%^property = $assigning_resource_property.property%

-- assign a value and unit to the quantity property
/resource_property_numeric(
    value=@quantity,
    unit='Count',
    unit_ecl_id='urn:plcs:rdl:std',
    si_unit='.false.',
    context='Numerical_representation_context',
    context_ecl_id='urn:plcs:rdl:std',
    property=^property)/

-- provide the role of the required_resource
/assigning_reference_data(
    items=^doc_req_res_spec,
    class_name='recommended',
    ecl_id='urn:plcs:rdl:uk_defence')/

-- [optional context]
/representing_required_resource_relationship(
    req_res_rel_class_name='Context_assignment',
    req_res_rel_ecl_id='urn:plcs:rdl:uk_defence',
    relating_req_res=@context,
    related_req_res=^doc_req_res_spec)/

-- Location
Resource_item_assignment
Resource_item_assignment.assigned_resource -> ^doc_res_item
Resource_item_assignment.item -> @location
%^res_item_ass = Resource_item_assignment%

-- provide the role of the Resource_assignment
/assigning_reference_data(
    items=^res_item_ass,
    class_name='recommended',
    ecl_id='urn:plcs:rdl:uk_defence')/

-- ID (mandatory)
/identifier(
    ID=@id,
    source_organization=@source_organization,
    type='Recommended_document_id_code',
    items=^doc_req_res_spec)/

XML representation of path

<refpath
   template="recommended_document">
   <comment>
      required resource
   </comment>
   <instantiate
      entity="Required_resource_by_specification"
      context="UK_Defence">
      
   </instantiate>
   <bind
      parameter="doc_req_res_spec">
      <express_entity
         entity="Required_resource_by_specification"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <comment>
      document resource item
   </comment>
   <call_template
      name="representing_resource_item_realization"
      business_context="UK_Defence">
      <param_in
         name="res_item_id"
         value="''">
         
      </param_in>
      <param_in
         name="res_item_id_class"
         value="''">
         
      </param_in>
      <param_in
         name="res_item_id_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="res_item_id_org_id"
         value="''">
         
      </param_in>
      <param_in
         name="res_item_id_org_id_class"
         value="''">
         
      </param_in>
      <param_in
         name="res_item_id_org_id_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="res_item_items"
         value="@related_document">
         
      </param_in>
   </call_template>
   <bind
      parameter="doc_res_item">
      <template_instance
         template="representing_resource_item_realization"
         parameter="res_item">
         
      </template_instance>
   </bind>
   <comment>
      required resource resource item
   </comment>
   <instantiate
      entity="Required_resource_by_resource_item"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Required_resource_by_resource_item"
            attribute="resource_item"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="doc_res_item">
            
         </bound_parameter>
      </source>
   </assign>
   <bind
      parameter="doc_req_res_item">
      <express_entity
         entity="Required_resource_by_resource_item"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <comment>
      relate required resources specification and resource item
   </comment>
   <call_template
      name="representing_required_resource_relationship"
      business_context="UK_Defence">
      <param_in
         name="req_res_rel_class_name"
         value="'Required_resource_relationship'">
         
      </param_in>
      <param_in
         name="req_res_rel_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="relating_req_res"
         value="^doc_req_res_spec">
         
      </param_in>
      <param_in
         name="related_req_res"
         value="^doc_req_res_item">
         
      </param_in>
   </call_template>
   <comment>
      assign a quantity to the required resource and classify it
   </comment>
   <call_template
      name="assigning_resource_property"
      business_context="UK_Defence">
      <param_in
         name="property_class_name"
         value="'Estimated_quantity'">
         
      </param_in>
      <param_in
         name="property_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="described_element"
         value="^doc_req_res_spec">
         
      </param_in>
   </call_template>
   <bind
      parameter="property">
      <template_instance
         template="assigning_resource_property"
         parameter="property">
         
      </template_instance>
   </bind>
   <comment>
      assign a value and unit to the quantity property
   </comment>
   <call_template
      name="resource_property_numeric"
      business_context="UK_Defence">
      <param_in
         name="value"
         value="@quantity">
         
      </param_in>
      <param_in
         name="unit"
         value="'Count'">
         
      </param_in>
      <param_in
         name="unit_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="si_unit"
         value="'.false.'">
         
      </param_in>
      <param_in
         name="context"
         value="'Numerical_representation_context'">
         
      </param_in>
      <param_in
         name="context_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="property"
         value="^property">
         
      </param_in>
   </call_template>
   <comment>
      provide the role of the required_resource
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="UK_Defence">
      <param_in
         name="items"
         value="^doc_req_res_spec">
         
      </param_in>
      <param_in
         name="class_name"
         value="'recommended'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
   </call_template>
   <comment>
      [optional context]
   </comment>
   <call_template
      name="representing_required_resource_relationship"
      business_context="UK_Defence">
      <param_in
         name="req_res_rel_class_name"
         value="'Context_assignment'">
         
      </param_in>
      <param_in
         name="req_res_rel_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="relating_req_res"
         value="@context">
         
      </param_in>
      <param_in
         name="related_req_res"
         value="^doc_req_res_spec">
         
      </param_in>
   </call_template>
   <comment>
      Location
   </comment>
   <instantiate
      entity="Resource_item_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Resource_item_assignment"
            attribute="assigned_resource"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="doc_res_item">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Resource_item_assignment"
            attribute="item"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="location">
            
         </param_in_ref>
      </source>
   </assign>
   <bind
      parameter="res_item_ass">
      <express_entity
         entity="Resource_item_assignment"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <comment>
      provide the role of the Resource_assignment
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="UK_Defence">
      <param_in
         name="items"
         value="^res_item_ass">
         
      </param_in>
      <param_in
         name="class_name"
         value="'recommended'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
   </call_template>
   <comment>
      ID (mandatory)
   </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="'Recommended_document_id_code'">
         
      </param_in>
      <param_in
         name="items"
         value="^doc_req_res_spec">
         
      </param_in>
   </call_template>
</refpath>

© UK MOD 2010 — All rights reserved