Template:— assigning_code (asg_code) Date: 2009/06/10 09:53:39
Revision: 1.20
Template: assigning_code

XML references to the Template

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

assigning_code

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="assigning_code" capability="assigning_codes">
  <param name="class_name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="code_class_name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="code_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="items">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="assigning_code">
  <param_in name="class_name" value=""/>
  <param_in name="code_class_name" value=""/>
  <param_in name="code_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="items" value=""/>
</template_example>

assigning_code
/assigning_code(class_name='', code_class_name='', code_ecl_id='urn:plcs:rdl:std', items='')/

Path

-- Create the class entity.
Class.id = '/IGNORE'
Class.description = '/IGNORE'
Class.name = @class_name

-- Mark the Class entity as referable when this template is used.
-- In other words, bind the Class instance to the reference
-- parameter class
%^class = Class%

-- Assign the External_class in the reference data library
-- being used to determine type of code
/assigning_reference_data(
    items=^class,
    class_name=@code_class_name,
    ecl_id=@code_ecl_id)/

-- Mark the External_class entity instantiated by the template
-- assigning_reference_data as referable when this template is used.
-- In other words, bind the External_class instance to the reference
-- parameter ext_class
%^ext_class = $assigning_reference_data.ext_class%

-- Mark the External_class_library entity instantiated by the template
-- assigning_reference_data as referable when this template is used.
-- In other words, bind the External_class_library instance to the reference
-- parameter ext_class_lib
%^ext_class_lib = $assigning_reference_data.ext_class_lib%

-- Create the Classification_assignment entity
Classification_assignment
Classification_assignment.role = '/IGNORE'
Classification_assignment.items -> @items
Classification_assignment.assigned_class -> Class

-- Mark the Classification_assignment entity as referable when this template is used.
-- In other words, bind the Classification_assignment instance to the reference
-- parameter class_asg
%^class_asg = Classification_assignment%
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Class.id '/IGNORE'
Class.description '/IGNORE'
Class.name @class_name
Classification_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="assigning_code">
   <comment>
      Create the class entity.
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Class"
            attribute="id"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Class"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Class"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="class_name">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Mark the Class entity as referable when this template is used.
   </comment>
   <comment>
      In other words, bind the Class instance to the reference
   </comment>
   <comment>
      parameter class
   </comment>
   <bind
      parameter="class">
      <express_entity
         entity="Class"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Assign the External_class in the reference data library
   </comment>
   <comment>
      being used to determine type of code
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="^class">
         
      </param_in>
      <param_in
         name="class_name"
         value="@code_class_name">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@code_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Mark the External_class entity instantiated by the template
   </comment>
   <comment>
      assigning_reference_data as referable when this template is used.
   </comment>
   <comment>
      In other words, bind the External_class instance to the reference
   </comment>
   <comment>
      parameter ext_class
   </comment>
   <bind
      parameter="ext_class">
      <template_instance
         template="assigning_reference_data"
         parameter="ext_class">
         
      </template_instance>
   </bind>
   <comment>
      Mark the External_class_library entity instantiated by the template
   </comment>
   <comment>
      assigning_reference_data as referable when this template is used.
   </comment>
   <comment>
      In other words, bind the External_class_library instance to the reference
   </comment>
   <comment>
      parameter ext_class_lib
   </comment>
   <bind
      parameter="ext_class_lib">
      <template_instance
         template="assigning_reference_data"
         parameter="ext_class_lib">
         
      </template_instance>
   </bind>
   <comment>
      Create the Classification_assignment entity
   </comment>
   <instantiate
      entity="Classification_assignment"
      context="">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Classification_assignment"
            attribute="role"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value="'/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Classification_assignment"
            attribute="items"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="items">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Classification_assignment"
            attribute="assigned_class"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Class"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Mark the Classification_assignment entity as referable when this template is used.
   </comment>
   <comment>
      In other words, bind the Classification_assignment instance to the reference
   </comment>
   <comment>
      parameter class_asg
   </comment>
   <bind
      parameter="class_asg">
      <express_entity
         entity="Classification_assignment"
         context="">
         
      </express_entity>
   </bind>
</refpath>

© OASIS 2010 — All rights reserved