Table (Named Data Type)

From wiki.fine.cz
Revision as of 09:37, 27 March 2022 by Petr.Bures (talk | contribs)
Jump to navigation Jump to search

Used to store tables with multiple rows. Items define columns, which can be of any item type.

Template XML definition

Common Properties

Property Template XML Description Presence Default
Settings [E] Settings required
    Table type     [A] ENUM TableType Table type {[V] General,[V] Depth,[V] DepthNoDuplicates,[V] Thickness,[V] DepthFromTo,[V] DepthFromToNoDuplicates,[V] DepthFromToOptionalDepthTo,[V] Attachments} optional General
Item [:E:] Item List of column definitions of any type including Table required

Table types have some obligatory columns according to following table:

Table type Enum value Column name Column GUID Column note Table type Note
Table with arbitrary columns [V] General No arbitrary columns
Table with Depth column [V] Depth Depth {9620F214-49F6-46E2-9E44-5E7FDE8D3289} Double
Table with Depth column,

no duplicate depths allowed

[V] DepthNoDuplicates Depth {9620F214-49F6-46E2-9E44-5E7FDE8D3289} Double
Table with layers defined by its thickness [V] Thickness Thickness {94D6458E-3A0C-4157-B5EF-5793907A78FC} Double Thickness is defined in data, but user can optionally enter Depth from and Depth to
Table with depth intervals from-to [V] DepthFromTo Depth from {4E767AEA-719A-4A5F-A6CB-C8419ACE7146} Double It is possible to have gaps between rows, intervals can overlap
Depth to {FD0C4901-6D88-4872-AC41-CE757CB7AAE5} Double
Table with depth intervals from-to,

no duplicate depth ranges allowed

[V] DepthFromToNoDuplicates Depth from {4E767AEA-719A-4A5F-A6CB-C8419ACE7146} Double It is possible to have gaps between rows, intervals cannot overlap
Depth to {FD0C4901-6D88-4872-AC41-CE757CB7AAE5} Double
Table with depth intervals from-to,

depth to is optional

[V] DepthFromToOptionalDepthTo Depth from {4E767AEA-719A-4A5F-A6CB-C8419ACE7146} Double User can enter interval or depth only
Depth to {FD0C4901-6D88-4872-AC41-CE757CB7AAE5} Double
Table with attachments [V] Attachments Table containing strictly defined columns specified here

Example of Template XML

<Item ID="{21DA2A83-A06A-40CA-8ACF-6FB8C593CC3D}" ItemType="Table">

  <Name ... />

  <Settings TableType="Thickness" />

  <Item ID="{94D6458E-3A0C-4157-B5EF-5793907A78FC}" ItemType="Double">

    <Name Lang="CS" Text="Mocnost" />

    <Settings Symbol="t" UnitType="Length" UnitDefMetric="m" DecimalDigitsMetric="2" ExponentMetric="false" />

  </Item>

  <Item ID="{2CDBAE53-1285-44FB-874B-BE512C0C22F6}" ItemType="String">

    <Name Lang="CS" Text="Název zeminy" />

    <Settings />

  </Item>

  <Item ... />

</Item>

Data XML definition

Common Properties

  • Table has no specific attributes
  • It has sub-elements of type Row, which have sub-elements of type Item defined by Template columns

Example of Data XML

<Item ID="{21DA2A83-A06A-40CA-8ACF-6FB8C593CC3D}">

  <Row>

    <Item ID="{94D6458E-3A0C-4157-B5EF-5793907A78FC}" DblValue="0,50" Unit="Length_m" />

    <Item ID="{2CDBAE53-1285-44FB-874B-BE512C0C22F6}" StrValue="gravel" />

    <Item ... />

  </Row>

  <Row>

    <Item ID="{94D6458E-3A0C-4157-B5EF-5793907A78FC}" DblValue="1,50" Unit="Length_m" />

    <Item ID="{2CDBAE53-1285-44FB-874B-BE512C0C22F6}" StrValue="sand" />

    <Item ... />

  </Row>

  <Row .... />

  <Row .... />

</Item>