Data

The Data configuration item is the last piece of the puzzle in providing textual data display to the user, with the Data Source providing the repository information, the Data Definition providing the description of the data, and finally the Data providing the display label and entity to link to.

A Data Definition describes a source of data that can be used in a number of places through out Weave, but to allow this data to be displayed directly to the user (via a data grid view, etc) then we need to provide some extra information to allow Weave to know how to present the data to the user (i.e. give it a user readable label) and tell it which entity the data relates to (so Weave knows which rows to return results for).

Each Data configuration provides a selectable entry for the users within any grid data views to allow them to display data from the associated Data Definition.
Without a Data tag there would be no way for the user to directly display the information represented by a Data Definition.

Users may still be able to indirectly display information from a Data Definition if that Data Definition is used by another item that the user has access to, for example if the Data Definition presents a list of values for an search.

Namespace

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

Tags

data

Properties

Name

Type

Required

Description

id

string

yes

Unique identifier

label

string

yes

Text to display to the user to represent this data set

datadefinition

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

yes

The data definition that that data will present

entity

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

yes

The entity that this data should be linked to

acl

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

no

A reference to an ACL to attach to the entity

Sub-tags

Name

Type

Cardinality

acl

urn:com.cohga.server.acl#1.0:acl

0..1

Content

None

Examples

<jdbc:datasource id="datasource.main">
	<-- connection details for data source -->
</jdbc:datasource>

<data:datadefinition id="dd_roadDetails">
	<datasourcedataconnection datasource="datasource.main" table="ROADS" key="RD_NAME" prefix="DISTINCT">
		<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"/>
		<parameter name="class" label="Class" column="CLASS_CODE" type="integer"/>
	</datasourcedataconnection>
</data:datadefinition>

<data:data id="roadDetails" label="Road Details" datadefinition="dd_roadDetails" entity="roads"/>

Data with ACL

<data:data id="roadDetails" label="Road Details" datadefinition="dd_roadDetails" entity="roads">
	<acl id="public"/>
</data:data>