How To...

This section contains some simple "How To" style guides to perform common tasks in the Topic Map Editor.

Procedure 11. Create A New Topic

  1. In the Topic Selector Panel, choose the Create Tab.

  2. Enter a subject identifier URI in the field labelled Subject Identifier.

  3. Enter a name for the topic in the field labelled Topic Name.

  4. Add one or more typing topics to using the topics list control labelled type. You add the topics from the Selected Topics List control.

    Note

    You can switch to the other tabs in the Topic Selector Panel to find the typing topics to be added. The name, subject identifier and type information you have already entered on the Create tab will be preserved.

  5. Check the Edit topic now check box if you wish to immediately add more information to the new topic.

  6. Check the Select Topic checkbox if you wish to add the new topic to the Topic Selector Panel.

  7. Click the Create button to create the new topic.

Procedure 12. Edit An Existing Topic

  1. Locate the topic. If you know the name, SI, occurrence resource or occurrence value of the topic then use the Search Tab, enter part of, or the entire name or PSI of the topic.

  2. Select the relevant value from the drop down box showing a list of searchable topic attributes.

  3. If an exact match is required, ensure that the Exact Match checkbox is selected.

  4. Click the Go button, or press the enter key with the focus in the text box next to the Go button.

  5. A set of topics that matched the search expression. Note that the topics will be shown by their display name, not by the value you searched for.

  6. To edit the topic either double click on the desired topic, or single click the topic to select it and click the Edit Topic button or click the topic name as shown in the Selected Topic control on the topic right of the Topic Map Editor display.

Procedure 13. Edit a topic by ID or link someone to a specific page in TMEditor

Clicking the [Refresh] link button in TMEditor will reload the TMEditor page using URL parameters to define:

  1. The Topic Map being edited, which is the tm parameter.

  2. The Topic ID being edited, which is the the t parameter.

  3. The index of the tab on the edit pane (left), which is the eti parameter.

  4. The indx of the tab on the search pane (right), which is the sti parameter.

Please note that tab index information is not set correctly when using the [Refresh] button in Internet Explorer (all versions), however if you specify tab information in the URL it will be honoured.

It follows that if you know the topic map ID and topic ID that you are trying to edit then you can:

  1. Click [Refresh] to set the URL to the topic map, topic ID and tab information in the address bar of the browser.

  2. Edit the value of the t parameter to pick a specific topic to edit.

  3. If you want to send someone a link to a specific topic editing pane in TMEditor you can send them the full URL.

Procedure 14. Create A Topic Hierarchy

To create a hierarchy in a topic map, you need to first decide on the following:

  • The name of the hierarchy. This is separate from the name of the root topic(s) of the hierarchy. For example the hierarchy "Geographical Regions" might have the root topic "The World".

  • The root topic or root topics of the hierarchy. These are the top-level starting points for building the hierarchy. You may specify multiple root topics for a hierarchy and each one will provide a separate top-level branch of the hierarchy.

  • The association type or types used to construct the hierarchy. These are the association types that are traversed from the root topic(s) of the hierarchy to find the hierarchy members. You must also decide, for each association type which role is played by the "parent" (the superordinate role type) and which is played by the "child" (the subordinate role type). For example the "Geographical Regions" hierarchy might use the association type "Region Contains Region" with the parent role being "Container" and the child role "Contained".

  1. If you haven't already done so, create topics for the association type(s) and superordinate and subordinate role type(s).

  2. Create a topic for each root of the hierarchy.

  3. Create a topic for the hierarchy itself (we shall call this the "hierarchy topic").

  4. With the hierarchy topic still selected for editing, go to the "Hierarchies" tab.

  5. Using the Topic Selector Panel, select the root topic(s) of the hierarchy and add them one at a time to the Root Topics topic list control.

  6. Using the Topic Selector Panel, select the association type(s) for the hierarchy and add them one at a time to the Hierarchy Types topic list control. Then add the "parent" role types to the Superordinate Roles topic list control and the "child" role types to the Subordinate Roles topic list control.

  7. Click the Refresh Hierarchy button to update the tree display of the hierarchy. If your root topic(s) are already associated to some child topics, you should see them appear in the tree display.

Procedure 15. Create A Topic Map Schema

Creating a schema for a topic map is primarily a process of requirements analysis and domain analysis to work out exactly what types are needed to represent the information your applications will work with. This process of analysis is beyond the scope of this document. Instead we will assume that you have already drawn up a list of the topic types, association types and occurrence types you want to have in your schema. For a full overview of the Networked Planet Constraint Language (NPCL), please refer to the Engine API Guide.

  1. Enter the basic type information. For each topic type, association type, role type and occurrence type identified in your schema

    1. Create a topic for the type. You MUST assign this topic at least one subject identifier on the Identifiers tab and you SHOULD also assign the topic at least one base name using the Names tab.

    2. Set the meta-type information. Go to the NPCL tab in the Topic Editor Panel and check all of the boxes that apply to this topic. We strongly recommend that each topic should only ever be used as a single meta-type - i.e. try to avoid creating a single topic which is both a Topic Type and an Occurrence Type or some other combination of meta-types.

    3. For now, don't fill in the detailed information for the meta-type.

  2. In the Topic Selector Panel, switch to the Types tab. This is the best tab for quickly listing all of your types as you can simply select the appropriate meta-type from the drop-down list.

  3. Create Association Role Constraints.

    1. From the drop-down list in the Types tab of the Topic Selector Panel, select "Association Type".

    2. Select the first item in the list and then click on the item in the Selected Topics List control to bring it into the topic editor.

    3. From the drop-down list in the Types tab of the Topic Selector Panel, select "Role Type".

    4. Select one of the role types allowed by this association type and click the >> button to add the type to a new role player constraint.

    5. Enter the minimum and maximum cardinality (the number of times that a role of this type should appear in an association of the constrained type).

    6. Enter the arc label string for the role. This is the default label to use to present the association information when seen from the point of view of the player of this role. For example, if your association type is "Employment" and the role types are "Employee" and "Employer", the arc label for the "Employee" role would be "Works For" and the arc label for the "Employer" role would be "Employs".

    7. Click the "Add" button to add this role player constraint to the association type.

    8. Repeat steps (d) to (g) for each role type allowed by the association type.

    9. Repeat steps (a) to (h) for each association type in your schema.

  4. Create Occurrence Constraints.

    1. From the drop-down list in the Types tab of the Topic Selector Panel, select "Topic Type".

    2. Select the first item in the list and then click on the item in the Selected Topics List control to bring it into the topic editor.

    3. From the drop-down list in the Types tab of the Topic Selector Panel, select "Occurrence Type".

    4. Select one of the occurrence types allowed by this topic type and click the >> button under the New Occurrence Type Constraint section of the NPCL tab.

    5. Enter the minimum and maximum cardinality for this occurrence type (the number of times that an occurrence of this type may appear on a topic of the constrained type).

    6. Click the "Add" button to add this occurrence constraint to the topic type.

    7. Repeat steps (d) to (f) for each occurrence type allowed by the topic type.

    8. Repeat steps (a) to (g) for each topic type in your schema.

  5. Create Role Player Constraints

    1. From the drop-down list in the Types tab of the Topic Selector Panel, select "Topic Type".

    2. Select the first item in the list and then click on the item in the Selected Topics List control to bring it into the topic editor.

    3. From the drop-down list in the Types tab of the Topic Selector Panel, select "Role Type".

    4. Select one of the role types that can be played by this topic type and click the >> button on the "Role" row under the New Role Type Constraint section of the NPCL tab.

    5. From the drop-down list in the Types tab of the Topic Selector Panel, select "Association Type"; select the association type that the topic can play the specified role in; and click the >> button on the "Association" row under the New Role Type Constraint section of the NPCL tab.

    6. Enter the minimum and maximum cardinality for this role player constraint type (the number of times that a topic of the constrained type can play the specified type of role in the specified type of association).

    7. Click the "Add" button to add this role player constraint to the topic type.

    8. Repeat steps (c) to (g) for each type of role that can be played by the topic type.

    9. Repeat steps (a) to (h) for each topic type in your schema.