Powered by Zoomin Software. For more details please contactZoomin

Semaphore Knowledge Model Management (KMM) How-To Articles

Validate model data using SKOS-XL constraints

  • Last Updated: May 13, 2026
  • 9 minute read
    • Semaphore
    • Documentation

The Knowledge Model Management (KMM) component supports validating models using SKOS-XL constraints. This form of validation provides an out-of-the-box solution to check for invalid and possibly undesirable data in your models. In this topic, we will discuss:

Note that while validating SKOS-XL constraints can detect a number of issues with your data, the guidelines are flexible by design. If your model would benefit from stricter validation, consider validating your data against model-specific constraints. See Validate data using model specific constraints for details.

What are SKOS-XL constraint violations and how does invalid data get into a model

KMM requires specified RDF structures to display and edit a model through its UI. For more information on these requirements, see Overview of Semaphore SKOS-XL Constructs. However, the backend data store of the KMM allows the storage of RDF data outside the range of what is viewable and editable in KMM. This allows interoperability with other RDF applications and systems, but can also hide bad or undesirable data.

Invalid data can be introduced into a model in a number of ways, primarily through:

  • Using SPARQL INSERT and/or DELETE queries that do not follow the Semaphore SKOS-XL modelling guidelines
  • Importing of RDF generated in other systems

Less common ways include:

  • Task conflicts, where the work done in multiple tasks conflict with each other
  • Certain conditions occur when importing data through the KMM CSV/Excel importing process

SKOS-XL validation checks

SKOS validation checks occur at the following events during the modeling process:

Constraint violations report

KMM provides a number of out-of-the-box reports that check for either invalid or possibly undesirable data in the model. Often this invalid data is not visible in the KMM UI, but might interfere with the use of the model. Therefore, it is important to find this data and resolve any potential issues by fixing, deleting, or making a deliberate decision to keep the data.

The “Constraint Violations” report is the most comprehensive of these reports and checks you model against all the constraints described in the SKOS-XL constraints table.

To run the “Constraint Violations” report or other validation reports:

  1. Open your model; then, click Open Master. Note that, in this procedure, we will use the provided "Space Missions" model in the examples.

  2. From the banner menu, select Master > Reporting.

  3. Select the Validation tab.

  4. Configure any report specific options; then, click Run Report.

Editing in the KMM UI

Error constraints are enforced in the KMM UI, and, therefore, cannot be created through the UI. However, some warning-level constraints can be created through the UI. This typically occurs when a warning message is returned, but the user elects to save the data anyway. For example:

Committing Tasks

The SKOS-XL error-level and warning-level constraints are checked when a Task is committed and the Validate before commit checkbox is selected:

If any errors or warnings are returned, the Task cannot be committed. Therefore, you might not want to validate a Task before committing if any of the warning constraints are acceptable in your models. For example, duplicate pref labels is a commonly acceptable condition.

The SPARQL Editor

When using the SPARQL editor, the Run Edit Rules and Check Constraints check boxes are exposed when specifying an INSERT or DELETE query:

If Check Constraints is selected, the SKOS-XL constraints are checked when the query is run. If any constraints are violated, whether Warnings or Errors, an error message is displayed and the query is not be executed.

If Check Constraint is disabled, then invalid data can be inserted or left to persist in the model.

Summary of constraint checks

Generally, the validation checks fall into the following categories:

  • Missing labels on:
    • Concept Schemes
    • Classes
    • Relationship Types
    • Alt Label Types
    • Metadata Property Types
    • Pref Labels on Concepts
  • Label violations:
    • Only one label per language for objects and Pref Labels
    • Concepts that have the same value in the same language in both the “alternative label” and the “preferred label”
    • Whitespace only labels
  • Orphaned concepts: Concepts must have a parent, whether another concept or as the top concept of a concept scheme
  • Domain and range violations:
    • Relationships: For example, if concept A is related to concept B, and one or both do not belong to the proper class(es) defined for that relationship type.
    • Metadata properties: For example, a value with a data type of date is not added to a property with a type of Boolean.
  • Hierarchical cyclic loops
  • Duplicate URIs for different object types
  • Checks for untyped subjects: For example, objects without an rdf:type, such as a concept without a class.

SKOS-XL constraints

The following table lists all the constraints that are checked during validation checks (see SKOS-XL validation checks). Typically, the constraint code is included with the message, but not always. Note that each constraint includes an error level in the definition that determines whether the violation is tolerated. For example, constraints that are defined as Warnings return a warning message when violated, but do not prohibit the action. Conversely, when a constraint defined as an Error is violated, an error message is returned, and the offending action is prohibited.

Constraint ID Error Level Message Description/Example
N001 Error Resource should have at least one label Verifies that concept schemes and structural elements (e.g. Relationship Types, Metadata Property Types, etc.) have at least one label.
N002 Warning There should be at least one Preferred Label for the concept Verifies that concept pref labels must have at least one label.
N005 Error Object can only have one label per language Verifies that concept schemes and structural elements (e.g. Relationship Types, Metadata Property Types, etc.) have only one label per language.
N006 Error Label of object should be globally unique Verifies that labels for concept schemes and structural elements (e.g. Relationship Types, Metadata Property Types, etc.) are globally unique.
N007 Error Concept should be attached to the hierarchy Verifies that concepts have a parent, which can be either a broader concept or the top concept of a concept scheme.
N008 Warning Object uses x range, but requires y range. Verifies that there are no structural elements range violations
N009 Warning Object uses x domain, but requires y domain. Verifies that there are no structural elements domain violations
N010 Warning Whitespace only labels are not allowed Verifies that labels for concept schemes, structural elements, and concept pref labels are not comprised of spaces only.
N013 Error A property can‘t be inverse of itself Verifies that symmetrical relationship types do not have the same URI for both the forward and inverse relationship name.
N017 Error Domain type of property must be subclass of domain type of the parent property type Verifies that sub-properties are in the domain of its parent property. For example, you cannot have a metadata property with domain "Concept" narrower to a metadata property with a domain that is a sub-class of “Concept”.
N021 Error Local name of property must be valid Verifies that a URI is legal, e.g. for a concept.
Note: This check is only made upon the creation of an object either through the UI, a SPARQL insert, or an RDF file import.
N024 Warning Concept should not be related to itself Verifies that concepts do not have an associative relationship to itself.
N025 Warning Concepts should not create loops in the hierarchy Verifies taht a concept’s path to root does not contain itself (i.e. it’s a descendent of itself).
N026 Warning Property value incompatible with datatype for rdfs:range Verifies that metadata property values are of the type specified (e.g. a String value type stored in a Boolean property).
N027 Warning value incompatible with its datatype Verifies that metadata property values are of the type expected (e.g. a string value identified as a Boolean value).
N028 Error Only One TargetSchemeInORT instance When a review is created for KRT, optional concept schemes to separate modifications into “new concepts”, “modified concepts”, and “to do” lists are created. This constraint check verifies that only one of each of these concept schemes exist in the review.
N031 Warning Verify datatype of sem:defaultValue is compatible with property range Verifies that the default value for a data property (e.g. true set for a Boolean property) is of the correct type (e.g. a Boolean vs. a String).
N032 Error Abstract classes should not be instantiated. Checks for the use of an abstract class on a concept.
N033 Error Cannot make class as abstract when it’s already been instantiated Verifies that, when a class is assigned to a concept, the class is not made an abstract class.
N034 Error Cannot add altLabel in different language than the required one If an alt label is set to use a specified language (e.g. language neutral), verifies there are no alt labels of that type in another language.
N037 Error Concept URI is in collision with different resource type URI Verifies that the URI of an object is not already in use by a different object type. For example, a concept cannot have the same URI as an already existing metadata property.
SX13 Warning Concept cannot have the same value in the same language in both the “alternative label” and the “preferred label”. Verifies that pref label value and alt Label value are not the same in the same language.
SX14 Error Only one prefLabel per language Verifies that there is not more than one pref label in the same language for a concept.
S27 Warning A concept can’t have the same value in both a related property and a broader/narrower property. Verifies that concepts do not have an associative relationship to its parent concept.
S36 Error Check Ordered Collection Members When ordered lists of relationships (hierarchical or associative) are used in the model, this constraint verifies there are no errors in the ordered list data.
S46a Error A concept can’t have the same value in both a skos:broaderMatch property and a skos:exactMatch property. The skos:exactMatch and skos:broadMatch properties are not accessible in the KMM UI. However, if those relationships exist in the model (e.g. inserted by SPARQL or imported as RDF), this constraint verifies that an object (e.g. a Concept) with an associative skos:exactMatch to another object does not also have a skos:broadMatch with that object. This has the same intention as S27.
S46b Error A concept can’t have the same value in both a skos:exactMatch property and a skos:relatedMatch property. As in S46a, the skos:exactMatch and skos:relatedMatch properties are not accessible in the KMM UI. However, if they exist in the model, this constraint verifies that two objects (e.g. two Concepts) cannot be related to each other with both skos:exactMatch and skos:relatedMatch properties.
CUST001 Warning Unique concept label per concept class Verifies that concept pref labels are unique within a class. Note that this violation will also cause the CUST002 violation.
CUST002 Warning Unique concept label Verifies that concept pref labels are unique within a model, regardless of class and concept scheme.
E001 Error Concepts (and ConceptSchemes) cannot use untyped objects. Verfies that concepts and concept scheme predicate objects have an rdf:type. For example, if a concept doesn’t have a class (i.e. doesn’t have an rdf:type of skos:Concept or a sub-class of skos:Concept), and is a top concept, then that concept scheme will throw this error.
E002 Error Concepts (and Concept Schemes) cannot use untyped properties. Verifies that concepts and concept schemes do not use properties that don’t have an rdf:type. For example, if a concept has a metadata property, but that property does not have an rdf:type, then this error is thrown.
E003 Error Each class must have at least one superclass Verifies that all classes of the type owl:Class have a sub-class of skos:Concept. If an owl:Class is inserted and is not also a sub-class of skos:Concept, this error is thrown.
E004 Error Ensures the subjects have at least one type. Verifies that any element in the subject position of a triple has an rdf:type associated with it. For example, that a concept has a class. Note that a check is made only when an object is created.
OWL001 Error Min cardinality constraint Verifies that KMM min cardinality conditions are met.
OWL002 Error Max cardinality constraint Verifies that KMM max cardinality conditions are met. For example, there can be no more than one instance of a Boolean property on a concept.
TitleResults for “How to create a CRG?”Also Available inAlert