<< Click to Display Table of Contents >> Navigation: EDP > EQuIS Format Files > EQuIS Format Sections and Fields |
Format Sections
Sections are a group of fields that are related to each other. Sections must have a name and usually have at least one mapping and one field. Shown below is an excerpt from an EQuIS Format Definition (EFD) file that illustrates defining a section.
<xs:element name="Location_v1">
<xs:annotation>
<xs:documentation>Contains information about the Location.</xs:documentation>
<xs:appinfo>
<edd:group>Field</edd:group>
<edd:table mode="lookup" target="rt_location_type">
<edd:lookup source="loc_type" target="location_type_code" />
</edd:table>
... other table mappings omitted ...
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="elev_unit" type="elev_unit" nillable="true">
<xs:annotation>
<xs:documentation>Unit of measurement for elevations</xs:documentation>
</xs:annotation>
</xs:element>
... other fields omitted ...
<xs:sequence>
</xs:complexType>
</xs:element> |
In the first line, the attribute name defines the name of the table. The text between the documentation tags on the third line is the tooltip text (text displayed when you pause on the section name in EDP) for the section. The text between the group tags on the fifth line is the name of the section group which the field belongs to, and is not required. Different sections within a section group are usually related to each other.
All table mappings are declared between the appinfo tags as shown by the RT_LOCATION_TYPE table mapping, while all fields are declared between the sequence tags as shown by the ELEV_UNIT field.
Format Fields
Fields are displayed as columns after a section is selected. All fields must have a name, type, and designation as to whether they are required or not. Below is an excerpt from from an EFD file that illustrates how to declare fields and their properties.
<xs:element name="basis" type="basis" nillable="false" default="WET">
<xs:annotation>
<xs:documentation>Must be either 'Wet' for wet_weight basis reporting, 'Dry' for dry_weight basis reporting, or 'NA' for tests for which this distinction is not applicable. </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="sample_source" nillable="false" default="Field">
<xs:annotation>
<xs:documentation>This field identifies where the sample came from, either Field or Lab.</xs:documentation> |
This excerpt shows four different fields: field “basis”, field “sample_source”, field “dilution_factor” and field “container_id”. The attributes name and nillable are required for all fields. The attribute name defines the name of the field and the attribute nillable defines whether or not the field is required to have a value in every row of data.
A nillable value of false, means the field is required. A nillable value of true, means the field is not required. There are four ways to declare the type of a field.
1.The first field is an enumeration type of “basis” defined by the type attribute.
2.The second field is an enumeration or text values defined by the enumeration tags within the restriction tag. The enumeration declared in the second field can only be used by that field, while the enumeration in the first field can also be used by several other fields.
3.The third field is of type numeric (“xs:decimal” means numeric) and
4.The fourth field is of type text (“xs:string” means text) defined by the base attribute in the restriction tag. In the third field, the maximum number of digits you are allowed to the right of the decimal is three and the total number of digits that can be entered is seven. In the fourth field, the maximum number of characters you can enter is 30, defined by the value attribute in the maxLength tag.
Fields may also have the attribute default to specify a default value as shown in the first two fields. This attribute can be used when a new row of data is created in EDP. The text between the documentation tags is the tooltip text for the field (displayed when the user pauses on the field header in EDP).
Copyright © 2024 EarthSoft, Inc. • Modified: 16 Aug 2023