Template:— representing_numeric_property (rep_num) Date: 2008/01/21 08:52:14
Revision: 1.20
Template: representing_numeric_property

XML references to the Template

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

representing_numeric_property

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="representing_numeric_property" capability="representing_properties_numerically">
  <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>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_numeric_property">
  <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="false"/>
  <param_in name="context" value=""/>
  <param_in name="context_ecl_id" value="urn:plcs:rdl:std"/>
</template_example>

representing_numeric_property
/representing_numeric_property(value='', 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
Numerical_representation_context

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

-- assign Property_value_representation to Numerical_representation_context
^representation.context_of_items -> ^representation_context

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

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

-- Instantiate template representing_numerical_item
-- for value and unit
/representing_numerical_item(
    value= @value,
    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
%^item = $representing_numerical_item.item%
Property_value_representation.items -> ^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

XML representation of path

<refpath
   template="representing_numeric_property">
   <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
   </comment>
   <instantiate
      entity="Numerical_representation_context"
      context="">
      
   </instantiate>
   <comment>
      Bind the Numerical_representation_context to the parameter ^representation_context.
   </comment>
   <comment>
      The parameter is a reference parameter so the Numerical_representation_context
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="representation_context">
      <express_entity
         entity="Numerical_representation_context"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      assign Property_value_representation to Numerical_representation_context
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="representation.context_of_items">
            
         </bound_parameter>
      </target>
      <source>
         <bound_parameter
            name="representation_context">
            
         </bound_parameter>
      </source>
   </assign>
   <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>
      Assign reference data for kind of Numerical_representation_context
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="Numerical_representation_context">
         
      </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 template representing_numerical_item
   </comment>
   <comment>
      for value and unit
   </comment>
   <call_template
      name="representing_numerical_item"
      business_context="">
      <param_in
         name="value"
         value=" @value">
         
      </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="item">
      <template_instance
         template="representing_numerical_item"
         parameter="item">
         
      </template_instance>
   </bind>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Property_value_representation"
            attribute="items"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="item">
            
         </bound_parameter>
      </source>
   </assign>
</refpath>

© OASIS 2010 — All rights reserved