Template:— representing_grid_location (rep_grid_locn)
Capability:representing_location
Date: 2005/08/15 08:20:35 :
Revision: 1.7
Template: representing_grid_location

XML references to the Template

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

representing_grid_location

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="representing_grid_location" capability="representing_location">
  <param name="reg_grid_loc_id">
    <param_value>Uknown</param_value>
    <description></description>
  </param>
  <param name="reg_grid_loc_type_code">
    <param_value>Regional_grid_location_identification_code</param_value>
    <description></description>
  </param>
  <param name="reg_grid_loc_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="reg_grid_loc_name">
    <param_value>Unknown</param_value>
    <description></description>
  </param>
  <param name="coord_siunit">
    <param_value>TRUE</param_value>
    <description></description>
  </param>
  <param name="coord_unit_type">
    <param_value>radian</param_value>
    <description></description>
  </param>
  <param name="coord_val">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="coord_type_ecl_id">
    <param_value>urn:plcs:rdl:std</param_value>
    <description></description>
  </param>
  <param name="coord_name">
    <param_value>Unknown</param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="representing_grid_location">
  <param_in name="reg_grid_loc_id" value="Uknown"/>
  <param_in name="reg_grid_loc_type_code" value="Regional_grid_location_identification_code"/>
  <param_in name="reg_grid_loc_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="reg_grid_loc_name" value="Unknown"/>
  <param_in name="coord_siunit" value="TRUE"/>
  <param_in name="coord_unit_type" value="radian"/>
  <param_in name="coord_val" value=""/>
  <param_in name="coord_type_ecl_id" value="urn:plcs:rdl:std"/>
  <param_in name="coord_name" value="Unknown"/>
</template_example>

representing_grid_location
/representing_grid_location(reg_grid_loc_id='Uknown', reg_grid_loc_type_code='Regional_grid_location_identification_code', reg_grid_loc_ecl_id='urn:plcs:rdl:std', reg_grid_loc_name='Unknown', coord_siunit='TRUE', coord_unit_type='radian', coord_val='', coord_type_ecl_id='urn:plcs:rdl:std', coord_name='Unknown')/

Path

-- Create the regional coordinate
Regional_coordinate

-- set local parameters
Regional_coordinate.name = '/IGNORE'

-- set the coordinate value
/representing_value_with_unit(
    unit_ecl_id=@coord_type_ecl_id,
    si_unit=@coord_siunit,
    value=@coord_val,
    unit=@coord_unit_type)/
%^coord_val = $representing_value_with_unit.item%
Regional_coordinate.coordinate_value -> ^coord_val
%^reg_coord = Regional_coordinate%

-- Assign the name to Regional_coordinate
/assigning_identification_with_no_organization(
    items=^reg_coord,
    id=@coord_name,
    id_class_name=Name,
    id_ecl_id=@coord_type_ecl_id)/

-- Instantiate a Regional_grid_location_representation
Regional_grid_location_representation

-- Set the local attributes to be ignored
Regional_grid_location_representation.description = '/IGNORE'
Regional_grid_location_representation.name = '/IGNORE'

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

-- Assign identifier to Product_based_location_identification
/assigning_identification_with_no_organization(
    items=^reg_grid_loc_rep,
    id=@reg_grid_loc_id,
    id_class_name=@reg_grid_loc_type_code,
    id_ecl_id=@reg_grid_loc_ecl_id)/

-- Assign Name to Product_based_location_identification (assumes same urn and
/assigning_identification_with_no_organization(
    items=^reg_grid_loc_rep,
    id=@reg_grid_loc_name,
    id_class_name=Name,
    id_ecl_id=@reg_grid_loc_ecl_id)/

-- Name is an OWL class under identification_code
Regional_coordinate.grid_system -> Regional_grid_location_representation

-- end
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Regional_coordinate.name '/IGNORE'
Regional_grid_location_representation.description '/IGNORE'
Regional_grid_location_representation.name '/IGNORE'

XML representation of path

<refpath
   template="representing_grid_location">
   <comment>
      Create the regional coordinate
   </comment>
   <instantiate
      entity="Regional_coordinate"
      context="">
      
   </instantiate>
   <comment>
      set local parameters
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Regional_coordinate"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      set the coordinate value
   </comment>
   <call_template
      name="representing_value_with_unit"
      business_context="">
      <param_in
         name="unit_ecl_id"
         value="@coord_type_ecl_id">
         
      </param_in>
      <param_in
         name="si_unit"
         value="@coord_siunit">
         
      </param_in>
      <param_in
         name="value"
         value="@coord_val">
         
      </param_in>
      <param_in
         name="unit"
         value="@coord_unit_type">
         
      </param_in>
   </call_template>
   <bind
      parameter="coord_val">
      <template_instance
         template="representing_value_with_unit"
         parameter="item">
         
      </template_instance>
   </bind>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Regional_coordinate"
            attribute="coordinate_value"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="coord_val">
            
         </bound_parameter>
      </source>
   </assign>
   <bind
      parameter="reg_coord">
      <express_entity
         entity="Regional_coordinate"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Assign the name to Regional_coordinate
   </comment>
   <call_template
      name="assigning_identification_with_no_organization"
      business_context="">
      <param_in
         name="items"
         value="^reg_coord">
         
      </param_in>
      <param_in
         name="id"
         value="@coord_name">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="Name">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="@coord_type_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Instantiate a Regional_grid_location_representation
   </comment>
   <instantiate
      entity="Regional_grid_location_representation"
      context="">
      
   </instantiate>
   <comment>
      Set the local attributes to be ignored
   </comment>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Regional_grid_location_representation"
            attribute="description"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Regional_grid_location_representation"
            attribute="name"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Bind the Regional_grid_location_representation to the parameter ^reg_grid_loc_rep
   </comment>
   <comment>
      The parameter is a reference parameter so the
   </comment>
   <comment>
      entity can be referred to when this template is used.
   </comment>
   <bind
      parameter="reg_grid_loc_rep">
      <express_entity
         entity="Regional_grid_location_representation"
         context="">
         
      </express_entity>
   </bind>
   <comment>
      Assign identifier to Product_based_location_identification
   </comment>
   <call_template
      name="assigning_identification_with_no_organization"
      business_context="">
      <param_in
         name="items"
         value="^reg_grid_loc_rep">
         
      </param_in>
      <param_in
         name="id"
         value="@reg_grid_loc_id">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="@reg_grid_loc_type_code">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="@reg_grid_loc_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Assign Name to Product_based_location_identification (assumes same urn and
   </comment>
   <call_template
      name="assigning_identification_with_no_organization"
      business_context="">
      <param_in
         name="items"
         value="^reg_grid_loc_rep">
         
      </param_in>
      <param_in
         name="id"
         value="@reg_grid_loc_name">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="Name">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="@reg_grid_loc_ecl_id">
         
      </param_in>
   </call_template>
   <comment>
      Name is an OWL class under identification_code
   </comment>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Regional_coordinate"
            attribute="grid_system"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <express_entity
            entity="Regional_grid_location_representation"
            context="">
            
         </express_entity>
      </source>
   </assign>
   <comment>
      end
   </comment>
</refpath>

© OASIS 2010 — All rights reserved