Editing a Custom 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.

Do not modify auto-generated, layer-managed models. Changes will be overwritten whenever the host graphmart or layer is reloaded or refreshed. For more information, see Managed Model Concepts.

Before editing a 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

  1. In the Anzo application, click Model. Anzo displays the Manage Data Model Working Set screen. For example:

  2. 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:

  3. 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.
    • 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.
    • 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 sections below provides instructions for working with model components. When modifying models, make sure that you click Save periodically to save your changes.

Creating 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.

Creating a New Property

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.

Adding 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:

Editing 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.

Deleting a Property

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 Delete button on the top right of the screen. Then click Delete in the dialog box to confirm that you want to delete the property.

Deleting a Class

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.

Adding 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.

Adding 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 Defining Resource Templates.
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

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.