Difference between revisions of "Exchange with mobile application"
Petr.Bures (talk | contribs) m  | 
				Petr.Bures (talk | contribs)  m  | 
				||
| (14 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
* only GUIDs are used to identify items and enumerations  | * only GUIDs are used to identify items and enumerations  | ||
*coordinates X and Y are specified in GPS coordinates as Latitude and Longitude -   | *coordinates X and Y are specified in GPS coordinates as Latitude and Longitude  | ||
<code><Item ID="{A80C49D2-091F-4AAC-8430-75C602F3BD6C}" ItemType="Double"></code>  | |||
<code>  <Name Lang="CS" Text="Zeměpisná šířka" /></code>  | |||
<code>  <Name Lang="EN" Text="Latitude" /></code>  | |||
<code>  <Settings UnitType="Angle" UnitDefMetric="deg" DecimalDigitsMetric="7" ExponentMetric="false" /></code>  | |||
<code></Item></code>  | |||
<code><Item ID="{112D9BFC-F300-43FA-994E-A57DE8FD3E0F}" ItemType="Double"></code>  | |||
<code>  <Name Lang="CS" Text="Zeměpisná délka" /></code>  | |||
<code>  <Name Lang="EN" Text="Longitude" /></code>  | |||
<code>  <Settings UnitType="Angle" UnitDefMetric="deg" DecimalDigitsMetric="7" ExponentMetric="false" /></code>  | |||
<code></Item></code>  | |||
* mapové značky jsou definovány enumerací s určeným GUID  | |||
<code><Item ID="{9E0528F6-0B21-4044-BEAD-242C907934C5}" ItemType="Enum"></code>  | |||
'''[[Formatted text value|Formatted text]] for mobile application'''  | |||
* texts in template use the formatting capabilities 1., 2., 3., 4., 7., 8., 9., 10.  | |||
* texts in data are plain for the first version - no formatting is used  | |||
'''Data file for exchange with mobile application'''  | '''Data file for exchange with mobile application'''  | ||
*Data file has [[wikipedia:ZIP_(file_format)|ZIP format]] with extension <code>.g5zip</code>  | |||
*Contains the file <code>Index.xml</code> specifying "what is in the ZIP file"  | |||
*Contains other XML files with [[Named Data Template|Template specifications]]  | |||
*Optionally contains XML files with [[Named Data Container|Data definitions]]  | |||
*Contains other files with attachments of [[File (Named Data Type)|various types]] (<code>jpg</code>, <code>pdf</code>, ...)  | |||
====Example of Index.xml====  | |||
==== Example of Index.xml ====  | |||
<code><?xml version="1.0" encoding="utf-8"?></code>  | <code><?xml version="1.0" encoding="utf-8"?></code>  | ||
| Line 21: | Line 48: | ||
<code>  <Language Value="EN" /></code>  | <code>  <Language Value="EN" /></code>  | ||
<code>  <Category TemplateType="Single" Template="ProjectTemplate.xml" DataType="Single" Data="ProjectData.xml  | <code>  <Category TemplateType="Single" Template="ProjectTemplate.xml" DataType="Single" Data="ProjectData.xml"></code>  | ||
<code>  <Category TemplateType="Single" Template="PointsTemplate.xml" DataType="Multi" Data="Points.xml  | <code>  <Category TemplateType="Single" Template="PointsTemplate.xml" DataType="Multi" Data="Points.xml"></code>  | ||
<code>  <Category TemplateType="Multi" Template="  | <code>  <Category TemplateType="Multi" Template="FieldTests.xml" DataType="Multi" Data="FieldTests.xml"></code>  | ||
<code></G5ZipIndex></code>  | <code></G5ZipIndex></code>  | ||
==== Example of other XMLs ====  | *UnitSystem specifies [[Units|system of units]] (not included for default template - for USA use imperial, otherwise metric)  | ||
*Language specifies app [[Language of system GEO5|language]] (not included for default template - language is determined by operating system)  | |||
*TemplateType speciifies, whether there is only one Template (<code>Single</code>) for entering data or user selects from list of Templates (<code>Multi</code>) when creating new data item  | |||
*DataType specifies if data have only single instance (<code>Single</code>) (exactly one) or user can add/edit/delete data in table (<code>Multi</code>)  | |||
Template has boolean attribute <code>PreferIdent</code>, if <code>true</code>, in application shows Ident instead of Name of elements, if Ident is non-empty.   | |||
====Example of other XMLs====  | |||
'''TemplateXML Type="Single"'''  | '''TemplateXML Type="Single"'''  | ||
| Line 36: | Line 69: | ||
<code><Root></code>  | <code><Root></code>  | ||
<code>  <Template GUID="{2BBF3527-B079-423B-9A34-AC5666693C36}"></code>  | <code>  <Template GUID="{2BBF3527-B079-423B-9A34-AC5666693C36}" PreferIdent="false"></code>  | ||
<code>    ...</code>  | <code>    ...</code>  | ||
| Line 52: | Line 85: | ||
<code><Root></code>  | <code><Root></code>  | ||
<code>  <Template GUID="..."></code>  | <code><Name></code>  | ||
<code>    <Item Lang="CS" Text="Polní zkoušky" /></code>  | |||
<code>  </Name></code>  | |||
<code>  <Template GUID="..." PreferIdent="false"></code>  | |||
<code>    ...</code>  | <code>    ...</code>  | ||
| Line 58: | Line 97: | ||
<code>  </Template></code>  | <code>  </Template></code>  | ||
<code>  <Template GUID="..."></code>  | <code>  <Template GUID="..." PreferIdent="true"></code>  | ||
<code>    ...</code>  | <code>    ...</code>  | ||
Latest revision as of 00:06, 2 October 2022
There are some limitations to Data and Template XML file used for exchange data with mobile application:
- only GUIDs are used to identify items and enumerations
 - coordinates X and Y are specified in GPS coordinates as Latitude and Longitude
 
<Item ID="{A80C49D2-091F-4AAC-8430-75C602F3BD6C}" ItemType="Double">
  <Name Lang="CS" Text="Zeměpisná šířka" />
  <Name Lang="EN" Text="Latitude" />
  <Settings UnitType="Angle" UnitDefMetric="deg" DecimalDigitsMetric="7" ExponentMetric="false" />
</Item>
<Item ID="{112D9BFC-F300-43FA-994E-A57DE8FD3E0F}" ItemType="Double">
  <Name Lang="CS" Text="Zeměpisná délka" />
  <Name Lang="EN" Text="Longitude" />
  <Settings UnitType="Angle" UnitDefMetric="deg" DecimalDigitsMetric="7" ExponentMetric="false" />
</Item>
- mapové značky jsou definovány enumerací s určeným GUID
 
<Item ID="{9E0528F6-0B21-4044-BEAD-242C907934C5}" ItemType="Enum">
Formatted text for mobile application
- texts in template use the formatting capabilities 1., 2., 3., 4., 7., 8., 9., 10.
 - texts in data are plain for the first version - no formatting is used
 
Data file for exchange with mobile application
- Data file has ZIP format with extension 
.g5zip - Contains the file 
Index.xmlspecifying "what is in the ZIP file" - Contains other XML files with Template specifications
 - Optionally contains XML files with Data definitions
 - Contains other files with attachments of various types (
jpg,pdf, ...) 
Example of Index.xml
<?xml version="1.0" encoding="utf-8"?>
<G5ZipIndex>
  <UnitSystem Value="Metric" />
  <Language Value="EN" />
  <Category TemplateType="Single" Template="ProjectTemplate.xml" DataType="Single" Data="ProjectData.xml">
  <Category TemplateType="Single" Template="PointsTemplate.xml" DataType="Multi" Data="Points.xml">
  <Category TemplateType="Multi" Template="FieldTests.xml" DataType="Multi" Data="FieldTests.xml">
</G5ZipIndex>
- UnitSystem specifies system of units (not included for default template - for USA use imperial, otherwise metric)
 - Language specifies app language (not included for default template - language is determined by operating system)
 - TemplateType speciifies, whether there is only one Template (
Single) for entering data or user selects from list of Templates (Multi) when creating new data item - DataType specifies if data have only single instance (
Single) (exactly one) or user can add/edit/delete data in table (Multi) 
Template has boolean attribute PreferIdent, if true, in application shows Ident instead of Name of elements, if Ident is non-empty. 
Example of other XMLs
TemplateXML Type="Single"
<?xml version="1.0" encoding="utf-8"?>
<Root>
  <Template GUID="{2BBF3527-B079-423B-9A34-AC5666693C36}" PreferIdent="false">
    ...
  </Template>
</Root>
TemplateXML Type="Multi"
<?xml version="1.0" encoding="utf-8"?>
<Root>
<Name>
    <Item Lang="CS" Text="Polní zkoušky" />
  </Name>
  <Template GUID="..." PreferIdent="false">
    ...
  </Template>
  <Template GUID="..." PreferIdent="true">
    ...
  </Template>
  ...
</Root>
DataXML Type="Single"
<?xml version="1.0" encoding="utf-8"?>
<Root>
  <Data Template="{2BBF3527-B079-423B-9A34-AC5666693C36}">
    ...
  </Data>
</Root>
DataXML Type="Multi"
<?xml version="1.0" encoding="utf-8"?>
<Root>
  <Data Template="...">
    ...
  </Data>
  <Data Template="...">
    ...
  </Data>
  ...
</Root>