From 283f77886e891001aae2825237117b610169eebd Mon Sep 17 00:00:00 2001 From: Sean Lilley Date: Mon, 2 Dec 2024 13:10:33 -0500 Subject: [PATCH] Add support for parent class --- extensions/2.0/Vendor/EXT_structural_metadata/README.md | 2 ++ .../Vendor/EXT_structural_metadata/schema/class.schema.json | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/extensions/2.0/Vendor/EXT_structural_metadata/README.md b/extensions/2.0/Vendor/EXT_structural_metadata/README.md index 43f4f2a605..848cf37813 100644 --- a/extensions/2.0/Vendor/EXT_structural_metadata/README.md +++ b/extensions/2.0/Vendor/EXT_structural_metadata/README.md @@ -95,6 +95,8 @@ Template for metadata entities. Classes provide a list of property definitions. Classes are defined as entries in the `schema.classes` dictionary, indexed by class ID. Class IDs must be alphanumeric identifiers matching the regular expression `^[a-zA-Z_][a-zA-Z0-9_]*$`. +A class may specify a `parent` class, forming a class hierarchy. A class instance contains property values for its class as well as ancestor classes. Classes in a hierarchy cannot have the same property ID. Cyclical inheritance is disallowed. + > **Example:** A "Tree" class, which might describe a table of tree measurements taken in a park. Property definitions are abbreviated here, and introduced in the next section. > > ```jsonc diff --git a/extensions/2.0/Vendor/EXT_structural_metadata/schema/class.schema.json b/extensions/2.0/Vendor/EXT_structural_metadata/schema/class.schema.json index a7c98cdc08..8db2b5875f 100644 --- a/extensions/2.0/Vendor/EXT_structural_metadata/schema/class.schema.json +++ b/extensions/2.0/Vendor/EXT_structural_metadata/schema/class.schema.json @@ -28,6 +28,11 @@ "$ref": "class.property.schema.json" } }, + "parent": { + "type": "string", + "minLength": 1, + "description": "The parent class ID. The class inherits all properties of its parent class and ancestor classes." + }, "extensions": {}, "extras": {} }