Template:— assigning_assessed_state (asg_asd_state) Date: 2008/02/20 08:05:00
Revision: 1.16
Template: assigning_assessed_state

XML references to the Template

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

assigning_assessed_state

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="assigning_assessed_state" capability="representing_state_observed">
  <param name="state_class_name">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="state_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="assigned_to">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="assigning_assessed_state">
  <param_in name="state_class_name" value=""/>
  <param_in name="state_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="assigned_to" value=""/>
</template_example>

assigning_assessed_state
/assigning_assessed_state(state_class_name='', state_ecl_id='urn:plcs:rdl:std', assigned_to='')/

Path

-- Instantiate an Applied_state_assignment
Applied_state_assignment

-- Assign the Assessed State to the
-- to the instances passed into the template through the @assigned_to
-- input parameter (e.g. a Product_as_individual_view)
Applied_state_assignment.assigned_to -> @assigned_to

-- Instantiate and point at a State_role
Applied_state_assignment.role -> State_role

-- Set the State_role attributes name and description to be ignored
State_role.name = '/IGNORE'
State_role.description = '/IGNORE'

-- Instantiate and point at State_observed
Applied_state_assignment.described_state -> State_observed

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

-- Set the State_observed attributes name and description to be ignored
State_observed.name = '/IGNORE'
State_observed.description = '/IGNORE'

-- Instantiate State_assessment and point it at
-- State_observed just instantiated
State_assessment.assessed_state -> ^state_obs

-- Set the State_assessment attributes name and description to be ignored
State_assessment.name = '/IGNORE'
State_assessment.description = '/IGNORE'

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

-- Instantiate and point at a State_definition
^state_assess.comparable_state -> State_definition

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

-- Set the State_definition attributes name and description to be ignored
State_definition.name = '/IGNORE'
State_definition.description = '/IGNORE'

-- Assign reference data for name of State_definition
/assigning_reference_data(
    items=^state_def,
    class_name=@state_class_name,
    ecl_id=@state_ecl_id)/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
State_role.name '/IGNORE'
State_role.description '/IGNORE'
State_observed.name '/IGNORE' State.name
State_observed.description '/IGNORE' State.description
State_assessment.name '/IGNORE'
State_assessment.description '/IGNORE'
State_definition.name '/IGNORE'
State_definition.description '/IGNORE'

XML representation of path

<refpath
   template="assigning_assessed_state">
   <comment>
      Instantiate an Applied_state_assignment
   </comment>
   <instantiate
      entity="Applied_state_assignment"
      context="">
      
   </instantiate>
   <comment>
      Assign the Assessed State to the
   </comment>
   <comment>
      to the instances passed into the template through the @assigned_to
   </comment>
   <comment>
      input parameter (e.g. a Product_as_individual_view)
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Applied_state_assignment"
            attribute="assigned_to"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="assigned_to">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      Instantiate and point at a State_role
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Applied_state_assignment"
            attribute="role"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="State_role"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Set the State_role attributes name and description to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="State_role"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="State_role"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Instantiate and point at State_observed
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Applied_state_assignment"
            attribute="described_state"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="State_observed"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Bind the State_observed to the parameter ^state_obs.
   </comment>
   <comment>
      The parameter is a reference parameter so the State_observed
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="state_obs">
      <express_entity
         entity="State_observed"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Set the State_observed attributes name and description to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="State_observed"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="State_observed"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Instantiate State_assessment and point it at
   </comment>
   <comment>
      State_observed just instantiated
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="State_assessment"
            attribute="assessed_state"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="state_obs">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      Set the State_assessment attributes name and description to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="State_assessment"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="State_assessment"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Bind the State_assessment to the parameter ^state_assess.
   </comment>
   <comment>
      The parameter is a reference parameter so the State_assessment
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="state_assess">
      <express_entity
         entity="State_assessment"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Instantiate and point at a State_definition
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="state_assess.comparable_state">
            
         </bound_parameter>
      </target>
      <source>
         <express_entity
            entity="State_definition"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      Bind the State_definition to the parameter ^state_def.
   </comment>
   <comment>
      The parameter is a reference parameter so the State_definition
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="state_def">
      <express_entity
         entity="State_definition"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Set the State_definition attributes name and description to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="State_definition"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="State_definition"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Assign reference data for name of State_definition
   </comment>
   <call_template
      name="assigning_reference_data"
      business_context="">
      <param_in
         name="items"
         value="^state_def">
         
      </param_in>
      <param_in
         name="class_name"
         value="@state_class_name">
         
      </param_in>
      <param_in
         name="ecl_id"
         value="@state_ecl_id">
         
      </param_in>
   </call_template>
</refpath>

© OASIS 2010 — All rights reserved