Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
Column
width45%

A condition must be specified according to:

Anchor
condition
condition

  • Anchor
    columnId
    columnId
    columnId is a reference to a column in the forecast table (see below), usually a parameter,
  • Anchor
    rowId
    rowId
    rowId is a reference to a row in the forecast table (see below), usually a location,
  • Anchor
    ifForecastValue
    ifForecastValue
    ifForecastValue indicates a condition based on the value of the published forecast,
  • Anchor
    ifForecastPublicationTime
    ifForecastPublicationTime
    ifForecastPublicationTime indicates a condition based on the publication time of the forecast,
  • Anchor
    ifForecastPublished
    ifForecastPublished
    ifForecastPublished indicates a condition based on whether a forecast has been published or not,
  • Anchor
    operator
    operator
    operator is one of "lt" (less than), "gt" (greater than), "le" (less than or equal to), "ge" (greater than or equal to), "eq" (equal to), "ne" (not equal to), "before", or "after", depending on the type of condition,
  • value is the reference value to compare to; depending on the condition type, this can be an integer/real value, a boolean value, or a date/time value.
Column

Image Removed

Anchor
script_configExample
script_configExample

An example in which conditions are used:

Code Block
xml
xml

<frame>
   <title>condition example</title>
   <start date="2008-03-13" time="00:01:00"/>
   <stop date="2008-03-13" time="00:02:00"/>
   <popup>true</popup>
   <condition>
      <columnId>water_level</columnId>
      <rowId>Lowestoft</rowId>
      <ifForecastPublished>
         <operator>eq</operator>
         <value>false</value>
      </ifForecastPublished>
   </condition>
   <message>Hurry, the forecast for Lowestoft has not been published yet!</message>
</frame>
<frame>
   <title>condition example</title>
   <start date="2008-03-13" time="00:10:00"/>
   <stop date="2008-03-13" time="00:11:00"/>
   <popup>true</popup>
   <condition>
      <columnId>water_level</columnId>
      <rowId>Lowestoft</rowId>
      <ifForecastPublicationTime>
         <operator>after</operator>
         <value date="2008-03-13" time="00:10:00"/>
      </ifForecastPublicationTime>
   </condition>
   <message>You were quite late with the forecast for Lowestoft</message>
</frame>
<frame>
   <title>condition example</title>
   <start date="2008-03-13" time="00:15:00"/>
   <stop date="2008-03-13" time="00:16:00"/>
   <popup>true</popup>
   <condition>
      <columnId>water_level</columnId>
      <rowId>Lowestoft</rowId>
      <ifForecastValue>
         <operator>ge</operator>
         <value>300</value>
      </ifForecastValue>
   </condition>
   <file>emergency_telephone_call.mp3</file>
</frame>
Column

Image Added

Section
Column
width45%

Anchor
forecasttable
forecasttable

Forecast Table

The contents of the forecast table can be configured using the forecastTable key. The schema for this section is

...

shown on the right.

Anchor
header
header
Using the header key, the column headers in the forecast table can be specified. A column can be added with the the column key. The value of this key is used as the name in the header of that column. For each column an id attribute must be specified. Furthermore, the following optional attributes may be specified for a column:

  • Anchor
    unit
    unit
    unit: a string containing the unit for the column (e.g. "cm" for a water level), which will also appear in the header of the column,
  • Anchor
    type
    type
    type: one of "string", "integer", "float", "boolean", or "dateTime", which indicates the type of data that is displayed in the column,
  • Anchor
    isEditable
    isEditable
    isEditable: a flag with value true or false indicating whether the column is editable for the user (e.g. the user can enter the forecast in this column),
  • Anchor
    isExport
    isExport
    isExport: a flag with value true or false indicating whether the column must be exported to file if the forecast is published (editable columns are exported by default),
  • Anchor
    exportName
    exportName
    exportName: a string containing the name that must be used for exporting the column to file,
  • Anchor
    lang
    lang
    lang: a string that specifies the language of the header; this attribute behaves the same as for the title keys.

For example, the header section in the forecast table may look like:

Code Block
xml
xml

<header>
   <column id="station">station</column>
   <column id="date">date</column>
   <column id="time">time</column>
   <column id="astro_level" unit="cm">astronomical water level</column>
   <column id="water_level" isEditable="true" unit="cm">water level</column>
   <column id="evacuate" isEditable="true" type="boolean">evacuate?</column>
</header>

Rows can be added to the forecast table by specifying the row key. The number of rows is arbitrary. For each row, an identifier must be specified using the id attribute. Content for a row is added using the cell key, where each cell must correspond to a column in the header. This can be achieved with the columnId attribute of the row key. For example:

Code Block
xml
xml

<row id="Vlissingen">
   <cell columnId="station">Vlissingen</cell>
   <cell columnId="date">12 Mar</cell>
   <cell columnId="time">17h16</cell>
   <cell columnId="astro_level">237</cell>
</row>

The cell key also supports a lang attribute that behaves the same as for the title keys.

Anchor
forecastnote
forecastnote

With the publication of a forecast, a note can be attached. An optional initial text in this note field can be specified with the forecastNote key.

Column

Image Added

Section
Column
width45%

Anchor
dictionary
dictionary

Dictionary

A dictionary can be added to a script for helping the user to look up words and definitions. These words have to be configured in a dictionary file. The key dictionaryFile contains the path to such a dictionary file. This key may be specified an arbitrary number of times in the section dictionaryFiles. The schema for a dictionary file is as

...

shown on the right.

Column

Image Modified

Anchor
example
example

Example

...