Template:— assigning_time (asg_time) Date: 2008/02/28 15:59:44
Revision: 1.17
Template: assigning_time

XML references to the Template

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

assigning_time

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="assigning_time" capability="assigning_date_time">
  <param name="date_class_name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="date_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="year">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="month">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="day">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="hour">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="minute">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="second">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="sense">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="hour_offset">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="minute_offset">
    <param_value></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_time">
  <param_in name="date_class_name" value=""/>
  <param_in name="date_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="year" value=""/>
  <param_in name="month" value=""/>
  <param_in name="day" value=""/>
  <param_in name="hour" value=""/>
  <param_in name="minute" value=""/>
  <param_in name="second" value=""/>
  <param_in name="sense" value=""/>
  <param_in name="hour_offset" value=""/>
  <param_in name="minute_offset" value=""/>
  <param_in name="items" value=""/>
</template_example>

assigning_time
/assigning_time(date_class_name='', date_ecl_id='urn:plcs:rdl:std', year='', month='', day='', hour='', minute='', second='', sense='', hour_offset='', minute_offset='', items='')/

Path

Date_or_date_time_assignment
%^time_assgn = Date_or_date_time_assignment%

-- the template assigning_reference_data is being called with parameters set.
-- The reference data is being assigned to the subject of the template,
-- in this case Date_or_date_time_assignment.
/assigning_reference_data(
    items=^time_assgn,
    class_name=@date_class_name,
    ecl_id=@date_ecl_id)/
Date_or_date_time_assignment.role = '/IGNORE'
Date_or_date_time_assignment.items -> @items

-- the template representing_date_time is being instantiated with parameters set.
/representing_date_time(
    year=@year,
    month=@month,
    day=@day,
    hour=@hour,
    minute=@minute,
    second=@second,
    sense=@sense,
    hour_offset=@hour_offset,
    minute_offset=@minute_offset)/

-- the attribute Date_or_date_time_assignment.assigned_date is assigned to entity bound to
-- reference parameter date_time in the template representing_date_time
%^ldate_time = $representing_date_time.date_time%
Date_or_date_time_assignment.assigned_date -> ^ldate_time
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Date_or_date_time_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="assigning_time">
   <instantiate
      entity="Date_or_date_time_assignment"
      context="">
      
   </instantiate>
   <bind
      parameter="time_assgn">
      <express_entity
         entity="Date_or_date_time_assignment"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      the template assigning_reference_data is being called with parameters set.
   </comment>
   <comment>
      The reference data is being assigned to the subject of the template,
   </comment>
   <comment>
      in this case Date_or_date_time_assignment.
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="^time_assgn">
         
      </param_in>
      <param_in
         name="class_name"
         value="@date_class_name">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@date_ecl_id">
         
      </param_in>
   </call_template>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="role"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="items"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="items">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      the template representing_date_time is being instantiated with parameters set.
   </comment>
   <call_template
      name="representing_date_time"
      business_context="">
      <param_in
         name="year"
         value="@year">
         
      </param_in>
      <param_in
         name="month"
         value="@month">
         
      </param_in>
      <param_in
         name="day"
         value="@day">
         
      </param_in>
      <param_in
         name="hour"
         value="@hour">
         
      </param_in>
      <param_in
         name="minute"
         value="@minute">
         
      </param_in>
      <param_in
         name="second"
         value="@second">
         
      </param_in>
      <param_in
         name="sense"
         value="@sense">
         
      </param_in>
      <param_in
         name="hour_offset"
         value="@hour_offset">
         
      </param_in>
      <param_in
         name="minute_offset"
         value="@minute_offset">
         
      </param_in>
   </call_template>
   <comment>
      the attribute Date_or_date_time_assignment.assigned_date is assigned to entity bound to
   </comment>
   <comment>
      reference parameter date_time in the template representing_date_time
   </comment>
   <bind
      parameter="ldate_time">
      <template_instance
         template="representing_date_time"
         parameter="date_time">
         
      </template_instance>
   </bind>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Date_or_date_time_assignment"
            attribute="assigned_date"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="ldate_time">
            
         </bound_parameter>
      </source>
   </assign>
</refpath>

© OASIS 2010 — All rights reserved