Editing an Individual Property

To edit an individual property such as birthDate, click the Edit row button next to the birthDate row. The Edit row button turns into a red forbidden sign and the Delete button turns into a green check mark, as seen in Fig. 177. The birthDate row in the table now becomes editable. Edited values are saved when the green check mark button is clicked again.

Enabling editing of **Eric**’s **birthDate** in **KB Editor** editing window

Fig. 177 Enabling editing of Eric’s birthDate in KB Editor editing window

When the property being edited has a range restriction, a list of existing individuals of that class in the KB is made available. To access the list, click the down arrow to the right of the property field. For example, after enabling editing of the property spouse for individual Eric, click the down arrow of the field to see a list of individuals available in the KB, as shown in Fig. 178. To change Eric’s spouse, either choose one of the individuals from the list, or use the menu option Create Fresh Individual in Namespace to type in the name of a new individual.

Range restrictions shown for updating property spouse

Fig. 178 Range restrictions shown for updating property spouse

After a property is modified in the editing window and corresponding changes which appear in the ontology file are saved in the Text Editor, queries can be rerun to obtain new results. The example below describes modifying the property birthDate of individual Mark and obtaining different results for query ’Who is how old?’.

First run the query ’Who is how old?’. Click the Queries tab to launch the Queries plugin. Scroll down in the Queries window to find ’Who is how old?’. Click to highlight this query, as shown in Fig. 179 and press Execute.

Who is how old

Fig. 179 Who is how old

When the query execution is done, the Query Results plugin is automatically launched to display the query results. Scroll down the list in the Query Results window to find one particular result: Mark is 10 years old. This result is shown in Fig. 180.

Mark is 10 years old

Fig. 180 Mark is 10 years old

Now change Mark’s birthDate property to conclude a different result. To do this, activate the KB Editor plugin by clicking the KB Editor tab. Expand class Person and subclass Man. Click to highlight individual Mark to display the Individual Properties table in the KB Editor editing window. Click the Edit row button to the left of Mark’s birthDate row to enable editing, as shown in Fig. 181.

Enable editing of **Mark**’s **birthDate** property

Fig. 181 Enable editing of Mark’s birthDate property

Click in the Value field and change Mark’s birthDate to 2004-12-27. Click the green check mark button to save the changes, as seen in Fig. 182.

Change **Mark**’s birthDate from 2006 to 2004

Fig. 182 Change Mark’s birthDate from 2006 to 2004

After the new property value is saved in the KB Editor, the corresponding Mark statement in family.flr should also be updated to have the new birthDate property value, as shown in Fig. 183. Similarly, editing can be done directly to family.flr in the Text Editor. When the file is saved, modifications will be reflected in the taxonomy and editing windows of the KB Editor.

**Mark**’s birthDate is also updated in family.flr

Fig. 183 Mark’s birthDate is also updated in family.flr

Note that changes made in the KB Editor are not visible in other plugins such as the Queries or KB Search until the corresponding .flr file opened in the Text Editor is also saved.

Now save family.flr in the Text Editor. Then click the Queries tab to activate the Queries plugin. Execute query ’Who is how old?’ again. The new query results should now show Mark is 12 years old, as shown in Fig. 184.

Mark is 12 years old with updated **birthDate** property

Fig. 184 Mark is 12 years old with updated birthDate property

Syntax Error Flagging

The KB Editor detects and flags syntax errors while a property is being edited. To see an example of this, we will edit the height property of individual Benjamin. In the KB Editor, click the pencil icon next to Benjamin‘s height property. This enables the height value to be edited, as shown in Fig. 185.

**Benjamin**'s height property in edit mode

Fig. 185 Benjamin‘s height property in edit-mode

Click to place the cursor inside the field. Use the delete key to delete the height value 72. The background color of the field turns red. At the same time, a pop up message reports a syntax error in the field, as seen in Fig. 186. The error is caused by the fact that the quantity predicate requires 2 arguments, a number and a type. The KB Editor detects the missing argument and flags it as a syntax error. The edited value cannot be saved when there is an uncorrected syntax error.

**KB Editor** reports a syntax error when **72** is deleted from the height value

Fig. 186 KB Editor reports a syntax error when 72 is deleted from the height value

To correct the error, type 71 in to replace the previous 72. The background color of the field returns to normal and the pop up error goes away, as shown in Fig. 187. The KB Editor no longer flags any syntax error because both required arguments are there for the height quantity. Now the changed height value can be saved.

Typing in **71** corrects the flagged syntax error

Fig. 187 Typing in 71 corrects the flagged syntax error