The prefix Statement

The prefix statement allows further nesting of ontology prefixes within the script.

By using either an existing prefix, possibly one defined in an ontology statement, or the full URI of an ontology, a prefix can be defined for use in the script.

prefix("sh" , "http://www.w3.org/ns/shacl#");

OR

prefix("uco-core", "uco:core");

In the second example above, the lanugage will resolve the reference uco:core by tracking the ontology referenced by uco prefix.

The example below demonstrates how the ontology statement and the prefix statement can be used together to reference an ontology, and create prefixes for sub-concepts in the ontology.

ontology("https://ontology.unifiedcyberontology.org", "uco");

prefix("uco-core", "uco:core");
prefix("uco-obs", "uco:observable");

The above examples results in 2 prefixes being made available to the script that resolve as follows:

Prefix Ontology Uri
uco-core https://ontology.unifiedcyberontology.org/core
uco-obs https://ontology.unifiedcyberontology.org/observable