Difference between revisions of "Modeler:Tutorial/Subtype and Generalisation"

From CaseTalk Wiki
Jump to: navigation, search
m
m
Line 1: Line 1:
= Classification and Qualification of subtypes =
= Classification and Qualification of subtypes =


The classification and qualification of subtypes is identical to the classification and qualification of other fact type expressions. The classification and the qualification of the example below automatically generates a subtype structure. ('Employee with Driving Licence' as subtype of 'Employee').
The classification and qualification of subtypes is identical to the classification and qualification of other fact type expressions.  
1. Open the ''File'' menu and select ''New >> Repository''.
 
2. Open the ''File'' menu and select ''New >> Diagram''.
 
3. Select the new repository in the Project Manager on the right.
 
4. Qualify the expression "''There is an employee John Doe.''" like this:
   
   
[[File:Subtype.GIF]]
[[File:Subtype.GIF]]
   
   
CaseTalk marks fact types containing one role played by an nominalized fact type automatically as a subtype.
5. Drag the items from the repository into the diagram:


= Creating subtypes after classification and qualification =
[[File:DragEmployee.png]]
 
Execute the steps below to create a subtype in an existing information grammar:
6. Expand the population of Employee like this:
 
1. Select the supertype in the IG Viewer.
[[File:EmployeePopulation.png]]
 
2. Select New Subtype from it's popup-menu:
7. Click OK.
 
[[File:Insertsubtype.GIF]]
8. Qualify the expression "''John Doe has a driver license''" like this:
 
3. Enter the name of the subtype and select the fact types you like to transfer to the subtype.
[[File:EmployeeWithLicense.png]]
4. Click Ok.


= Classification and qualification of common subtypes =
9. Drag the new items into the diagram:


Execute the steps below to create a common subtype:
[[File:DiagramWithLicense.png]]
1. Enter a fact type expression containing all roles of the common subtype.
(For example: 'The bike NT-15-RT is the motorcycle NT-15-RT' for the common subtype Motorbike).
2. Add population to common subtype using the population editor and the fact type expression from step 1.
3. Add other object or fact type expressions to the common subtype.
Make sure the labels in these expressions have already be added to the common subtype during step 1 or 2.
4. Add the uniqueness constraints after you have added all fact type expressions and population.


= Classification and qualification of generalizations =
A few things happened automatically during Qualification:
a. The fact type ''Employee'' has become an Object Type.
b. The fact type ''Employee with driver license'' is a subtype of ''Employee'', as can be seen by the black arrow.


The classification and qualification of generalizations is identical to the classification and qualification of other fact type expressions. The classification and the qualification of the example below automatically generates a generalized structure:
10. To confirm, rightclick on the fact type ''Employee With Driver License'' and select ''Task >> Edit'':
[[File:Gen1.GIF]]
The casetool tries to match the fact expression below with 'file is Kb'. But this match is not correct. After we have clicked the Try OTL button, the casetool tried to match the fact expression on the OTL level. This match is ok: ' is '. When matching the object expression 'file letter2.txt' we have a similar situation. First you should click Try OTL then you should click No Match:
[[File:Gen2.GIF]]


The diagram (after placing a few UC's) may look like this, the 'OP'-tional role is visible:
[[File:EmployeeSubtype.png]]


[[File:Optional.GIF]]
Note: if a subtype is not automatically created, it’s always possible to create one afterwards by selecting ''Subtype'' as shown above.


The UC arrow is partially dotted because of this optional role.
Note: If the thick arrow is not showing in the diagram, please edit the diagram style to display subtypes with appropriate arrows.


= Classification and qualification of recursive structures =
11. Select Save All from the File menu and save the new ig(d) files as: '''employee'''
The classification and qualification of generalizations is identical to the classification and qualification of other fact type expressions. The classification and the qualification of the example below automatically generates a recursive (and generalized) structure:
[[File:Recursive.GIF]]
The diagram looks like this:
[[File:Recursiveigd.GIF]]


----
----

Revision as of 06:31, 24 March 2021

Classification and Qualification of subtypes

The classification and qualification of subtypes is identical to the classification and qualification of other fact type expressions. 1. Open the File menu and select New >> Repository.

2. Open the File menu and select New >> Diagram.

3. Select the new repository in the Project Manager on the right.

4. Qualify the expression "There is an employee John Doe." like this:

Subtype.GIF

5. Drag the items from the repository into the diagram:

DragEmployee.png

6. Expand the population of Employee like this:

EmployeePopulation.png

7. Click OK.

8. Qualify the expression "John Doe has a driver license" like this:

EmployeeWithLicense.png

9. Drag the new items into the diagram:

DiagramWithLicense.png

A few things happened automatically during Qualification: a. The fact type Employee has become an Object Type. b. The fact type Employee with driver license is a subtype of Employee, as can be seen by the black arrow.

10. To confirm, rightclick on the fact type Employee With Driver License and select Task >> Edit:

EmployeeSubtype.png

Note: if a subtype is not automatically created, it’s always possible to create one afterwards by selecting Subtype as shown above.

Note: If the thick arrow is not showing in the diagram, please edit the diagram style to display subtypes with appropriate arrows.

11. Select Save All from the File menu and save the new ig(d) files as: employee


Back: Using the plugin modules

Next: Integrity Checks