Modeler: 13/CustomAttr

From CaseTalk Wiki
< Modeler:13
Revision as of 08:08, 6 April 2024 by Marcow (talk | contribs) (1 revision imported: Copied from Modeler:12 pages)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

(Reserved Annotation: Reference Data and Methods)

Tip Create an annotation called "Derivation" and mark it for the Entity "Derived Type" to document derivation rules for Object/Fact Types which are marked as derivable.

DerivedAnnotation.png

It'll show up in Object/Fact Types which are marked derivable:

OtftDerivationRule.png

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. Most entities are regular parts of the information model or project. The exception is Derivable type which is any Object- or Fact Type that is marked with the Derivable flag. This can be helpful to specify derivation rule annotations.

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.

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