@itwin/ecschema-metadata 5.12.0-dev.16 → 5.12.0-dev.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/lib/cjs/Localization/SchemaLocalization.d.ts +1 -1
  2. package/lib/cjs/Localization/SchemaLocalization.d.ts.map +1 -1
  3. package/lib/cjs/Localization/SchemaLocalization.js.map +1 -1
  4. package/lib/cjs/SchemaView/SchemaManifest.d.ts +81 -0
  5. package/lib/cjs/SchemaView/SchemaManifest.d.ts.map +1 -0
  6. package/lib/cjs/SchemaView/SchemaManifest.js +131 -0
  7. package/lib/cjs/SchemaView/SchemaManifest.js.map +1 -0
  8. package/lib/cjs/{SchemaView.d.ts → SchemaView/SchemaView.d.ts} +23 -90
  9. package/lib/cjs/SchemaView/SchemaView.d.ts.map +1 -0
  10. package/lib/cjs/{SchemaView.js → SchemaView/SchemaView.js} +32 -198
  11. package/lib/cjs/SchemaView/SchemaView.js.map +1 -0
  12. package/lib/cjs/SchemaView/SchemaViewBinaryReader.d.ts +37 -0
  13. package/lib/cjs/SchemaView/SchemaViewBinaryReader.d.ts.map +1 -0
  14. package/lib/cjs/{SchemaViewBinaryReader.js → SchemaView/SchemaViewBinaryReader.js} +84 -43
  15. package/lib/cjs/SchemaView/SchemaViewBinaryReader.js.map +1 -0
  16. package/lib/cjs/SchemaView/SchemaViewBuilder.d.ts +116 -0
  17. package/lib/cjs/SchemaView/SchemaViewBuilder.d.ts.map +1 -0
  18. package/lib/cjs/SchemaView/SchemaViewBuilder.js +230 -0
  19. package/lib/cjs/SchemaView/SchemaViewBuilder.js.map +1 -0
  20. package/lib/cjs/{SchemaViewInterfaces.d.ts → SchemaView/SchemaViewInterfaces.d.ts} +1 -1
  21. package/lib/cjs/SchemaView/SchemaViewInterfaces.d.ts.map +1 -0
  22. package/lib/cjs/SchemaView/SchemaViewInterfaces.js.map +1 -0
  23. package/lib/cjs/SchemaView/SchemaViewManager.d.ts +114 -0
  24. package/lib/cjs/SchemaView/SchemaViewManager.d.ts.map +1 -0
  25. package/lib/cjs/SchemaView/SchemaViewManager.js +184 -0
  26. package/lib/cjs/SchemaView/SchemaViewManager.js.map +1 -0
  27. package/lib/cjs/ecschema-metadata.d.ts +6 -3
  28. package/lib/cjs/ecschema-metadata.d.ts.map +1 -1
  29. package/lib/cjs/ecschema-metadata.js +6 -3
  30. package/lib/cjs/ecschema-metadata.js.map +1 -1
  31. package/lib/esm/Localization/SchemaLocalization.d.ts +1 -1
  32. package/lib/esm/Localization/SchemaLocalization.d.ts.map +1 -1
  33. package/lib/esm/Localization/SchemaLocalization.js.map +1 -1
  34. package/lib/esm/SchemaView/SchemaManifest.d.ts +81 -0
  35. package/lib/esm/SchemaView/SchemaManifest.d.ts.map +1 -0
  36. package/lib/esm/SchemaView/SchemaManifest.js +127 -0
  37. package/lib/esm/SchemaView/SchemaManifest.js.map +1 -0
  38. package/lib/esm/{SchemaView.d.ts → SchemaView/SchemaView.d.ts} +23 -90
  39. package/lib/esm/SchemaView/SchemaView.d.ts.map +1 -0
  40. package/lib/esm/{SchemaView.js → SchemaView/SchemaView.js} +32 -197
  41. package/lib/esm/SchemaView/SchemaView.js.map +1 -0
  42. package/lib/esm/SchemaView/SchemaViewBinaryReader.d.ts +37 -0
  43. package/lib/esm/SchemaView/SchemaViewBinaryReader.d.ts.map +1 -0
  44. package/lib/esm/{SchemaViewBinaryReader.js → SchemaView/SchemaViewBinaryReader.js} +82 -43
  45. package/lib/esm/SchemaView/SchemaViewBinaryReader.js.map +1 -0
  46. package/lib/esm/SchemaView/SchemaViewBuilder.d.ts +116 -0
  47. package/lib/esm/SchemaView/SchemaViewBuilder.d.ts.map +1 -0
  48. package/lib/esm/SchemaView/SchemaViewBuilder.js +226 -0
  49. package/lib/esm/SchemaView/SchemaViewBuilder.js.map +1 -0
  50. package/lib/esm/{SchemaViewInterfaces.d.ts → SchemaView/SchemaViewInterfaces.d.ts} +1 -1
  51. package/lib/esm/SchemaView/SchemaViewInterfaces.d.ts.map +1 -0
  52. package/lib/esm/SchemaView/SchemaViewInterfaces.js.map +1 -0
  53. package/lib/esm/SchemaView/SchemaViewManager.d.ts +114 -0
  54. package/lib/esm/SchemaView/SchemaViewManager.d.ts.map +1 -0
  55. package/lib/esm/SchemaView/SchemaViewManager.js +180 -0
  56. package/lib/esm/SchemaView/SchemaViewManager.js.map +1 -0
  57. package/lib/esm/ecschema-metadata.d.ts +6 -3
  58. package/lib/esm/ecschema-metadata.d.ts.map +1 -1
  59. package/lib/esm/ecschema-metadata.js +6 -3
  60. package/lib/esm/ecschema-metadata.js.map +1 -1
  61. package/package.json +6 -6
  62. package/lib/cjs/SchemaView.d.ts.map +0 -1
  63. package/lib/cjs/SchemaView.js.map +0 -1
  64. package/lib/cjs/SchemaViewBinaryReader.d.ts +0 -16
  65. package/lib/cjs/SchemaViewBinaryReader.d.ts.map +0 -1
  66. package/lib/cjs/SchemaViewBinaryReader.js.map +0 -1
  67. package/lib/cjs/SchemaViewInterfaces.d.ts.map +0 -1
  68. package/lib/cjs/SchemaViewInterfaces.js.map +0 -1
  69. package/lib/esm/SchemaView.d.ts.map +0 -1
  70. package/lib/esm/SchemaView.js.map +0 -1
  71. package/lib/esm/SchemaViewBinaryReader.d.ts +0 -16
  72. package/lib/esm/SchemaViewBinaryReader.d.ts.map +0 -1
  73. package/lib/esm/SchemaViewBinaryReader.js.map +0 -1
  74. package/lib/esm/SchemaViewInterfaces.d.ts.map +0 -1
  75. package/lib/esm/SchemaViewInterfaces.js.map +0 -1
  76. /package/lib/cjs/{SchemaViewInterfaces.js → SchemaView/SchemaViewInterfaces.js} +0 -0
  77. /package/lib/esm/{SchemaViewInterfaces.js → SchemaView/SchemaViewInterfaces.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { SchemaKey } from "../SchemaKey";
2
- import { SchemaView } from "../SchemaView";
2
+ import { SchemaView } from "../SchemaView/SchemaView";
3
3
  import { Schema } from "../Metadata/Schema";
4
4
  import { ECClass } from "../Metadata/Class";
5
5
  import { Property } from "../Metadata/Property";
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaLocalization.d.ts","sourceRoot":"","sources":["../../../src/Localization/SchemaLocalization.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,aAAa,EAA0B,MAAM,qBAAqB,CAAC;AAI5E,KAAK,cAAc,GAAG,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,WAAW,GAAG,UAAU,CAAC,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;AAE1H;;;GAGG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,SAAS,CAAwB;IACzC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAA8D;IAE5E,OAAO;IAKP,OAAO,KAAK,WAAW,GAEtB;IAED,OAAO,CAAC,QAAQ;IAIhB;;;;;OAKG;WACiB,MAAM,CAAC,QAAQ,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAMzI,IAAW,MAAM,IAAI,MAAM,CAE1B;IAEM,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAKtC;;OAEG;IACH,IAAW,QAAQ,IAA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AQ;YACX,OAAO,YAAY,CAAC,WAAW,CAAC;QAClC,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,CAAC;QAC5C,IAAI,CAAC,UAAU;YACb,OAAO,IAAI,EAAE,WAAW,CAAC;QAC3B,OAAO,IAAI,EAAE,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC;IAClD,CAAC;CACF;AA9MD,gDA8MC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { SchemaKey } from \"../SchemaKey\";\nimport { SchemaView } from \"../SchemaView\";\nimport { Schema } from \"../Metadata/Schema\";\nimport { ECClass } from \"../Metadata/Class\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { Property } from \"../Metadata/Property\";\nimport { SchemaItem } from \"../Metadata/SchemaItem\";\nimport { ILocalizationProvider } from \"./LocalizationProvider\";\nimport { AnyEnumerator, Enumeration } from \"../Metadata/Enumeration\";\nimport { LocalizedText, SchemaLocalizationJson } from \"./LocalizationTypes\";\n\nconst loggerCategory = \"SchemaLocalization\";\n\ntype SchemaViewItem = SchemaView.Class | SchemaView.Enumeration | SchemaView.KindOfQuantity | SchemaView.PropertyCategory;\n\n/**\n * Manages schema localization to provide localized labels and descriptions.\n * @beta\n */\nexport class SchemaLocalization {\n private _provider: ILocalizationProvider;\n private _locale: string;\n private _cache: Map<string, SchemaLocalizationJson | undefined> = new Map();\n\n private constructor(provider: ILocalizationProvider, locale: string) {\n this._provider = provider;\n this._locale = locale;\n }\n\n private get _baseLocale(): string | undefined {\n return this._locale.includes(\"-\") ? this._locale.split(\"-\")[0] : undefined;\n }\n\n private cacheKey(schemaName: string, locale: string): string {\n return `${schemaName}:${locale}`;\n }\n\n /**\n * Create a SchemaLocalization instance and pre-load localization files for the given schemas.\n * @param provider The localization provider to use for loading localization files\n * @param locale The target locale (e.g., \"de\", \"fr\", \"es-CO\")\n * @param schemas The schemas whose localization should be pre-loaded\n */\n public static async create(provider: ILocalizationProvider, locale: string, schemaKeys: Iterable<SchemaKey>): Promise<SchemaLocalization> {\n const localization = new SchemaLocalization(provider, locale);\n await localization.loadLocalizations(schemaKeys);\n return localization;\n }\n\n public get locale(): string {\n return this._locale;\n }\n\n public setLocale(locale: string): void {\n this._locale = locale;\n this._cache.clear();\n }\n\n /**\n * Get localization provider.\n */\n public get provider(): ILocalizationProvider {\n return this._provider;\n }\n\n /**\n * Load localizations for the given schema keys.\n * @param schemaKeys The schema keys to load localization for\n */\n public async loadLocalizations(schemaKeys: Iterable<SchemaKey>): Promise<void> {\n const promises: Promise<void>[] = [];\n for (const key of schemaKeys) {\n promises.push(this.loadLocalizationInfo(key.name, key.readVersion, this._locale));\n if (this._baseLocale !== undefined)\n promises.push(this.loadLocalizationInfo(key.name, key.readVersion, this._baseLocale));\n }\n await Promise.all(promises);\n }\n\n /**\n * Get a localized label for a schema, schema item, or member.\n */\n public getLabel(schemaName: string, itemName?: string, memberName?: string): string | undefined {\n const localization = this.getCachedLocalization(schemaName, this._locale);\n const label = this.resolveLabel(localization, itemName, memberName);\n if (label)\n return label;\n\n if (this._baseLocale) {\n const baseLocalization = this.getCachedLocalization(schemaName, this._baseLocale);\n return this.resolveLabel(baseLocalization, itemName, memberName);\n }\n\n return undefined;\n }\n\n /**\n * Get a localized description for a schema, schema item, or member.\n */\n public getDescription(schemaName: string, itemName?: string, memberName?: string): string | undefined {\n const localization = this.getCachedLocalization(schemaName, this._locale);\n const description = this.resolveDescription(localization, itemName, memberName);\n if (description)\n return description;\n\n if (this._baseLocale) {\n const baseLocalization = this.getCachedLocalization(schemaName, this._baseLocale);\n return this.resolveDescription(baseLocalization, itemName, memberName);\n }\n\n return undefined;\n }\n\n /**\n * Get localized label and description of a schema.\n * Label fallback: localized label → base locale label → original label → schema name\n * Description fallback: localized description → base locale description → original description\n */\n public getLocalizedSchema(schema: Schema | SchemaView.Schema): LocalizedText {\n const label = this.getLabel(schema.name) ?? (schema.label || schema.name);\n const description = this.getDescription(schema.name) ?? schema.description;\n return { label, description };\n }\n\n /**\n * Get localized label and description of a schema item (class, enumeration, unit, etc.).\n * Label fallback: localized label → base locale label → original label → item name\n * Description fallback: localized description → base locale description → original description\n */\n public getLocalizedSchemaItem(item: SchemaItem | SchemaViewItem): LocalizedText {\n const label = this.getLabel(item.schema.name, item.name) ?? (item.label || item.name);\n const description = this.getDescription(item.schema.name, item.name) ?? item.description;\n return { label, description };\n }\n\n /**\n * Get localized label and description of a property.\n * Label fallback: localized label → base locale label → original label → property name\n * Description fallback: localized description → base locale description → original description\n */\n public getLocalizedProperty(ecClass: ECClass | SchemaView.Class, property: Property | SchemaView.Property): LocalizedText {\n const label = this.getLabel(ecClass.schema.name, ecClass.name, property.name) ?? (property.label || property.name);\n const description = this.getDescription(ecClass.schema.name, ecClass.name, property.name) ?? property.description;\n return { label, description };\n }\n\n /**\n * Get localized label and description of an enumerator.\n * Label fallback: localized label → base locale label → original label → enumerator name\n * Description fallback: localized description → base locale description → original description\n */\n public getLocalizedEnumerator(enumeration: Enumeration | SchemaView.Enumeration, enumerator: AnyEnumerator | SchemaView.Enumerator): LocalizedText {\n const label = this.getLabel(enumeration.schema.name, enumeration.name, enumerator.name) ?? (enumerator.label || enumerator.name);\n const description = this.getDescription(enumeration.schema.name, enumeration.name, enumerator.name) ?? enumerator.description;\n return { label, description };\n }\n\n /**\n * Load localization information for a specific schema and locale.\n */\n private async loadLocalizationInfo(schemaName: string, readVersion: number, locale: string): Promise<void> {\n const cacheKey = this.cacheKey(schemaName, locale);\n if (this._cache.has(cacheKey))\n return;\n\n const localization = await this._provider.getLocalization(schemaName, locale);\n if (localization?.version) {\n const localizationMajor = this.getMajorVersion(localization.version);\n if (localizationMajor === undefined || readVersion !== localizationMajor) {\n Logger.logWarning(loggerCategory, `Localization version mismatch for schema \"${schemaName}\". Schema major version is ${readVersion.toString()}, but localization is for major version ${localizationMajor?.toString() ?? \"undefined\"}.`);\n this._cache.set(cacheKey, undefined);\n return;\n }\n }\n\n this._cache.set(cacheKey, localization);\n }\n\n /**\n * Get major version from version string\n */\n private getMajorVersion(version: string): number | undefined {\n const rawVersion = version.split(\".\");\n if (rawVersion.length > 0) {\n const majorVersion = parseInt(rawVersion[0], 10);\n return isNaN(majorVersion) ? undefined : majorVersion;\n }\n return undefined;\n }\n\n /**\n * Retrieve the cached localization for a locale\n */\n private getCachedLocalization(schemaName: string, locale: string): SchemaLocalizationJson | undefined {\n const cacheKey = this.cacheKey(schemaName, locale);\n return this._cache.get(cacheKey);\n }\n\n /**\n * Resolve a label from a localization object by item and optional member path.\n */\n private resolveLabel(localization: SchemaLocalizationJson | undefined, itemName?: string, memberName?: string): string | undefined {\n if (!localization)\n return undefined;\n if (!itemName)\n return localization.label;\n const item = localization.items?.[itemName];\n if (!memberName)\n return item?.label;\n return item?.members?.[memberName]?.label;\n }\n\n /**\n * Resolve a description from a localization object by item and optional member path.\n */\n private resolveDescription(localization: SchemaLocalizationJson | undefined, itemName?: string, memberName?: string): string | undefined {\n if (!localization)\n return undefined;\n if (!itemName)\n return localization.description;\n const item = localization.items?.[itemName];\n if (!memberName)\n return item?.description;\n return item?.members?.[memberName]?.description;\n }\n}\n"]}
1
+ {"version":3,"file":"SchemaLocalization.js","sourceRoot":"","sources":["../../../src/Localization/SchemaLocalization.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAM/F,sDAA6C;AAO7C,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAI5C;;;GAGG;AACH,MAAa,kBAAkB;IACrB,SAAS,CAAwB;IACjC,OAAO,CAAS;IAChB,MAAM,GAAoD,IAAI,GAAG,EAAE,CAAC;IAE5E,YAAoB,QAA+B,EAAE,MAAc;QACjE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,IA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YACf,OAAO,SAAS,CAAC;QACnB,IAAI,CAAC,QAAQ;YACX,OAAO,YAAY,CAAC,WAAW,CAAC;QAClC,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,CAAC;QAC5C,IAAI,CAAC,UAAU;YACb,OAAO,IAAI,EAAE,WAAW,CAAC;QAC3B,OAAO,IAAI,EAAE,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC;IAClD,CAAC;CACF;AA9MD,gDA8MC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { SchemaKey } from \"../SchemaKey\";\nimport { SchemaView } from \"../SchemaView/SchemaView\";\nimport { Schema } from \"../Metadata/Schema\";\nimport { ECClass } from \"../Metadata/Class\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { Property } from \"../Metadata/Property\";\nimport { SchemaItem } from \"../Metadata/SchemaItem\";\nimport { ILocalizationProvider } from \"./LocalizationProvider\";\nimport { AnyEnumerator, Enumeration } from \"../Metadata/Enumeration\";\nimport { LocalizedText, SchemaLocalizationJson } from \"./LocalizationTypes\";\n\nconst loggerCategory = \"SchemaLocalization\";\n\ntype SchemaViewItem = SchemaView.Class | SchemaView.Enumeration | SchemaView.KindOfQuantity | SchemaView.PropertyCategory;\n\n/**\n * Manages schema localization to provide localized labels and descriptions.\n * @beta\n */\nexport class SchemaLocalization {\n private _provider: ILocalizationProvider;\n private _locale: string;\n private _cache: Map<string, SchemaLocalizationJson | undefined> = new Map();\n\n private constructor(provider: ILocalizationProvider, locale: string) {\n this._provider = provider;\n this._locale = locale;\n }\n\n private get _baseLocale(): string | undefined {\n return this._locale.includes(\"-\") ? this._locale.split(\"-\")[0] : undefined;\n }\n\n private cacheKey(schemaName: string, locale: string): string {\n return `${schemaName}:${locale}`;\n }\n\n /**\n * Create a SchemaLocalization instance and pre-load localization files for the given schemas.\n * @param provider The localization provider to use for loading localization files\n * @param locale The target locale (e.g., \"de\", \"fr\", \"es-CO\")\n * @param schemas The schemas whose localization should be pre-loaded\n */\n public static async create(provider: ILocalizationProvider, locale: string, schemaKeys: Iterable<SchemaKey>): Promise<SchemaLocalization> {\n const localization = new SchemaLocalization(provider, locale);\n await localization.loadLocalizations(schemaKeys);\n return localization;\n }\n\n public get locale(): string {\n return this._locale;\n }\n\n public setLocale(locale: string): void {\n this._locale = locale;\n this._cache.clear();\n }\n\n /**\n * Get localization provider.\n */\n public get provider(): ILocalizationProvider {\n return this._provider;\n }\n\n /**\n * Load localizations for the given schema keys.\n * @param schemaKeys The schema keys to load localization for\n */\n public async loadLocalizations(schemaKeys: Iterable<SchemaKey>): Promise<void> {\n const promises: Promise<void>[] = [];\n for (const key of schemaKeys) {\n promises.push(this.loadLocalizationInfo(key.name, key.readVersion, this._locale));\n if (this._baseLocale !== undefined)\n promises.push(this.loadLocalizationInfo(key.name, key.readVersion, this._baseLocale));\n }\n await Promise.all(promises);\n }\n\n /**\n * Get a localized label for a schema, schema item, or member.\n */\n public getLabel(schemaName: string, itemName?: string, memberName?: string): string | undefined {\n const localization = this.getCachedLocalization(schemaName, this._locale);\n const label = this.resolveLabel(localization, itemName, memberName);\n if (label)\n return label;\n\n if (this._baseLocale) {\n const baseLocalization = this.getCachedLocalization(schemaName, this._baseLocale);\n return this.resolveLabel(baseLocalization, itemName, memberName);\n }\n\n return undefined;\n }\n\n /**\n * Get a localized description for a schema, schema item, or member.\n */\n public getDescription(schemaName: string, itemName?: string, memberName?: string): string | undefined {\n const localization = this.getCachedLocalization(schemaName, this._locale);\n const description = this.resolveDescription(localization, itemName, memberName);\n if (description)\n return description;\n\n if (this._baseLocale) {\n const baseLocalization = this.getCachedLocalization(schemaName, this._baseLocale);\n return this.resolveDescription(baseLocalization, itemName, memberName);\n }\n\n return undefined;\n }\n\n /**\n * Get localized label and description of a schema.\n * Label fallback: localized label → base locale label → original label → schema name\n * Description fallback: localized description → base locale description → original description\n */\n public getLocalizedSchema(schema: Schema | SchemaView.Schema): LocalizedText {\n const label = this.getLabel(schema.name) ?? (schema.label || schema.name);\n const description = this.getDescription(schema.name) ?? schema.description;\n return { label, description };\n }\n\n /**\n * Get localized label and description of a schema item (class, enumeration, unit, etc.).\n * Label fallback: localized label → base locale label → original label → item name\n * Description fallback: localized description → base locale description → original description\n */\n public getLocalizedSchemaItem(item: SchemaItem | SchemaViewItem): LocalizedText {\n const label = this.getLabel(item.schema.name, item.name) ?? (item.label || item.name);\n const description = this.getDescription(item.schema.name, item.name) ?? item.description;\n return { label, description };\n }\n\n /**\n * Get localized label and description of a property.\n * Label fallback: localized label → base locale label → original label → property name\n * Description fallback: localized description → base locale description → original description\n */\n public getLocalizedProperty(ecClass: ECClass | SchemaView.Class, property: Property | SchemaView.Property): LocalizedText {\n const label = this.getLabel(ecClass.schema.name, ecClass.name, property.name) ?? (property.label || property.name);\n const description = this.getDescription(ecClass.schema.name, ecClass.name, property.name) ?? property.description;\n return { label, description };\n }\n\n /**\n * Get localized label and description of an enumerator.\n * Label fallback: localized label → base locale label → original label → enumerator name\n * Description fallback: localized description → base locale description → original description\n */\n public getLocalizedEnumerator(enumeration: Enumeration | SchemaView.Enumeration, enumerator: AnyEnumerator | SchemaView.Enumerator): LocalizedText {\n const label = this.getLabel(enumeration.schema.name, enumeration.name, enumerator.name) ?? (enumerator.label || enumerator.name);\n const description = this.getDescription(enumeration.schema.name, enumeration.name, enumerator.name) ?? enumerator.description;\n return { label, description };\n }\n\n /**\n * Load localization information for a specific schema and locale.\n */\n private async loadLocalizationInfo(schemaName: string, readVersion: number, locale: string): Promise<void> {\n const cacheKey = this.cacheKey(schemaName, locale);\n if (this._cache.has(cacheKey))\n return;\n\n const localization = await this._provider.getLocalization(schemaName, locale);\n if (localization?.version) {\n const localizationMajor = this.getMajorVersion(localization.version);\n if (localizationMajor === undefined || readVersion !== localizationMajor) {\n Logger.logWarning(loggerCategory, `Localization version mismatch for schema \"${schemaName}\". Schema major version is ${readVersion.toString()}, but localization is for major version ${localizationMajor?.toString() ?? \"undefined\"}.`);\n this._cache.set(cacheKey, undefined);\n return;\n }\n }\n\n this._cache.set(cacheKey, localization);\n }\n\n /**\n * Get major version from version string\n */\n private getMajorVersion(version: string): number | undefined {\n const rawVersion = version.split(\".\");\n if (rawVersion.length > 0) {\n const majorVersion = parseInt(rawVersion[0], 10);\n return isNaN(majorVersion) ? undefined : majorVersion;\n }\n return undefined;\n }\n\n /**\n * Retrieve the cached localization for a locale\n */\n private getCachedLocalization(schemaName: string, locale: string): SchemaLocalizationJson | undefined {\n const cacheKey = this.cacheKey(schemaName, locale);\n return this._cache.get(cacheKey);\n }\n\n /**\n * Resolve a label from a localization object by item and optional member path.\n */\n private resolveLabel(localization: SchemaLocalizationJson | undefined, itemName?: string, memberName?: string): string | undefined {\n if (!localization)\n return undefined;\n if (!itemName)\n return localization.label;\n const item = localization.items?.[itemName];\n if (!memberName)\n return item?.label;\n return item?.members?.[memberName]?.label;\n }\n\n /**\n * Resolve a description from a localization object by item and optional member path.\n */\n private resolveDescription(localization: SchemaLocalizationJson | undefined, itemName?: string, memberName?: string): string | undefined {\n if (!localization)\n return undefined;\n if (!itemName)\n return localization.description;\n const item = localization.items?.[itemName];\n if (!memberName)\n return item?.description;\n return item?.members?.[memberName]?.description;\n }\n}\n"]}
@@ -0,0 +1,81 @@
1
+ /** @packageDocumentation
2
+ * @module Schema
3
+ */
4
+ /** One schema in a {@link SchemaManifest}: its name, version, and the entries it directly references.
5
+ * @internal
6
+ */
7
+ export interface SchemaManifestEntry {
8
+ readonly name: string;
9
+ readonly readVersion: number;
10
+ readonly writeVersion: number;
11
+ readonly minorVersion: number;
12
+ /** The schemas this schema directly references. */
13
+ readonly references: readonly SchemaManifestEntry[];
14
+ }
15
+ /** One row of `SELECT ECInstanceId, Name, VersionMajor, VersionWrite, VersionMinor FROM
16
+ * meta.ECSchemaDef`, as passed to {@link SchemaManifest.fromRows}.
17
+ * @note `ecInstanceId` is a plain number, matching SchemaView's convention for schema-related rows:
18
+ * `ec_` metadata rowids carry no briefcase prefix, so they are exactly representable. It is used
19
+ * only to wire reference edges and is not retained in the manifest.
20
+ * @internal
21
+ */
22
+ export interface SchemaManifestSchemaRow {
23
+ readonly ecInstanceId: number;
24
+ readonly name: string;
25
+ readonly versionMajor: number;
26
+ readonly versionWrite: number;
27
+ readonly versionMinor: number;
28
+ }
29
+ /** One row of `SELECT SourceECInstanceId, TargetECInstanceId FROM meta.SchemaHasSchemaReferences`,
30
+ * as passed to {@link SchemaManifest.fromRows}.
31
+ * @internal
32
+ */
33
+ export interface SchemaManifestReferenceRow {
34
+ readonly sourceECInstanceId: number;
35
+ readonly targetECInstanceId: number;
36
+ }
37
+ /** The reference graph of every schema in one iModel - names, versions and reference edges, without
38
+ * any schema data. A {@link (SchemaView:class)} husk loads it up front to answer which schemas exist
39
+ * and which dependency-ordered set it must load to satisfy a request.
40
+ *
41
+ * A `SchemaViewDataProvider` builds the manifest from ECDbMeta rows via {@link SchemaManifest.fromRows}.
42
+ * The entries are a flat array with no iModel or platform dependency; even the largest iModels hold
43
+ * on the order of a hundred schemas, so the closure and topological walks are plain recursion.
44
+ * @note The manifest does not track which schemas are already loaded. `SchemaViewManager` does that
45
+ * and filters the result of {@link SchemaManifest.getSchemaClosure} itself.
46
+ * @internal
47
+ */
48
+ export declare class SchemaManifest {
49
+ private readonly _entries;
50
+ private readonly _byLowerName;
51
+ /** Wraps a set of entries whose references are already wired to one another. */
52
+ constructor(entries: readonly SchemaManifestEntry[]);
53
+ /** Build a manifest from raw ECDbMeta query rows, so a `SchemaViewDataProvider` only has to run
54
+ * the two queries and hand the rows over. Reference rows whose endpoints are unknown or
55
+ * self-referential are skipped; that cannot happen for a well-formed iModel.
56
+ * @internal
57
+ */
58
+ static fromRows(schemaRows: readonly SchemaManifestSchemaRow[], referenceRows: readonly SchemaManifestReferenceRow[]): SchemaManifest;
59
+ /** The number of schemas in the iModel. */
60
+ get schemaCount(): number;
61
+ /** The names of every schema in the iModel, in manifest order. */
62
+ getAvailableSchemaNames(): string[];
63
+ get entries(): readonly SchemaManifestEntry[];
64
+ /** The entry for a schema by name (case-insensitive), or `undefined` if the iModel has no such schema. */
65
+ findByName(name: string): SchemaManifestEntry | undefined;
66
+ /** The transitive reference closure of the requested schemas, as a flat, duplicate-free list of
67
+ * names: the full set that must be present to use them. The order is unspecified - run
68
+ * {@link SchemaManifest.sortInDependencyOrder} on the result when a load order is needed.
69
+ * @note Requested names the iModel does not contain are ignored; check
70
+ * {@link SchemaManifest.findByName} first to detect them.
71
+ */
72
+ getSchemaClosure(requestedNames: Iterable<string>): string[];
73
+ /** Orders the given schema names so each appears after every schema it references, directly or
74
+ * transitively. References through schemas not in `schemaNames` are still honored, so the order is
75
+ * correct even when an intermediate schema is left out. Names the iModel does not contain are
76
+ * ignored, and reference cycles - which EC forbids - are broken arbitrarily rather than looping.
77
+ * @internal
78
+ */
79
+ sortInDependencyOrder(schemaNames: Iterable<string>): string[];
80
+ }
81
+ //# sourceMappingURL=SchemaManifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaManifest.d.ts","sourceRoot":"","sources":["../../../src/SchemaView/SchemaManifest.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,mDAAmD;IACnD,QAAQ,CAAC,UAAU,EAAE,SAAS,mBAAmB,EAAE,CAAC;CACrD;AAED;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AAED;;;;;;;;;;GAUG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiC;IAC1D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA2C;IAExE,gFAAgF;gBAC7D,OAAO,EAAE,SAAS,mBAAmB,EAAE;IAQ1D;;;;OAIG;WACW,QAAQ,CAAC,UAAU,EAAE,SAAS,uBAAuB,EAAE,EAAE,aAAa,EAAE,SAAS,0BAA0B,EAAE,GAAG,cAAc;IA6B5I,2CAA2C;IAC3C,IAAW,WAAW,IAAI,MAAM,CAAiC;IAEjE,kEAAkE;IAC3D,uBAAuB,IAAI,MAAM,EAAE;IAI1C,IAAW,OAAO,IAAI,SAAS,mBAAmB,EAAE,CAEnD;IAED,0GAA0G;IACnG,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAIhE;;;;;OAKG;IACI,gBAAgB,CAAC,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE;IAqBnE;;;;;OAKG;IACI,qBAAqB,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE;CA4BtE"}
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Schema
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.SchemaManifest = void 0;
11
+ /** The reference graph of every schema in one iModel - names, versions and reference edges, without
12
+ * any schema data. A {@link (SchemaView:class)} husk loads it up front to answer which schemas exist
13
+ * and which dependency-ordered set it must load to satisfy a request.
14
+ *
15
+ * A `SchemaViewDataProvider` builds the manifest from ECDbMeta rows via {@link SchemaManifest.fromRows}.
16
+ * The entries are a flat array with no iModel or platform dependency; even the largest iModels hold
17
+ * on the order of a hundred schemas, so the closure and topological walks are plain recursion.
18
+ * @note The manifest does not track which schemas are already loaded. `SchemaViewManager` does that
19
+ * and filters the result of {@link SchemaManifest.getSchemaClosure} itself.
20
+ * @internal
21
+ */
22
+ class SchemaManifest {
23
+ _entries;
24
+ _byLowerName;
25
+ /** Wraps a set of entries whose references are already wired to one another. */
26
+ constructor(entries) {
27
+ this._entries = entries;
28
+ const byLowerName = new Map();
29
+ for (const entry of entries)
30
+ byLowerName.set(entry.name.toLowerCase(), entry);
31
+ this._byLowerName = byLowerName;
32
+ }
33
+ /** Build a manifest from raw ECDbMeta query rows, so a `SchemaViewDataProvider` only has to run
34
+ * the two queries and hand the rows over. Reference rows whose endpoints are unknown or
35
+ * self-referential are skipped; that cannot happen for a well-formed iModel.
36
+ * @internal
37
+ */
38
+ static fromRows(schemaRows, referenceRows) {
39
+ const entries = [];
40
+ const entryByECInstanceId = new Map();
41
+ for (const row of schemaRows) {
42
+ const entry = {
43
+ name: row.name,
44
+ readVersion: row.versionMajor,
45
+ writeVersion: row.versionWrite,
46
+ minorVersion: row.versionMinor,
47
+ references: [],
48
+ };
49
+ entries.push(entry);
50
+ entryByECInstanceId.set(row.ecInstanceId, entry);
51
+ }
52
+ for (const row of referenceRows) {
53
+ const source = entryByECInstanceId.get(row.sourceECInstanceId);
54
+ const target = entryByECInstanceId.get(row.targetECInstanceId);
55
+ if (source === undefined || target === undefined || source === target || source.references.includes(target))
56
+ continue;
57
+ source.references.push(target);
58
+ }
59
+ return new SchemaManifest(entries);
60
+ }
61
+ /** The number of schemas in the iModel. */
62
+ get schemaCount() { return this._entries.length; }
63
+ /** The names of every schema in the iModel, in manifest order. */
64
+ getAvailableSchemaNames() {
65
+ return this._entries.map((entry) => entry.name);
66
+ }
67
+ get entries() {
68
+ return this._entries;
69
+ }
70
+ /** The entry for a schema by name (case-insensitive), or `undefined` if the iModel has no such schema. */
71
+ findByName(name) {
72
+ return this._byLowerName.get(name.toLowerCase());
73
+ }
74
+ /** The transitive reference closure of the requested schemas, as a flat, duplicate-free list of
75
+ * names: the full set that must be present to use them. The order is unspecified - run
76
+ * {@link SchemaManifest.sortInDependencyOrder} on the result when a load order is needed.
77
+ * @note Requested names the iModel does not contain are ignored; check
78
+ * {@link SchemaManifest.findByName} first to detect them.
79
+ */
80
+ getSchemaClosure(requestedNames) {
81
+ const result = [];
82
+ const visited = new Set();
83
+ const visit = (entry) => {
84
+ if (visited.has(entry))
85
+ return;
86
+ visited.add(entry);
87
+ result.push(entry.name);
88
+ for (const reference of entry.references)
89
+ visit(reference);
90
+ };
91
+ for (const name of requestedNames) {
92
+ const entry = this._byLowerName.get(name.toLowerCase());
93
+ if (entry !== undefined)
94
+ visit(entry);
95
+ }
96
+ return result;
97
+ }
98
+ /** Orders the given schema names so each appears after every schema it references, directly or
99
+ * transitively. References through schemas not in `schemaNames` are still honored, so the order is
100
+ * correct even when an intermediate schema is left out. Names the iModel does not contain are
101
+ * ignored, and reference cycles - which EC forbids - are broken arbitrarily rather than looping.
102
+ * @internal
103
+ */
104
+ sortInDependencyOrder(schemaNames) {
105
+ const requested = new Set();
106
+ for (const name of schemaNames) {
107
+ const entry = this._byLowerName.get(name.toLowerCase());
108
+ if (entry !== undefined)
109
+ requested.add(entry);
110
+ }
111
+ const result = [];
112
+ const visited = new Set();
113
+ const visiting = new Set();
114
+ const visit = (entry) => {
115
+ if (visited.has(entry) || visiting.has(entry))
116
+ return;
117
+ visiting.add(entry);
118
+ for (const reference of entry.references)
119
+ visit(reference);
120
+ visiting.delete(entry);
121
+ visited.add(entry);
122
+ if (requested.has(entry))
123
+ result.push(entry.name);
124
+ };
125
+ for (const entry of requested)
126
+ visit(entry);
127
+ return result;
128
+ }
129
+ }
130
+ exports.SchemaManifest = SchemaManifest;
131
+ //# sourceMappingURL=SchemaManifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaManifest.js","sourceRoot":"","sources":["../../../src/SchemaView/SchemaManifest.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAsCH;;;;;;;;;;GAUG;AACH,MAAa,cAAc;IACR,QAAQ,CAAiC;IACzC,YAAY,CAA2C;IAExE,gFAAgF;IAChF,YAAmB,OAAuC;QACxD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,MAAM,WAAW,GAAG,IAAI,GAAG,EAA+B,CAAC;QAC3D,KAAK,MAAM,KAAK,IAAI,OAAO;YACzB,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,CAAC;QACnD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,QAAQ,CAAC,UAA8C,EAAE,aAAoD;QAIzH,MAAM,OAAO,GAAmB,EAAE,CAAC;QACnC,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAwB,CAAC;QAC5D,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;YAC7B,MAAM,KAAK,GAAiB;gBAC1B,IAAI,EAAE,GAAG,CAAC,IAAI;gBACd,WAAW,EAAE,GAAG,CAAC,YAAY;gBAC7B,YAAY,EAAE,GAAG,CAAC,YAAY;gBAC9B,YAAY,EAAE,GAAG,CAAC,YAAY;gBAC9B,UAAU,EAAE,EAAE;aACf,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpB,mBAAmB,CAAC,GAAG,CAAC,GAAG,CAAC,YAAY,EAAE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,CAAC,KAAK,CAAC,CAAC;YACvB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACnB,IAAI,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC;gBACtB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC;QAEF,KAAK,MAAM,KAAK,IAAI,SAAS;YAC3B,KAAK,CAAC,KAAK,CAAC,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA7HD,wCA6HC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Schema\n */\n\n/** One schema in a {@link SchemaManifest}: its name, version, and the entries it directly references.\n * @internal\n */\nexport interface SchemaManifestEntry {\n readonly name: string;\n readonly readVersion: number;\n readonly writeVersion: number;\n readonly minorVersion: number;\n /** The schemas this schema directly references. */\n readonly references: readonly SchemaManifestEntry[];\n}\n\n/** One row of `SELECT ECInstanceId, Name, VersionMajor, VersionWrite, VersionMinor FROM\n * meta.ECSchemaDef`, as passed to {@link SchemaManifest.fromRows}.\n * @note `ecInstanceId` is a plain number, matching SchemaView's convention for schema-related rows:\n * `ec_` metadata rowids carry no briefcase prefix, so they are exactly representable. It is used\n * only to wire reference edges and is not retained in the manifest.\n * @internal\n */\nexport interface SchemaManifestSchemaRow {\n readonly ecInstanceId: number;\n readonly name: string;\n readonly versionMajor: number;\n readonly versionWrite: number;\n readonly versionMinor: number;\n}\n\n/** One row of `SELECT SourceECInstanceId, TargetECInstanceId FROM meta.SchemaHasSchemaReferences`,\n * as passed to {@link SchemaManifest.fromRows}.\n * @internal\n */\nexport interface SchemaManifestReferenceRow {\n readonly sourceECInstanceId: number;\n readonly targetECInstanceId: number;\n}\n\n/** The reference graph of every schema in one iModel - names, versions and reference edges, without\n * any schema data. A {@link (SchemaView:class)} husk loads it up front to answer which schemas exist\n * and which dependency-ordered set it must load to satisfy a request.\n *\n * A `SchemaViewDataProvider` builds the manifest from ECDbMeta rows via {@link SchemaManifest.fromRows}.\n * The entries are a flat array with no iModel or platform dependency; even the largest iModels hold\n * on the order of a hundred schemas, so the closure and topological walks are plain recursion.\n * @note The manifest does not track which schemas are already loaded. `SchemaViewManager` does that\n * and filters the result of {@link SchemaManifest.getSchemaClosure} itself.\n * @internal\n */\nexport class SchemaManifest {\n private readonly _entries: readonly SchemaManifestEntry[];\n private readonly _byLowerName: ReadonlyMap<string, SchemaManifestEntry>;\n\n /** Wraps a set of entries whose references are already wired to one another. */\n public constructor(entries: readonly SchemaManifestEntry[]) {\n this._entries = entries;\n const byLowerName = new Map<string, SchemaManifestEntry>();\n for (const entry of entries)\n byLowerName.set(entry.name.toLowerCase(), entry);\n this._byLowerName = byLowerName;\n }\n\n /** Build a manifest from raw ECDbMeta query rows, so a `SchemaViewDataProvider` only has to run\n * the two queries and hand the rows over. Reference rows whose endpoints are unknown or\n * self-referential are skipped; that cannot happen for a well-formed iModel.\n * @internal\n */\n public static fromRows(schemaRows: readonly SchemaManifestSchemaRow[], referenceRows: readonly SchemaManifestReferenceRow[]): SchemaManifest {\n // Mutable during the wiring walk below; entries are read-only once handed to the manifest.\n type MutableEntry = Omit<SchemaManifestEntry, \"references\"> & { references: SchemaManifestEntry[] };\n\n const entries: MutableEntry[] = [];\n const entryByECInstanceId = new Map<number, MutableEntry>();\n for (const row of schemaRows) {\n const entry: MutableEntry = {\n name: row.name,\n readVersion: row.versionMajor,\n writeVersion: row.versionWrite,\n minorVersion: row.versionMinor,\n references: [],\n };\n entries.push(entry);\n entryByECInstanceId.set(row.ecInstanceId, entry);\n }\n\n for (const row of referenceRows) {\n const source = entryByECInstanceId.get(row.sourceECInstanceId);\n const target = entryByECInstanceId.get(row.targetECInstanceId);\n if (source === undefined || target === undefined || source === target || source.references.includes(target))\n continue;\n source.references.push(target);\n }\n\n return new SchemaManifest(entries);\n }\n\n /** The number of schemas in the iModel. */\n public get schemaCount(): number { return this._entries.length; }\n\n /** The names of every schema in the iModel, in manifest order. */\n public getAvailableSchemaNames(): string[] {\n return this._entries.map((entry) => entry.name);\n }\n\n public get entries(): readonly SchemaManifestEntry[] {\n return this._entries;\n }\n\n /** The entry for a schema by name (case-insensitive), or `undefined` if the iModel has no such schema. */\n public findByName(name: string): SchemaManifestEntry | undefined {\n return this._byLowerName.get(name.toLowerCase());\n }\n\n /** The transitive reference closure of the requested schemas, as a flat, duplicate-free list of\n * names: the full set that must be present to use them. The order is unspecified - run\n * {@link SchemaManifest.sortInDependencyOrder} on the result when a load order is needed.\n * @note Requested names the iModel does not contain are ignored; check\n * {@link SchemaManifest.findByName} first to detect them.\n */\n public getSchemaClosure(requestedNames: Iterable<string>): string[] {\n const result: string[] = [];\n const visited = new Set<SchemaManifestEntry>();\n\n const visit = (entry: SchemaManifestEntry): void => {\n if (visited.has(entry))\n return;\n visited.add(entry);\n result.push(entry.name);\n for (const reference of entry.references)\n visit(reference);\n };\n\n for (const name of requestedNames) {\n const entry = this._byLowerName.get(name.toLowerCase());\n if (entry !== undefined)\n visit(entry);\n }\n return result;\n }\n\n /** Orders the given schema names so each appears after every schema it references, directly or\n * transitively. References through schemas not in `schemaNames` are still honored, so the order is\n * correct even when an intermediate schema is left out. Names the iModel does not contain are\n * ignored, and reference cycles - which EC forbids - are broken arbitrarily rather than looping.\n * @internal\n */\n public sortInDependencyOrder(schemaNames: Iterable<string>): string[] {\n const requested = new Set<SchemaManifestEntry>();\n for (const name of schemaNames) {\n const entry = this._byLowerName.get(name.toLowerCase());\n if (entry !== undefined)\n requested.add(entry);\n }\n\n const result: string[] = [];\n const visited = new Set<SchemaManifestEntry>();\n const visiting = new Set<SchemaManifestEntry>();\n\n const visit = (entry: SchemaManifestEntry): void => {\n if (visited.has(entry) || visiting.has(entry))\n return;\n visiting.add(entry);\n for (const reference of entry.references)\n visit(reference);\n visiting.delete(entry);\n visited.add(entry);\n if (requested.has(entry))\n result.push(entry.name);\n };\n\n for (const entry of requested)\n visit(entry);\n return result;\n }\n}\n"]}
@@ -2,7 +2,8 @@
2
2
  * @module Schema
3
3
  */
4
4
  import { type ClassData, ClassModifier, ClassType, type EnumerationData, type EnumeratorData, type KoqData, type PropCategoryData, type PropertyDef, PropertyKind, type PropertyRef, type RelConstraintData, type SchemaData, SchemaViewPrimitiveType } from "./SchemaViewInterfaces";
5
- import { StrengthDirection, StrengthType } from "./ECObjects";
5
+ import { SchemaViewMergeContext } from "./SchemaViewBinaryReader";
6
+ import { StrengthDirection, StrengthType } from "../ECObjects";
6
7
  declare const _storage: unique symbol;
7
8
  /** Internal runtime storage attached to a SchemaView instance. Carries the immutable data
8
9
  * tables built by SchemaViewBuilder plus two mutable caches populated lazily at runtime.
@@ -58,11 +59,15 @@ export interface SchemaViewData {
58
59
  export declare class SchemaView {
59
60
  /** @internal */
60
61
  readonly [_storage]: SchemaViewStorage;
61
- private _schemaToken;
62
+ private readonly _schemaToken;
62
63
  private _outdated;
64
+ /** When present, this view is a *husk*: it retains the live builder and cross-reference maps, so
65
+ * `mergeFragment` can append further fragment blobs. Undefined for one-shot views from `fromBinary`. */
66
+ private readonly _mergeContext?;
63
67
  /** @internal */
64
- constructor(data: SchemaViewData, schemaToken?: string);
65
- /** SHA3-256 content hash of the ec_ schema tables at the time this view was built.
68
+ constructor(data: SchemaViewData, schemaToken?: string, mergeContext?: SchemaViewMergeContext);
69
+ /** Cache-invalidation token identifying the schemas this view was built from: a hash of every
70
+ * schema's name and version (see `PRAGMA checksum(schema_token)`), not of their full contents.
66
71
  * Empty string if not set (e.g., when built from a builder without a token).
67
72
  * @beta
68
73
  */
@@ -105,14 +110,25 @@ export declare class SchemaView {
105
110
  findPropertyCategory(qualifiedName: string): SchemaView.PropertyCategory | undefined;
106
111
  /** Parse a binary blob into a SchemaView. Synchronous.
107
112
  * @param blob - The binary blob from `PRAGMA schema_view`.
108
- * @param schemaToken - Optional SHA3-256 content hash for cache invalidation.
113
+ * @param schemaToken - Optional cache-invalidation token (schema name+version hash; see `PRAGMA checksum(schema_token)`).
109
114
  * @beta
110
115
  */
111
116
  static fromBinary(blob: Uint8Array, schemaToken?: string): SchemaView;
112
- /** Build from a pre-populated builder (used by the binary parser).
117
+ /** Create an empty, *mergeable* view (a "husk"). It contains no schemas until `mergeFragment` is
118
+ * called. Each merged fragment is appended into the same instance, so flyweights and cached
119
+ * cross-references obtained earlier stay valid - indices are append-only and never reordered.
120
+ * @note Fragments must be merged in dependency order: a fragment may only reference schemas from
121
+ * fragments already merged.
113
122
  * @internal
114
123
  */
115
- static fromBuilder(builder: SchemaViewBuilder, schemaToken?: string): SchemaView;
124
+ static createMergeable(schemaToken?: string): SchemaView;
125
+ /** Merge one fragment blob into this view. Only valid on a view created via `createMergeable`.
126
+ * Synchronous. Any flyweight or cached index obtained before the call remains valid.
127
+ * @note If the merge throws (e.g. on a malformed blob), the view may be left partially extended
128
+ * and must be discarded by the host.
129
+ * @internal
130
+ */
131
+ mergeFragment(blob: Uint8Array): void;
116
132
  /** Resolve a qualified "SchemaName:ItemName" (or dot-separated) to an index using the given
117
133
  * per-schema name map. Returns undefined if not found. @internal */
118
134
  private _resolveSchemaItemIdx;
@@ -566,88 +582,5 @@ export declare namespace SchemaView {
566
582
  get constraintClasses(): readonly Class[];
567
583
  }
568
584
  }
569
- /** Builder for constructing an immutable `SchemaView`.
570
- *
571
- * Collects data during binary blob parsing, then freezes it into a view.
572
- * Handles string interning and property definition deduplication.
573
- *
574
- * Consumers should not use this directly - read views via `IModelDb.getSchemaView`
575
- * / `IModelConnection.getSchemaView` (or `SchemaView.fromBinary` if you have a raw blob).
576
- * @internal
577
- */
578
- export declare class SchemaViewBuilder {
579
- private readonly _strings;
580
- private readonly _lowerStrings;
581
- private readonly _stringMap;
582
- private readonly _schemas;
583
- private readonly _classes;
584
- private readonly _classMixins;
585
- private readonly _propDefs;
586
- private readonly _propertyRefs;
587
- private readonly _relConstraints;
588
- private readonly _constraintClassRefs;
589
- private readonly _enumerations;
590
- private readonly _enumerators;
591
- private readonly _koqs;
592
- private readonly _propCategories;
593
- private readonly _propDefMap;
594
- /** Intern a string, returning its SID. Empty/undefined strings return 0.
595
- * Interning is case-sensitive - "MyLabel" and "MYLABEL" get distinct SIDs.
596
- * The `lowerStrings` array provides case-insensitive lookup without mutating display values.
597
- */
598
- internString(value: string | undefined): number;
599
- /** Add a schema. Returns its index. */
600
- addSchema(data: SchemaData): number;
601
- /** Add a class. Returns its index. Must be called after the owning schema. */
602
- addClass(data: ClassData): number;
603
- /** Add a property definition with deduplication. Returns the def index (possibly existing). */
604
- addPropertyDef(data: PropertyDef): number;
605
- /** Append a property reference to the flat refs array. */
606
- addPropertyRef(ref: PropertyRef): void;
607
- /** Add an enumeration. Returns its index. */
608
- addEnumeration(data: EnumerationData): number;
609
- /** Append an enumerator to the flat enumerators array. */
610
- addEnumerator(data: EnumeratorData): void;
611
- /** Add a KindOfQuantity. Returns its index. */
612
- addKoq(data: KoqData): number;
613
- /** Add a PropertyCategory. Returns its index. */
614
- addPropertyCategory(data: PropCategoryData): number;
615
- /** Add a relationship constraint. Returns its index. */
616
- addRelConstraint(data: RelConstraintData): number;
617
- /** Append a constraint class reference to the flat array. */
618
- addConstraintClassRef(classIdx: number): void;
619
- /** Append a mixin class reference to the flat array. */
620
- addClassMixin(classIdx: number): void;
621
- /** The current count of property refs (used to set ownPropStart on ClassData). */
622
- get propertyRefCount(): number;
623
- /** The current count of enumerators (used to set enumeratorStart on EnumerationData). */
624
- get enumeratorCount(): number;
625
- /** The current count of constraint class refs (used to set classRefStart). */
626
- get constraintClassRefCount(): number;
627
- /** The current count of class mixins (used to set mixinStartIdx). */
628
- get classMixinCount(): number;
629
- /** Get a string by SID. @internal */
630
- getString(sid: number): string;
631
- /** Replace class data at the given index (used during deferred cross-ref resolution). @internal */
632
- updateClass(classIdx: number, data: ClassData): void;
633
- /** Update range fields on a schema (used after all items for a schema are collected). @internal */
634
- updateSchemaRanges(schemaIdx: number, ranges: {
635
- classRangeStart: number;
636
- classCount: number;
637
- enumRangeStart: number;
638
- enumCount: number;
639
- koqRangeStart: number;
640
- koqCount: number;
641
- catRangeStart: number;
642
- catCount: number;
643
- }): void;
644
- /** Freeze all data and produce an immutable SchemaView. */
645
- build(schemaToken?: string): SchemaView;
646
- /** Produce a dedup signature for a PropertyDef. Label and priority are excluded because
647
- * they are per-PropertyRef overrides, not part of the structural definition.
648
- * Uses SIDs (not lowercase strings) for name/description so that case-preserving names
649
- * stay distinct - matching the C++ writer's dedup behavior. */
650
- private _propDefSignature;
651
- }
652
585
  export {};
653
586
  //# sourceMappingURL=SchemaView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaView.d.ts","sourceRoot":"","sources":["../../../src/SchemaView/SchemaView.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,KAAK,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtR,OAAO,EAAuB,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAO/D,QAAA,MAAM,QAAQ,eAA+B,CAAC;AAE9C;;;GAGG;AACH,UAAU,iBAAkB,SAAQ,cAAc;IAChD,QAAQ,CAAC,mBAAmB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/D,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC;CACrE;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IACl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