@itwin/ecschema-metadata 3.5.0-dev.13 → 3.5.0-dev.16

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 (141) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/lib/cjs/Constants.d.ts +23 -23
  3. package/lib/cjs/Constants.js +33 -33
  4. package/lib/cjs/Constants.js.map +1 -1
  5. package/lib/cjs/Context.d.ts +139 -139
  6. package/lib/cjs/Context.js +204 -204
  7. package/lib/cjs/DelayedPromise.d.ts +88 -88
  8. package/lib/cjs/DelayedPromise.js +91 -91
  9. package/lib/cjs/DelayedPromise.js.map +1 -1
  10. package/lib/cjs/Deserialization/AbstractParser.d.ts +45 -45
  11. package/lib/cjs/Deserialization/AbstractParser.js +11 -11
  12. package/lib/cjs/Deserialization/AbstractParser.js.map +1 -1
  13. package/lib/cjs/Deserialization/Helper.d.ts +251 -251
  14. package/lib/cjs/Deserialization/Helper.js +843 -843
  15. package/lib/cjs/Deserialization/Helper.js.map +1 -1
  16. package/lib/cjs/Deserialization/JsonParser.d.ts +165 -165
  17. package/lib/cjs/Deserialization/JsonParser.js +680 -680
  18. package/lib/cjs/Deserialization/JsonParser.js.map +1 -1
  19. package/lib/cjs/Deserialization/JsonProps.d.ts +282 -282
  20. package/lib/cjs/Deserialization/JsonProps.js +9 -9
  21. package/lib/cjs/Deserialization/JsonProps.js.map +1 -1
  22. package/lib/cjs/Deserialization/SchemaGraphUtil.d.ts +34 -34
  23. package/lib/cjs/Deserialization/SchemaGraphUtil.js +77 -77
  24. package/lib/cjs/Deserialization/SchemaGraphUtil.js.map +1 -1
  25. package/lib/cjs/Deserialization/XmlParser.d.ts +85 -85
  26. package/lib/cjs/Deserialization/XmlParser.js +973 -973
  27. package/lib/cjs/Deserialization/XmlParser.js.map +1 -1
  28. package/lib/cjs/Deserialization/XmlSerializationUtils.d.ts +54 -54
  29. package/lib/cjs/Deserialization/XmlSerializationUtils.js +174 -174
  30. package/lib/cjs/Deserialization/XmlSerializationUtils.js.map +1 -1
  31. package/lib/cjs/ECName.d.ts +30 -30
  32. package/lib/cjs/ECName.js +85 -85
  33. package/lib/cjs/ECName.js.map +1 -1
  34. package/lib/cjs/ECObjects.d.ts +162 -162
  35. package/lib/cjs/ECObjects.js +453 -453
  36. package/lib/cjs/ECObjects.js.map +1 -1
  37. package/lib/cjs/Exception.d.ts +43 -43
  38. package/lib/cjs/Exception.js +86 -86
  39. package/lib/cjs/Exception.js.map +1 -1
  40. package/lib/cjs/Interfaces.d.ts +66 -66
  41. package/lib/cjs/Interfaces.js +9 -9
  42. package/lib/cjs/Interfaces.js.map +1 -1
  43. package/lib/cjs/Metadata/Class.d.ts +243 -243
  44. package/lib/cjs/Metadata/Class.js +558 -558
  45. package/lib/cjs/Metadata/Class.js.map +1 -1
  46. package/lib/cjs/Metadata/Constant.d.ts +64 -64
  47. package/lib/cjs/Metadata/Constant.js +123 -123
  48. package/lib/cjs/Metadata/Constant.js.map +1 -1
  49. package/lib/cjs/Metadata/CustomAttribute.d.ts +23 -23
  50. package/lib/cjs/Metadata/CustomAttribute.js +27 -27
  51. package/lib/cjs/Metadata/CustomAttribute.js.map +1 -1
  52. package/lib/cjs/Metadata/CustomAttributeClass.d.ts +39 -39
  53. package/lib/cjs/Metadata/CustomAttributeClass.js +68 -68
  54. package/lib/cjs/Metadata/CustomAttributeClass.js.map +1 -1
  55. package/lib/cjs/Metadata/EntityClass.d.ts +77 -77
  56. package/lib/cjs/Metadata/EntityClass.js +230 -230
  57. package/lib/cjs/Metadata/EntityClass.js.map +1 -1
  58. package/lib/cjs/Metadata/Enumeration.d.ts +86 -86
  59. package/lib/cjs/Metadata/Enumeration.js +159 -159
  60. package/lib/cjs/Metadata/Enumeration.js.map +1 -1
  61. package/lib/cjs/Metadata/Format.d.ts +98 -98
  62. package/lib/cjs/Metadata/Format.js +242 -242
  63. package/lib/cjs/Metadata/Format.js.map +1 -1
  64. package/lib/cjs/Metadata/InvertedUnit.d.ts +49 -49
  65. package/lib/cjs/Metadata/InvertedUnit.js +97 -97
  66. package/lib/cjs/Metadata/InvertedUnit.js.map +1 -1
  67. package/lib/cjs/Metadata/KindOfQuantity.d.ts +65 -65
  68. package/lib/cjs/Metadata/KindOfQuantity.js +225 -225
  69. package/lib/cjs/Metadata/KindOfQuantity.js.map +1 -1
  70. package/lib/cjs/Metadata/Mixin.d.ts +54 -54
  71. package/lib/cjs/Metadata/Mixin.js +113 -113
  72. package/lib/cjs/Metadata/Mixin.js.map +1 -1
  73. package/lib/cjs/Metadata/OverrideFormat.d.ts +55 -55
  74. package/lib/cjs/Metadata/OverrideFormat.js +88 -88
  75. package/lib/cjs/Metadata/OverrideFormat.js.map +1 -1
  76. package/lib/cjs/Metadata/Phenomenon.d.ts +33 -33
  77. package/lib/cjs/Metadata/Phenomenon.js +59 -59
  78. package/lib/cjs/Metadata/Phenomenon.js.map +1 -1
  79. package/lib/cjs/Metadata/Property.d.ts +197 -197
  80. package/lib/cjs/Metadata/Property.js +491 -491
  81. package/lib/cjs/Metadata/Property.js.map +1 -1
  82. package/lib/cjs/Metadata/PropertyCategory.d.ts +39 -39
  83. package/lib/cjs/Metadata/PropertyCategory.js +61 -61
  84. package/lib/cjs/Metadata/PropertyCategory.js.map +1 -1
  85. package/lib/cjs/Metadata/RelationshipClass.d.ts +152 -152
  86. package/lib/cjs/Metadata/RelationshipClass.js +349 -349
  87. package/lib/cjs/Metadata/RelationshipClass.js.map +1 -1
  88. package/lib/cjs/Metadata/Schema.d.ts +291 -291
  89. package/lib/cjs/Metadata/Schema.js +520 -520
  90. package/lib/cjs/Metadata/Schema.js.map +1 -1
  91. package/lib/cjs/Metadata/SchemaItem.d.ts +61 -61
  92. package/lib/cjs/Metadata/SchemaItem.js +136 -136
  93. package/lib/cjs/Metadata/SchemaItem.js.map +1 -1
  94. package/lib/cjs/Metadata/Unit.d.ts +76 -76
  95. package/lib/cjs/Metadata/Unit.js +162 -162
  96. package/lib/cjs/Metadata/UnitSystem.d.ts +20 -20
  97. package/lib/cjs/Metadata/UnitSystem.js +29 -29
  98. package/lib/cjs/Metadata/UnitSystem.js.map +1 -1
  99. package/lib/cjs/PropertyTypes.d.ts +49 -49
  100. package/lib/cjs/PropertyTypes.js +91 -91
  101. package/lib/cjs/PropertyTypes.js.map +1 -1
  102. package/lib/cjs/SchemaJsonLocater.d.ts +34 -34
  103. package/lib/cjs/SchemaJsonLocater.js +42 -42
  104. package/lib/cjs/SchemaJsonLocater.js.map +1 -1
  105. package/lib/cjs/SchemaKey.d.ts +110 -110
  106. package/lib/cjs/SchemaKey.js +219 -219
  107. package/lib/cjs/SchemaKey.js.map +1 -1
  108. package/lib/cjs/SchemaLoader.d.ts +23 -23
  109. package/lib/cjs/SchemaLoader.js +47 -47
  110. package/lib/cjs/SchemaLoader.js.map +1 -1
  111. package/lib/cjs/SchemaPartVisitorDelegate.d.ts +274 -274
  112. package/lib/cjs/SchemaPartVisitorDelegate.js +212 -212
  113. package/lib/cjs/SchemaPartVisitorDelegate.js.map +1 -1
  114. package/lib/cjs/UnitConversion/Graph.d.ts +34 -34
  115. package/lib/cjs/UnitConversion/Graph.js +83 -83
  116. package/lib/cjs/UnitConversion/Graph.js.map +1 -1
  117. package/lib/cjs/UnitConversion/Parser.d.ts +8 -8
  118. package/lib/cjs/UnitConversion/Parser.js +42 -42
  119. package/lib/cjs/UnitConversion/Parser.js.map +1 -1
  120. package/lib/cjs/UnitConversion/UnitConversion.d.ts +45 -45
  121. package/lib/cjs/UnitConversion/UnitConversion.js +77 -77
  122. package/lib/cjs/UnitConversion/UnitConversion.js.map +1 -1
  123. package/lib/cjs/UnitConversion/UnitConverter.d.ts +39 -39
  124. package/lib/cjs/UnitConversion/UnitConverter.js +116 -116
  125. package/lib/cjs/UnitConversion/UnitConverter.js.map +1 -1
  126. package/lib/cjs/UnitConversion/UnitTree.d.ts +43 -43
  127. package/lib/cjs/UnitConversion/UnitTree.js +169 -169
  128. package/lib/cjs/UnitConversion/UnitTree.js.map +1 -1
  129. package/lib/cjs/UnitProvider/SchemaUnitProvider.d.ts +77 -77
  130. package/lib/cjs/UnitProvider/SchemaUnitProvider.js +236 -236
  131. package/lib/cjs/UnitProvider/SchemaUnitProvider.js.map +1 -1
  132. package/lib/cjs/Validation/SchemaWalker.d.ts +23 -23
  133. package/lib/cjs/Validation/SchemaWalker.js +53 -53
  134. package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
  135. package/lib/cjs/ecschema-metadata.d.ts +51 -51
  136. package/lib/cjs/ecschema-metadata.js +96 -96
  137. package/lib/cjs/ecschema-metadata.js.map +1 -1
  138. package/lib/cjs/utils/SchemaGraph.d.ts +25 -25
  139. package/lib/cjs/utils/SchemaGraph.js +65 -65
  140. package/lib/cjs/utils/SchemaGraph.js.map +1 -1
  141. package/package.json +7 -7
package/lib/cjs/ECName.js CHANGED
@@ -1,86 +1,86 @@
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 Metadata
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ECName = void 0;
11
- const core_bentley_1 = require("@itwin/core-bentley");
12
- const Exception_1 = require("./Exception");
13
- const validECNameRegex = /^([a-zA-Z_]+[a-zA-Z0-9_]*)$/i;
14
- const ecNameReplacerRegex = /__x([0-9a-fA-F]{4})__/g;
15
- const leadingDigits = ["0000", "000", "00", "0", ""];
16
- function isDigit(character) {
17
- (0, core_bentley_1.assert)(1 === character.length);
18
- return character >= "0" && character <= "9";
19
- }
20
- function isValidAlphaNumericCharacter(c) {
21
- (0, core_bentley_1.assert)(1 === c.length);
22
- return (((c >= "0" && c <= "9") || (c >= "A" && c <= "Z") || (c >= "a" && c <= "z") || c === "_"));
23
- }
24
- /** The name of an item in a [[Schema]], encoded to meet restrictions on the characters usable in such names.
25
- * An ECName meets the following criteria:
26
- * - Contains at least one character.
27
- * - Does not begin with a digit.
28
- * - Consists entirely of characters in the ASCII ranges A-Z, a-z, and 0-9; and the underscore ("_") character.
29
- *
30
- * All characters not meeting the above criteria are encoded as "__x####__" where "####" is the UTF-16 character code.
31
- * Such names are often automatically generated from the item's display label, which is unrestricted in the characters it may contain.
32
- * @public
33
- */
34
- class ECName {
35
- /** Construct a new ECName from a valid EC name.
36
- * throws ECObjectsError if `name` does not meet the criteria for a valid EC name.
37
- */
38
- constructor(name) {
39
- if (!ECName.validate(name))
40
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECName);
41
- this._name = name;
42
- }
43
- /** Returns true if a string meets the criteria of a valid EC name. */
44
- static validate(name) {
45
- return validECNameRegex.test(name);
46
- }
47
- /** The underlying name as a string. */
48
- get name() {
49
- return this._name;
50
- }
51
- /** Create an ECName from an arbitrary string, encoding any special characters as "__x####__" where "####" is the UTF-16 character code.
52
- * @throws ECObjectsError if `input` is an empty string.
53
- */
54
- static encode(input) {
55
- if (0 === input.length)
56
- throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECName);
57
- if (ECName.validate(input)) {
58
- // It's already a valid EC name.
59
- return new ECName(input);
60
- }
61
- let output = "";
62
- function appendEncodedCharacter(index) {
63
- const hex = input.charCodeAt(index).toString(16).toUpperCase();
64
- (0, core_bentley_1.assert)(hex.length > 0 && hex.length < 5);
65
- output += `__x${leadingDigits[hex.length]}${hex}__`;
66
- }
67
- // First character cannot be a digit.
68
- const firstCharIsDigit = isDigit(input[0]);
69
- if (firstCharIsDigit)
70
- appendEncodedCharacter(0);
71
- for (let i = firstCharIsDigit ? 1 : 0; i < input.length; i++) {
72
- const char = input[i];
73
- if (!isValidAlphaNumericCharacter(char))
74
- appendEncodedCharacter(i);
75
- else
76
- output += char;
77
- }
78
- return new ECName(output);
79
- }
80
- /** Decode this ECName, replacing encoded special characters with the characters they encode. */
81
- decode() {
82
- return this.name.replace(ecNameReplacerRegex, (_match, hex) => String.fromCharCode(Number.parseInt(hex, 16)));
83
- }
84
- }
85
- exports.ECName = ECName;
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 Metadata
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ECName = void 0;
11
+ const core_bentley_1 = require("@itwin/core-bentley");
12
+ const Exception_1 = require("./Exception");
13
+ const validECNameRegex = /^([a-zA-Z_]+[a-zA-Z0-9_]*)$/i;
14
+ const ecNameReplacerRegex = /__x([0-9a-fA-F]{4})__/g;
15
+ const leadingDigits = ["0000", "000", "00", "0", ""];
16
+ function isDigit(character) {
17
+ (0, core_bentley_1.assert)(1 === character.length);
18
+ return character >= "0" && character <= "9";
19
+ }
20
+ function isValidAlphaNumericCharacter(c) {
21
+ (0, core_bentley_1.assert)(1 === c.length);
22
+ return (((c >= "0" && c <= "9") || (c >= "A" && c <= "Z") || (c >= "a" && c <= "z") || c === "_"));
23
+ }
24
+ /** The name of an item in a [[Schema]], encoded to meet restrictions on the characters usable in such names.
25
+ * An ECName meets the following criteria:
26
+ * - Contains at least one character.
27
+ * - Does not begin with a digit.
28
+ * - Consists entirely of characters in the ASCII ranges A-Z, a-z, and 0-9; and the underscore ("_") character.
29
+ *
30
+ * All characters not meeting the above criteria are encoded as "__x####__" where "####" is the UTF-16 character code.
31
+ * Such names are often automatically generated from the item's display label, which is unrestricted in the characters it may contain.
32
+ * @public
33
+ */
34
+ class ECName {
35
+ /** Construct a new ECName from a valid EC name.
36
+ * throws ECObjectsError if `name` does not meet the criteria for a valid EC name.
37
+ */
38
+ constructor(name) {
39
+ if (!ECName.validate(name))
40
+ throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECName);
41
+ this._name = name;
42
+ }
43
+ /** Returns true if a string meets the criteria of a valid EC name. */
44
+ static validate(name) {
45
+ return validECNameRegex.test(name);
46
+ }
47
+ /** The underlying name as a string. */
48
+ get name() {
49
+ return this._name;
50
+ }
51
+ /** Create an ECName from an arbitrary string, encoding any special characters as "__x####__" where "####" is the UTF-16 character code.
52
+ * @throws ECObjectsError if `input` is an empty string.
53
+ */
54
+ static encode(input) {
55
+ if (0 === input.length)
56
+ throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidECName);
57
+ if (ECName.validate(input)) {
58
+ // It's already a valid EC name.
59
+ return new ECName(input);
60
+ }
61
+ let output = "";
62
+ function appendEncodedCharacter(index) {
63
+ const hex = input.charCodeAt(index).toString(16).toUpperCase();
64
+ (0, core_bentley_1.assert)(hex.length > 0 && hex.length < 5);
65
+ output += `__x${leadingDigits[hex.length]}${hex}__`;
66
+ }
67
+ // First character cannot be a digit.
68
+ const firstCharIsDigit = isDigit(input[0]);
69
+ if (firstCharIsDigit)
70
+ appendEncodedCharacter(0);
71
+ for (let i = firstCharIsDigit ? 1 : 0; i < input.length; i++) {
72
+ const char = input[i];
73
+ if (!isValidAlphaNumericCharacter(char))
74
+ appendEncodedCharacter(i);
75
+ else
76
+ output += char;
77
+ }
78
+ return new ECName(output);
79
+ }
80
+ /** Decode this ECName, replacing encoded special characters with the characters they encode. */
81
+ decode() {
82
+ return this.name.replace(ecNameReplacerRegex, (_match, hex) => String.fromCharCode(Number.parseInt(hex, 16)));
83
+ }
84
+ }
85
+ exports.ECName = ECName;
86
86
  //# sourceMappingURL=ECName.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ECName.js","sourceRoot":"","sources":["../../src/ECName.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,2CAA8D;AAE9D,MAAM,gBAAgB,GAAG,8BAA8B,CAAC;AACxD,MAAM,mBAAmB,GAAG,wBAAwB,CAAC;AACrD,MAAM,aAAa,GAAG,CAAC,MA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F;AA/DD,wBA+DC","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 Metadata\n */\n\nimport { assert } from \"@itwin/core-bentley\";\nimport { ECObjectsError, ECObjectsStatus } from \"./Exception\";\n\nconst validECNameRegex = /^([a-zA-Z_]+[a-zA-Z0-9_]*)$/i;\nconst ecNameReplacerRegex = /__x([0-9a-fA-F]{4})__/g;\nconst leadingDigits = [\"0000\", \"000\", \"00\", \"0\", \"\"];\n\nfunction isDigit(character: string): boolean {\n assert(1 === character.length);\n return character >= \"0\" && character <= \"9\";\n}\n\nfunction isValidAlphaNumericCharacter(c: string): boolean {\n assert(1 === c.length);\n return (((c >= \"0\" && c <= \"9\") || (c >= \"A\" && c <= \"Z\") || (c >= \"a\" && c <= \"z\") || c === \"_\"));\n}\n\n/** The name of an item in a [[Schema]], encoded to meet restrictions on the characters usable in such names.\n * An ECName meets the following criteria:\n * - Contains at least one character.\n * - Does not begin with a digit.\n * - Consists entirely of characters in the ASCII ranges A-Z, a-z, and 0-9; and the underscore (\"_\") character.\n *\n * All characters not meeting the above criteria are encoded as \"__x####__\" where \"####\" is the UTF-16 character code.\n * Such names are often automatically generated from the item's display label, which is unrestricted in the characters it may contain.\n * @public\n */\nexport class ECName {\n private _name: string;\n\n /** Construct a new ECName from a valid EC name.\n * throws ECObjectsError if `name` does not meet the criteria for a valid EC name.\n */\n constructor(name: string) {\n if (!ECName.validate(name))\n throw new ECObjectsError(ECObjectsStatus.InvalidECName);\n\n this._name = name;\n }\n\n /** Returns true if a string meets the criteria of a valid EC name. */\n public static validate(name: string): boolean {\n return validECNameRegex.test(name);\n }\n\n /** The underlying name as a string. */\n public get name(): string {\n return this._name;\n }\n\n /** Create an ECName from an arbitrary string, encoding any special characters as \"__x####__\" where \"####\" is the UTF-16 character code.\n * @throws ECObjectsError if `input` is an empty string.\n */\n public static encode(input: string): ECName {\n if (0 === input.length)\n throw new ECObjectsError(ECObjectsStatus.InvalidECName);\n\n if (ECName.validate(input)) {\n // It's already a valid EC name.\n return new ECName(input);\n }\n\n let output = \"\";\n\n function appendEncodedCharacter(index: number): void {\n const hex = input.charCodeAt(index).toString(16).toUpperCase();\n assert(hex.length > 0 && hex.length < 5);\n output += `__x${leadingDigits[hex.length]}${hex}__`;\n }\n\n // First character cannot be a digit.\n const firstCharIsDigit = isDigit(input[0]);\n if (firstCharIsDigit)\n appendEncodedCharacter(0);\n\n for (let i = firstCharIsDigit ? 1 : 0; i < input.length; i++) {\n const char = input[i];\n if (!isValidAlphaNumericCharacter(char))\n appendEncodedCharacter(i);\n else\n output += char;\n }\n\n return new ECName(output);\n }\n\n /** Decode this ECName, replacing encoded special characters with the characters they encode. */\n public decode(): string {\n return this.name.replace(ecNameReplacerRegex, (_match, hex) => String.fromCharCode(Number.parseInt(hex, 16)));\n }\n}\n"]}
1
+ {"version":3,"file":"ECName.js","sourceRoot":"","sources":["../../src/ECName.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,2CAA8D;AAE9D,MAAM,gBAAgB,GAAG,8BAA8B,CAAC;AACxD,MAAM,mBAAmB,GAAG,wBAAwB,CAAC;AACrD,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;AAErD,SAAS,OAAO,CAAC,SAAiB;IAChC,IAAA,qBAAM,EAAC,CAAC,KAAK,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,SAAS,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,CAAC;AAC9C,CAAC;AAED,SAAS,4BAA4B,CAAC,CAAS;IAC7C,IAAA,qBAAM,EAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;IACvB,OAAO,CAAC,CAAC,CAAC,CAAC,IA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M,IAAI,MAAM,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,CAAC;QACtD,CAAC;QAED,qCAAqC;QACrC,MAAM,gBAAgB,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3C,IAAI,gBAAgB;YAClB,sBAAsB,CAAC,CAAC,CAAC,CAAC;QAE5B,KAAK,IAAI,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC5D,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC;gBACrC,sBAAsB,CAAC,CAAC,CAAC,CAAC;;gBAE1B,MAAM,IAAI,IAAI,CAAC;SAClB;QAED,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAED,gGAAgG;IACzF,MAAM;QACX,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAChH,CAAC;CACF;AA/DD,wBA+DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Metadata\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { ECObjectsError, ECObjectsStatus } from \"./Exception\";\r\n\r\nconst validECNameRegex = /^([a-zA-Z_]+[a-zA-Z0-9_]*)$/i;\r\nconst ecNameReplacerRegex = /__x([0-9a-fA-F]{4})__/g;\r\nconst leadingDigits = [\"0000\", \"000\", \"00\", \"0\", \"\"];\r\n\r\nfunction isDigit(character: string): boolean {\r\n assert(1 === character.length);\r\n return character >= \"0\" && character <= \"9\";\r\n}\r\n\r\nfunction isValidAlphaNumericCharacter(c: string): boolean {\r\n assert(1 === c.length);\r\n return (((c >= \"0\" && c <= \"9\") || (c >= \"A\" && c <= \"Z\") || (c >= \"a\" && c <= \"z\") || c === \"_\"));\r\n}\r\n\r\n/** The name of an item in a [[Schema]], encoded to meet restrictions on the characters usable in such names.\r\n * An ECName meets the following criteria:\r\n * - Contains at least one character.\r\n * - Does not begin with a digit.\r\n * - Consists entirely of characters in the ASCII ranges A-Z, a-z, and 0-9; and the underscore (\"_\") character.\r\n *\r\n * All characters not meeting the above criteria are encoded as \"__x####__\" where \"####\" is the UTF-16 character code.\r\n * Such names are often automatically generated from the item's display label, which is unrestricted in the characters it may contain.\r\n * @public\r\n */\r\nexport class ECName {\r\n private _name: string;\r\n\r\n /** Construct a new ECName from a valid EC name.\r\n * throws ECObjectsError if `name` does not meet the criteria for a valid EC name.\r\n */\r\n constructor(name: string) {\r\n if (!ECName.validate(name))\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECName);\r\n\r\n this._name = name;\r\n }\r\n\r\n /** Returns true if a string meets the criteria of a valid EC name. */\r\n public static validate(name: string): boolean {\r\n return validECNameRegex.test(name);\r\n }\r\n\r\n /** The underlying name as a string. */\r\n public get name(): string {\r\n return this._name;\r\n }\r\n\r\n /** Create an ECName from an arbitrary string, encoding any special characters as \"__x####__\" where \"####\" is the UTF-16 character code.\r\n * @throws ECObjectsError if `input` is an empty string.\r\n */\r\n public static encode(input: string): ECName {\r\n if (0 === input.length)\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECName);\r\n\r\n if (ECName.validate(input)) {\r\n // It's already a valid EC name.\r\n return new ECName(input);\r\n }\r\n\r\n let output = \"\";\r\n\r\n function appendEncodedCharacter(index: number): void {\r\n const hex = input.charCodeAt(index).toString(16).toUpperCase();\r\n assert(hex.length > 0 && hex.length < 5);\r\n output += `__x${leadingDigits[hex.length]}${hex}__`;\r\n }\r\n\r\n // First character cannot be a digit.\r\n const firstCharIsDigit = isDigit(input[0]);\r\n if (firstCharIsDigit)\r\n appendEncodedCharacter(0);\r\n\r\n for (let i = firstCharIsDigit ? 1 : 0; i < input.length; i++) {\r\n const char = input[i];\r\n if (!isValidAlphaNumericCharacter(char))\r\n appendEncodedCharacter(i);\r\n else\r\n output += char;\r\n }\r\n\r\n return new ECName(output);\r\n }\r\n\r\n /** Decode this ECName, replacing encoded special characters with the characters they encode. */\r\n public decode(): string {\r\n return this.name.replace(ecNameReplacerRegex, (_match, hex) => String.fromCharCode(Number.parseInt(hex, 16)));\r\n }\r\n}\r\n"]}
@@ -1,163 +1,163 @@
1
- /** @packageDocumentation
2
- * @module Metadata
3
- */
4
- export { PropertyType } from "./PropertyTypes";
5
- /** @beta */
6
- export declare enum ECClassModifier {
7
- None = 0,
8
- Abstract = 1,
9
- Sealed = 2
10
- }
11
- /** @beta */
12
- export declare enum SchemaItemType {
13
- EntityClass = 0,
14
- Mixin = 1,
15
- StructClass = 2,
16
- CustomAttributeClass = 3,
17
- RelationshipClass = 4,
18
- Enumeration = 5,
19
- KindOfQuantity = 6,
20
- PropertyCategory = 7,
21
- Unit = 8,
22
- InvertedUnit = 9,
23
- Constant = 10,
24
- Phenomenon = 11,
25
- UnitSystem = 12,
26
- Format = 13
27
- }
28
- /**
29
- * Primitive data types for ECProperties.
30
- * @beta
31
- */
32
- export declare enum PrimitiveType {
33
- Uninitialized = 0,
34
- Binary = 257,
35
- Boolean = 513,
36
- DateTime = 769,
37
- Double = 1025,
38
- Integer = 1281,
39
- Long = 1537,
40
- Point2d = 1793,
41
- Point3d = 2049,
42
- String = 2305,
43
- IGeometry = 2561
44
- }
45
- /**
46
- * Defines the valid CustomAttribute container types.
47
- * @beta
48
- */
49
- export declare enum CustomAttributeContainerType {
50
- Schema = 1,
51
- EntityClass = 2,
52
- CustomAttributeClass = 4,
53
- StructClass = 8,
54
- RelationshipClass = 16,
55
- AnyClass = 30,
56
- PrimitiveProperty = 32,
57
- StructProperty = 64,
58
- PrimitiveArrayProperty = 128,
59
- StructArrayProperty = 256,
60
- NavigationProperty = 512,
61
- AnyProperty = 992,
62
- SourceRelationshipConstraint = 1024,
63
- TargetRelationshipConstraint = 2048,
64
- AnyRelationshipConstraint = 3072,
65
- Any = 4095
66
- }
67
- /**
68
- * Defines what sort of match should be used when locating a schema.
69
- * @beta
70
- */
71
- export declare enum SchemaMatchType {
72
- Identical = 0,
73
- Exact = 1,
74
- LatestWriteCompatible = 2,
75
- Latest = 3,
76
- LatestReadCompatible = 4
77
- }
78
- /**
79
- * Identifer for an ECRelationshipConstraint. Used to determine the side of the relationship the constraint is representing.
80
- * @beta
81
- */
82
- export declare enum RelationshipEnd {
83
- Source = 0,
84
- Target = 1
85
- }
86
- /** @beta */
87
- export declare enum StrengthType {
88
- Referencing = 0,
89
- Holding = 1,
90
- Embedding = 2
91
- }
92
- /** @beta */
93
- export declare enum StrengthDirection {
94
- Forward = 1,
95
- Backward = 2
96
- }
97
- /**
98
- * Parses the provided string into an ECClassModifier if the string is a valid modifier.
99
- * @param modifier The modifier string to parse.
100
- * @beta
101
- */
102
- export declare function parseClassModifier(modifier: string): ECClassModifier | undefined;
103
- /**
104
- * @return A string representing the provided ECClassModifier. If the modifier is not valid, an empty string is returned.
105
- * @beta
106
- */
107
- export declare function classModifierToString(modifier: ECClassModifier): string;
108
- /**
109
- * Tries to parse the given string as one of the 8 schema item types.
110
- * @param type The schema item type string to parse.
111
- * @returns A valid SchemaItemType if successfully parsed. Otherwise, undefined if the provided string is not a valid SchemaItemType.
112
- * @beta
113
- */
114
- export declare function parseSchemaItemType(type: string): SchemaItemType | undefined;
115
- /**
116
- * Converts a valid SchemaItemType to a display string.
117
- * @param value The SchemaItemType to stringify.
118
- * @return A string representing the provided SchemaItemType. If the type is not valid, an empty string is returned.
119
- * @beta
120
- */
121
- export declare function schemaItemTypeToString(value: SchemaItemType): string;
122
- /** @internal */
123
- export declare function schemaItemTypeToXmlString(value: SchemaItemType): string;
124
- /**
125
- * Tries to parse the given string as one of the 10 primitive types.
126
- * @param type The primitive type string to parse.
127
- * @returns A valid PrimitiveType if successfully parsed, or undefined if the provided string is not a valid PrimitiveType.
128
- * @beta
129
- */
130
- export declare function parsePrimitiveType(type: string): PrimitiveType | undefined;
131
- /** @beta */
132
- export declare function primitiveTypeToString(type: PrimitiveType): string;
133
- /**
134
- * Parses the given string into the appropriate CustomAttributeContainerType if the string is valid.
135
- * @param type The container type string to parse.
136
- * @beta
137
- */
138
- export declare function parseCustomAttributeContainerType(type: string): CustomAttributeContainerType | undefined;
139
- /**
140
- * Creates a string representing a valid CustomAttributeContainerType.
141
- * @param value The CustomAttributeContainerType to stringify.
142
- * @return A string representing the provided CustomAttributeContainerType. If the type is not valid, an empty string is returned.
143
- * @beta
144
- */
145
- export declare function containerTypeToString(type: CustomAttributeContainerType): string;
146
- /** @beta */
147
- export declare function parseRelationshipEnd(end: string): RelationshipEnd | undefined;
148
- /** @beta */
149
- export declare function relationshipEndToString(end: RelationshipEnd): string;
150
- /**
151
- * Takes a string representing a StrengthType, will parse it and return the corresponding StrengthType.
152
- * @throws ECObjectsStatus.InvalidStrength if the provided string that is not valid
153
- * @param strength
154
- * @beta
155
- */
156
- export declare function parseStrength(strength: string): StrengthType | undefined;
157
- /** @beta */
158
- export declare function strengthToString(strength: StrengthType): string;
159
- /** @beta */
160
- export declare function parseStrengthDirection(direction: string): StrengthDirection | undefined;
161
- /** @beta */
162
- export declare function strengthDirectionToString(direction: StrengthDirection): string;
1
+ /** @packageDocumentation
2
+ * @module Metadata
3
+ */
4
+ export { PropertyType } from "./PropertyTypes";
5
+ /** @beta */
6
+ export declare enum ECClassModifier {
7
+ None = 0,
8
+ Abstract = 1,
9
+ Sealed = 2
10
+ }
11
+ /** @beta */
12
+ export declare enum SchemaItemType {
13
+ EntityClass = 0,
14
+ Mixin = 1,
15
+ StructClass = 2,
16
+ CustomAttributeClass = 3,
17
+ RelationshipClass = 4,
18
+ Enumeration = 5,
19
+ KindOfQuantity = 6,
20
+ PropertyCategory = 7,
21
+ Unit = 8,
22
+ InvertedUnit = 9,
23
+ Constant = 10,
24
+ Phenomenon = 11,
25
+ UnitSystem = 12,
26
+ Format = 13
27
+ }
28
+ /**
29
+ * Primitive data types for ECProperties.
30
+ * @beta
31
+ */
32
+ export declare enum PrimitiveType {
33
+ Uninitialized = 0,
34
+ Binary = 257,
35
+ Boolean = 513,
36
+ DateTime = 769,
37
+ Double = 1025,
38
+ Integer = 1281,
39
+ Long = 1537,
40
+ Point2d = 1793,
41
+ Point3d = 2049,
42
+ String = 2305,
43
+ IGeometry = 2561
44
+ }
45
+ /**
46
+ * Defines the valid CustomAttribute container types.
47
+ * @beta
48
+ */
49
+ export declare enum CustomAttributeContainerType {
50
+ Schema = 1,
51
+ EntityClass = 2,
52
+ CustomAttributeClass = 4,
53
+ StructClass = 8,
54
+ RelationshipClass = 16,
55
+ AnyClass = 30,
56
+ PrimitiveProperty = 32,
57
+ StructProperty = 64,
58
+ PrimitiveArrayProperty = 128,
59
+ StructArrayProperty = 256,
60
+ NavigationProperty = 512,
61
+ AnyProperty = 992,
62
+ SourceRelationshipConstraint = 1024,
63
+ TargetRelationshipConstraint = 2048,
64
+ AnyRelationshipConstraint = 3072,
65
+ Any = 4095
66
+ }
67
+ /**
68
+ * Defines what sort of match should be used when locating a schema.
69
+ * @beta
70
+ */
71
+ export declare enum SchemaMatchType {
72
+ Identical = 0,
73
+ Exact = 1,
74
+ LatestWriteCompatible = 2,
75
+ Latest = 3,
76
+ LatestReadCompatible = 4
77
+ }
78
+ /**
79
+ * Identifer for an ECRelationshipConstraint. Used to determine the side of the relationship the constraint is representing.
80
+ * @beta
81
+ */
82
+ export declare enum RelationshipEnd {
83
+ Source = 0,
84
+ Target = 1
85
+ }
86
+ /** @beta */
87
+ export declare enum StrengthType {
88
+ Referencing = 0,
89
+ Holding = 1,
90
+ Embedding = 2
91
+ }
92
+ /** @beta */
93
+ export declare enum StrengthDirection {
94
+ Forward = 1,
95
+ Backward = 2
96
+ }
97
+ /**
98
+ * Parses the provided string into an ECClassModifier if the string is a valid modifier.
99
+ * @param modifier The modifier string to parse.
100
+ * @beta
101
+ */
102
+ export declare function parseClassModifier(modifier: string): ECClassModifier | undefined;
103
+ /**
104
+ * @return A string representing the provided ECClassModifier. If the modifier is not valid, an empty string is returned.
105
+ * @beta
106
+ */
107
+ export declare function classModifierToString(modifier: ECClassModifier): string;
108
+ /**
109
+ * Tries to parse the given string as one of the 8 schema item types.
110
+ * @param type The schema item type string to parse.
111
+ * @returns A valid SchemaItemType if successfully parsed. Otherwise, undefined if the provided string is not a valid SchemaItemType.
112
+ * @beta
113
+ */
114
+ export declare function parseSchemaItemType(type: string): SchemaItemType | undefined;
115
+ /**
116
+ * Converts a valid SchemaItemType to a display string.
117
+ * @param value The SchemaItemType to stringify.
118
+ * @return A string representing the provided SchemaItemType. If the type is not valid, an empty string is returned.
119
+ * @beta
120
+ */
121
+ export declare function schemaItemTypeToString(value: SchemaItemType): string;
122
+ /** @internal */
123
+ export declare function schemaItemTypeToXmlString(value: SchemaItemType): string;
124
+ /**
125
+ * Tries to parse the given string as one of the 10 primitive types.
126
+ * @param type The primitive type string to parse.
127
+ * @returns A valid PrimitiveType if successfully parsed, or undefined if the provided string is not a valid PrimitiveType.
128
+ * @beta
129
+ */
130
+ export declare function parsePrimitiveType(type: string): PrimitiveType | undefined;
131
+ /** @beta */
132
+ export declare function primitiveTypeToString(type: PrimitiveType): string;
133
+ /**
134
+ * Parses the given string into the appropriate CustomAttributeContainerType if the string is valid.
135
+ * @param type The container type string to parse.
136
+ * @beta
137
+ */
138
+ export declare function parseCustomAttributeContainerType(type: string): CustomAttributeContainerType | undefined;
139
+ /**
140
+ * Creates a string representing a valid CustomAttributeContainerType.
141
+ * @param value The CustomAttributeContainerType to stringify.
142
+ * @return A string representing the provided CustomAttributeContainerType. If the type is not valid, an empty string is returned.
143
+ * @beta
144
+ */
145
+ export declare function containerTypeToString(type: CustomAttributeContainerType): string;
146
+ /** @beta */
147
+ export declare function parseRelationshipEnd(end: string): RelationshipEnd | undefined;
148
+ /** @beta */
149
+ export declare function relationshipEndToString(end: RelationshipEnd): string;
150
+ /**
151
+ * Takes a string representing a StrengthType, will parse it and return the corresponding StrengthType.
152
+ * @throws ECObjectsStatus.InvalidStrength if the provided string that is not valid
153
+ * @param strength
154
+ * @beta
155
+ */
156
+ export declare function parseStrength(strength: string): StrengthType | undefined;
157
+ /** @beta */
158
+ export declare function strengthToString(strength: StrengthType): string;
159
+ /** @beta */
160
+ export declare function parseStrengthDirection(direction: string): StrengthDirection | undefined;
161
+ /** @beta */
162
+ export declare function strengthDirectionToString(direction: StrengthDirection): string;
163
163
  //# sourceMappingURL=ECObjects.d.ts.map