Creating Types

Creating A Type

1

2

Click the button.

If you are on a subsection of the Types page, like Articles, you will see a "+ Create Article" button, instead of Crete Type and you will only be able to create the corresponding Category of Types.

3

Enter the Type Information

Choose the Category

You should build your types in the following order because Evidence & Claims reference Articles.

  1. Articles

  2. Evidence

  3. Claims

Enter the Name

Because names must be URL safe, spaces and most special characters are not allowed, but underscores (_) and dashes (-) are.

Additionally, names are case insensitive, meaning that "TestName" and "testname" are the same name.

Enter the Description

4

Click Create

Categories of Types

  • Article Types - To set up Article Types, you should add all of the properties needed to uniquely define the Article. In many cases, this may just be the unique $Id that every article must have, but you can add any other properties that are needed.

  • Evidence Types - To set up evidence types, you will define:

    • The properties of the Evidence

    • The About, which describes the Article Type the Evidence will be about

  • Claim Types - When setting up Claims, there are two main types

    1. Claims that you will Commit to WarmHub

      • To set up these Claims, you will define:

        • The properties of the Claim

        • The About, which describes the Article Type the Claim will be about

    2. Claims that WarmHub will automatically compute and commit for you.

  • Source Types - To set up Source Types, you should add all of the properties needed to uniquely define the Source.

    • For an observation this may be information about the instrument used in the observation

    • For a citation, this should be all of the information needed for others to locate the source

  • Custom Types - Custom Types can help you define any unique structure or set of properties, so that they can be easily used to define properties of Articles, Evidence, Claims, or Sources.

Properties

The main component that helps define all types are their properties. Each property is a specific element of the data that can or must be present whenever someone commits data of that type.

All types contain the $Id property, which will be the unique Id within your repo of all instances.

Creating a Property

1

When you create a new type, you will land on the page for that type, where you can add properties.

To navigate to this page later, you can click on the name of a type from the grid on the types page. Make sure that they type you want to edit has a key in the Origin column, this indicates that the type was created and can be edited in this repo.

You will not be able to add or edit properties of types that were imported from other Repos. If you see an eye in the Origin column of the types table, it means that you can only view this type.

2

Click the "+ Create Property" button

By selecting the ellipsis in the action column you can edit an existing property, or duplicate a property, so that you can quickly make multiple types with similar elements.

3

Enter the Required Elements of the Property

4

Click the Create button

5

Make sure to save your Type before leaving the page

Next to the "Save Changes" button in the upper right hand corner of the Type page, you will be alerted if there are any changes you need to save before leaving the page.


Elements of Properties

  • Name - This is required and identifies the property

Because names must be URL safe, spaces and most special characters are not allowed, but underscores (_) and dashes (-) are.

Additionally, names are case insensitive, meaning that "TestName" and "testname" are the same name.

  • Type - This is the primitive type or format of data that this property will be. For example: Text, Integer, URL, DateTime, etc.

    • Many of the standard types are available through the automatically imported types from our warmhub/standard repo, but you can add other types that will show up here, by creating Custom Types.

  • Description - This describes the property and helps others understand how it should be used.

  • Required - Check this box, if any commit of this type must contain this property to be valid and accepted into the repo. If the box is unchecked, then commits of that type can be made with or without that property.

  • List - Check this box if you want to allow a list of items like an array, and not just a single data element for this property. If unchecked, only one data element can be present for the property.

Last updated