Template:— representing_geographical_location (rep_geo_locn)
Capability:representing_location
Date: 2005/08/15 08:20:35 :
Revision: 1.15
Template: representing_geographical_location

XML references to the Template

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

representing_geographical_location

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="" name="representing_geographical_location" capability="representing_location">
  <param name="latitude">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="lat_unit_type">
    <param_value>radian</param_value>
    <description></description>
  </param>
  <param name="lat_siunit">
    <param_value>TRUE</param_value>
    <description></description>
  </param>
  <param name="longitude">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="long_unit_type">
    <param_value>radian</param_value>
    <description></description>
  </param>
  <param name="long_siunit">
    <param_value>TRUE</param_value>
    <description></description>
  </param>
  <param name="altitude">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="alt_unit_type">
    <param_value>metre</param_value>
    <description></description>
  </param>
  <param name="alt_siunit">
    <param_value>TRUE</param_value>
    <description></description>
  </param>
  <param name="geo_area">
    <param_value>Unknown</param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="representing_geographical_location">
  <param_in name="latitude" value=""/>
  <param_in name="lat_unit_type" value="radian"/>
  <param_in name="lat_siunit" value="TRUE"/>
  <param_in name="longitude" value=""/>
  <param_in name="long_unit_type" value="radian"/>
  <param_in name="long_siunit" value="TRUE"/>
  <param_in name="altitude" value=""/>
  <param_in name="alt_unit_type" value="metre"/>
  <param_in name="alt_siunit" value="TRUE"/>
  <param_in name="geo_area" value="Unknown"/>
</template_example>

representing_geographical_location
/representing_geographical_location(latitude='', lat_unit_type='radian', lat_siunit='TRUE', longitude='', long_unit_type='radian', long_siunit='TRUE', altitude='', alt_unit_type='metre', alt_siunit='TRUE', geo_area='Unknown')/

Path

-- Create Global location rep
%^geog_locn = Global_location_representation%
Global_location_representation.geographical_area = '/IGNORE'

-- set the latitude value
/representing_value_with_unit(
    unit_ecl_id='urn:plcs:rdl:std',
    si_unit=@lat_siunit,
    value=@latitude,
    unit=@lat_unit_type)/
%^loc_lat = $representing_value_with_unit.value%
Global_location_representation.latitude -> ^loc_lat

-- set the longitude value
/representing_value_with_unit(
    unit_ecl_id='urn:plcs:rdl:std',
    si_unit=@long_siunit,
    value=@longitude,
    unit=@long_unit_type)/
%^loc_long = $representing_value_with_unit.value%
Global_location_representation.longitude -> ^loc_long

-- set the altitude value
/representing_value_with_unit(
    unit_ecl_id='urn:plcs:rdl:std',
    si_unit=@alt_siunit,
    value=@altitude,
    unit=@alt_unit_type)/
%^loc_alt = $representing_value_with_unit.value%
Global_location_representation.altitude -> ^loc_alt

-- assign an identifier to the representation
/assigning_identification_with_no_organization(
    items=Global_location_representation,
    id=@geo_area,
    id_class_name='Geographic_location_identification_code',
    id_ecl_id='urn:plcs:rdl:std')/

-- end.
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Global_location_representation.geographical_area '/IGNORE'

XML representation of path

<refpath
   template="representing_geographical_location">
   <comment>
      Create Global location rep
   </comment>
   <bind
      parameter="geog_locn">
      <express_entity
         entity="Global_location_representation"
         context="">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="equals"
      context="">
      <target>
         <express_attribute
            entity="Global_location_representation"
            attribute="geographical_area"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <string
            value="'/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      set the latitude value
   </comment>
   <call_template
      name="representing_value_with_unit"
      business_context="">
      <param_in
         name="unit_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="si_unit"
         value="@lat_siunit">
         
      </param_in>
      <param_in
         name="value"
         value="@latitude">
         
      </param_in>
      <param_in
         name="unit"
         value="@lat_unit_type">
         
      </param_in>
   </call_template>
   <bind
      parameter="loc_lat">
      <template_instance
         template="representing_value_with_unit"
         parameter="value">
         
      </template_instance>
   </bind>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Global_location_representation"
            attribute="latitude"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="loc_lat">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      set the longitude value
   </comment>
   <call_template
      name="representing_value_with_unit"
      business_context="">
      <param_in
         name="unit_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="si_unit"
         value="@long_siunit">
         
      </param_in>
      <param_in
         name="value"
         value="@longitude">
         
      </param_in>
      <param_in
         name="unit"
         value="@long_unit_type">
         
      </param_in>
   </call_template>
   <bind
      parameter="loc_long">
      <template_instance
         template="representing_value_with_unit"
         parameter="value">
         
      </template_instance>
   </bind>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Global_location_representation"
            attribute="longitude"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="loc_long">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      set the altitude value
   </comment>
   <call_template
      name="representing_value_with_unit"
      business_context="">
      <param_in
         name="unit_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="si_unit"
         value="@alt_siunit">
         
      </param_in>
      <param_in
         name="value"
         value="@altitude">
         
      </param_in>
      <param_in
         name="unit"
         value="@alt_unit_type">
         
      </param_in>
   </call_template>
   <bind
      parameter="loc_alt">
      <template_instance
         template="representing_value_with_unit"
         parameter="value">
         
      </template_instance>
   </bind>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Global_location_representation"
            attribute="altitude"
            context="">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="loc_alt">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      assign an identifier to the representation
   </comment>
   <call_template
      name="assigning_identification_with_no_organization"
      business_context="">
      <param_in
         name="items"
         value="Global_location_representation">
         
      </param_in>
      <param_in
         name="id"
         value="@geo_area">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="'Geographic_location_identification_code'">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
   </call_template>
   <comment>
      end.
   </comment>
</refpath>

© OASIS 2010 — All rights reserved