Last modified: Mon, 04/03/2017 - 17:29
This example has a variable constraint and a couple of text constraints.
In this example, the first constraint is a variable constraint. When a variable constraint is added to the LAS UI a menu of all the variables in a dataset is added to the UI along with a list comparison operators and a text box for the value. If the user applies the constraint then the selections in these menus and the value from the textbox are passed into the backend service via the <constraint> element. The other two constraints are text constraints where the left-hand-side is an arbitrary list of choices that is supplied by the LAS installer.
The Operations are:
- lt (less than)
- le (less than or equal)
- eq (equal)
- ne (not equal)
- gt (greater than)
- ge (greater than or equal)
<?xml version="1.0" encoding="UTF-8"?>
<backend_request>
<!-- A variable constraint. -->
<constraint type="variable">
<op>lt</op>
<rhs>30.</rhs>
<lhs>sst</lhs>
</constraint>
<constraint type="text">
<lhs>country</lhs>
<op>eq</op>
<rhs>AU</rhs>
</constraint>
<constraint type="text">
<lhs>type</lhs>
<op>eq</op>
<rhs>ARGO FLOAT</rhs>
</constraint>
<region ID="region_0">
<x_lo>120.0</x_lo>
<x_hi>179.0</x_hi>
<y_lo>-30.0</y_lo>
<y_hi>19.0</y_hi>
<t_lo>26-May-2005 00:00:00</t_lo>
<t_hi>28-May-2005 00:00:00</t_hi>
</region>
<properties>
<property_group type="las">
<property>
<name>debug</name>
<value>debug</value>
</property>
</property_group>
<property_group type="database">
<property>
<name>service_action</name>
<value>sql</value>
</property>
</property_group>
<property_group type="operation">
<property>
<name>service</name>
<value>database</value>
</property>
<property>
<name>service_action</name>
<value>sql</value>
</property>
<property>
<name>name</name>
<value>Database Extraction</value>
</property>
<property>
<name>ID</name>
<value>DBExtract</value>
</property>
<property>
<name>key</name>
<value>A57024A8A22C39ABEAB14367F9617871</value>
</property>
</property_group>
</properties>
<dataObjects>
<data url="platforms" var="sst" title="Sea Surface Temperature" xpath="/lasdata/datasets/platforms/variables/sst" dataset_url="platforms" dataset_name="Platforms with IDs" dataset_ID="platforms" units="deg C" name="Sea Surface Temperature" ID="sst" points="xyt" intervals="xyt" grid_type="scattered">
<region IDREF="region_0" />
<properties>
<property_group type="database_access">
<property>
<name>string_var_titles</name>
<value>ID,Country,Platform Type</value>
</property>
<property>
<name>string_vars</name>
<value>id,country,type</value>
</property>
<property>
<name>timeout</name>
<value>180</value>
</property>
<property>
<name>time_format</name>
<value>yyyy-MM-dd HH:mm:ss.SSS</value>
</property>
<property>
<name>time</name>
<value>time</value>
</property>
<property>
<name>db_table</name>
<value>platforms</value>
</property>
<property>
<name>db_title</name>
<value>LAS in-situ demo 2</value>
</property>
<property>
<name>missing</name>
<value>-999</value>
</property>
<property>
<name>lon_domain</name>
<value>0:360</value>
</property>
<property>
<name>db_host</name>
<value>localhost</value>
</property>
<property>
<name>time_units</name>
<value>hours since 1970-01-01 00:00:00</value>
</property>
<property>
<name>db_passwd</name>
<value>lasrules</value>
</property>
<property>
<name>db_login</name>
<value>las</value>
</property>
<property>
<name>longitude</name>
<value>lon</value>
</property>
<property>
<name>db_name</name>
<value>LAS_insitu_demo</value>
</property>
<property>
<name>time_type</name>
<value>string</value>
</property>
<property>
<name>db_type</name>
<value>mysql</value>
</property>
<property>
<name>time_sample</name>
<value>1999-01-01</value>
</property>
<property>
<name>latitude</name>
<value>lat</value>
</property>
<property>
<name>string_var_lengths</name>
<value>8,2,16</value>
</property>
</property_group>
<property_group type="ui">
<property>
<name>default</name>
<value>file:ui.xml#insitu_demo_2</value>
</property>
</property_group>
<property_group type="product_server">
<property>
<name>ui_timeout</name>
<value>10000</value>
</property>
<property>
<name>ps_timeout</name>
<value>3600</value>
</property>
<property>
<name>use_cache</name>
<value>false</value>
</property>
</property_group>
</properties>
</data>
</dataObjects>
<response ID="DBExtractResponse">
<result type="debug" ID="db_debug" file_suffix=".txt" file="C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\las\output\A57024A8A22C39ABEAB14367F9617871_db_debug.txt" index="0" />
<result type="netCDF" ID="netcdf" file_suffix=".nc" file="C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\las\output\A57024A8A22C39ABEAB14367F9617871_netcdf.nc" index="1" />
<result type="rss" ID="rss" file="C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\las\output\ADD12308179A456AB901606F2DFD5F69_rss.rss" url="http://localhost:8880/armcmp/output/ADD12308179A456AB901606F2DFD5F69_rss.rss" />
</response>
</backend_request>