Template:— representing_text_property (rep_text) Date: 2008/02/26 15:54:25
Revision: 1.17
Template: representing_text_property

XML references to the Template

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

representing_text_property

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

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

representing_text_property
/representing_text_property(value='', context='', context_ecl_id='urn:plcs:rdl:std')/

Path

-- Instantiate Representation entity
Representation

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

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

-- Instantiate Representation_context and assign
-- Representation at it
%^representation_context = Representation_context%
^representation.context_of_items -> ^representation_context

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

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

-- Instantiate String_representation_item and assign
-- Representation to it
^representation.items -> String_representation_item

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

-- Set the String_representation_item attribute string_value to the
-- value of the input parameter value
String_representation_item.string_value -> @value
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Representation.id '/IGNORE'
Representation.name '/IGNORE'
Representation.description '/IGNORE'
Representation_context.id '/IGNORE'
Representation_context.kind '/IGNORE'
String_representation_item.name '/IGNORE' Representation_item.name

XML representation of path

<refpath
   template="representing_text_property">
   <comment>
      Instantiate Representation entity
   </comment>
   <instantiate
      entity="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="Representation"
            attribute="id"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Representation"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Representation"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Bind the Representation to the parameter ^representation.
   </comment>
   <comment>
      The parameter is a reference parameter so the Representation
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="representation">
      <express_entity
         entity="Representation"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Instantiate Representation_context and assign
   </comment>
   <comment>
      Representation at it
   </comment>
   <bind
      parameter="representation_context">
      <express_entity
         entity="Representation_context"
         context="">
         
      </express_entity>
   </bind>
   <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 Representation_context attributes id and kind to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Representation_context"
            attribute="id"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Representation_context"
            attribute="kind"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Assign reference data for kind of Representation_context
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="^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 String_representation_item and assign
   </comment>
   <comment>
      Representation to it
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="representation.items">
            
         </bound_parameter>
      </target>
      <source>
         <express_entity
            entity="String_representation_item"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Set the String_representation_item attribute name to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="String_representation_item"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Set the String_representation_item attribute string_value to the
   </comment>
   <comment>
      value of the input parameter value
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="String_representation_item"
            attribute="string_value"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="value">
            
         </param_in_ref>
      </source>
   </assign>
</refpath>

© OASIS 2010 — All rights reserved