Ontology Synchronization Counts
The /settingsontologysynchronization Blazor page displays synchronization statistics for each entity element in the selected ontology.
Synchronized Count
The synchronized count includes distinct Entity nodes aggregated by communities defined by the selected Ontology when the entity carries the ontology element label.
Source Count
Source mappings are represented by EntityOntology-[:HAS_SOURCE]->OntologySource. Each mapped OntologySource.name identifies a source node label. The page displays the number of non-Thalabus source nodes carrying each mapped label, while SourceTotal counts distinct source ontologies using the first two dot-separated name parts (for example, all kg.Innovator.* mappings count as one source ontology). Source nodes are counted only when they are in scope of a package or diagram selected through Ontology-[:SYNCHRONIZE_SOURCE]->(Package|Diagram): descendants of a selected package (owner*1..), elements occurring on a selected diagram (diagram_occurrences), or the selected node itself.
The counts are loaded in one batched call through IOntologyService.GetOntologyElementSynchronizationCounts when an ontology is selected.
Innovator Package & Diagram Tree Counts
The source-configuration page (/settingskg/{ontologyId}/sourcesconfiguration) shows a single unified tree — "Packages & Diagrams Selection" — where both structural packages (is_structure = true) and diagrams (is_diagram = true) appear as selectable nodes, distinguished by a folder or diagram icon. Diagram identity is determined solely by the is_diagram boolean property; diagram stereotype labels are not reliable classifiers. Each node displays a count badge using the following format:
NN + MM [+ SS] [+ KK]
NNis the number of non-structure elements directly owned by the node. For a package node this is the count of elements linked viaowner; for a diagram node this is the count of elements linked viadiagram_occurrences. It is shown in boldface when greater than zero.MMis the number of non-structure elements owned by all descendant nodes, including any descendant diagrams. It is the sum of the direct counts of the node's descendants and does not includeNN. Diagram descendants are included in the same rollup as package descendants — no separate exclusion is applied.SS, when shown, is the number of selected elements in the node's complete subtree whose Neo4j labels match anOntologySourcemapping defined for the current ontology. It is the total selected count minusKK, and is omitted when it is zero.KK, when shown, is the number of selected elements whose Neo4j labels match noOntologySourcemapping defined for the current ontology through either anEntityOntologyor aRelationshipOntologydefinition (EntityOntology|RelationshipOntology-[:HAS_SOURCE]->OntologySourcewith akg.<label1>.<label2>name). These elements have no rule that would ever consolidate them into a targetEntity. The value is shown in red and omitted when it is zero.
For example, 3 + 12 + 8 means that the node has 3 direct elements, its descendants have 12 elements in total, and 8 selected elements are mapped. 3 + 12 means the same direct and descendant counts, with no selected mapped elements. 3 + 12 + 8 + 2 means that 8 selected elements are mapped and 2 additional selected elements have no matching source mapping. Those 2 elements will not be synchronized until a mapping is added. Hovering over the badge displays the same definitions in the localized tooltip.
Computing KK
KK is derived the same way as the total selected count, but starting from an "unmapped" element count instead of the total element count:
- For each package node,
IOntologyService.GetInnovatorPackageUnmappedElementCounts(ontologyId, packageNodeIdentifiers)counts the package's direct non-structure elements (viaowner) whose label set does not satisfysourceParts[1] IN labels(element) AND sourceParts[2] IN labels(element)for anykg.-prefixed source name mapped to anEntityOntologyorRelationshipOntologydefinition of the ontology. For each diagram node,IOntologyService.GetInnovatorDiagramUnmappedElementCounts(ontologyId, diagramNodeIdentifiers)computes the analogous count over elements linked viadiagram_occurrences. - The Blazor page aggregates these per-node "unmapped direct" counts up the tree into an "unmapped descendant" count, mirroring how
DirectElementCount/DescendantElementCountproduceNN/MM. KKfor a given node is then computed with the same selection-propagation rule used for the total selected count (GetFullySelectedElementCount): if the node (or an ancestor) is selected for synchronization,KKequals the node's unmapped direct + unmapped descendant counts; otherwise it is the sum ofKKover its children. The displayedSSisGetFullySelectedElementCount - KKand is clamped at zero.