From b6784f2305a9d63b2c4045b5979d18b05635f161 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2026 15:08:48 +0000 Subject: [PATCH] feat(DocumentQueries): WhereType takes exact, to keep only the elements whose own metaclass is named Co-Authored-By: Nicolas Rouquette --- .meta.json | 4 ++-- libraries/DocumentQueries.sysml | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.meta.json b/.meta.json index 0ca5e58..026058e 100644 --- a/.meta.json +++ b/.meta.json @@ -14,7 +14,7 @@ }, "libraries/DocumentQueries.sysml": { "algorithm": "SHA256", - "value": "370b6f880bb2dc375b534f388e3c802c5820cc45e13977c38b3d36a9d1710233" + "value": "7cad8b83772182db5aa917ed36c19feb2e0796ecd6cfbc3b6b1a4c33729b11a7" }, "libraries/IdentityMetadata.sysml": { "algorithm": "SHA256", @@ -69,7 +69,7 @@ "value": "9e00f049209584092dc8bcb398b736c08e6a39b1db667a8a744de3df72a543bf" } }, - "created": "2026-10-27T13:19:03Z", + "created": "2026-10-29T15:08:48Z", "index": { "AnalysisRecords": "libraries/AnalysisRecords.sysml", "DiagramLayout": "libraries/DiagramLayout.sysml", diff --git a/libraries/DocumentQueries.sysml b/libraries/DocumentQueries.sysml index 6f7022a..bcdd3f3 100644 --- a/libraries/DocumentQueries.sysml +++ b/libraries/DocumentQueries.sysml @@ -144,10 +144,14 @@ library package DocumentQueries { return result : Element[0..*] ordered; } - /* WhereType keeps the elements that are of any of the named types. */ + /* WhereType keeps the elements that are of any of the named types: a metaclass + * (PartUsage) or a definition/usage of the model, subtypes included. */ calc def WhereType { in source : Element[0..*] ordered; in type : String[1..*] ordered; + /* exact = true keeps only the elements whose own metaclass is one of the named + * ones, neither its subclasses nor the model's types: the reflective walk. */ + in exact : Boolean[1] default false; return result : Element[0..*] ordered; }