Template:— representing_value_range (rep_range) Date: 2009/04/23 13:25:36
Revision: 1.27
Template: representing_value_range

XML references to the Template

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

representing_value_range

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="representing_value_range" capability="representing_property_value_ranges">
  <param name="upper_limit">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="lower_limit">
    <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>false</param_value>
    <description></description>
  </param>
  <param name="context">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="context_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="representing_value_range">
  <param_in name="upper_limit" value=""/>
  <param_in name="lower_limit" value=""/>
  <param_in name="unit" value=""/>
  <param_in name="unit_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="si_unit" value="false"/>
  <param_in name="context" value=""/>
  <param_in name="context_ecl_id" value="urn:plcs:rdl:std"/>
</template_example>

representing_value_range
/representing_value_range(upper_limit='', lower_limit='', unit='', unit_ecl_id='urn:plcs:rdl:std', si_unit='false', context='', context_ecl_id='urn:plcs:rdl:std')/

Path

-- Instantiate Property_value_representation entity
Property_value_representation

-- Set the Property_value_representation attributes id, name and description to be ignored
Property_value_representation.id = '/IGNORE'
Property_value_representation.name = '/IGNORE'
Property_value_representation.description = '/IGNORE'

-- Bind the Property_value_representation to the parameter ^representation.
-- The parameter is a reference parameter so the Property_value_representation
-- entity can be referred to when this template is used.
%^representation = Property_value_representation%

-- Instantiate Numerical_representation_context and assign
%^num_rep_cntxt = Numerical_representation_context%

-- Set the Numerical_representation_context attributes id and kind to be ignored
Numerical_representation_context.id = '/IGNORE'
Numerical_representation_context.kind = '/IGNORE'

-- Property_value_representation at it
^representation.context_of_items -> ^num_rep_cntxt

-- Assign reference data for kind of Numerical_representation_context
/assigning_reference_data(
    items=^num_rep_cntxt,
    class_name=@context,
    ecl_id=@context_ecl_id)/

-- Instantiate Value_range and assign
-- Property_value_representation to it
^representation.items -> Value_range

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

-- Instantiate template representing_numerical_item
-- for upper limit
/representing_numerical_item(
    value= @upper_limit,
    unit= @unit,
    unit_ecl_id= @unit_ecl_id,
    si_unit= @si_unit)/

-- Bind ref param ^item in just instantiated template
-- representing_numerical_item to ref param ^item in this template,
-- and point attribute Value_range.upper_limit to it
%^upper_item = $representing_numerical_item.item%
Value_range.upper_limit -> ^upper_item

-- Instantiate template representing_numerical_item
-- for lower limit
/representing_numerical_item(
    value= @lower_limit,
    unit= @unit,
    unit_ecl_id= @unit_ecl_id,
    si_unit= @si_unit)/

-- Bind ref param ^item in just instantiated template
-- representing_numerical_item to ref param ^item in this template,
-- and point attribute Value_range.lower_limit to it
%^lower_item = $representing_numerical_item.item%
Value_range.lower_limit -> ^lower_item
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Property_value_representation.id '/IGNORE' Representation.id
Property_value_representation.name '/IGNORE' Representation.name
Property_value_representation.description '/IGNORE' Representation.description
Numerical_representation_context.id '/IGNORE' Representation_context.id
Numerical_representation_context.kind '/IGNORE' Representation_context.kind
Value_range.name '/IGNORE' Representation_item.name

XML representation of path

<refpath
   template="representing_value_range">
   <comment>
      Instantiate Property_value_representation entity
   </comment>
   <instantiate
      entity="Property_value_representation"
      context="">
      
   </instantiate>
   <comment>
      Set the Property_value_representation attributes id, name and description to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Property_value_representation"
            attribute="id"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Property_value_representation"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Property_value_representation"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Bind the Property_value_representation to the parameter ^representation.
   </comment>
   <comment>
      The parameter is a reference parameter so the Property_value_representation
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="representation">
      <express_entity
         entity="Property_value_representation"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Instantiate Numerical_representation_context and assign
   </comment>
   <bind
      parameter="num_rep_cntxt">
      <express_entity
         entity="Numerical_representation_context"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Set the Numerical_representation_context attributes id and kind to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Numerical_representation_context"
            attribute="id"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Numerical_representation_context"
            attribute="kind"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Property_value_representation at it
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="representation.context_of_items">
            
         </bound_parameter>
      </target>
      <source>
         <bound_parameter
            name="num_rep_cntxt">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      Assign reference data for kind of Numerical_representation_context
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="^num_rep_cntxt">
         
      </param_in>
      <param_in
         name="class_name"
         value="@context">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@context_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Instantiate Value_range and assign
   </comment>
   <comment>
      Property_value_representation to it
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="representation.items">
            
         </bound_parameter>
      </target>
      <source>
         <express_entity
            entity="Value_range"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Set the Value_range attribute name to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Value_range"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Instantiate template representing_numerical_item
   </comment>
   <comment>
      for upper limit
   </comment>
   <call_template
      name="representing_numerical_item"
      business_context="">
      <param_in
         name="value"
         value=" @upper_limit">
         
      </param_in>
      <param_in
         name="unit"
         value=" @unit">
         
      </param_in>
      <param_in
         name="unit_ecl_id"
         value=" @unit_ecl_id">
         
      </param_in>
      <param_in
         name="si_unit"
         value=" @si_unit">
         
      </param_in>
   </call_template>
   <comment>
      Bind ref param ^item in just instantiated template
   </comment>
   <comment>
      representing_numerical_item to ref param ^item in this template,
   </comment>
   <comment>
      and point attribute Value_range.upper_limit to it
   </comment>
   <bind
      parameter="upper_item">
      <template_instance
         template="representing_numerical_item"
         parameter="item">
         
      </template_instance>
   </bind>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Value_range"
            attribute="upper_limit"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="upper_item">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      Instantiate template representing_numerical_item
   </comment>
   <comment>
      for lower limit
   </comment>
   <call_template
      name="representing_numerical_item"
      business_context="">
      <param_in
         name="value"
         value=" @lower_limit">
         
      </param_in>
      <param_in
         name="unit"
         value=" @unit">
         
      </param_in>
      <param_in
         name="unit_ecl_id"
         value=" @unit_ecl_id">
         
      </param_in>
      <param_in
         name="si_unit"
         value=" @si_unit">
         
      </param_in>
   </call_template>
   <comment>
      Bind ref param ^item in just instantiated template
   </comment>
   <comment>
      representing_numerical_item to ref param ^item in this template,
   </comment>
   <comment>
      and point attribute Value_range.lower_limit to it
   </comment>
   <bind
      parameter="lower_item">
      <template_instance
         template="representing_numerical_item"
         parameter="item">
         
      </template_instance>
   </bind>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Value_range"
            attribute="lower_limit"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="lower_item">
            
         </bound_parameter>
      </source>
   </assign>
</refpath>

© OASIS 2010 — All rights reserved