ID
Every OntoUML element carries an id: a non-empty string that identifies it uniquely within an
ontology. Ids are the backbone of the serialization's structure — they are how elements
reference one another. Wherever an element needs
to point at another (a package's contents, a generalization's general and specific, a view's
isViewOf, and so on), it does not nest that element; it stores the target element's id.
Structure
- JSON type:
string - Constraint: at least one character — the value must not be empty.
"class_person"
There is no required syntax beyond non-emptiness: an id can be a human-readable slug such as
class_person, a UUID, or any other string, as long as it is unique among the elements of the
ontology.
Where it is used
An id appears in two roles:
- Declaration — every element has its own
idfield, established as one of its identity properties. - Reference — properties that link to other elements hold an
id(or a list of ids,id[]) rather than the element itself. Examples include a package'scontents, a class'spropertiesandliterals, a generalization'sgeneralandspecific, and a view'sisViewOf.
Namespaces and global identifiers
When a Project declares a namespace, appending an element's id to
that namespace should yield a globally unique, resolvable URI. This turns each element into a
FAIR Digital Object, addressable on the semantic web while remaining a
short, local identifier inside the model.
id is one of the reusable datatypes; the others are
languageString, resource,
pointInTime, and point.