Versions Compared

Key

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

spatialdataconnection

Properties

Name

Type

Required

Description

entity

ref urn:com.cohga.server.entity#1.0

yes

Id if the entity that this data definition should use to generate its data.
The data is generated based on the Spatial Mapping specified for the entity

Sub-tags

Name

Type

Cardinality

parameter

parameter

1..n

Content

None

Anchor
parameter
parameter

parameter

Properties

Name

Type

Required

Description

column

string

yes

The name of the column within the table that this parameter references (can be an sql function also)

type

'string', 'numeric', 'date' or 'url'

no (default 'string')

An indicator of how the data should be displayed on the client

name

string

no (default lowercase value of column)

A unique identifier for the parameter

label

string

no (default 'pretty' value of column)

A user displayable label for the column

text

string

no

Only when type is 'url'. Specifies text to be displayed to the user instead of the actual url contents

textcolumn

string

no

Only when type is 'url'. Specifies the column that contains text to be displayed to the user instead of the actual url contents

Sub-tags

None

Content

None

Notes

  • If no label is specified then it will be generated by formatting the name, unless no name is supplied, then it will be generated by formatting the column
  • Formatting involves converting any _'s to spaces, converting the first letter and any letter after a space to upper case and converting every other letter to lower case, e.g. "BOMB_DISPOSAL_METHOD" becomes "Bomb Disposal Method"
  • Only one of text or textcolumn should be specified when type is 'url'

Examples

A simple spatial data definition generating name and label attributes based on the column

Code Block
xml
xml
linenumberstrue

<data:datadefinition id="graffiti">
	<spatialdataconnection entity="graffiti">
		<parameter column="ID"/> <!-- name will be 'id', label 'Id' -->
		<parameter column="DESCRIPTION"/> <!-- name will be 'description', label 'Description' -->
		<parameter label="Created on" column="CREATED" type="datetime"/> <!-- name will be 'created' -->
		<parameter label="Modified on" column="MODIFIED" type="datetime"/> <!-- name will be 'modified' -->
		<parameter name="user" label="User" column="USERID"/>
	</spatialdataconnection>
</data:datadefinition>