Difference between revisions of "Exchange with mobile application"
Petr.Bures (talk | contribs) m  | 
				Petr.Bures (talk | contribs)  m  | 
				||
| Line 7: | Line 7: | ||
<code>  <Name Lang="CS" Text="Zeměpisná šířka" /></code>  | <code>  <Name Lang="CS" Text="Zeměpisná šířka" /></code>  | ||
<code><Name Lang="EN" Text="Latitude" /></code>  | <code>  <Name Lang="EN" Text="Latitude" /></code>  | ||
<code>  <Settings UnitType="Angle" UnitDefMetric="deg" DecimalDigitsMetric="7" ExponentMetric="false" /></code>  | <code>  <Settings UnitType="Angle" UnitDefMetric="deg" DecimalDigitsMetric="7" ExponentMetric="false" /></code>  | ||
| Line 17: | Line 17: | ||
<code>  <Name Lang="CS" Text="Zeměpisná délka" /></code>  | <code>  <Name Lang="CS" Text="Zeměpisná délka" /></code>  | ||
<code><Name Lang="EN" Text="Longitude" /></code>  | <code>  <Name Lang="EN" Text="Longitude" /></code>  | ||
<code>  <Settings UnitType="Angle" UnitDefMetric="deg" DecimalDigitsMetric="7" ExponentMetric="false" /></code>  | <code>  <Settings UnitType="Angle" UnitDefMetric="deg" DecimalDigitsMetric="7" ExponentMetric="false" /></code>  | ||
| Line 23: | Line 23: | ||
<code></Item></code>  | <code></Item></code>  | ||
====== '''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>  | * 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 the file <code>Index.xml</code> specifying "what is in the ZIP file"  | ||
| Line 30: | Line 30: | ||
*Contains other files with attachments of [[File (Named Data Type)|various types]] (<code>jpg</code>, <code>pdf</code>, ...)  | *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 47: | Line 47: | ||
<code></G5ZipIndex></code>  | <code></G5ZipIndex></code>  | ||
* UnitSystem specifies [[Units|system of units]] (for default template can be here both unit systems)  | *UnitSystem specifies [[Units|system of units]] (for default template can be here both unit systems)  | ||
* Language specifies app [[Language of system GEO5|language]] (for default template can be here more language elements)    | *Language specifies app [[Language of system GEO5|language]] (for default template can be here more language elements)  | ||
* TemplateType speifies, whether there is only one Template for entering data or user selects from list of Templates when creating new data item  | *TemplateType speifies, whether there is only one Template for entering data or user selects from list of Templates when creating new data item  | ||
* DataType specifies if data have only single instance (exactly one) or user can add/edit/delete data in table  | *DataType specifies if data have only single instance (exactly one) or user can add/edit/delete data in table  | ||
* Root is the name of root element in XML files  | * Root is the name of root element in XML files  | ||
Template has boolean attribute <code>PreferIdents</code>, if <code>true</code>, in application shows Ident instead of Name of elements, if Ident is non-empty.    | Template has boolean attribute <code>PreferIdents</code>, if <code>true</code>, in application shows Ident instead of Name of elements, if Ident is non-empty.    | ||
==== Example of other XMLs ====  | ====Example of other XMLs ====  | ||
'''TemplateXML Type="Single"'''  | '''TemplateXML Type="Single"'''  | ||
Revision as of 09:27, 29 April 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>
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 conains 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" Root="ProjectData">
  <Category TemplateType="Single" Template="PointsTemplate.xml" DataType="Multi" Data="Points.xml" Root="Points">
  <Category TemplateType="Multi" Template="FieldtTests.xml" DataType="Multi" Data="FieldTests.xml" Root="FieldTests">
</G5ZipIndex>
- UnitSystem specifies system of units (for default template can be here both unit systems)
 - Language specifies app language (for default template can be here more language elements)
 - TemplateType speifies, whether there is only one Template for entering data or user selects from list of Templates when creating new data item
 - DataType specifies if data have only single instance (exactly one) or user can add/edit/delete data in table
 - Root is the name of root element in XML files
 
Template has boolean attribute PreferIdents, 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}" PreferIdents="false">
    ...
  </Template>
</Root>
TemplateXML Type="Multi"
<?xml version="1.0" encoding="utf-8"?>
<Root>
  <Template GUID="..." PreferIdents="false">
    ...
  </Template>
  <Template GUID="..." PreferIdents="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>