Template:— representing_numerical_item (rep_num_item) Date: 2008/03/10 08:13:07
Revision: 1.22
Template: representing_numerical_item

XML references to the Template

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

representing_numerical_item

Set up a hyperlink to the template definition.
<template_ref name="representing_numerical_item" capability="representing_value_with_unit"/>

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="representing_numerical_item" capability="representing_value_with_unit">
  <param name="value">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="unit">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="unit_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="si_unit">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="representing_numerical_item">
  <param_in name="value" value=""/>
  <param_in name="unit" value=""/>
  <param_in name="unit_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="si_unit" value=""/>
</template_example>

representing_numerical_item
/representing_numerical_item(value='', unit='', unit_ecl_id='urn:plcs:rdl:std', si_unit='')/

Path

-- Instantiate Numerical_item_with_unit
-- and associate it with reference param ^item
Numerical_item_with_unit
%^item = Numerical_item_with_unit%

-- Set the Numerical_item_with_unit attribute name to be ignored
Numerical_item_with_unit.name = '/IGNORE'

-- Set the Numerical_item_with_unit attribute value_component to the
-- value of the input parameter value
Numerical_item_with_unit.value_component -> @value

-- Instantiate Unit and Bind the Unit to the parameter ^unit_entity.
-- The parameter is a reference parameter so the Unit
-- entity can be referred to when this template is used.
%^unit_entity = Unit%

-- Instantiate assign Numerical_item_with_unit to unit
Numerical_item_with_unit.unit -> ^unit_entity

-- Set the Unit attributes
Unit.name = '/IGNORE'
Unit.si_unit -> @si_unit

-- Assign reference data for name of Unit
/assigning_reference_data(
    items=Unit,
    class_name=@unit,
    ecl_id=@unit_ecl_id)/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Numerical_item_with_unit.name '/IGNORE' Representation_item.name
Unit.name '/IGNORE'

XML representation of path

<refpath
   template="representing_numerical_item">
   <comment>
      Instantiate Numerical_item_with_unit
   </comment>
   <comment>
      and associate it with reference param ^item
   </comment>
   <instantiate
      entity="Numerical_item_with_unit"
      context="">
      
   </instantiate>
   <bind
      parameter="item">
      <express_entity
         entity="Numerical_item_with_unit"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Set the Numerical_item_with_unit attribute name to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Numerical_item_with_unit"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Set the Numerical_item_with_unit attribute value_component to the
   </comment>
   <comment>
      value of the input parameter value
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Numerical_item_with_unit"
            attribute="value_component"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="value">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Instantiate Unit and Bind the Unit to the parameter ^unit_entity.
   </comment>
   <comment>
      The parameter is a reference parameter so the Unit
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="unit_entity">
      <express_entity
         entity="Unit"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Instantiate assign Numerical_item_with_unit to unit
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Numerical_item_with_unit"
            attribute="unit"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="unit_entity">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      Set the Unit attributes
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Unit"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Unit"
            attribute="si_unit"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="si_unit">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Assign reference data for name of Unit
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="Unit">
         
      </param_in>
      <param_in
         name="class_name"
         value="@unit">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@unit_ecl_id">
         
      </param_in>
   </call_template>
</refpath>

© OASIS 2010 — All rights reserved