Before Chris and I start to dive in and explain how DIGGS fits together I thought it would be useful to clarify the terms that we are going to use when describing the structure of DIGGS. So here goes ....
Everything in a DIGGS file is an object, a property, a value or an attribute. Objects contain properties, and properties have values and attributes. Example 1 illustrates these simple relationships.
<Object> <property1 attribute=””>value</property1> <property2 attribute=””>value</property2> </Object>
Objects can only contain properties and cannot directly contain other objects. This rule results in the Example 2 being invalid as Object1 directly contains Object2.
<Object1> <property1>Value</property1> <property2>Value</property2> <Object2> <property1>Value</property1> </Object2> </Object1>
A property value can be a simple value, or it could be another Object. Example 3 iullustrates using a property that is another object.
<Object1> <property1> <Object2> <property2>value</property2> </Object2> </property1> </Object1>
In Example 3 Object 2 is the value of property1 and in this case property1 is called a relationship property. This is because it explains the relationship between Object1 and Object2.
To illustrate this rule again with geotechnical data Example 4 shows two layers Objects within a Hole object without a relationship property between them. In this case a relationship property is added that groups the layer objects together and describes their relationship to the Hole. As with many Objects in DIGGS the relationship property is simply a holder for a group of objects and in this case takes the plural from of the Object (i.e adds an "s" to the end of the object name) Example 5 shows the addition of a layers property to ensure the Object Property relationship rule is observed.
<Hole> <Layer> <topDepth uom=”m”>2.3</topDepth> <description>Firm CLAY</description> </Layer> <Layer> <topDepth uom=”m”>2.3</topDepth> <description>Firm CLAY</description> </Layer> </Hole>
<Hole> <layers> <layer> <topDepth uom=”m”>2.3</topDepth> <description>Firm CLAY</description> </layer> <layer> <topDepth uom=”m”>2.3</topDepth> <description>Firm CLAY</description> </layer> </layers> </Hole>