Editing a Model
This topic provides information about using the Anzo model editor to open a data model and modify it to add, edit, or remove classes, properties, data ranges, and annotations.
When editing a data model, follow the requirements and guidelines defined in Model Requirements and Recommendations.
- Opening Models in the Editor
- Changing Model Components
- Class Editor Reference
- Property Editor Reference
Before editing a data model, you have the option to create a backup of the current version. For more information, see Creating and Restoring Versions of Artifacts.
Opening Models in the Editor
- In the Anzo application, click Model. Anzo displays the Manage Data Model Working Set screen. For example:
- On the Manage Working Set screen, select the checkbox next to the model (or models) that you want to add to the working set and edit. Then click OK. Anzo opens the selected model in the editor. For example:
- You can edit the following model-level settings or view the Changing Model Components section below for information about working with classes, properties, annotations, and data ranges.
- Description: A brief description of the model.
- Serialization Prefix: The prefix to use for this model when Anzo serializes it. For example, the prefix for the Friend of a Friend (FOAF) model is "foaf," and the prefix for Dublin Core is "dc."
The Prefix value is also used to provide hints when typing queries in the Query Builder. When writing a query against a data source that has this model in scope, typing in the PREFIX clause presents this Prefix value as a suggestion.
- Class Prefix: The custom URI template to follow for classes in this model. The value must be a valid URI. When the Class Prefix is set, the URIs for the classes in this model will follow the specified scheme. For example, if Class Prefix is set to http://cambridgesemantics.com/class/ and a class called Employees is created in the model, the URI that is generated for the Employees class will be http://cambridgesemantics.com/class/Employees.
When Class Prefix is not set, Anzo generates the model's class URIs in the following format: http://cambridgesemantics.com/ontologies/<model_label>#<class_label>.
- Property Prefix: The custom URI template to follow for properties in this model. The value must be a valid URI. When the Property Prefix is set, the URIs for the properties in this model will follow the specified scheme. For example, if Property Prefix is set to http://cambridgesemantics.com/property/ and a property called LastName is created in the model, the URI that is generated for the LastName property will be http://cambridgesemantics.com/property/LastName.
When Property Prefix is not set, Anzo generates the model's property URIs in the following format: http://cambridgesemantics.com/ontologies/<model_label>#p_<property_label>.
- Imports: Lists any definitions that you want to import from another model into this model. To select models to import, click in the Imports field and select a model from the drop-down list. Select the field again to select additional models.
- System Model: Indicates that the data model is a system model only and not related to business data.
- Hidden Model: Hides the data model so that it is not associated with business data.
Changing Model Components
The table below provides instructions for working with model components. When modifying models, make sure that you click Save periodically to save your changes.
What do you want to do? | Instructions |
---|---|
Create a new class | Open the model menu by clicking the menu icon () to the right of the model name. Then select Add Class. Anzo opens the class editor so that you can configure the new class. See Class Editor Reference below for information about class settings. |
Create a new property in a class | Open the class menu by clicking the menu icon () to the right of the class name. Then select Add Property. Anzo opens the property editor so you can configure the new property. See Property Editor Reference below for information about property settings. |
Add an existing property to a class | To add an existing property to a class, click the class in the left pane to display the class details in the editor. In the editor, click in the Properties field and select the property that you want to add from the drop-down list. For example: |
Edit a class | To change an existing class, select the class in the left pane. Anzo expands the class to show its properties and displays the details for that class in the editor. You can make changes in the editor. See Class Editor Reference below for information about class settings. |
Delete a property from a class | In the left pane of the working set, select the property that you want to delete. Anzo opens that property in the editor. To remove the property, click the trashcan icon () on the top right of the screen. Then click Delete in the dialog box to confirm that you want to delete the property. |
Delete a class from the model | Click the menu icon () to the right of the class that you want to remove from the model. Click Delete. Anzo displays a dialog box that asks if you want to delete only the class or all of the subclasses and properties in the class. Select the appropriate option and then click Delete to confirm that you want to delete the class. This action cannot be undone. Anzo removes the class and saves the model. |
Add a data range | Click the menu icon () to the right of the model name. Then select Add Data Range. Anzo opens the data range editor so that you can configure the new range. |
Add an annotation | Click the menu icon () to the right of the model name. Then select Add Annotation. Anzo opens the editor so that you can configure the annotation. |
Class Editor Reference
This section describes each of the fields that are available for configuring classes.
Field | Description |
---|---|
Label | The name of the class. |
Description | A brief description of the class. |
Parent Classes | Lists any parent classes under which this class becomes a child or subclass. Click in the field to select parent classes from the drop-down list. Or click the X to the left of a class name to remove that parent class from the list. |
Properties | Lists the properties under this class. Click in the field to a property from the drop-down list. Or click the X to the right of a property name to remove that property from the list. |
Inherited Properties | Properties that the class has inherited from a super class or the model. |
Preview Property | Defines a property from the class to use as the "name" or entity on default displays. For example, if there is a reference to entity X, and entity X has Name, Title, and Label properties, you could specify that you want Title to display by default instead of "X." |
Resource Template | Defines the Uniform Resource Identifier (URI) template to use for instances of the class. You can construct URI templates by typing a value and pressing Enter or by choosing an available property from the drop-down list. For more information, see Setting Class Instance URI Patterns. |
Graph Template | Defines the graph URI template to use for instances of the class. You can construct graph URI templates by typing a value and pressing Enter or by choosing an available property from the drop-down list. You can concatenate the specified graph template value with values of properties in the class. For example, http://cambridgesemantics.com/graph/ and Title |
Category | Indicates whether the class should be listed as one of the categories that can be managed in the Data Sources and Datasets Category tabs and displayed in the list of quick filters that are available when sorting resource lists. For example: For more information about categories, see Configuring Data Source Categories and Configuring Dataset Categories. |
Property Editor Reference
This section describes each of the fields that are available for configuring properties.
Field | Description |
---|---|
Label | The name of the property. |
Description | A brief description of the property. |
Required | Indicates whether a value is required for this property. |
Multi Value | Indicates whether more than one value can exist for this property. Some business intelligence (BI) applications have limitations on the retrieval of multi-value properties. If you use the Anzo Data on Demand service to query data from BI tools, consider whether your application supports multi-value properties before creating them. |
Has Data Range | Indicates whether the property has a single data type or a data range. Selecting this checkbox displays the Data Range field so that you can choose the data range. |
Property Range | The data type for the property. See Property Range Guidelines for recommendations on choosing property ranges. |
Domain | Lists the class or classes that the property belongs to. |
Min Cardinality | The minimum number of distinct values a property can have. When Min Cardinality is blank, the number of values is unrestricted. |
Max Cardinality | The maximum number of distinct values a property can have. When Max Cardinality is blank, the number of values is unrestricted. |
Value Restriction | Indicates whether to restrict the property’s values to certain data types or specific values in a list. |