Skip to content

Toro Cloud Dev Center


Creating Data models

There are plenty of ways to create Data models. You can always make one from scratch but then, if you already have an existing model, it would be wiser to just generate them from the original source. Fortunately, Gloop is capable of generating Data models provided that the source is:

Procedure

Regardless of your Data model's source the process for creating a model remains the same; that is:

  1. Launch the Data model wizard. To do this, right click on the code folder (or any folder which is a child of it) of the Martini package where you would like the model to reside, then select New > Gloop Model.
  2. Enter a name for the Data model, choose the model's source type, and then click Next.
  3. Provide the source's content if you're not going to create a model from scratch and then click Next. Different source types will have different requirements.
  4. Click Finish.

Launch the wizard using keyboard shortcuts only

You can open the Gloop model wizard using the wizard launcher. To open the wizard launcher, press if you're using Martini Desktop; if Martini Online. Once the wizard appears, select Gloop Model from the list of displayed options.

To make it easier for you to find this entry, enter gm, or Data Model in the filter text box to filter out all other options, leaving only the Data Model option to appear. Once the Data Model option is highlighted, you can press or click on the Finish button. The Data model wizard should then appear.

The generated Data model should now appear in the chosen location under the Navigator view.

From scratch

Creating an empty Data model means it is your responsibility to populate it with properties. You may add a property by right clicking on the created Data model's canvas and then left clicking the type of property you want to add.

Creating a Data model from scratch

Creating a Data model from scratch

From an existing Data model

If your source is an existing Data model, you must specify the model's location by entering its URL in the text box provided or by locating it on your file system.

Creating a Data model from an existing Data Model is essentially the same as duplicating the source model. Aside from using the Data model wizard, you may opt to simply copy and paste models.

Creating Data model from an existing Data model

Creating Data model from an existing Data model

Importing multiple models

You can also import multiple Data model files by simply dropping them on a Martini package's code folder in the Navigator view.

Importing multiple Data models in Martini

Importing multiple Data models in Martini

From a JSON string or file

If your source is a JSON string, simply copy and paste the string in the text area displayed. In Martini Desktop, it's possible to provide the source as a JSON file or a URL that returns JSON data by clicking on the Import button underneath the text area.

Creating Data model from a JSON string

Creating Data model from a JSON string

From a JSON schema

If your source is a JSON schema, you must specify its location by entering its URL or by browsing its location in the file system.

Creating Data model from a JSON schema

Creating Data model from a JSON schema

From an XML string or file

If your source is an XML string, copy and paste the string in the text area displayed. Otherwise, provide the source as an XML file or a URL that returns XML data by clicking on the Import button underneath the text area.

Creating a Data model from an XML

Creating a Data model from an XML

From an XML schema

If your source is an XML schema, you must specify its location by entering its URL or by browsing its location in the file system.

Creating a Data model from an XML schema

Creating a Data model from an XML schema

From a YAML string or file

If your source is a YAML string, copy and paste the string in the text area displayed. Otherwise, provide the source as a YAML file or a URL that returns YAML data by clicking on the Import button underneath the text area.

Creating a Data model from a YAML

Creating a Data model from a YAML