Ontologies and ontology modeling are key to EDG since ontologies define schemas for all other types of collections. In EDG, ontologies are defined using SHACL, World Wide Web Consortium’s (W3C) standard for defining graph data models. W3C is the same organization that is responsible for defining standards for XML, HTML, CSS and other web technologies. To learn more about SHACL, see https://www.w3.org/TR/shacl/ and TopQuadrant’s web page about SHACL https://www.topquadrant.com/technology/shacl/.

TopBraid EDG also supports RDFS and OWL which are the earlier generation of modeling languages defined by W3C. You can load into EDG any standard ontology. Using features on the Transform tab for ontologies, you can then auto-generate SHACL model definitions from RDFS/OWL.

Ontologies contain classes (asset types) and associated properties – attributes and relationships. Classes in EDG are also node shapes. Node shapes define schema information for class members – assets of a given type.

It is possible to also have node shapes that are not classes. These shapes define alternative views into an asset. For example, a Business Term class/node shape defines a number of properties for business terms. You may want to have a more abridged view of a Business Term for certain stakeholders. To support this, you can define a node shape that is not a class, associate with it only a subset of properties and target it to members of Business Term class.

In addition to property definitions that specify type of property values, number of values and other constraints, ontologies can also contain inference rules that calculate or derive new facts from existing facts.

Ontologies contain schema and rules. Instance data however, should be created in other collection types such as data graphs, taxonomy or reference data. Ontology Editor offers only limited features for working with instances in the cases of a small amount of enumerated values like days of the week for example.

Majority of TopBraid EDG asset collection are based on pre-specified ontologies. The exception to this rule are reference datasets, data graphs, crosswalks and content tagsets. Taxonomies are based on SKOS or SKOS-XL. All other asset collections (data assets, enterprise assets, lineage models, governance model, etc.) are based on “EDG ontologies”. These ontologies are located in EDG workspace as files. Their names start with “EDG Shapes”, followed by the asset collection type. For example, “EDG Shapes – Data Assets”. The process for customizing these models is described below:

  • Create an ontology in EDG
  • Include in it an EDG Shapes model corresponding to the asset collection type you want to change
  • Make changes to your ontology:
    • You can freely add classes, node shapes, properties and property shapes
    • You should not delete properties or property shapes. In fact, since they are included by reference, you will not be able to do so. Instead, de-activate a shape for a property you need to remove by setting deactivated to true
    • You should not (and will not be able to) remove subclass relationship between pre-built classes. Instead, you can add new sub class relationships in the ontology and then change the Root Class for specific asset collections (using its Manage tab)
  • Include your customized ontology into an asset collection you want to have the modifications. If you changes should apply to all collection of a given type, EDG Administrators can define it as a default include for the type. This option is available under the EDG Configuration Parameters page.

If different groups in your organizations need to have different customizations, each should follow the process outlined above to address their specific customizations needs. EDG Getting Started with Business Glossaries guide provides an example of using this approach to customize a glossary.

If your organization decides that you need to physically remove anything in the pre-built ontologies, such changes can only be made directly to the underlying files. Should you decide to do this, the changes you make will need to be backed up and, possibly, reconciled with changes to the EDG models in the future releases.

Please see the Asset Collection Guide for all the general features of asset collections such as import/export, editing, user permissions, reports and settings. Ontology specific information is included within this page. 

Ontology Overview

 

In the current EDG release, there are two choices for editors. This documentation focuses on the “new editor”. Please see the previous documentation at doc.topquadrant.com for the “old editor”.

EDG collection editors are composed of panels. The example below is the default view for ontologies. Panels here are label 1-5. Just like the other collection editors, the UI for this editor can be customized and arranged and comes with many panels and layouts. For more information on using EDG editors please see Asset Collection Guide – Editor.

Classes vs. Instances

TopBraid EDG implements the recommend practice that instance data should be separated from their class definitions, which are included via one or more ontologies. Ontologies define classes, properties, and shapes (SHACL constraints) and other asset collection types (e.g., taxonomy, etc.) contain only instances.

If any non-ontology collection needs special classes (e.g., subclasses of skos:Concept in a taxonomy), then these should be defined in an ontology that gets included in the collections that need them. Inclusion is done on creation of an asset collection and, subsequently, additional ontologies can be included using Settings>Includes. Internally, inclusions are recorded using owl:imports statements.

Note that along with class-level definitions, the ontology editor still supports instances in a limited manner, which might be needed in certain cases such as small enumerated values.  You will only be able to define label and comment for these instances. Note, you will see a warning when creating a new instance in the Instances Panel of the editor. “Ontologies should only contain shape-related assets but not instances. You may proceed creating small numbers of simple instances, for example to represent enumerated values. However, all fields of those instances except labels and comments will be marked as read-only. You are strongly encouraged to store instance data in non-Ontology asset collections such as Data Graphs.”

Refactoring Ontologies

If you have an ontology that contains both schema and instances or a file that contains both and you want to separate them, the option on the Transform tab>Copy or Move Instances from Other Asset Collection lets you separate instances from schema definitions.

Create an asset collection that should contain the instances if one does not exist already. Navigate to its Transform tab and select Copy or Move Instances from Other Asset Collection. In the displayed dialog, select the ontology that currently contains instances. Then, select classes which instances you want to move.

Example: You may have RDF file that contains classes, properties as well as instances and you want to separate them. Create an ontology in EDG and load RDF file. Create another asset collection such as Taxonomy, Reference Dataset or Data Graph. Base it on your ontology. Use Copy or Move Instances from Other Asset Collection to move instances to it from the ontology.

Converting non-SHACL ontologies

EDG uses SHACL in ontologies to describe characteristics of class instances e.g., what properties they may have and what type of values are expected for the properties.

Non-SHACL ontologies can be converted to SHACL via the ontology utility:  Transform > Convert OWL Axioms to SHACL Constraints. It gives you a choice of keeping OWL statements and adding SHACL or replacing OWL with SHACL. Majority of RDFS/OWL will be converted. However, some of the complex OWL axioms may require further manual translation.

To add SHACL declarations to a class that is not yet defined to be a Node Shape, select it and then use Modify  > Enable SHACL constraints for this class.

Working with Classes

Classes describe characteristics (properties) of class members or instances. For example, a class Person is used to describe what properties a person may have e.g., first name, last name, data of birth, etc. In EDG, classes are typically created in the Classes panel using either Add (create) New icon at the upper left of the panel or Modify > Create subclass menu option. Also see information in Creating New Assets and Classes Panel. 

Classes are organized in hierarchies. Each class will have a parent or superclass. Relationship between a child and a parent class is  rdfs:subclassOf.  These relationships can be modified on the class’s form to change a class’s parent. Select a class in the Classes panel. Once it is displayed on the form, change the “superclass” value by entering a new one. You can also change a class’s parent by dragging it in the hierarchy displayed in Classes panel. A class can have multiple parent classes.

Any property defined for a parent class appears on the form for the child class as “inherited” property.

Creating Abstract Classes

Sometime, you may need to define classes that have no direct instances. Instead, their instances are always members of  subclasses. For example, in EDG ontology for data assets, there is a class Data Asset. It is an abstract class with many subclasses such as Database, Dataset and numerous others. When creating instances, EDG will not let you create an instances of an abstract class and, instead, will make you select one of its subclasses.

To define your class as abstract, set the value of abstract to true.  Internally, this is stored using dash:abstract property.

Creating Node Shapes

Node shapes are used to describe characteristics (properties) of other resources. This sounds similar to classes and, indeed, a class created in EDG will also be a node shape. However, there are also node shapes that are not classes. Unlike classes, these node shapes do not have any members. Such shapes define characteristics of resources that are “targeted” by a shape.  There are various ways to specify shape’s target. Targets of a node shape that is also a class are always members of the class.

To create node shapes that are not classes, use either Add (create) New icon at the upper left of the Node Shapes panel or right click and use Modify > Create subshape menu option.

Also see information in Creating New Assets and Node Shapes Panel.

Creating Properties and Property Groups

Properties are always associated with node shapes. The starting point for creating them is selecting a class/node shape. An association between a class/node-shape and a property is made using sh:path.

Properties can be created using Property Groups panel. See Creating New Assets and Property Groups Panel for more information.

You can also create new properties within the form when it displays a class or a node shape – as described under Form Panel (schema assets).

Both, a new property and a property shape associating it with a class will be created at the same time. Technically, EDG will simply create a property shape with a link to the property. No other statements will be created for the property itself.

Creating Property Shapes for already Existing Properties

There are several options for accomplishing this.

One option is to first, identify a URI of the property you want to create a shape for. It is best to copy it into the copy buffer. Then:

  • Click on Create Attribute or Create Relationship – as appropriate.
  • In the create dialog, check Show Identifiers. In the ID/Path of Property field, copy the URL or a qname of the property. You could also se CTRL-Space to auto-complete existing property identifiers.
  • Enter any display characteristics (name, description, group, order) and constraints.

Another option is to re-use already existing property shape. This can be done by using Add existing property definition … option in the Property Groups panel. This action will associate your selected class/node-shape with an already existing property shape. In other words, the same property shape will be used in two places and any modifications you make to it would be effective in two places.

Yet another option is to copy a property shape and modify the copy.

For example, you could select a property shape, clone it and then associate the clone with a class different from the class associated with the original shape (this will require you updating two classes: the class that original shape was connected to and the class that a clone should be connected to).

Or you could select a class/node-shape and then select Modify>Clone property shapes from …

See Property Groups Panel and Classes Panel for more information.

Creating Inverse Relationships

Relationships are always directional. For example, the “column of” relationship goes from a column to a table that contains a column.  Using it, you can, for example, say that “customer ID” is a column of “Customer Master Table”.

Sometimes, you may want to name (give a label) to a relationship that goes into another, inverse direction. You may want to display on the form showing information about Customer Master Table all its columns. Strictly speaking you do not need to do anything to see this information as you can use the Reference panel to show all incoming links for an asset. Nevertheless, there are situations where you may want this info to be displayed in line with other data.

To give a name to the inverse connection, identify a URI of the underlying relationship. It is best to copy into the copy buffer. Then:

  • Click on Create Relationship.
  • In the create dialog, check Show Identifiers. In the ID/Path of Property field, copy the URL or a qname of the property. You could also use CTRL-Space to auto-complete existing property identifiers. Then put ‘^’ in front of it e.g., ^edg:columnOf.
  • Use the name field to give it a name – such as “columns” and a description to provide a meaningful description.
  • You can place it in the property group of your choice and give it constraints. They should not contradict the constraints of the main relationships.

Now, if you go to, for example, Customer Master Table, you will see “columns: customer ID”.

The data is stored in only one direction but you will be able to see and edit it in both.

This process does not create a new property, it only gives a human readable name to the inverse.

There are cases where you may want to create a true identity, a URI, for the inverse property. In this case:

  • Click on Create Relationship
  • Type the name of the relationship e.g., columns
  • Provide a description, display and constraint information

EDG will create a property shape, but so far, there is no connection between “columns of” and “columns”. To define a connection, create a Property Value Rule that will calculate values for “columns” based on the values for “columns of”. The underlying SHACL expression will look as follows:

 

sh:values [

                        sh:path [

                                    sh:inversePath edg:columnOf ;

                                    ]

                        ]

EDG will not store values of the “columns” property, it will calculate them on demand. You can query them and, if necessary for external systems, you can populate them on export.

Setting a Primary Key for a Class

To use a class as the main entity of any reference dataset, the class must have exactly one property designated with the primary key constraint, which may be specified either on the class itself or on one of its superclasses. The primary key constraint guarantees that each value of the property is unique across all instances of the class.

To set a primary key constraint select the appropriate class in the Class Panel, then select the property in the Property Groups Panel, now the Form Panel should refresh allowing you to edit the details of the property. Find URI start on the form, enter the prefix of the URI pattern that will be used to construct the property values (i.e., the individual URIs, with unique suffixes). Click Save Changes. 

Creating Shapes for Complex Property Paths

Sometimes, you may want to define a connection between an asset and another asset or a literal value using a complex set of connections. For example, a grandparent is a parent of a parent. Country of birth, can be thought of as a relationship that traverses a connection between a person, a city/town they are born in and a country birth city belongs to. Financial applications often ask applicant to provide maiden name of their mother. “Mother’s maiden name” can be reached by first going to person’s mother and then to mother’s maiden name.

To create a property shape for a complex property path:

  • Click on Create Attribute or Create Relationship depending on whether the final value is a literal or another resource
  • In the create dialog, check Show Identifiers. In the ID/Path of Property field, enter a path. You can use URIs or qname and enter property path expressions in SPARQL syntax. For example enter ^skos:broader for an inverse relationship or ex:parent/ex:parent for a path expression to reach the grandparent or ex:parent/ex:maidenName. Use CTRL-Space to auto-complete existing property identifiers.
  • Enter the rest of the information as usual (e.g., name, datatype)

Enabling Reification of Property Values

Sometimes, you may want to capture facts about property values. The modeling pattern that supports doing this is typically called reification. You may have a statement such as Joe’s job title is Software Developer. You want to be able to make other statements about it. In order to do this you need to give an identity to  Joe’s job title is Software Developer statement. This is what reification means. One may say that they want to reify people’s job titles in order to, for example, capture a source of a statement about Joe’s job title or its effectivity date.  To specify this in an ontology:

  • Create a Node Shape e.g., Effectivity Shape
  • Add to the node shape properties to store facts you want to capture e.g effective start and effective end dates
  • Navigate to a class which property values you want to annotate with these facts e.g., class Person
  • Select a property for which values you want to capture the effective start and end e.g., job title property. Edit it to add the node shape (e.g., Effectivity Shape) as a value of its reifiable by property. Internally, this is stored using dash:reifiableBy property

Now, when you use the ontology as the basis of another asset collection (such as a data graph or a taxonomy or a reference dataset), you will be able to add effective dates to statements that store job titles of people. 

Working with Rules

SHACL Triple and SPARQL Rules can be created using the Source Code panel. For more on SHACL Rules, see W3C SHACL Advanced Features Specification https://www.w3.org/TR/shacl-af/.

You will also be able to create a Property Value Rule from a template or by editing the source code and you will be able to set default values for a property.

Property Value rules are used by EDG to dynamically calculate (infer) values for the selected property.

With a property shape selected, click on Modify and pick the option to create property value rule from template:

When you select a template, you will be able to enter additional parameters. For example, if you want to populate a number of related concepts for a selected taxonomy concept:

  • Create a new attribute e.g., “number of related concepts”
  • Select it and using Modify>Create property value rule …
  • Select Count number of properties template
  • Type “related concept” in the template field or pick it from the dropdown
  • Press OK

You will see the following rule in the Inferences section.

The source code will show the following.

You can edit the source code to create more complex rules than those covered by available templates. Power users can also define additional templates to cover your most common rule patterns.

Now, if you navigate to a taxonomy based on this ontology, you will see a number of related concepts – as shown below.

Calculated (inferred) fields are not editable.

You can set a default value using a similar approach. Default value can be a constant or an expression such as ones using for sh:values field. There is no form-based UI for entering default values. Use source code and sh:defaultValue. For more information see https://www.topquadrant.com/graphql/values.html 

Working with Wikidata and other external Knowledge Graphs

For classes and node shapes, you will be able auto-create property shapes using Wikidata resource as an example.

To do this, use an option under Modify menu and provide an ID of a resource from Wikidata. EDG will return its properties for selection. You will be able to select the ones you want to use.

For property shapes, you will be able to create Wikidata link (or a link to another SPARQL endpoint) by selecting an option under Modify menu. The form will not change, but in the source code you will see “dash:detailsEndpoint https://query.wikidata.org/sparql”. You can use Source Code panel to make links to other endpoints.

Whenever a property shape carries a value for dash:detailsEndpoint, TopBraid EDG will understand that the values of the property are URIs and that more statements for these URIs can be queried from the given SPARQL endpoint. If the endpoint happens to be exactly the URL above, then additional features for Wikidata get activated. For more on how to use this feature, see this tutorial https://www.topquadrant.com/technology/shacl/wikidata/.

Deactivating Property Shapes

Click on the property shape you want to deactivate, then click Edit. Select “true” in the deactivated dropdown. Internally, this is stored using sh:deactivated property.

After you do this, you will no longer see this property and its values on the instances forms. If you still want to use the property and only wanted to deactivate some specific constraints, create another property shape using the same property and specify constraints you want to keep.

Deleting Classes and Node Shapes

Deleting a class does not remove its subclasses. If a child does not have any parents it will no longer appear in the Classes panel, but you will be able to find it in the Search panel and/or navigate to it using Navigate to… .

Deleting a class or a node shape does not delete associated property shapes if they are defined as independent resources with their own URIs. It will remove property shapes that are blank nodes.

Deleting Property Groups 

Deleting a property group does not remove any property shapes associated with the group.

Properties that used to be grouped under the deleted group will now appear under “catch all” Other Properties group.

Deleting Property Shapes

A property shape can be deleted using Delete action in the Modify menu.

If multiple property shapes are defined for the same property, deleting one property shape does not impact any other property shapes. Nor does such delete operation remove any data that may be using a property.

Deleting Properties 

Typically, it is sufficient to delete property shapes. If a property has any information associated directly with it (outside of what is in a property shape), it can be deleted by displaying it on a form and then selecting Modify>Delete.

Deleting a property does it remove any data that is using it.

SHACL Enablement

SHACL is a W3C constraint language that is used to define well-formedness conditions on RDF graphs (See also: introduction, tutorials: EDG, TBC).

EDG uses SHACL in ontologies to describe characteristics of class instances e.g, what properties they may have and what type of values are expected for the properties. By default, EDG will assume the use of SHACL in ontologies, but for any particular ontology, its manager can switch this of. See Manage > Prefer SHACL over OWL/RDFS for details.

Converting non-SHACL ontologies

Non-SHACL ontologies can be converted to SHACL via the ontology utility:  Transform > Convert OWL Axioms to SHACL Constraints. It gives you a choice of keeping OWL statements and adding SHACL or replacing OWL with SHACL. Majority of RDFS/OWL will be converted. However, some of the complex OWL axioms may require further manual translation.

To add SHACL declarations to a class that is not yet defined to be a Node Shape, select it and then use the gear menu  > Enable SHACL constraints for this class. 

Note: If your ontology contains instances, you need to generate SHACL shapes to fully use search over instances.  Otherwise, only free text search is available.

SHACL requirements for working with Reference Datasets and Data Graphs

Working with TopBraid EDG asset collections that use ontologies as their data schemas requires that classes that define the resources (assets) of interest are: 

  1. SHACL Node shapes and
  2. Declared to be public (or protected) classes/shapes of an ontology that defines them.

All necessary requirements are already addressed for the majority of collection types e.g., Taxonomies, Data Asset Collections, etc., – in other words, for any collection that is based on a pre-built ontology shipped with EDG.

Since Reference Datasets and Data Graphs are based on your own, custom ontologies, you will need to add the necessary information yourself. A class can be made public by adding it to the GraphQL public classes on the Form Panel for the collection.

 

For additional technical details behind these requirements see this page.

Note: If your property labels contain hyphens ( – ), you should give them a GraphQL field name without a hyphen. To populate GraphQL field name for a property, navigate to a property shape form and enter a value for “GraphQL field name”. GraphQL name is also required if you are defining a shape for rdfs:label. It should be rdfs_labe

Managing Ontologies

 

Custom root-class

By default, the root class of the Class Hierarchy is set to Thing. You can set it to another class via Manage > Root Class of Hierarchy. This might be desired, for example, if your ontology specializes another ontology, and you don’t want to show the ancestor classes of your main custom class. Replace the default class-name “Thing” with the name of the preferred root class. Autocomplete assists in entering the class-name.

 

Import Schema from Spreadsheet

This import is only available for Ontologies. Takes a spreadsheet and tries to extract class and property definitions from its header. Shapes will be created for the schema upon import. 

 

Other Management  Operations

See Asset Collection Management for information on other Manage operations. 

Ontologies Editor

 

For a walkthrough of each panel of the editor, please read the Editor user guide as a prerequisite to this section. Ontology specific details are below.

You can add schema panels to an editor for any asset collection, but you will only be able to perform edit operations in these panels if you are in an ontology.

If you are in an ontology and some of the editing operations are not available to you, check that you have editing permissions. If you do, then a resource you have selected may be defined in an included ontology. In this case, some of editing is not possible i.e., you can add new statements, but you can’t delete statements that are from the included ontology.

Class Hierarchy Panel

This panel displays hierarchy of classes starting with a selected root. Hierarchical relationship between classes is rdfs:subClassOf. You can re-arrange classes in the hierarchy by dragging and dropping.

In EDG, every asset is a member of at least one class. Properties are associated with classes and a default view of the asset is determined by classes it belongs to. Alternative views can be defined by node shapes that are not classes themselves but target members of a class.

By default, the root class in the Classes panel is set to Thing. You can set the root to another class via Manage > Root Class of Hierarchy. This might be desired, for example, if your ontology specializes another ontology, and you don’t want to show the ancestor classes of your main custom class. Replace the default class-name “Thing” with the name of the preferred root class. Autocomplete will assist in entering the class-name.

Classes panel has a quick search field. It lets you look up classes displayed in the tree. The lookup is limited only to classes that are children of the currently selected root.

To create a new class, select the parent class and then click the Create Class…   button. Or, alternatively, right click on the parent and select Create subclass of … :

  • EDG will display a dialog box where you enter the name of your new Class and optionally edit the URI generated by EDG as an internal ID for the class.
  • By default, EDG will automatically generate a URI to uniquely identify the resource by combining the default namespace specified for the ontology on its creation (the default being “http://example.org/ontologies/<asset collection name>#”) with a user-entered label for the resource, with any characters that would cause problems in a URI being converted. For example, the URI generated for a class with the label “Nonprofit Organization” might be “http://example.org/ontologies/my_ontology#NonprofitOrganization”. If the generated URI is non-unique, EDG will give you a message that resource already exists.
  • After you click the OK button, EDG adds the class to the hierarchy.

Note:Every new class will also be typed as a SHACL Node Shape. If you have started by loading into EDG ontologies in RDFS/EDG, use Transform>Convert OWL Axioms to SHACL Constraints to generate SHACL Shapes.

This panel has no menu system in the header, instead actions are driven by right clicking on a class. It also has no settings menu.

Add to Asset List

Adds selected class to a sharable asset list. Asset lists are available in the Asset List Panel and used for bookmarking or bulk actions.

Add to Basket

Basket is similar to Asset List but for all of EDG. It is located in the left navigation menu. Here you create create new versions of collection or bookmark assets or collections. This is per user and not shared. 

Open on new Form

This opens the Form Panel for the selected class.

Start Workflow

Starts a workflow for this selected class in this collection.

Explore Menu

Provides access to the following operations:

  • Find Similar Assets … – will open a search dialog to select similarity criteria
  • Show Affected Workflows … – will check if any active workflows contain any changes to the selected class
  • Show Comments … – will let you view already created comments for the selected class and will let you create new comments
  • Show Tasks … – will let you view already created tasks for the selected class and will let you create new tasks
  • Show NeighborGram – will display NeighborGram panel for selected class
  • Show Relationship Tree – will display Relationship Tree panel for selected class

Modify Menu

 

Provides access to the following operations:

  • Clone … – will clone selected class. All property shapes associated with the selected class will also be associated with the clone. See Cloning and Replacing Assets for more.
  • Merge … – will remove the selected class and copy all its information into another, “merged into” class.
  • Replace … – will replace selected class. See Cloning and Replacing Assets for more.
  • Add Label Property Declaration – will auto-create a property shape for rdfs:label.
  • Clone property shapes from … – will let you select a class or a node shape from which to clone property shapes definitions. You will be able to select the properties to clone. Cloning creates copies of selected property shapes as blank nodes.
  • Add property shapes from Wikidata sample … – will let identify Wikidata resource to use as an indicative example from which to create property definitions. You will be able to select properties you want to use and modify their cardinalities and datatypes. New property shapes will be created as resources using the standard Class-property convention for URI creation.
  • Delete … – after confirmation, will delete the selected class. It will also delete some associated items. Deleting a class will delete all its instances if they are present in the ontology. Any property shapes will be deleted if they are identified using blank nodes. For more information see Deleting Assets.
  • Delete with subclasses … – after confirmation, will delete the selected class and all its subclasses, transitively. 
  • Enable SHACL constraints for this class – only available if selected class is not already a Node Shape, will add a type statement making a class also a node shape

Node Shapes Panel

While EDG will declare all new classes also as Node Shapes, it also supports creation of Node Shapes that are not classes. This may be useful when creating an alternative view of class members or when creating a shape that will be used in other shapes, for example, as part of logical expressions.

Node Shapes panel displays ONLY node shapes that are not classes. It also supports creation of such shapes. This means that in order for these shapes to be used with data, they must be targeted. See W3C SHACL specification to understand targets https://www.w3.org/TR/shacl/#targets.

This panel can display hierarchy of node shapes. Hierarchical relationship between node shapes is sh:node. You can drag and drop node shapes to arrange them hierarchically. Organizing a node shape under a parent means that all constraints defined for the parent apply to the child.

Node Shapes panel has a quick search field. It lets you quickly look up node shapes of interest. Lookup will only search for node shapes presented in this panel i.e., no classes.

Right clicking on a Node Shape, in addition to create action, will give you access to Explore and Modify operations. All operations are described below.

Create subshape of Class shape

Lets you create a subshape of the selected shape. Internally, relationship between a child and parent shape is stored using sh:node.

Add to Asset List

Adds selected class to a sharable asset list. Asset lists are available in the Asset List Panel and used for bookmarking or bulk actions. 

Add to Basket

Basket is similar to Asset List but for all of EDG. It is located in the left navigation menu. Here you create create new versions of collection or bookmark assets or collections. This is per user and not shared. 

Open on new Form

This opens the Form Panel for the selected class.

Start Workflow

Starts a workflow for this selected class in this collection.

Explore Menu

 

 

Provides access to the following operations:

  • Find Similar Assets … – will open a search dialog to select similarity criteria
  • Show Affected Workflows … – will check if any active workflows contain any changes to the selected class
  • Show Comments … – will let you view already created comments for the selected class and will let you create new comments
  • Show Tasks … – will let you view already created tasks for the selected class and will let you create new tasks
  • Show NeighborGram – will display NeighborGram panel for selected class
  • Show Relationship Tree – will display Relationship Tree panel for selected class

Modify Menu

 

Provides access to the following operations:

  • Clone … – will clone selected class. All property shapes associated with the selected class will also be associated with the clone. See Cloning and Replacing Assets for more.
  • Replace … – will replace selected shape. 
  • Clone property shapes from … – will let you select a class or a node shape from which to clone property shapes definitions. You will be able to select the properties to clone. Cloning creates copies of selected property shapes as blank nodes.
  • Add property shapes from Wikidata sample … – will let identify Wikidata resource to use as an indicative example from which to create property definitions. You will be able to select properties you want to use and modify their cardinalities and datatypes. New property shapes will be created as resources using the standard Class-property convention for URI creation.
  • Delete – after confirmation, will delete the selected shape. It will also delete some associated items. Any property shapes will be deleted if they are identified using blank nodes. Deleting a class (asset type) from an ontology will not remove class instances (assets of a given type) that may be stored in another asset collection. It will make them members of undefined class.

Property Groups Panel

This panel will display properties associated with a selected class or a node shape. Properties are displayed organized into groups, reflecting how they would be shown on a form. If a property does not belong to any group, it will be shown under built-in Other Properties group. The panel lets you create new property definitions (for attributes and relationships) and new property groups. Properties are associated with classes (or node shapes) using property shapes which define constraints on the property values. It is possible to refer to the same property in multiple property shapes. Thus, this panel actually displays property shapes – associations between properties and classes/node shapes.

Create New dialogs will create a property shape, associating a property with the class/node-shape and containing value constraints. It will refer to a property that will be used by data, but it will not create any statements about the property other than the reference in the shape.

Alternatively, as described below, an existing property can be used to create a property shape.

The dialogs let you enter a name by which the property will be known in the context of the shape, its textual description and select its cardinality. For attributes, you will also be able to select the datatype (e.g., string, integer). Multiple datatypes can be selected. One common combination is string and langString. This leaves the choice of language tagging a value up to to the user that will enter data.

If you do not select a datatype, EDG will add a node-kind constraint indicating that the value is literal.

If you start the create process by selecting a property group, it will already be pre-selected in the dialog. Otherwise, you can choose one from the drop down or leave the selection empty.

For relationships, you will also be able to select a class values should belong to and/or a node shape they should comply with.

Clicking on the “i” icon in the upper right corner of the dialog will provide a description and instructions for each field in the dialog.

By default, EDG will automatically generate a URI to uniquely identify the resource by combining the default namespace specified for the ontology on its creation (the default being “http://example.org/ontologies/<asset collection name>#”) with a user-entered label for the resource. Any characters that would cause problems in a URI are converted. When creating property shapes, URI of the class and the name specified in the create dialog will be used to create the URI for the property shape

For example, if the property name is “new relationship” and it is created for a class with the URI “http://example.org/ontologies/my_ontology#MyClass”, the property shape will have the generated URI of “http://example.org/ontologies/my_ontology#MyClass-newRelationship”.

To override the system generated URIs, check Show Identifiers checkbox. The dialog will now show two new fields that can be updated:

  • ID/Path of Property
  • ID of Property Shape Definition

You can use these fields to override the generated URIs, to use URI of already existing property and to define properties that represent more complex connections between resources. The latter is done by entering path expressions in the ID/Path of Property field.

The other two options in the Property Groups panel let you add existing property group for use with your properties and add existing property shape to a selected class.

If you right click on a property group displayed in this panel, EDG will display the right click menu with the following options.

Create Attribute

Lets you create a property shape for an attribute, placing it within the selected property group.

Create Relationship

Lets you create a property shape for a relationship, placing it within the selected property group.

Add to Asset List

Adds selected group to a sharable asset list. Asset lists are available in the Asset List panel.

Explore Menu

Provides access to the following operations:

  • Find Similar Assets … – will open a search dialog to select similarity criteria
  • Show Affected Workflows … – will check if any active workflows contain any changes to the selected group
  • Show Comments … – will let you view already created comments for the selected group and will let you create new comments
  • Show Tasks … – will let you view already created tasks for the selected group and will let you create new tasks
  • Show NeighborGram – will display NeighborGram panel for selected group
  • Show Relationship Tree – will display Relationship Tree panel for selected group

Modify Menu

Provides access to the following operations:

  • Clone … – will clone the selected group. All property shapes associated with the selected group will also be associated with the clone.
  • Replace … – will replace selected group.
  • Delete – after confirmation, will delete the selected group. Deleting a group will not impact any properties. They will now be placed under the “catch all” Other Properties group

If you right click on a property displayed in this panel, EDG will display the right click menu with the following options.

Add to Asset List

Adds selected property to a sharable asset list. Asset lists are available in the Asset List panel.

 

Add to Basket

Adds the selected property to the basket for all of EDG located in the left navigation menu.

Explore Menu

Provides access to the following operations:

  • Find Similar Assets … – will open a search dialog to select similarity criteria
  • Show Affected Workflows … – will check if any active workflows contain any changes to the selected property
  • Show Comments … – will let you view already created comments for the selected property and will let you create new comments
  • Show Tasks … – will let you view already created tasks for the selected property and will let you create new tasks
  • Show NeighborGram – will display NeighborGram panel for selected property
  • Show Relationship Tree – will display Relationship Tree panel for selected property

Modify Menu

Provides access to the following operations:

  • Clone … – will clone selected property shape. The label of the clone (preferred label in case of SKOS Concepts) will be set as the label of original asset with “ Copy” post-pended to it.
  • Replace … –Replace, creates a clone of the selected asset using URI that you will provide and then deletes selected asset. One difference with the clone operation above is that the label will be the same as the label of the original asset, “ Copy” will not be post-pended. You can use this operation if you decide that you need to modify URI identity of a resource. EDG will automatically adjust all incoming and outgoing references. However, it will do so only for the currently selected asset collection. Other asset collections will not be updated. If they contain references to the asset you are replacing, you will see broken links. To understand possible impacts of delete operations see Deleting Assets section.
  • Create property value rule from template … – will let you create a calculation (inference) rule for property values.
  • Make Wikidata link – for more information on this option see Working with Wikidata and other external Knowledge Graphs.
  • Delete – after confirmation, will delete the selected shape. Property values are not impacted. Since asset collections in EDG can include each other by reference, some care needs to be taken when deleting assets. Delete operation only deletes references to the deleted asset that exist in your current asset collection.  Deleting a property does not delete property values that are held in another asset collection. 

Settings menu for this panel provides the following options:

  • Leave property groups closed – when checked property groups will be shown collapsed with the ability to expand them one by one
  • Show numeric order values – when checked, numeric order of a property within a group and the order of groups will be shown after the property name in parenthesis
  • Show defining shapes/classes – when checked, shape/class a property is associated with will be shown in parenthesis after its name and order value

Creating Alternative Views 

EDG lets you create different views into assets. To quickly build a new view, clone property shapes from the “base class” selecting only properties you want to appear in each view and make that class be the target class. See Form Panel for more information on using alternative views. 

Form Panel (schema assets)

See information in the Form Panel (any asset) in the Editor documentation since most of the form options described for instances also apply to schema resources.

A few additional options are available when working with schema level resources. For classes you will be able to use Manchester syntax when editing certain properties. Note that in this syntax you need to surround property and class names using the ` character (not the plain ‘ apostrophe). While this feature is available, EDG is optimized for using SHACL and we recommend that the models are defined in SHACL. SHACL shapes are created automatically when you create new properties.

For node shapes, including node shapes that are also classes, you will be able to:

  • See associated properties displayed in a table on the form and add a new property by clicking on the “+’ icon next the “declared properties” field
  • Create associated properties by cloning them from another class or a node shape by selecting an option under the Modify menu.
  • Use sample data from Wikidata to create property shapes.

For property shapes, you will be able to:

  • Deactivate a property shape. Deactivating a shape means that the field will not appear on a form, it will not be available for GraphQL query and no data validation will be performed for its values.
  • Update a property group, a property belongs to and its order within the group.
  • Select View and Edit widgets for property values. Typically, this is not necessary as EDG will auto-select the most appropriate widget.
  • Mark a property as “read only”. In this case, users will not be able to change it in the form. However, if they have access to source code editing, they will still be able to modify it.
  • Modify property value constraints displayed on the form.
  • Create Wikidata link (or a link to another SPARQL endpoint). For more information on this option see Working with Wikidata and other external Knowledge Graphs.
  • Create a property value rule from a template. 

Customizing the forms

To customize the forms of system resources such as rdfs:Class/sh:PropertyShape etc, you have two options:

  • You can define alternative view shapes in the Property Group Panel that have sh:targetClass or dash:applicableToClass rdfs:Class, owl:Class, rdf:Property or sh:PropertyShape and these will then be offered in the usual view shapes drop-down.
  • Extra fields can be injected into the default system forms that are currently living in metash.ttl by uploading a graph with base URI http://datashapes.org/metashx (or /genericx for the generic.ttl replacement). These should owl:import the base file that they extend and then simply add sh:property shapes.

Class Diagram Panel

The class diagram panel shows a visual representation of the class and properties and it’s connections. There are several diagrams to choose from in the panel.

 

 

Instances Panel

This panel is a table showing all instances of a class selected in another panel e.g., Class Hierarchy panel. New button lets you create new instances. While this panel is available in different editors, the main use of it is in the OntologY Editor where Search Results panel with its richer capabilities for working with instances is not available.

Note that while you could create an instance directly in an ontology, ontologies in EDG are not intended for working with instances. When you create an instance directly in an ontology, you will only be able to create and edit its label and comment information.  

RDF/OWL Properties List Panel

This panel is a table showing instance of rdf:Property class and its subclasses. New button lets you create new properties. The main use of the panel is to find properties that do not participate in property shapes. Creating a property in this panel will not create a property shape.