Template:— asset_managed_product (ass_mgd_prod)
Context:— UK_Defence
Date: 2009/10/30 15:49:23
Revision: 1.5
Template: asset_managed_product

XML references to the Template

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

asset_managed_product

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="asset_managed_product" context="UK_Defence" >
  <param name="prod_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="prod_source_organization">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="prod_type">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="category">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="book_value">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="book_value_unit">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="owned_by">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="end_date_year">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="end_date_month">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="end_date_day">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="start_date_year">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="start_date_month">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="start_date_day">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="amp_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="amp_source_organization">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="amp_type">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="depreciation_period_value_unit">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="depreciation_period_value">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="asset_id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="asset_source_organization">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="asset_type">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="conforms_with">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="asset_managed_product">
  <param_in name="prod_id" value=""/>
  <param_in name="prod_source_organization" value=""/>
  <param_in name="prod_type" value=""/>
  <param_in name="category" value=""/>
  <param_in name="book_value" value=""/>
  <param_in name="book_value_unit" value=""/>
  <param_in name="owned_by" value=""/>
  <param_in name="end_date_year" value=""/>
  <param_in name="end_date_month" value=""/>
  <param_in name="end_date_day" value=""/>
  <param_in name="start_date_year" value=""/>
  <param_in name="start_date_month" value=""/>
  <param_in name="start_date_day" value=""/>
  <param_in name="amp_id" value=""/>
  <param_in name="amp_source_organization" value=""/>
  <param_in name="amp_type" value=""/>
  <param_in name="depreciation_period_value_unit" value=""/>
  <param_in name="depreciation_period_value" value=""/>
  <param_in name="name" value=""/>
  <param_in name="asset_id" value=""/>
  <param_in name="asset_source_organization" value=""/>
  <param_in name="asset_type" value=""/>
  <param_in name="conforms_with" value=""/>
</template_example>

asset_managed_product
/asset_managed_product(prod_id='', prod_source_organization='', prod_type='', category='', book_value='', book_value_unit='', owned_by='', end_date_year='', end_date_month='', end_date_day='', start_date_year='', start_date_month='', start_date_day='', amp_id='', amp_source_organization='', amp_type='', depreciation_period_value_unit='', depreciation_period_value='', name='', asset_id='', asset_source_organization='', asset_type='', conforms_with='')/

Path

-- instantiate the product
-- Note it is assumed that the part is not versioned
/product(
    conforms_with=@conforms_with,
    ID=@prod_id,
    source_organization=@prod_source_organization,
    type=@prod_type,
    name='/IGNORE')/
%^pai = $product.pai%
%^par = $product.par%
%^view = $product.view%

-- assign a book value property to the asset and classify it as 'Cost_property
/property(
    ID='Cost_property',
    property_ecl_id='urn:plcs:rdl:uk_defence',
    value=@book_value,
    unit=@book_value_unit,
    unit_ecl_id='urn:plcs:rdl:std',
    si_unit='.false.',
    disposition='/IGNORE',
    a_property_of=^view)/

-- instantiate a start date to the asset managed product
/assigning_time(
    date_class_name='Date_actual_start',
    date_ecl_id='urn:plcs:rdl:std',
    year=@start_date_year,
    month=@start_date_month,
    day=@start_date_day,
    hour='0',
    minute='0',
    second='0',
    sense='.EXACT.',
    hour_offset='0',
    minute_offset='0',
    items=^par)/

-- [OPTIONAL end date]
/assigning_time(
    date_class_name='Date_actual_end',
    date_ecl_id='urn:plcs:rdl:std',
    year=@end_date_year,
    month=@end_date_month,
    day=@end_date_day,
    hour='0',
    minute='0',
    second='0',
    sense='.EXACT.',
    hour_offset='0',
    minute_offset='0',
    items=^par)/

-- [optional Category]
/assigning_reference_data(
    items=^par,
    class_name=@category,
    ecl_id='urn:plcs:rdl:uk_defence')/

-- instantiate assigning_identification for the asset's identification
/identifier(
    ID=@asset_id,
    source_organization=@asset_source_organization,
    type=@asset_type,
    items=^pai)/

-- instantiate assigning_identification for the asset managed product's identification
/identifier(
    ID=@amp_id,
    source_organization=@amp_source_organization,
    type=@amp_type,
    items=^pai)/

-- [OPTIONAL name]
/identifier(
    ID=@name,
    source_organization=@asset_source_organization,
    type='Name',
    items=^pai)/

-- [OPTIONAL depreciation period]
/property(
    ID='Depreciation_period',
    property_ecl_id='urn:plcs:rdl:uk_defence',
    value=@depreciation_period_value,
    unit=@depreciation_period_value_unit,
    unit_ecl_id='urn:plcs:rdl:std',
    si_unit='false',
    disposition='/IGNORE',
    a_property_of=^view)/

-- Instantiate Organization_or_person_in_organization_assignment entity
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 to the AMP
Organization_or_person_in_organization_assignment.items -> ^pai

-- Create the owned_by parameter
Organization_or_person_in_organization_assignment.assigned_entity -> @owned_by
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="asset_managed_product">
   <comment>
      instantiate the product
   </comment>
   <comment>
      Note it is assumed that the part is not versioned
   </comment>
   <call_template
      name="product"
      business_context="UK_Defence">
      <param_in
         name="conforms_with"
         value="@conforms_with">
         
      </param_in>
      <param_in
         name="ID"
         value="@prod_id">
         
      </param_in>
      <param_in
         name="source_organization"
         value="@prod_source_organization">
         
      </param_in>
      <param_in
         name="type"
         value="@prod_type">
         
      </param_in>
      <param_in
         name="name"
         value="'/IGNORE'">
         
      </param_in>
   </call_template>
   <bind
      parameter="pai">
      <template_instance
         template="product"
         parameter="pai">
         
      </template_instance>
   </bind>
   <bind
      parameter="par">
      <template_instance
         template="product"
         parameter="par">
         
      </template_instance>
   </bind>
   <bind
      parameter="view">
      <template_instance
         template="product"
         parameter="view">
         
      </template_instance>
   </bind>
   <comment>
      assign a book value property to the asset and classify it as 'Cost_property
   </comment>
   <call_template
      name="property"
      business_context="UK_Defence">
      <param_in
         name="ID"
         value="'Cost_property'">
         
      </param_in>
      <param_in
         name="property_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="value"
         value="@book_value">
         
      </param_in>
      <param_in
         name="unit"
         value="@book_value_unit">
         
      </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="disposition"
         value="'/IGNORE'">
         
      </param_in>
      <param_in
         name="a_property_of"
         value="^view">
         
      </param_in>
   </call_template>
   <comment>
      instantiate a start date to the asset managed product
   </comment>
   <call_template
      name="assigning_time"
      business_context="UK_Defence">
      <param_in
         name="date_class_name"
         value="'Date_actual_start'">
         
      </param_in>
      <param_in
         name="date_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="year"
         value="@start_date_year">
         
      </param_in>
      <param_in
         name="month"
         value="@start_date_month">
         
      </param_in>
      <param_in
         name="day"
         value="@start_date_day">
         
      </param_in>
      <param_in
         name="hour"
         value="'0'">
         
      </param_in>
      <param_in
         name="minute"
         value="'0'">
         
      </param_in>
      <param_in
         name="second"
         value="'0'">
         
      </param_in>
      <param_in
         name="sense"
         value="'.EXACT.'">
         
      </param_in>
      <param_in
         name="hour_offset"
         value="'0'">
         
      </param_in>
      <param_in
         name="minute_offset"
         value="'0'">
         
      </param_in>
      <param_in
         name="items"
         value="^par">
         
      </param_in>
   </call_template>
   <comment>
      [OPTIONAL end date]
   </comment>
   <call_template
      name="assigning_time"
      business_context="UK_Defence">
      <param_in
         name="date_class_name"
         value="'Date_actual_end'">
         
      </param_in>
      <param_in
         name="date_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="year"
         value="@end_date_year">
         
      </param_in>
      <param_in
         name="month"
         value="@end_date_month">
         
      </param_in>
      <param_in
         name="day"
         value="@end_date_day">
         
      </param_in>
      <param_in
         name="hour"
         value="'0'">
         
      </param_in>
      <param_in
         name="minute"
         value="'0'">
         
      </param_in>
      <param_in
         name="second"
         value="'0'">
         
      </param_in>
      <param_in
         name="sense"
         value="'.EXACT.'">
         
      </param_in>
      <param_in
         name="hour_offset"
         value="'0'">
         
      </param_in>
      <param_in
         name="minute_offset"
         value="'0'">
         
      </param_in>
      <param_in
         name="items"
         value="^par">
         
      </param_in>
   </call_template>
   <comment>
      [optional Category]
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="UK_Defence">
      <param_in
         name="items"
         value="^par">
         
      </param_in>
      <param_in
         name="class_name"
         value="@category">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
   </call_template>
   <comment>
      instantiate assigning_identification for the asset's identification
   </comment>
   <call_template
      name="identifier"
      business_context="UK_Defence">
      <param_in
         name="ID"
         value="@asset_id">
         
      </param_in>
      <param_in
         name="source_organization"
         value="@asset_source_organization">
         
      </param_in>
      <param_in
         name="type"
         value="@asset_type">
         
      </param_in>
      <param_in
         name="items"
         value="^pai">
         
      </param_in>
   </call_template>
   <comment>
      instantiate assigning_identification for the asset managed product's identification
   </comment>
   <call_template
      name="identifier"
      business_context="UK_Defence">
      <param_in
         name="ID"
         value="@amp_id">
         
      </param_in>
      <param_in
         name="source_organization"
         value="@amp_source_organization">
         
      </param_in>
      <param_in
         name="type"
         value="@amp_type">
         
      </param_in>
      <param_in
         name="items"
         value="^pai">
         
      </param_in>
   </call_template>
   <comment>
      [OPTIONAL name]
   </comment>
   <call_template
      name="identifier"
      business_context="UK_Defence">
      <param_in
         name="ID"
         value="@name">
         
      </param_in>
      <param_in
         name="source_organization"
         value="@asset_source_organization">
         
      </param_in>
      <param_in
         name="type"
         value="'Name'">
         
      </param_in>
      <param_in
         name="items"
         value="^pai">
         
      </param_in>
   </call_template>
   <comment>
      [OPTIONAL depreciation period]
   </comment>
   <call_template
      name="property"
      business_context="UK_Defence">
      <param_in
         name="ID"
         value="'Depreciation_period'">
         
      </param_in>
      <param_in
         name="property_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="value"
         value="@depreciation_period_value">
         
      </param_in>
      <param_in
         name="unit"
         value="@depreciation_period_value_unit">
         
      </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="disposition"
         value="'/IGNORE'">
         
      </param_in>
      <param_in
         name="a_property_of"
         value="^view">
         
      </param_in>
   </call_template>
   <comment>
      Instantiate Organization_or_person_in_organization_assignment entity
   </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 to the AMP
   </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>
         <bound_parameter
            name="pai">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      Create the owned_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="owned_by">
            
         </param_in_ref>
      </source>
   </assign>
</refpath>

© UK MOD 2010 — All rights reserved