Modeler: 8/CustomAttr

From CaseTalk Wiki
Jump to: navigation, search

Custom Attributes

Adding additional descriptive information to your information model can be enabled through custom attributes. For instance a Fact Type has a name, an alias, comments. But if the model could use source references, the custom attributes can be setup to contain these descriptive values, in addition to the standard information on these Fact Types.

This also applies to other elements in the Fact Oriented Models. And in addition to Custom Attributes, Custom Annotations can be defined.

Annotations

Annotation types can be declared to be activated similar to Categories at certain element types in CaseTalk. This way the user can annotate in addition the already existing Comment fields.

Category

Per category of attributes you should specify for which entities in CaseTalk they apply. For instance Owner related information are enabled for Facts, Objects and Labels.

The category will be added as a tab to the property dialogs for the selected entity.

CustomAttribCategory.png

Attribute

Every category may contain attributes. These attributes are presented in the previously named tabs in the property dialogs.

CustomAttribute.png

Every attribute should have a datatype, and additionally may contain a predefined list, or a default value. And once used, the CaseTalk user may edit these attributes or update them through the specific entity dialogs.

Types

Custom attributes are of a specific type. This limits the input by the user later on. The available types are:

  • text : Any text can be entered.
  • timestamp: A datetime is to be entered, typically used in combination with keyword %NOW%.
  • options: A list can be set from which the user may choose.
  • boolean: Simply a value of True or False can be set.
  • color: A color can be chosen.
  • uri: The text value is treated as an internet link. This may be convenient to dynamically link it to an online glossary. E.g. a default value may be used: "https://www.google.nl/search?q=%ID%". This will use Google Search to find a keyword corresponding to the identifier of the current entity.

Default

The default value which is applied upon creation of the relevant information element in the model. This could contain a keyword, which will het expanded before applied.

Update

The value will be applied whenever an update is applied on the information element. This could contain a keyword, which will het expanded before applied.

User Editable

Checking this box allows users to alter the custom attribute value. For example: To save a timestamp of the moment of creation, the default would be set to the keyword %NOW%, and the user editable state would be turned off.

Mandatory

If an attribute definition is mandatory, the user cannot close the edit dialog of the relevant information element before this value is set. For instance derivable fact types may require an annotation with a derivation rule.

Keywords

Within the Default or Update editbox, you can specify any text value. Also you may use some predefined keywords which will expand into a value upon usage. The possible keywords are:

  • %ID% : Entity name of identifier of the object itself
  • %GUID%: A globally unique identifier, partially based on hardware and time, this always creates a 128 bit unique identifier.
  • %UUID%: Similar to GUID, yet a more readable global unique identifier in the format of: "<username>@<computername>/<timestamp>".
  • %NOW% : Current date and time
  • %COMPUTER% : Current computer name
  • %AUTHOR% : License User Name
  • %COMPANY% : License Company Name
  • %PROJECTNAME% : Current Project Name
  • %IGNAME% : Current IG Name
  • %IGNAMESPACE% : Current IG Namespace identifier
  • %IGVERSION% : Current IG Version number as retrieved from the Manager

User Interface

  • In CaseTalk the custom annotations are rendered as tabs in the comment fields in several property dialogs.
  • The categories show up as tabs at the top of the various property dialogs.
  • The attributes are shown as a grid inside a tab, corresponding to the category, inside the property dialogs of the information elements.

Below are screenprints from a Fact Type property Dialog, extended with Custom Annotation and Attributes for the modelers to document the source attributes belonging to the fact type.

CnExample.png

CaExample.png

Throughout the use of CaseTalk these attributes will show up. Another example is this selected Fact Type in the repository:

FactTypeCA.png