From wiki.ginstr.com
Revision as of 17:45, 12 July 2016 by Mark (talk | contribs) (Created page with "<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div> <span STYLE="font-size: xx-large">Datatypes</span> Category:ginstr_launcher_manual Datatypes repres...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Datatypes

Datatypes represent special entities in ginstr which are composed of base types (string, integer, boolean,...)


The table below contains a brief description of all possible datatypes.

Full details on each datatype can be found by clicking on the datatype name

Datatype Brief Description
text Used for text or combinations of text and numbers
number Used for numbers
date Used for dates (yyyy-mm-dd)
time Used for time (hh:mm:ss)
dateTime Used for date and time (yyyy-mm-dd hh:mm:ss)
listOfDates Used for list of dates
listOfTimes Used for list of times
listOfDateTimes Used for list of dateTimes
assignment Used to define assigned table/column
pointer Used to define pointed table
weekday Used for weekdays (i.e. Monday to Friday)
email Used for email addresses
phoneNumber Used for Phone Numbers
gps Used for GPS data
status Used for status
pictures Used for image files
video Used for video files
audio Used for audio files
documents Used for document files
signature Used for signature files
iBeacon Used for Apple iBeacon protocol

Two representations are listed below for each datatype:

JSON
JSON representation shows how datatype is structured in database
configuration.xml
full representation of XML definition for datatype when written in configuration.xml. More details about configuration.xml here

Each datatype has, in addition to base attributes, special settings which are different when comparing with other datatypes. In the following text, specification can be found for each setting per datatype.

All column settings are optional and have null by default (except pointer, assignment, audio, video, pictures and documents datatypes).


text

Used for text or combinations of text and numbers

Example JSON

{
  "dataTypeDefinitionId": "text",
  "name": "text",
  "field": "ORSXQ5A0",
  "id": "ORSXQ5A0",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "len": null,
    "horizontalAlignment": "left",
    "multiline": null,
    "valuesList": ["val1", "val2"]
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnText>

 <len>null|>=0|<=10000</len>
 <horizontalAlignment>left|center|right</horizontalAlignment>
 <multiline>true|false</multiline>
 <valuesList>
   <value>val1</value>
   <value>val2</value>
 </valuesList>

</columnText> </source>

Description of settings

len (Integer, optional)
the length limit of text
Value from 0 to 10000.
0 and null value is unlimited.
Default: null
horizontalAlignment (String, optional)
the text alignment in column.
Allows left, center, right.
Default: left
multiline (Boolean, optional)
the option to enable or disable multiline text.
Default: false
valuesList (StringArray, optional)
array with list of possible values.
If array is empty, all values are allowed.
Default: null


number

Used for numbers

Example JSON

{
  "dataTypeDefinitionId": "number",
  "name": "number",
  "field": "NZ2W2YTFOI000000",
  "id": "NZ2W2YTFOI000000",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "decimalPlaces": null,
    "natural": null,
    "percentage": null,
    "notNegative": null,
    "valuesList": [1, 2]
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnNumber>

 <decimalPlaces>null|>=0|<=13</decimalPlaces>
 <natural>true|false</natural>
 <percentage>true|false</percentage>
 <notNegative>true|false</notNegative>
 <valuesList>
   <value>1</value>
   <value>2</value>
 </valuesList>

</columnNumber> </source>

Description of settings

decimalPlaces (Integer, optional)
the length limit of decimal places.
Allows integer as value from 0 to 13.
0 and null value is limited to 13.
Default: null
natural (Boolean, optional)
enable/disable fractional numbers.
When true, fractional numbers are now allowed.
Default: false
percentage (Boolean, optional)
enable/disable percentage.
When true, numbers are multiplied by 100 and % sign is added.
Default: false
notNegative (Boolean, optional)
enable/disable negative numbers.
When true, negative numbers are not allowed.
Default: false
valuesList (DoubleArray, optional)
array with list of possible values.
If array is empty, all values are allowed.
Default: null


date

Used for dates (yyyy-mm-dd)

Value is equal to start of date in UTC time zone.

Example JSON

{
  "dataTypeDefinitionId": "date",
  "name": "date",
  "field": "MRQXIZI0",
  "id": "MRQXIZI0",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "minDate": null,
    "maxDate": null,
    "preset": null,
    "defaultFilter": null,
    "setCurrent": null,
    "notEditable": null
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnDate>

 <minDate>yyyy-mm-dd</minDate>
 <maxDate>yyyy-mm-dd</maxDate>
 <preset>yyyy-mm-dd</preset>
 <defaultFilter>today|yesterday|currentWeek|lastWeek|currentMonth|lastMonth|untilToday|fromToday|untilTomorrow|fromTomorrow|currentYear|lastYear</defaultFilter>
 <setCurrent>true|false</setCurrent>
 <notEditable>true|false</notEditable>

</columnDate> </source>

Description of settings

minDate (Long/Date, optional)
minimum date
Unix time in milliseconds in JSON
yyyy-mm-dd in XML
Default: null
maxDate (Long/Date, optional)
maximum date
Unix time in milliseconds in JSON
yyyy-mm-dd in XML
Default: null
preset (Long/Date, optional)
default value
Unix time in milliseconds in JSON
yyyy-mm-dd in XML
Default: null
defaultFilter (String, optional)
filter that is applied to the field, it can be null or one of above options.
Default: null
setCurrent (Boolean, optional)
enable/disable set of current date when create new date cell.
Default: false
notEditable (Boolean, optional)
is field editable.
Default: false


time

Used for time (hh:mm:ss)

Example JSON

{
  "dataTypeDefinitionId": "time",
  "name": "time",
  "field": "ORUW2ZI0",
  "id": "ORUW2ZI0",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "minTime": null,
    "maxTime": null,
    "preset": null,
    "setCurrent": null,
    "notEditable": null
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnTime>

 <minTime>hh:mm:ss</minTime>
 <maxTime>hh:mm:ss</maxTime>
 <preset>hh:mm:ss</preset>
 <setCurrent>true|false</setCurrent>
 <notEditable>true|false</notEditable>

</columnTime> </source>

Description of settings

minTime (Long/Time, optional)
minimum time,
Unix time in milliseconds in JSON
hh:mm:ss in XML
Default: null
maxTime (Long/Time, optional)
maximum time
Unix time in milliseconds in JSON
hh:mm:ss in XML
Default: null
preset (Long/Time, optional)
default value
Unix time in milliseconds in JSON
hh:mm:ss in XML
Default: null
setCurrent (Boolean, optional)
enable/disable set of current time when create new date cell.
Default: false
notEditable (Boolean, optional)
is field editable.
Default: false


dateTime

Used for date and time (yyyy-mm-dd hh:mm:ss)

Example JSON

{
  "dataTypeDefinitionId": "dateTime",
  "name": "date and time",
  "field": "MRQXIZJAMFXGIIDUNFWWK000",
  "id": "MRQXIZJAMFXGIIDUNFWWK000",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "minDate": null,
    "maxDate": null,
    "minTime": null,
    "maxTime": null,
    "preset": null,
    "defaultFilter": null,
    "setCurrent": null,
    "notEditable": null
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnDateTime>

 <minDate>yyyy-mm-dd</minDate>
 <maxDate>yyyy-mm-dd</maxDate>
 <minTime>hh:mm:ss</minTime>
 <maxTime>hh:mm:ss</maxTime>
 <preset>yyyy-mm-dd hh:mm:ss</preset>
 <defaultFilter>today|yesterday|currentWeek|lastWeek|currentMonth|lastMonth|untilToday|fromToday|untilTomorrow|fromTomorrow|currentYear|lastYear</defaultFilter>
 <setCurrent>true|false</setCurrent>
 <notEditable>true|false</notEditable>

</columnDateTime> </source>

Description of settings

minDate (Long/Date, optional)
minimum date
Unix time in milliseconds in JSON
yyyy-mm-dd in XML
Default: null
maxDate (Long/Date, optional)
maximum date
Unix time in milliseconds in JSON
yyyy-mm-dd in XML
Default: null
minTime (Long/Time, optional)
minimum time
Unix time in milliseconds in JSON
hh:mm:ss in XML
Default: null
maxTime (Long/Time, optional)
maximum time
Unix time in milliseconds in JSON
hh:mm:ss in XML
Default: null
preset (Long/Datetime, optional)
default value
Unix time in milliseconds in JSON
yyyy-mm-dd hh:mm:ss in XML
Default: null
defaultFilter (String, optional)
filter that is applied to the field, it can be null or one of above options.
Default: null
setCurrent (Boolean, optional)
enable/disable set of current timestamp when create new date cell
Default: false
notEditable (Boolean, optional)
is field editable.
Default: false


listOfDates

Used for list of dates

Example JSON

{
  "dataTypeDefinitionId": "listOfDates",
  "name": "list of dates",
  "field": "ORSXQ5A0",
  "id": "ORSXQ5A0",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "maxItems": null,
    "preset": null,
    "minDate": null,
    "maxDate": null
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnListOfDates>

 <maxItems></maxItems>
 <preset>yyyy-mm-dd</preset>
 <minDate>yyyy-mm-dd</minDate>
 <maxDate>yyyy-mm-dd</maxDate>

</columnListOfDates> </source>

Description of settings

maxItems (Integer, optional)
maximum number of items
Default: null
minDate (Long/Date, optional)
minimum date
Unix time in milliseconds in JSON
yyyy-mm-dd in XML
Default: null
maxDate (Long/Date, optional)
maximum date
Unix time in milliseconds in JSON
yyyy-mm-dd in XML
Default: null
preset (Long/Datetime, optional)
default value
Unix time in milliseconds in JSON
yyyy-mm-dd hh:mm:ss in XML
Default: null


listOfTimes

Used for list of times

Example JSON

{
  "dataTypeDefinitionId": "listOfTimes",
  "name": "list of times",
  "field": "ORSXQ5A0",
  "id": "ORSXQ5A0",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "maxItems": null,
    "preset": null,
    "minTime": null,
    "maxTime": null
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnListOfTimes>

 <maxItems></maxItems>
 <preset>hh:mm:ss</preset>
 <minTime>hh:mm:ss</minTime>
 <maxTime>hh:mm:ss</maxTime>

</columnListOfTimes> </source>

Description of settings

maxItems (Integer, optional)
maximum number of items
Default: null
minTime (Long/Time, optional)
minimum time,
Unix time in milliseconds in JSON
hh:mm:ss in XML
Default: null
maxTime (Long/Time, optional)
maximum time
Unix time in milliseconds in JSON
hh:mm:ss in XML
Default: null
preset (Long/Time, optional)
default value
Unix time in milliseconds in JSON
hh:mm:ss in XML
Default: null


listOfDateTimes

Used for list of dateTimes

Example JSON

{
  "dataTypeDefinitionId": "listOfDateTimes",
  "name": "list of dates and times",
  "field": "ORSXQ5A0",
  "id": "ORSXQ5A0",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "maxItems": null,
    "minDate": null,
    "maxDate": null,
    "minTime": null,
    "maxTime": null,
    "preset": null
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnListOfDateTimes>

 <maxItems></maxItems>
 <minDate>yyyy-mm-dd</minDate>
 <maxDate>yyyy-mm-dd</maxDate>
 <minTime>hh:mm:ss</minTime>
 <maxTime>hh:mm:ss</maxTime>
 <preset>yyyy-mm-dd hh:mm:ss</preset>

</columnListOfDateTime> </source>

Description of settings

maxItems (Integer, optional)
maximum number of items
Default: null
minDate (Long/Date, optional)
minimum date
Unix time in milliseconds in JSON
yyyy-mm-dd in XML
Default: null
maxDate (Long/Date, optional)
maximum date
Unix time in milliseconds in JSON
yyyy-mm-dd in XML
Default: null
minTime (Long/Time, optional)
minimum time
Unix time in milliseconds in JSON
hh:mm:ss in XML
Default: null
maxTime (Long/Time, optional)
maximum time
Unix time in milliseconds in JSON
hh:mm:ss in XML
Default: null
preset (Long/Datetime, optional)
default value
Unix time in milliseconds in JSON
yyyy-mm-dd hh:mm:ss in XML
Default: null


assignment

Used to define assigned table/column

Assigned column should be specified

Example JSON

{
  "dataTypeDefinitionId": "assignment",
  "name": "assignment",
  "field": "MFZXG2LHNZWWK3TU",
  "id": "MFZXG2LHNZWWK3TU",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "type": "other",
    "tableId": "mainUser111140__GAYSA5DBMJWGKIDBNRWCA5DZOBSXG000",
    "nameColumnField": "ORSXQ5A0",
    "backNameColumnField": "_id",
    "relatedColumnName": "xxx",
    "dataType": "text" 
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnAssignment>

tableId
 <column>columnField</column>

</columnAssignment> </source>

Description of settings=

tableId (table) (String)
id of assigned table
No default value.
nameColumnField (column) (String)
ID of column in assigned table which value should be shown in current table.
No default value.
type (String)
Reserved for assignment to trackables, geofences and other non-ginstr objects.
Default: other
backNameColumnField (String)
name of column that will be displayed in relatedColumnName of assigned table.
Field should be empty in case column is created from configuration.xml
Default: null
relatedColumnName (String, optional)
name of column that will be created in assigned table which will hold assignments to current table.
Field should be empty in case column is created from configuration.xml
Default: null
dataType (String)
data type of nameColumnField column.
It supports all existing datatypes except assignment, status & pointer.
Field value is set automatically during table creation/update
Default: null


pointer

Used to define pointed table

Pointed column should be specified

Example JSON

{
  "dataTypeDefinitionId": "pointer",
  "name": "pointer",
  "field": "OBXWS3TUMVZA0000",
  "id": "OBXWS3TUMVZA0000",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings": {
    "reference": {
      "category": "mainUser111140__GAYSA5DBMJWGKIDBNRWCA5DZOBSXG000",
      "item": "ORSXQ5A0" 
    },
    "filterOnParentSelection": null,
    "auxiliaryColumns": ["JZQW2ZI0", "KBUG65DP"],
    "dependsOnColumns": [{
      "category": "zoneNo",
      "item": "zoneNo" 
    }],
    "dataType": "text" 
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnPointer>

tableId
 <column>columnField</column>
 <filterOnParentSelection>true|false</filterOnParentSelection>
 <auxiliaryColumns>
   <column>columnField</column>
 </auxiliaryColumns>
 <dependsOnColumns>
   <column>
     <current>columnInCurrentTable</current>
     <pointed>columnInPointedTableToDefineSubset</pointed>
   </column>
 </dependsOnColumns>

</columnPointer> </source>

Description of settings

category (table) (String)
ID of pointed table.
No default value.
item (column) (String)
ID of pointed column.
No default value.
filterOnParentSelection (Boolean, optional)
if true, filters table content if parent is selected in another portlet of same workspace.
Default: true (for configuration.xml) and false for other cases.
auxiliaryColumns (StringArray, optional)
list of columns that should be shown in autocomplete popup widget while pointer value is selected.
Default: null
dependsOnColumns (StringHash, optional)
list of columns current column depends on.
Should be used to show only subset of values filtered on value in selected table.
[{"category": "columnInCurrentTable", "item": "columnInPointedTableToDefineSubset"}]
Default: null
dataType (String)
data type of pointed column.
It supports all existing datatypes except assignment & pointer
Field value is set automatically during table creation/update
Default: null


weekday

Used for weekdays (i.e. Monday to Friday)

Example JSON

{
  "dataTypeDefinitionId": "weekday",
  "name": "weekday",
  "field": "O5SWK23EMF4Q0000",
  "id": "O5SWK23EMF4Q0000",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings": {}
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnWeekDay/> </source>

Description of settings

This datatype doesn't have settings


email

Used for email addresses

Example JSON

{
  "dataTypeDefinitionId": "email",
  "name": "email",
  "field": "MVWWC2LM",
  "id": "MVWWC2LM",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "maxItems": null,
    "presetEmail": "test@gmail.com" 
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnEmail>

 <maxItems></maxItems>
 <presetEmail>test@gmail.com</presetEmail>

</columnEmail> </source>

Description of settings

maxItems (Integer, optional)
maximum number of items
Default: null
presetEmail (String, optional)
default e-mail address.
Default: null


phoneNumber

Used for Phone Numbers

Example JSON

{
  "dataTypeDefinitionId": "phoneNumbers",
  "name": "phone",
  "field": "OBUG63TF",
  "id": "OBUG63TF",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings": {}
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnPhoneNumber/> </source>

Description of settings

This datatype doesn't have settings


gps

Used for GPS data

Example JSON

{
  "dataTypeDefinitionId": "GPS",
  "name": "GPS",
  "field": "I5IFG000",
  "id": "I5IFG000",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings": {}
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnGps/> </source>

Description of settings

This datatype doesn't have settings


status

Used for status

Example JSON

{
  "dataTypeDefinitionId": "status",
  "name": "status",
  "field": "ON2GC5DVOM000000",
  "id": "ON2GC5DVOM000000",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings": {}
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnStatus/> </source>

Description of settings

This data type doesn't have settings


pictures

Used for image files

Should have at least one file format enabled.

Example JSON

{
  "dataTypeDefinitionId": "pictures",
  "name": "pictures",
  "field": "OBUWG5DVOJSXG000",
  "id": "OBUWG5DVOJSXG000",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "formats":          [
      "image/jpeg",
      "image/png" 
    ],
    "replicate": false
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnPicture>

 <formats>
   <format>image/jpeg</format>
   <format>image/png</format>
 </formats>
 <replicate>true|false</replicate>

</columnPicture> </source>

Description of settings

formats (StringArray, required)
contains array with supported formats.
image/jpeg, image/png are allowed.
Default: null.
In case empty list of formats was specified in configuration.xml, all possible formats are allowed
replicate (Boolean, optional)
if truem replicates images from server to android client.
Default: false

video

Used for video files

Should have at least one file format enabled.

Example JSON

{
  "dataTypeDefinitionId": "video",
  "name": "video",
  "field": "OZUWIZLP",
  "id": "OZUWIZLP",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "formats": ["video/mp4"],
    "replicate": false
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnVideo>

 <formats>
   <format>video/mp4</format>
 </formats>
 <replicate>true|false</replicate>

</columnVideo> </source>

formats (StringArray, required)
contains array with supported formats.
video/mp4 is allowed.
Default: null.
In case empty list of formats was specified in configuration.xml, all possible formats are allowed
replicate (Boolean, optional)
if true, replicates videos from server to android client.
Default: false

audio

Used for audio files

Should have at least one file format enabled.

Example JSON

{
  "dataTypeDefinitionId": "audio",
  "name": "audio",
  "field": "MF2WI2LP",
  "id": "MF2WI2LP",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "formats":          [
      "audio/mp4",
      "video/mp4" 
    ],
    "replicate": false
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnAudio>

 <formats>
   <format>audio/mp4</format>
   <format>video/mp4</format>
 </formats>
 <replicate>true|false</replicate>

</columnAudio> </source>

Description of settings

formats (StringArray, required)
contains array with supported formats.
audio/mp4 and video/mp4 are allowed.
Default: null
In case empty list of formats was specified in configuration.xml, all possible formats are allowed
replicate (Boolean, optional)
if true, replicates audios from server to android client.
Default: false

documents

Used for document files

Should have at least one file format enabled.

Example JSON

{
  "dataTypeDefinitionId": "documents",
  "name": "document",
  "field": "MRXWG5LNMVXHI000",
  "id": "MRXWG5LNMVXHI000",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "formats":          [
      "application/pdf",
      "application/vnd.ms-excel",
      "text/csv",
      "application/msword",
      "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
      "application/vnd.openxmlformats-officedocument.wordprocessingml.document" 
    ],
    "replicate": false
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnDocument>

 <formats>
   <format>application/pdf</format>
   <format>application/vnd.ms-excel</format>
   <format>text/csv</format>
   <format>application/msword</format>
   <format>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</format>
   <format>application/vnd.openxmlformats-officedocument.wordprocessingml.document</format>
 </formats>
 <replicate>true|false</replicate>

</columnDocument> </source>

Description of settings

formats (StringArray, required)
contains array with supported formats.
application/pdf, application/vnd.ms-excel, text/csv, application/msword, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet and application/vnd.openxmlformats-officedocument.wordprocessingml.document are allowed.
Default: null
In case empty list of formats was specified in configuration.xml, all possible formats are allowed
replicate (Boolean, optional)
if true, replicates audios from server to android client.
Default: false

signature

Used for signature files

Example JSON

{
  "dataTypeDefinitionId": "signature",
  "name": "signature",
  "field": "MRXWG5LNMVXHI000",
  "id": "MRXWG5LNMVXHI000",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings":       {
    "replicate": false
  }
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnSignature>

 <replicate>true|false</replicate>

</columnSignature> </source>

Description of settings

replicate (Boolean, optional)
if true, replicates audios from server to android client.
Default: false

iBeacon

Used for Apple iBeacon protocol

Example JSON

{
  "dataTypeDefinitionId": "iBeacon",
  "name": "iBeacon",
  "field": "AUJLYWNVBG",
  "id": "AUJLYWNVBG",
  "unique": false,
  "required": false,
  "hidden": false,
  "settings": {}
}

Example configuration.xml

<source lang="xml" enclose="div"> <columnIBeacon/> </source>

Description of settings

This datatype doesn't have settings

This category currently contains no pages or media.