Versions Compared

Key

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

...

The data definition itself is just a container for a data connection, the data definition provides an id and a container for a data connection and it's the data connection that describes the source of the underlying data and how that data is obtained.

...

Namespace

urn:com.cohga.server.data.database#1.0

Tags

datadefinition

Properties

Name

Type

Required

Description

id

string

yes

Unique identifier for referencing the data definition

filter

string

no

Provide the id of a selection filter that will be applied to the id’s before generating the data. Available from Weave 2.6.7.
For example if you’re using different id’s for the selection of an entity than the data source provides this can be used to first convert the id’s to the values that the data source does understand.

Sub-tags

Content

None

Notes

  • Only one of the data connection types can be included in a data definition.

Examples

Sample data definition using a database

xml
Code Block
xml
linenumberstrue
<data:datadefinition id="roadDetails">
	<datasourcedataconnection datasource="datasource.main" table="ROADS" key="RD_NAME" prefix="DISTINCT">
		<from table="PLANS"/>
		<where clause="PLANS.ID=ROADS.PLAN_ID"/>
		<parameter name="name" label="Name" column="RD_NAME"/>
		<parameter name="suffix" label="Suffix" column="RD_SUFFIX"/>
		<parameter name="type" label="Type" column="RD_TYPE"/>
		<parameter name="altname" label="Alt. Name" column="ALT_NAME"/>
		<parameter name="altsuffix" label="Alt. Suffix" column="ALT_SUFFIX"/>
		<parameter name="alttype" label="Alt. Type" column="ALT_TYPE"/>
	</datasourcedataconnection>
</data:datadefinition>

A simple inline data definition

xml
Code Block
xml
linenumberstrue
<data:datadefinition id="connectionType">
	<inlinedataconnection>
		<parameter type="string" name="key" label="Key" />
		<parameter type="string" name="label" label="Label" />
		<row>
			<cell>U</cell>
			<cell>Unverfied</cell>
		</row>
		<row>
			<cell>V</cell>
			<cell>Verified</cell>
		</row>
	</inlinedataconnection>
</data:datadefinition>

...