Skip to main content

Interfaces

Defines new ”view” at the data – it can bring together heterogeneous data and make them look homogenous. Interface definition includes attributes and forms definitions.

Example: Structure of an interface array.
<ber:interfaceArray>
<ber:interface id="if_1" name="Interface 1">
<ber:description>Heterogeneous list 1</ber:description>
<ber:interfaceAttributeArray>
<ber:interfaceAttribute id="ia_1_01" name="Name" dbName="NAME">
<ber:description>String attribute</ber:description>
<ber:dataType>
<ber:string maxLength="80"/>
</ber:dataType>
</ber:interfaceAttribute>
<ber:interfaceAttribute id="ia_1_02" name="Length" dbName="LENGTH">
<ber:description>Decimal attribute</ber:description>
<ber:dataType>
<ber:decimal precision="7" scale="2"/>
</ber:dataType>
</ber:interfaceAttribute>
<ber:interfaceAttribute id="ia_1_03" name="Type" dbName="TYPE">
<ber:description>Codelist attribute</ber:description>
<ber:dataType>
<ber:codeListRef refId="cl_1" displayColumn="ca_1_01"/>
</ber:dataType>
</ber:interfaceAttribute>
<ber:interfaceAttribute id="ia_1_04" name="Master ID" dbName="MASTER_ID">
<ber:description>FeatureRef attribute</ber:description>
<ber:dataType>
<ber:featureRef>
<ber:attribute refId="at_r_002"/>
<ber:featureRefRelationAssoc refId="r_a_b"/>
</ber:featureRef>
</ber:dataType>
</ber:interfaceAttribute>
</ber:interfaceAttributeArray>
<ber:formArray>
<ber:form id="frm_if_101" name="Interface 1">
<ber:description> Heterogeneous list 1</ber:description>
<ber:fieldGroup>
<ber:field refId="ia_1_01"/>
<ber:field refId="ia_1_02"/>
<ber:field refId="ia_1_03"/>
<ber:field refId="ia_1_04"/>
</ber:fieldGroup>
</ber:form>
</ber:formArray>
</ber:interface>
</ber:interfaceArray>

Attributes:

  • id – Unique identifier of an interface.
  • name – Name of an interface.

Inner elements:

  • description – Detailed description of an interface; optional definition.
  • interfaceAttributeArray – Definition of interface attributes.
  • formArray – Definition of forms used to present interface content.

Defining Interface Attributes

  • id – Unique identifier of an interface attribute.
  • name – Name of interface attribute.
  • dbName – Database column name of an interface attribute.
  • outputFormat – This type defines a number format string. It contains the colon with format specifier and precision (:f2 or :F0).

Inner elements:

  • description – Detailed description of an interface attribute.
  • dataType – Data type of an interface attribute or reference to an association (<ber:featureRefRelationAssoc>) and its attribute (<ber:attribute>)

Implementing Interface

The interface and its attributes are used = implemented by individual feature types and their attributes. One feature type can implement more interfaces, and one interface can be implemented by more feature types.

Interface implementation by particular feature type is defined in interfaceDefArray in feature type definition.

interfaceDef definition includes:

  • refId – Interface definition reference.
  • interfaceAttributeDef
    • refId – Interface attribute reference
    • attribute refId – feature type attribute when the feature type implements the interface attribute by standard attribute or
    • defaultValue – when the feature type implements the interface attribute by constant value. Empty value as a special type of defaultValue is also valid definition.
Example: Structure of an interfaceDefArray.
<ber:interfaceDefArray>
<ber:interfaceDef refId="if_1">
<ber:interfaceAttributeDef refId="ia_1_01">
<ber:attribute refId="at_001"/>
</ber:interfaceAttributeDef>
<ber:interfaceAttributeDef refId="ia_1_02">
<ber:defaultValue>100.05</ber:defaultValue>
</ber:interfaceAttributeDef>
<ber:interfaceAttributeDef refId="ia_1_03">
<ber:attribute refId="at_002"/>
</ber:interfaceAttributeDef>
<ber:interfaceAttributeDef refId="ia_1_04">
<ber:defaultValue/>
</ber:interfaceAttributeDef>
</ber:interfaceDef>
</ber:interfaceDefArray>
warning

A feature type implementing an interface has to define the mapping for all interface attributes.

Codelist attributes in interfaces

If dataType of an interface attribute is codeListRef

  • The codelist is used only in specific cases
  • The individual codelists defined in feature attribute definitions are used for displaying the data
  • When defining a defaultValue for a codelist interface attribute, the system does not validate the value against the entries in the codelist. The default value is exposed as a constant in the interface. The value must match the data type of the codelist’s primary key column.

Interface limitations

  • Interface must define at least one form to be accessible in LIDS Edit / Explorer browse
  • It’s not possible to use system attributes in interfaces
  • It’s not possible to combine different data types in one interface attribute
  • The same feature attribute can't be mapped to more interface attributes of the same interface