Adding Topic Properties and Constraints

Top  Previous  Next

Occurrence types and constraints define the properties allowed on instances of a given topic type.

 

To create and edit the occurrence constraints for a given topic type double click the type box on the main canvas. The following dialog will appear.

 

edit_topic_types_namestab

 

 

The click on the Occurrences tab to add a new occurrence constraint.

 

edit_topic_types_occurtab

 

To create a new occurrence type Choose <New...> from the Add Occurrence drop-down list. If you have previously created some other occurrence types, they will be listed in this drop-down, allowing you to add the same occurrence type to several different topic types if you wish.

 

createnewoccurrencetypemenu

 

Select <New...> and then click Add button to bring up the New Occurrence Type dialog.

 

new_occurrence_type_dialog

 

Enter the label and subject identifier properties and select a data type. If you want to add multiple subject identifiers to the occurrence type, click on the ... button to open the Identifiers Editor. When you are happy with the settings click OK. The type and the constraint are now created and listed in the occurrence tab as shown below.

 

createdoccurrenceconstraint

 

By default new properties constraints are added with a minimum cardinality of 0 and a maximum cardinality of * meaning that a topic can have zero or more occurrences of this type. To change these values, click on the appropriate number and type in the new value. The Min cardinality can be any integer value greater than 0. The Max value can be any integer or a * but should be greater than or equal to the Min value.

 

To remove an name or occurrence constraint from a topic type, click on the red x on that row. This removes the constraint that allows this occurrence or name type to appear on the topic type - it does not remove the type itself from the schema. Please refer to Removing Types and Constraints for details on how to remove the type entirely from the schema.

 

The same procedure can be used on the Names tab to add a new Name Type and its constraints.