Types

Every object in the system has a Type, which specifies which attributes it uses, how it’s displayed, and so on. Types can have sub-types, and sub-types can themselves have sub-types.

Your Name » System management » Types

You can create your own Types and sub-types, or edit the default types. To create a new Type click on New root type at the bottom of the Types list. To create a new sub-type, click on the parent Type and choose New sub-type from the right hand menu.

With a root Type, you can edit the full information. Sub-types are restricted by the choices made in the root type, and can either inherit settings from their parent type or override them.

Main details

  • Name: choose a name for the type
  • Search names: choose a short, lower case, name for use when restricting your search to specific types ie organisation:BBC OR title:Hamlet. To add multiple search names separate them with a comma. Spaces are allowed in these names. Consider including singular and plural versions if you think your users will use them in constraints.
  • Behaviours: tick any that are relevant
    • classification types represent categories of descriptions
    • hierarchical includes the taxonomies and controlled lists
    • “Force explicit choice of section when creating new object” to make sure the user explicitly chooses the section in which a new item will be added. Enable this when it’s important that your users create items in the right section.
    • “Represents a physical item” is used for types which represent physical objects in your business such as equipment
    • “Show hierarchy when displaying a link to this object” displays the hierarchical context when display this item via an Attribute on a linked item.

Attributes (root type)

Tick the Attributes you want listed by default for this type and it’s sub-types. Drag the ticked Attributes into the order you want them displayed in this Type’s object editor.

If you require any Attributes which are not listed, add these via the Attributes editor.

Attributes (sub-type)

Untick any Attributes you don’t want to use for this sub-type.

You cannot add any Attributes which aren’t used by the root-type.

Search and retrieval

  • Relevancy weight: the normal, and default, relevancy weighting in searches is 1. Enter a different number if this type should be ranked higher or lower than average in searches. You can use two decimal places. 0.5 is half as relevant as the normal weighting of 1, so would come lower down the search results, 2.0 is twice as relevant. The relevancy weighting range spans from 0 to infinity (though within Haplo the range used tends to be between 0 and 100.)
  • Term inclusion specification: controls how related objects are included in the search results. See Term inclusion specification below for details.

Display

  • Show linked objects under caption: tick to display at the bottom of this object, all other objects which are linked to this object. Specify the caption underneath which the objects will display.
  • Render type: rendering determines how objects display. Choose a render style for this type. If Haplo does not have a special rendering for the specified type, the default generic type will be used.
  • Render icon: choose an icon to represent this type, used in search results and (usually) at the top of the object page.
  • Category: specify the background colour with which objects of this type will display in search results. The category colours are edited in the appearance menus (found in System Management under Configuration.)

Object creation

  • Show this type in subtypes menu: untick to stop this type from being selectable in the editor. Use this for depreciating types you don’t want people to use any more, or for preventing users from creating objects using the root type.
  • Default section: specifies the default section in which new objects of this type will be created.
  • Allowed sections: (root types only) the sections in which objects of this type may be created.
  • First position to offer creating objects of this type: (root types only) determines where this type is offered on the Add page or whether the user has to click through to a further page. Use “don’t offer it anywhere” to deprecate a root type and all it’s sub-types.
  • Default sub-type: (root types only) specifies which type will be offered by default when creating a new object.

Term inclusion specification

When an object links to another object, the search behaves as if some of the text from the linked object appears in the linking object. So if an object linked to another object with a title ‘Example’, everything will work as if the text ‘Example’ was included in an attribute.

The end result is that the search will work as a user expects. They see ‘Example’ in an attribute of an object, and searching for ‘Example’ will find that object.

A “term inclusion specification” allows you to control exactly what terms (text) is included in the linking object.

Text from the title attribute is always included, and this cannot be overridden since it would yield unexpected results. But you can use the specification to include other fields and change the relative weightings.

Each line of the specification looks like

  weighting attribute-name

Where weighting is a number, and attribute-name is the search name of an attribute.

If an attribute is mentioned, any terms from the text in that attribute is included. For example,

  2.0 title
  0.25 notes

includes text from the title, boosted in relevance, and from the notes, with reduced relevance.

Term inclusion can only include terms from text values. It won’t include anything from, for example, links to other objects.

Use term inclusion with caution, as it may cause your search results to include unexpected items.