Data dictionary elements

A data dictionary is composed of data dictionary elements (DDEs) of which there are three types: Simple, Composite, and Collection elements. Simple DDEs are primitive elements such as strings, numbers, dates, and Boolean values that hold information such as a city name. A Composite DDE contains other DDEs, which can be of type primitive, composite or collection. For example, an address, which consists of a street address, city, province, country, and postal code. A Collection is a list of similar Simple or Composite DDEs. For example, a customer with multiple locations, or different billing and shipping addresses.

Data Dictionary Elements must adhere to a few rules with respect to the schema structure.

  • Only composite type is allowed as top-level DDE in a data dictionary.

  • An annotated FML with multiple top-level entities, cannot be imported

  • Name, reference name, and element type are mandatory fields for a data dictionaries and DDEs.

  • The reference name must be unique.

    A parent DDE (composite) can't have two children with the same name.

  • Enums only contain primitive String types.

Computed data dictionary elements

A data dictionary can also include computed elements. A computed data dictionary element is always associated with an expression. This expression is evaluated to get the value of a data dictionary element at runtime. A computed DDE value is a function of other DDE values or literals. By default JSP Expression Language (EL) expressions are supported. The EL expressions use the ${ } characters and valid expressions can include literals, operators, variables (data dictionary element references), and function calls. While referencing a data dictionary element in the expression, the reference name of the DDE is used. The reference name is unique for every data dictionary element within a data dictionary.

A computed DDE PersonFullName can be associated with an EL concatenation expression such as ${PersonFirstName} ${PersonLastName}.

Data Dictionary Building Block Class Diagram

The following diagram shows the relationships among the above Data Dictionary classes:

View full size graphic
Data dictionary element types

The following table details the common attributes associated with a DDE:

Attribute

Type

Description

name

String

Required. Name of the DDE. It must be unique.

reference Name

String

Required. Unique Reference name for the DDE allowing for references to the DDE that are independent of changes to the hierarchy or structure of the data dictionary. Text modules are mapped using this name

displayname

String

An optional user-friendly name of the DDE.

description

String

Description of the DDE.

elementType

String

Required. The type of DDE: STRING, NUMBER, DATE, BOOLEAN, COMPOSITE, COLLECTION.

elementSubType

String

The subtype for DDE: ENUM. Only allowed for STRING and NUMBER elementType.

key

Boolean

A Boolean field to indicate if a DDE is key element.

computed

Boolean

A Boolean field to indicate if a DDE is computed. A computed DDE value is a function of other DDE values. By default, jsp el expressions are supported.

expression

String

The expression for the "computed" DDE. The expression evaluation service shipped by default supports JSP EL expressions. You can replace the expression service with a custom implementation.

valueSet

List

A set of allowed values for an Enum type DDE. For example, Accounttype can have (Saving, Current) values only.

extendedProperties

Object

A Map of custom properties added to the DDE (user interface specific or any other information).

required

Boolean

The flag indicates that the source of instance data corresponding to the data dictionary must contain the value of this particular DDE.

Binding

BindingElement

The XML or Java binding of the element.

Data type mapping between XSD, data dictionary and data model

Exporting an XSD to the model’s annotated FML requires specific data mapping, which is detailed in the following table. The DDI column indicates the type of the DDE value as available in the DDI.

XSD

Data Dictionary

model

DDI (Instance Value Data Type)

xs:element of type - Composite Type

DDE of type - COMPOSITE

Entity

java.util.Map

xs:element where maxOccurs > 1

DDE of type - COLLECTION-

A DDE node is created next to the COLLECTION DDE which captures information from the parent COLLECTION node. The same gets created for both collection of simple/composite data types. Whenever you have a COLLECTION of the type composite, the Data Dictionary tree captures the constituent fields in the children of the DDE created for capturing type information.

- DDE (COLLECTION)

- DDE(COMPOSITE for type info)

- DDE(STRING) field1

- DDE(STRING) field2

Collection property in FML

Simple - Mapped as a collection

Composite -Mapped as a relationship of cardinality one-to-many with the corresponding entity.

java.util.List

Attribute of type - xs:id

DDE of type - STRING

id (property)

java.lang.String

xs:attribute /xs:element of type - xs:string

DDE of type - STRING

Property of type - string

java.lang.String

xs:attribute /xs:element of type - xs:boolean

DDE of type - BOOLEAN

Property of type - boolean

java.lang.Boolean

xs:attribute /xs:element of type - xs:date

DDE of type - DATE

Property of type - date

java.lang.String

xs:attribute /xs:element of type - xs:integer

DDE of type - NUMBER

Property of type - double

java.lang.Double

xs:attribute /xs:element of type - xs:long

DDE of type - NUMBER

Property of type - double

java.lang.Double

xs:attribute /xs:element of type - xs:double

DDE of type - NUMBER

Property of type - double

java.lang.Double

Element of enum type and baseType - xs:string

DDE of

type - STRING

subtype - ENUM

valueSet - the allowed values for ENUM

Property of type - string

The allowed ENUM values go to DDS category annotations.

java.lang.String

// Ethnio survey code removed