Metadata file format - AtlasOfLivingAustralia/ecodata-client-plugin GitHub Wiki

The ecodata-client-plugin renders forms based on instructions contained in a JSON file. See examples for some examples.

The forms follow the MVC design patterns where the Model is represented by the dataModel section of the form (see below), the View is handled by the viewModel and the Controller is managed by code in the plugin that sources configuration and plugs the form engine with back end data.

A form can operate in mostly two modes : Edit and Read Only.

In edit mode a form will display input controls for entering data such as text areas or combo boxes. This mode will be used when filling in the data for a new record or editing an existing one.

Read only mode is used to display saved records, data entered in a textbox in edit mode will be displayed as a label (HTML text) or a combo box will be displayed in read only mode.

A slight variation of the read only mode is printmode where the form is rendered in a suitable format for printing.

All models must have the structure as illustrated below:

{
   "modelName":"model name",
   "title":"optional title",
   "record":true, 
   "excludeAbsenceRecord": false,
   "dataModel":[],
   "viewModel":[]
}
  • Record (optional) - Enabling this attribute will generate species records.
  • excludeAbsenceRecord (optional) - Default is set to false, if set to true will exclude record creation for absence record when individualCount = 0 or null
  • The title will be used to render a form title if present.
  • The dataModel element must be an array of Data Type objects, each describing a single data item that will be captured by the form.
  • The viewModel element must be an array of View Type objects, each describing how some data will be presented on the generated form.