Template:— assigning_descriptor (asg_descr) Date: 2008/03/08 14:52:57
Revision: 1.17
Template: assigning_descriptor

XML references to the Template

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

assigning_descriptor

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="assigning_descriptor" capability="assigning_descriptor">
  <param name="descr">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="class_name">
    <param_value>Description</param_value>
    <description></description>
  </param>
  <param name="ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="is_assigned_to">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="assigning_descriptor">
  <param_in name="descr" value=""/>
  <param_in name="class_name" value="Description"/>
  <param_in name="ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="is_assigned_to" value=""/>
</template_example>

assigning_descriptor
/assigning_descriptor(descr='', class_name='Description', ecl_id='urn:plcs:rdl:std', is_assigned_to='')/

Path

Document_assignment

-- Mark the Document_assignment entity as referable when this template is used.
-- In other words, bind the Document_assignment instance to the reference
-- parameter descr_asg
%^descr_asg = Document_assignment%
Document_assignment.role = '/IGNORE'
Document_assignment.is_assigned_to -> @is_assigned_to

-- Provide the role of the descriptor by classifying the Document_assignment
/assigning_reference_data(
    items=^descr_asg,
    class_name=@class_name,
    ecl_id=@ecl_id)/

-- Mark the Document entity as referable when this template is used.
-- In other words, bind the Document instance to the reference parameter descr
%^descr = Document%
Document_assignment.assigned_document -> Document
Document.id = '/IGNORE'
Document.name = '/IGNORE'
Document.description = @descr

-- Define the role of the Document as descriptor, by classification
/assigning_reference_data(
    items=^descr,
    class_name='Descriptor',
    ecl_id='urn:plcs:rdl:std')/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Document_assignment.role '/IGNORE'
Document.id '/IGNORE' Product.id
Document.name '/IGNORE' Product.name
Document.description @descr Product.description

XML representation of path

<refpath
   template="assigning_descriptor">
   <instantiate
      entity="Document_assignment"
      context="">
      
   </instantiate>
   <comment>
      Mark the Document_assignment entity as referable when this template is used.
   </comment>
   <comment>
      In other words, bind the Document_assignment instance to the reference
   </comment>
   <comment>
      parameter descr_asg
   </comment>
   <bind
      parameter="descr_asg">
      <express_entity
         entity="Document_assignment"
         context="">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document_assignment"
            attribute="role"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value="'/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Document_assignment"
            attribute="is_assigned_to"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="is_assigned_to">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Provide the role of the descriptor by classifying the Document_assignment
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="^descr_asg">
         
      </param_in>
      <param_in
         name="class_name"
         value="@class_name">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Mark the Document entity as referable when this template is used.
   </comment>
   <comment>
      In other words, bind the Document instance to the reference parameter descr
   </comment>
   <bind
      parameter="descr">
      <express_entity
         entity="Document"
         context="">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Document_assignment"
            attribute="assigned_document"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Document"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document"
            attribute="id"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Document"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="descr">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Define the role of the Document as descriptor, by classification
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="^descr">
         
      </param_in>
      <param_in
         name="class_name"
         value="'Descriptor'">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
   </call_template>
</refpath>

© OASIS 2010 — All rights reserved