@itwin/ecschema-metadata 4.8.0-dev.9 → 4.9.0-dev.1
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.
- package/CHANGELOG.md +36 -1
- package/lib/cjs/Constants.js.map +1 -1
- package/lib/cjs/DelayedPromise.js.map +1 -1
- package/lib/cjs/Deserialization/AbstractParser.js.map +1 -1
- package/lib/cjs/Deserialization/Helper.js.map +1 -1
- package/lib/cjs/Deserialization/JsonParser.js.map +1 -1
- package/lib/cjs/Deserialization/JsonProps.d.ts +4 -0
- package/lib/cjs/Deserialization/JsonProps.d.ts.map +1 -1
- package/lib/cjs/Deserialization/JsonProps.js.map +1 -1
- package/lib/cjs/Deserialization/SchemaGraphUtil.js.map +1 -1
- package/lib/cjs/Deserialization/XmlParser.js.map +1 -1
- package/lib/cjs/Deserialization/XmlSerializationUtils.js.map +1 -1
- package/lib/cjs/ECName.js.map +1 -1
- package/lib/cjs/ECObjects.js.map +1 -1
- package/lib/cjs/Exception.js.map +1 -1
- package/lib/cjs/Interfaces.js.map +1 -1
- package/lib/cjs/Metadata/Class.d.ts +0 -6
- package/lib/cjs/Metadata/Class.d.ts.map +1 -1
- package/lib/cjs/Metadata/Class.js +0 -8
- package/lib/cjs/Metadata/Class.js.map +1 -1
- package/lib/cjs/Metadata/Constant.js.map +1 -1
- package/lib/cjs/Metadata/CustomAttribute.js.map +1 -1
- package/lib/cjs/Metadata/CustomAttributeClass.d.ts +7 -3
- package/lib/cjs/Metadata/CustomAttributeClass.d.ts.map +1 -1
- package/lib/cjs/Metadata/CustomAttributeClass.js +16 -10
- package/lib/cjs/Metadata/CustomAttributeClass.js.map +1 -1
- package/lib/cjs/Metadata/EntityClass.js.map +1 -1
- package/lib/cjs/Metadata/Enumeration.js.map +1 -1
- package/lib/cjs/Metadata/Format.js.map +1 -1
- package/lib/cjs/Metadata/InvertedUnit.js.map +1 -1
- package/lib/cjs/Metadata/KindOfQuantity.js.map +1 -1
- package/lib/cjs/Metadata/Mixin.js.map +1 -1
- package/lib/cjs/Metadata/OverrideFormat.d.ts.map +1 -1
- package/lib/cjs/Metadata/OverrideFormat.js +3 -1
- package/lib/cjs/Metadata/OverrideFormat.js.map +1 -1
- package/lib/cjs/Metadata/Phenomenon.js.map +1 -1
- package/lib/cjs/Metadata/Property.js.map +1 -1
- package/lib/cjs/Metadata/PropertyCategory.js.map +1 -1
- package/lib/cjs/Metadata/RelationshipClass.js.map +1 -1
- package/lib/cjs/Metadata/Schema.d.ts +14 -0
- package/lib/cjs/Metadata/Schema.d.ts.map +1 -1
- package/lib/cjs/Metadata/Schema.js +21 -0
- package/lib/cjs/Metadata/Schema.js.map +1 -1
- package/lib/cjs/Metadata/SchemaItem.d.ts +5 -0
- package/lib/cjs/Metadata/SchemaItem.d.ts.map +1 -1
- package/lib/cjs/Metadata/SchemaItem.js +7 -0
- package/lib/cjs/Metadata/SchemaItem.js.map +1 -1
- package/lib/cjs/Metadata/UnitSystem.js.map +1 -1
- package/lib/cjs/PropertyTypes.js.map +1 -1
- package/lib/cjs/SchemaJsonLocater.js.map +1 -1
- package/lib/cjs/SchemaKey.js.map +1 -1
- package/lib/cjs/SchemaLoader.js.map +1 -1
- package/lib/cjs/SchemaPartVisitorDelegate.js.map +1 -1
- package/lib/cjs/UnitConversion/Graph.js.map +1 -1
- package/lib/cjs/UnitConversion/Parser.js.map +1 -1
- package/lib/cjs/UnitConversion/UnitConversion.js.map +1 -1
- package/lib/cjs/UnitConversion/UnitConverter.js.map +1 -1
- package/lib/cjs/UnitConversion/UnitTree.js.map +1 -1
- package/lib/cjs/UnitProvider/SchemaUnitProvider.js.map +1 -1
- package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
- package/lib/cjs/ecschema-metadata.js.map +1 -1
- package/lib/cjs/utils/SchemaGraph.js.map +1 -1
- package/lib/esm/Constants.d.ts +24 -0
- package/lib/esm/Constants.d.ts.map +1 -0
- package/lib/esm/Constants.js +30 -0
- package/lib/esm/Constants.js.map +1 -0
- package/lib/esm/Context.d.ts +219 -0
- package/lib/esm/Context.d.ts.map +1 -0
- package/lib/esm/Context.js +321 -0
- package/lib/esm/Context.js.map +1 -0
- package/lib/esm/DelayedPromise.d.ts +89 -0
- package/lib/esm/DelayedPromise.d.ts.map +1 -0
- package/lib/esm/DelayedPromise.js +88 -0
- package/lib/esm/DelayedPromise.js.map +1 -0
- package/lib/esm/Deserialization/AbstractParser.d.ts +46 -0
- package/lib/esm/Deserialization/AbstractParser.d.ts.map +1 -0
- package/lib/esm/Deserialization/AbstractParser.js +8 -0
- package/lib/esm/Deserialization/AbstractParser.js.map +1 -0
- package/lib/esm/Deserialization/Helper.d.ts +263 -0
- package/lib/esm/Deserialization/Helper.d.ts.map +1 -0
- package/lib/esm/Deserialization/Helper.js +871 -0
- package/lib/esm/Deserialization/Helper.js.map +1 -0
- package/lib/esm/Deserialization/JsonParser.d.ts +166 -0
- package/lib/esm/Deserialization/JsonParser.d.ts.map +1 -0
- package/lib/esm/Deserialization/JsonParser.js +677 -0
- package/lib/esm/Deserialization/JsonParser.js.map +1 -0
- package/lib/esm/Deserialization/JsonProps.d.ts +273 -0
- package/lib/esm/Deserialization/JsonProps.d.ts.map +1 -0
- package/lib/esm/Deserialization/JsonProps.js +9 -0
- package/lib/esm/Deserialization/JsonProps.js.map +1 -0
- package/lib/esm/Deserialization/SchemaGraphUtil.d.ts +35 -0
- package/lib/esm/Deserialization/SchemaGraphUtil.d.ts.map +1 -0
- package/lib/esm/Deserialization/SchemaGraphUtil.js +74 -0
- package/lib/esm/Deserialization/SchemaGraphUtil.js.map +1 -0
- package/lib/esm/Deserialization/XmlParser.d.ts +86 -0
- package/lib/esm/Deserialization/XmlParser.d.ts.map +1 -0
- package/lib/esm/Deserialization/XmlParser.js +970 -0
- package/lib/esm/Deserialization/XmlParser.js.map +1 -0
- package/lib/esm/Deserialization/XmlSerializationUtils.d.ts +55 -0
- package/lib/esm/Deserialization/XmlSerializationUtils.d.ts.map +1 -0
- package/lib/esm/Deserialization/XmlSerializationUtils.js +172 -0
- package/lib/esm/Deserialization/XmlSerializationUtils.js.map +1 -0
- package/lib/esm/ECName.d.ts +31 -0
- package/lib/esm/ECName.d.ts.map +1 -0
- package/lib/esm/ECName.js +82 -0
- package/lib/esm/ECName.js.map +1 -0
- package/lib/esm/ECObjects.d.ts +166 -0
- package/lib/esm/ECObjects.d.ts.map +1 -0
- package/lib/esm/ECObjects.js +422 -0
- package/lib/esm/ECObjects.js.map +1 -0
- package/lib/esm/Exception.d.ts +45 -0
- package/lib/esm/Exception.d.ts.map +1 -0
- package/lib/esm/Exception.js +82 -0
- package/lib/esm/Exception.js.map +1 -0
- package/lib/esm/Interfaces.d.ts +79 -0
- package/lib/esm/Interfaces.d.ts.map +1 -0
- package/lib/esm/Interfaces.js +9 -0
- package/lib/esm/Interfaces.js.map +1 -0
- package/lib/esm/Metadata/Class.d.ts +245 -0
- package/lib/esm/Metadata/Class.d.ts.map +1 -0
- package/lib/esm/Metadata/Class.js +552 -0
- package/lib/esm/Metadata/Class.js.map +1 -0
- package/lib/esm/Metadata/Constant.d.ts +65 -0
- package/lib/esm/Metadata/Constant.d.ts.map +1 -0
- package/lib/esm/Metadata/Constant.js +119 -0
- package/lib/esm/Metadata/Constant.js.map +1 -0
- package/lib/esm/Metadata/CustomAttribute.d.ts +24 -0
- package/lib/esm/Metadata/CustomAttribute.d.ts.map +1 -0
- package/lib/esm/Metadata/CustomAttribute.js +24 -0
- package/lib/esm/Metadata/CustomAttribute.js.map +1 -0
- package/lib/esm/Metadata/CustomAttributeClass.d.ts +44 -0
- package/lib/esm/Metadata/CustomAttributeClass.d.ts.map +1 -0
- package/lib/esm/Metadata/CustomAttributeClass.js +70 -0
- package/lib/esm/Metadata/CustomAttributeClass.js.map +1 -0
- package/lib/esm/Metadata/EntityClass.d.ts +78 -0
- package/lib/esm/Metadata/EntityClass.d.ts.map +1 -0
- package/lib/esm/Metadata/EntityClass.js +224 -0
- package/lib/esm/Metadata/EntityClass.js.map +1 -0
- package/lib/esm/Metadata/Enumeration.d.ts +87 -0
- package/lib/esm/Metadata/Enumeration.d.ts.map +1 -0
- package/lib/esm/Metadata/Enumeration.js +155 -0
- package/lib/esm/Metadata/Enumeration.js.map +1 -0
- package/lib/esm/Metadata/Format.d.ts +99 -0
- package/lib/esm/Metadata/Format.d.ts.map +1 -0
- package/lib/esm/Metadata/Format.js +238 -0
- package/lib/esm/Metadata/Format.js.map +1 -0
- package/lib/esm/Metadata/InvertedUnit.d.ts +50 -0
- package/lib/esm/Metadata/InvertedUnit.d.ts.map +1 -0
- package/lib/esm/Metadata/InvertedUnit.js +93 -0
- package/lib/esm/Metadata/InvertedUnit.js.map +1 -0
- package/lib/esm/Metadata/KindOfQuantity.d.ts +72 -0
- package/lib/esm/Metadata/KindOfQuantity.d.ts.map +1 -0
- package/lib/esm/Metadata/KindOfQuantity.js +229 -0
- package/lib/esm/Metadata/KindOfQuantity.js.map +1 -0
- package/lib/esm/Metadata/Mixin.d.ts +55 -0
- package/lib/esm/Metadata/Mixin.d.ts.map +1 -0
- package/lib/esm/Metadata/Mixin.js +109 -0
- package/lib/esm/Metadata/Mixin.js.map +1 -0
- package/lib/esm/Metadata/OverrideFormat.d.ts +68 -0
- package/lib/esm/Metadata/OverrideFormat.d.ts.map +1 -0
- package/lib/esm/Metadata/OverrideFormat.js +124 -0
- package/lib/esm/Metadata/OverrideFormat.js.map +1 -0
- package/lib/esm/Metadata/Phenomenon.d.ts +34 -0
- package/lib/esm/Metadata/Phenomenon.d.ts.map +1 -0
- package/lib/esm/Metadata/Phenomenon.js +55 -0
- package/lib/esm/Metadata/Phenomenon.js.map +1 -0
- package/lib/esm/Metadata/Property.d.ts +247 -0
- package/lib/esm/Metadata/Property.d.ts.map +1 -0
- package/lib/esm/Metadata/Property.js +565 -0
- package/lib/esm/Metadata/Property.js.map +1 -0
- package/lib/esm/Metadata/PropertyCategory.d.ts +40 -0
- package/lib/esm/Metadata/PropertyCategory.d.ts.map +1 -0
- package/lib/esm/Metadata/PropertyCategory.js +57 -0
- package/lib/esm/Metadata/PropertyCategory.js.map +1 -0
- package/lib/esm/Metadata/RelationshipClass.d.ts +170 -0
- package/lib/esm/Metadata/RelationshipClass.d.ts.map +1 -0
- package/lib/esm/Metadata/RelationshipClass.js +380 -0
- package/lib/esm/Metadata/RelationshipClass.js.map +1 -0
- package/lib/esm/Metadata/Schema.d.ts +330 -0
- package/lib/esm/Metadata/Schema.d.ts.map +1 -0
- package/lib/esm/Metadata/Schema.js +570 -0
- package/lib/esm/Metadata/Schema.js.map +1 -0
- package/lib/esm/Metadata/SchemaItem.d.ts +67 -0
- package/lib/esm/Metadata/SchemaItem.d.ts.map +1 -0
- package/lib/esm/Metadata/SchemaItem.js +140 -0
- package/lib/esm/Metadata/SchemaItem.js.map +1 -0
- package/lib/esm/Metadata/Unit.d.ts +77 -0
- package/lib/esm/Metadata/Unit.d.ts.map +1 -0
- package/lib/esm/Metadata/Unit.js +158 -0
- package/lib/esm/Metadata/Unit.js.map +1 -0
- package/lib/esm/Metadata/UnitSystem.d.ts +21 -0
- package/lib/esm/Metadata/UnitSystem.d.ts.map +1 -0
- package/lib/esm/Metadata/UnitSystem.js +25 -0
- package/lib/esm/Metadata/UnitSystem.js.map +1 -0
- package/lib/esm/PropertyTypes.d.ts +50 -0
- package/lib/esm/PropertyTypes.d.ts.map +1 -0
- package/lib/esm/PropertyTypes.js +88 -0
- package/lib/esm/PropertyTypes.js.map +1 -0
- package/lib/esm/SchemaJsonLocater.d.ts +42 -0
- package/lib/esm/SchemaJsonLocater.d.ts.map +1 -0
- package/lib/esm/SchemaJsonLocater.js +54 -0
- package/lib/esm/SchemaJsonLocater.js.map +1 -0
- package/lib/esm/SchemaKey.d.ts +111 -0
- package/lib/esm/SchemaKey.d.ts.map +1 -0
- package/lib/esm/SchemaKey.js +214 -0
- package/lib/esm/SchemaKey.js.map +1 -0
- package/lib/esm/SchemaLoader.d.ts +32 -0
- package/lib/esm/SchemaLoader.d.ts.map +1 -0
- package/lib/esm/SchemaLoader.js +53 -0
- package/lib/esm/SchemaLoader.js.map +1 -0
- package/lib/esm/SchemaPartVisitorDelegate.d.ts +275 -0
- package/lib/esm/SchemaPartVisitorDelegate.d.ts.map +1 -0
- package/lib/esm/SchemaPartVisitorDelegate.js +209 -0
- package/lib/esm/SchemaPartVisitorDelegate.js.map +1 -0
- package/lib/esm/UnitConversion/Graph.d.ts +35 -0
- package/lib/esm/UnitConversion/Graph.d.ts.map +1 -0
- package/lib/esm/UnitConversion/Graph.js +80 -0
- package/lib/esm/UnitConversion/Graph.js.map +1 -0
- package/lib/esm/UnitConversion/Parser.d.ts +9 -0
- package/lib/esm/UnitConversion/Parser.d.ts.map +1 -0
- package/lib/esm/UnitConversion/Parser.js +39 -0
- package/lib/esm/UnitConversion/Parser.js.map +1 -0
- package/lib/esm/UnitConversion/UnitConversion.d.ts +46 -0
- package/lib/esm/UnitConversion/UnitConversion.d.ts.map +1 -0
- package/lib/esm/UnitConversion/UnitConversion.js +74 -0
- package/lib/esm/UnitConversion/UnitConversion.js.map +1 -0
- package/lib/esm/UnitConversion/UnitConverter.d.ts +40 -0
- package/lib/esm/UnitConversion/UnitConverter.d.ts.map +1 -0
- package/lib/esm/UnitConversion/UnitConverter.js +113 -0
- package/lib/esm/UnitConversion/UnitConverter.js.map +1 -0
- package/lib/esm/UnitConversion/UnitTree.d.ts +44 -0
- package/lib/esm/UnitConversion/UnitTree.d.ts.map +1 -0
- package/lib/esm/UnitConversion/UnitTree.js +165 -0
- package/lib/esm/UnitConversion/UnitTree.js.map +1 -0
- package/lib/esm/UnitProvider/SchemaUnitProvider.d.ts +78 -0
- package/lib/esm/UnitProvider/SchemaUnitProvider.d.ts.map +1 -0
- package/lib/esm/UnitProvider/SchemaUnitProvider.js +231 -0
- package/lib/esm/UnitProvider/SchemaUnitProvider.js.map +1 -0
- package/lib/esm/Validation/SchemaWalker.d.ts +24 -0
- package/lib/esm/Validation/SchemaWalker.d.ts.map +1 -0
- package/lib/esm/Validation/SchemaWalker.js +50 -0
- package/lib/esm/Validation/SchemaWalker.js.map +1 -0
- package/lib/esm/ecschema-metadata.d.ts +52 -0
- package/lib/esm/ecschema-metadata.d.ts.map +1 -0
- package/lib/esm/ecschema-metadata.js +55 -0
- package/lib/esm/ecschema-metadata.js.map +1 -0
- package/lib/esm/utils/SchemaGraph.d.ts +44 -0
- package/lib/esm/utils/SchemaGraph.d.ts.map +1 -0
- package/lib/esm/utils/SchemaGraph.js +111 -0
- package/lib/esm/utils/SchemaGraph.js.map +1 -0
- package/package.json +9 -7
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Metadata
|
|
7
|
+
*/
|
|
8
|
+
import { XmlSerializationUtils } from "../Deserialization/XmlSerializationUtils";
|
|
9
|
+
import { SchemaItemType } from "../ECObjects";
|
|
10
|
+
/**
|
|
11
|
+
* Overrides of a Format, from a Schema, and is SchemaItem that is used specifically on KindOfQuantity.
|
|
12
|
+
* @beta
|
|
13
|
+
*/
|
|
14
|
+
export class OverrideFormat {
|
|
15
|
+
constructor(parent, precision, unitAndLabels) {
|
|
16
|
+
this.parent = parent;
|
|
17
|
+
this.name = OverrideFormat.createOverrideFormatFullName(parent, precision, unitAndLabels);
|
|
18
|
+
this._precision = precision;
|
|
19
|
+
this._units = unitAndLabels;
|
|
20
|
+
}
|
|
21
|
+
// Properties that can be overriden
|
|
22
|
+
get precision() { return (undefined === this._precision) ? this.parent.precision : this._precision; }
|
|
23
|
+
get units() { return (undefined === this._units) ? this.parent.units : this._units; }
|
|
24
|
+
// Properties that cannot be overriden
|
|
25
|
+
get fullName() { return this.name; }
|
|
26
|
+
get roundFactor() { return this.parent.roundFactor; }
|
|
27
|
+
get type() { return this.parent.type; }
|
|
28
|
+
get minWidth() { return this.parent.minWidth; }
|
|
29
|
+
get scientificType() { return this.parent.scientificType; }
|
|
30
|
+
get showSignOption() { return this.parent.showSignOption; }
|
|
31
|
+
get decimalSeparator() { return this.parent.decimalSeparator; }
|
|
32
|
+
get thousandSeparator() { return this.parent.thousandSeparator; }
|
|
33
|
+
get uomSeparator() { return this.parent.uomSeparator; }
|
|
34
|
+
get stationSeparator() { return this.parent.stationSeparator; }
|
|
35
|
+
get stationOffsetSize() { return this.parent.stationOffsetSize; }
|
|
36
|
+
get formatTraits() { return this.parent.formatTraits; }
|
|
37
|
+
get spacer() { return this.parent.spacer; }
|
|
38
|
+
get includeZero() { return this.parent.includeZero; }
|
|
39
|
+
hasFormatTrait(formatTrait) {
|
|
40
|
+
return (this.parent.formatTraits & formatTrait) === formatTrait;
|
|
41
|
+
}
|
|
42
|
+
/** Returns the format string of this override in the Xml full name format.
|
|
43
|
+
* @alpha
|
|
44
|
+
*/
|
|
45
|
+
fullNameXml(koqSchema) {
|
|
46
|
+
let fullName = XmlSerializationUtils.createXmlTypedName(koqSchema, this.parent.schema, this.parent.name);
|
|
47
|
+
if (undefined !== this.precision)
|
|
48
|
+
fullName += `(${this.precision.toString()})`;
|
|
49
|
+
if (undefined === this._units)
|
|
50
|
+
return fullName;
|
|
51
|
+
for (const [unit, unitLabel] of this._units) {
|
|
52
|
+
fullName += "[";
|
|
53
|
+
fullName += XmlSerializationUtils.createXmlTypedName(koqSchema, unit.schema, unit.name);
|
|
54
|
+
if (unitLabel !== undefined)
|
|
55
|
+
fullName += `|${unitLabel}`;
|
|
56
|
+
fullName += `]`;
|
|
57
|
+
}
|
|
58
|
+
return fullName;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Creates a valid OverrideFormat fullName from the parent Format and overridden units.
|
|
62
|
+
* @param parent The parent Format.
|
|
63
|
+
* @param unitAndLabels The overridden unit and labels collection.
|
|
64
|
+
*/
|
|
65
|
+
static createOverrideFormatFullName(parent, precision, unitAndLabels) {
|
|
66
|
+
let fullName = parent.fullName;
|
|
67
|
+
if (precision)
|
|
68
|
+
fullName += `(${precision.toString()})`;
|
|
69
|
+
if (undefined === unitAndLabels)
|
|
70
|
+
return fullName;
|
|
71
|
+
for (const [unit, unitLabel] of unitAndLabels)
|
|
72
|
+
if (undefined === unitLabel)
|
|
73
|
+
fullName += `[${unit.fullName}]`;
|
|
74
|
+
else
|
|
75
|
+
fullName += `[${unit.fullName}|${unitLabel}]`;
|
|
76
|
+
return fullName;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
static isOverrideFormat(object) {
|
|
82
|
+
const overrideFormat = object;
|
|
83
|
+
return overrideFormat !== undefined && overrideFormat.name !== undefined && overrideFormat.parent !== undefined && overrideFormat.parent.schemaItemType === SchemaItemType.Format;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Returns a JSON object that contains the specification for the OverrideFormat where the precision and units properties have been overriden.
|
|
87
|
+
* If the precision and/or units properties have been overriden, the returned object will contain a "name" and a "parent" property.
|
|
88
|
+
* The "name" property identifies the OverrideFormat object itself and the "parent" property identifies the Format that has been overriden.
|
|
89
|
+
* This method is not intended for complete serialization as it does not serialize any of the schema item properties.
|
|
90
|
+
*/
|
|
91
|
+
getFormatProps() {
|
|
92
|
+
const formatJson = this.parent.toJSON();
|
|
93
|
+
if (this.parent.fullName !== this.fullName) {
|
|
94
|
+
// Update name and parent properties to distinguish it from parent Format
|
|
95
|
+
formatJson.name = this.fullName;
|
|
96
|
+
formatJson.parent = this.parent.fullName;
|
|
97
|
+
}
|
|
98
|
+
// Update Precision overriden property
|
|
99
|
+
formatJson.precision = this.precision;
|
|
100
|
+
if (this.units !== undefined) {
|
|
101
|
+
// Update Units overriden property
|
|
102
|
+
const units = [];
|
|
103
|
+
for (const unit of this.units) {
|
|
104
|
+
units.push({
|
|
105
|
+
name: unit[0].fullName,
|
|
106
|
+
label: unit[1],
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
formatJson.composite = {
|
|
110
|
+
spacer: (this.spacer !== " ") ? this.spacer : undefined,
|
|
111
|
+
includeZero: (this.includeZero === false) ? this.includeZero : undefined,
|
|
112
|
+
units,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
return formatJson;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* @internal
|
|
120
|
+
*/
|
|
121
|
+
export function getFormatProps(format) {
|
|
122
|
+
return OverrideFormat.isOverrideFormat(format) ? format.getFormatProps() : format.toJSON();
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=OverrideFormat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverrideFormat.js","sourceRoot":"","sources":["../../../src/Metadata/OverrideFormat.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAS9C;;;GAGG;AACH,MAAM,OAAO,cAAc;IAazB,YAAY,MAAc,EAAE,SAAkD,EAAE,aAAgE;QAC9I,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC,4BAA4B,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QAC1F,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC;IAC9B,CAAC;IAED,mCAAmC;IACnC,IAAW,SAAS,KAA6C,OAAO,CAAC,SAAS,KAAK,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IACp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YACL,CAAC;YAED,UAAU,CAAC,SAAS,GAAG;gBACrB,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;gBACvD,WAAW,EAAE,CAAC,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;gBACxE,KAAK;aACN,CAAC;QACJ,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,MAA+B;IAC5D,OAAO,cAAc,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;AAC7F,CAAC","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 { XmlSerializationUtils } from \"../Deserialization/XmlSerializationUtils\";\r\nimport { SchemaItemType } from \"../ECObjects\";\r\nimport { DecimalPrecision, FormatProps, FormatTraits, FormatType, FractionalPrecision, ScientificType, ShowSignOption } from \"@itwin/core-quantity\";\r\nimport { Format } from \"./Format\";\r\nimport { InvertedUnit } from \"./InvertedUnit\";\r\nimport { Schema } from \"./Schema\";\r\nimport { SchemaItemOverrideFormatProps } from \"../Deserialization/JsonProps\";\r\nimport { Unit } from \"./Unit\";\r\nimport { Mutable } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * Overrides of a Format, from a Schema, and is SchemaItem that is used specifically on KindOfQuantity.\r\n * @beta\r\n */\r\nexport class OverrideFormat {\r\n private _precision?: DecimalPrecision | FractionalPrecision;\r\n private _units?: Array<[Unit | InvertedUnit, string | undefined]>;\r\n\r\n /** The Format that this OverrideFormat is extending */\r\n public readonly parent: Format;\r\n\r\n /** The name of this OverrideFormat.\r\n *\r\n * This should be set to the [FormatString]($docs/bis/ec/kindofquantity/#format-string) which represents the format override.\r\n */\r\n public readonly name: string;\r\n\r\n constructor(parent: Format, precision?: DecimalPrecision | FractionalPrecision, unitAndLabels?: Array<[Unit | InvertedUnit, string | undefined]>) {\r\n this.parent = parent;\r\n this.name = OverrideFormat.createOverrideFormatFullName(parent, precision, unitAndLabels);\r\n this._precision = precision;\r\n this._units = unitAndLabels;\r\n }\r\n\r\n // Properties that can be overriden\r\n public get precision(): DecimalPrecision | FractionalPrecision { return (undefined === this._precision) ? this.parent.precision : this._precision; }\r\n public get units() { return (undefined === this._units) ? this.parent.units : this._units; }\r\n\r\n // Properties that cannot be overriden\r\n public get fullName(): string { return this.name; }\r\n public get roundFactor(): number { return this.parent.roundFactor; }\r\n public get type(): FormatType { return this.parent.type; }\r\n public get minWidth(): number | undefined { return this.parent.minWidth; }\r\n public get scientificType(): ScientificType | undefined { return this.parent.scientificType; }\r\n public get showSignOption(): ShowSignOption { return this.parent.showSignOption; }\r\n public get decimalSeparator(): string { return this.parent.decimalSeparator; }\r\n public get thousandSeparator(): string { return this.parent.thousandSeparator; }\r\n public get uomSeparator(): string { return this.parent.uomSeparator; }\r\n public get stationSeparator(): string { return this.parent.stationSeparator; }\r\n public get stationOffsetSize(): number | undefined { return this.parent.stationOffsetSize; }\r\n public get formatTraits(): FormatTraits { return this.parent.formatTraits; }\r\n public get spacer(): string | undefined { return this.parent.spacer; }\r\n public get includeZero(): boolean | undefined { return this.parent.includeZero; }\r\n\r\n public hasFormatTrait(formatTrait: FormatTraits) {\r\n return (this.parent.formatTraits & formatTrait) === formatTrait;\r\n }\r\n\r\n /** Returns the format string of this override in the Xml full name format.\r\n * @alpha\r\n */\r\n public fullNameXml(koqSchema: Schema): string {\r\n let fullName = XmlSerializationUtils.createXmlTypedName(koqSchema, this.parent.schema, this.parent.name);\r\n\r\n if (undefined !== this.precision)\r\n fullName += `(${this.precision.toString()})`;\r\n\r\n if (undefined === this._units)\r\n return fullName;\r\n for (const [unit, unitLabel] of this._units) {\r\n fullName += \"[\";\r\n fullName += XmlSerializationUtils.createXmlTypedName(koqSchema, unit.schema, unit.name);\r\n if (unitLabel !== undefined)\r\n fullName += `|${unitLabel}`;\r\n fullName += `]`;\r\n }\r\n return fullName;\r\n }\r\n\r\n /**\r\n * Creates a valid OverrideFormat fullName from the parent Format and overridden units.\r\n * @param parent The parent Format.\r\n * @param unitAndLabels The overridden unit and labels collection.\r\n */\r\n public static createOverrideFormatFullName(parent: Format, precision?: DecimalPrecision | FractionalPrecision, unitAndLabels?: Array<[Unit | InvertedUnit, string | undefined]>): string {\r\n let fullName = parent.fullName;\r\n\r\n if (precision)\r\n fullName += `(${precision.toString()})`;\r\n\r\n if (undefined === unitAndLabels)\r\n return fullName;\r\n for (const [unit, unitLabel] of unitAndLabels)\r\n if (undefined === unitLabel)\r\n fullName += `[${unit.fullName}]`;\r\n else\r\n fullName += `[${unit.fullName}|${unitLabel}]`;\r\n return fullName;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public static isOverrideFormat(object: any): object is OverrideFormat {\r\n const overrideFormat = object as OverrideFormat;\r\n\r\n return overrideFormat !== undefined && overrideFormat.name !== undefined && overrideFormat.parent !== undefined && overrideFormat.parent.schemaItemType === SchemaItemType.Format;\r\n }\r\n\r\n /**\r\n * Returns a JSON object that contains the specification for the OverrideFormat where the precision and units properties have been overriden.\r\n * If the precision and/or units properties have been overriden, the returned object will contain a \"name\" and a \"parent\" property.\r\n * The \"name\" property identifies the OverrideFormat object itself and the \"parent\" property identifies the Format that has been overriden.\r\n * This method is not intended for complete serialization as it does not serialize any of the schema item properties.\r\n */\r\n public getFormatProps(): SchemaItemOverrideFormatProps {\r\n const formatJson = this.parent.toJSON() as Mutable<SchemaItemOverrideFormatProps>;\r\n\r\n if (this.parent.fullName !== this.fullName) {\r\n // Update name and parent properties to distinguish it from parent Format\r\n formatJson.name = this.fullName;\r\n formatJson.parent = this.parent.fullName;\r\n }\r\n\r\n // Update Precision overriden property\r\n formatJson.precision = this.precision;\r\n\r\n if (this.units !== undefined) {\r\n // Update Units overriden property\r\n const units = [];\r\n for (const unit of this.units) {\r\n units.push({\r\n name: unit[0].fullName,\r\n label: unit[1],\r\n });\r\n }\r\n\r\n formatJson.composite = {\r\n spacer: (this.spacer !== \" \") ? this.spacer : undefined,\r\n includeZero: (this.includeZero === false) ? this.includeZero : undefined,\r\n units,\r\n };\r\n }\r\n\r\n return formatJson;\r\n }\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function getFormatProps(format: Format | OverrideFormat): FormatProps {\r\n return OverrideFormat.isOverrideFormat(format) ? format.getFormatProps() : format.toJSON();\r\n}\r\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Metadata
|
|
3
|
+
*/
|
|
4
|
+
import { PhenomenonProps } from "../Deserialization/JsonProps";
|
|
5
|
+
import { SchemaItemType } from "../ECObjects";
|
|
6
|
+
import { Schema } from "./Schema";
|
|
7
|
+
import { SchemaItem } from "./SchemaItem";
|
|
8
|
+
/** @beta */
|
|
9
|
+
export declare class Phenomenon extends SchemaItem {
|
|
10
|
+
readonly schemaItemType: SchemaItemType.Phenomenon;
|
|
11
|
+
protected _definition: string;
|
|
12
|
+
constructor(schema: Schema, name: string);
|
|
13
|
+
get definition(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Save this Phenomenon's properties to an object for serializing to JSON.
|
|
16
|
+
* @param standalone Serialization includes only this object (as opposed to the full schema).
|
|
17
|
+
* @param includeSchemaVersion Include the Schema's version information in the serialized object.
|
|
18
|
+
*/
|
|
19
|
+
toJSON(standalone?: boolean, includeSchemaVersion?: boolean): PhenomenonProps;
|
|
20
|
+
/** @internal */
|
|
21
|
+
toXml(schemaXml: Document): Promise<Element>;
|
|
22
|
+
fromJSONSync(phenomenonProps: PhenomenonProps): void;
|
|
23
|
+
fromJSON(phenomenonProps: PhenomenonProps): Promise<void>;
|
|
24
|
+
protected setDefinition(definition: string): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
* An abstract class used for schema editing.
|
|
29
|
+
*/
|
|
30
|
+
export declare abstract class MutablePhenomenon extends Phenomenon {
|
|
31
|
+
abstract setDefinition(definition: string): Promise<void>;
|
|
32
|
+
abstract setDisplayLabel(displayLabel: string): void;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=Phenomenon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Phenomenon.d.ts","sourceRoot":"","sources":["../../../src/Metadata/Phenomenon.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,YAAY;AACZ,qBAAa,UAAW,SAAQ,UAAU;IACxC,SAAyB,cAAc,EAAG,cAAc,CAAC,UAAU,CAAC;IACpE,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC;gBAElB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAMxC,IAAW,UAAU,IAAI,MAAM,CAA6B;IAE5D;;;;OAIG;IACa,MAAM,CAAC,UAAU,GAAE,OAAe,EAAE,oBAAoB,GAAE,OAAe,GAAG,eAAe;IAM3G,gBAAgB;IACM,KAAK,CAAC,SAAS,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;IAMlD,YAAY,CAAC,eAAe,EAAE,eAAe;IAQvC,QAAQ,CAAC,eAAe,EAAE,eAAe;cAI/C,aAAa,CAAC,UAAU,EAAE,MAAM;CAGjD;AAED;;;GAGG;AACH,8BAAsB,iBAAkB,SAAQ,UAAU;aAC/B,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;aAChD,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;CACrE"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Metadata
|
|
7
|
+
*/
|
|
8
|
+
import { SchemaItemType } from "../ECObjects";
|
|
9
|
+
import { ECObjectsError, ECObjectsStatus } from "../Exception";
|
|
10
|
+
import { SchemaItem } from "./SchemaItem";
|
|
11
|
+
/** @beta */
|
|
12
|
+
export class Phenomenon extends SchemaItem {
|
|
13
|
+
constructor(schema, name) {
|
|
14
|
+
super(schema, name);
|
|
15
|
+
this.schemaItemType = SchemaItemType.Phenomenon;
|
|
16
|
+
this._definition = "";
|
|
17
|
+
}
|
|
18
|
+
get definition() { return this._definition; }
|
|
19
|
+
/**
|
|
20
|
+
* Save this Phenomenon's properties to an object for serializing to JSON.
|
|
21
|
+
* @param standalone Serialization includes only this object (as opposed to the full schema).
|
|
22
|
+
* @param includeSchemaVersion Include the Schema's version information in the serialized object.
|
|
23
|
+
*/
|
|
24
|
+
toJSON(standalone = false, includeSchemaVersion = false) {
|
|
25
|
+
const schemaJson = super.toJSON(standalone, includeSchemaVersion);
|
|
26
|
+
schemaJson.definition = this.definition;
|
|
27
|
+
return schemaJson;
|
|
28
|
+
}
|
|
29
|
+
/** @internal */
|
|
30
|
+
async toXml(schemaXml) {
|
|
31
|
+
const itemElement = await super.toXml(schemaXml);
|
|
32
|
+
itemElement.setAttribute("definition", this.definition);
|
|
33
|
+
return itemElement;
|
|
34
|
+
}
|
|
35
|
+
fromJSONSync(phenomenonProps) {
|
|
36
|
+
super.fromJSONSync(phenomenonProps);
|
|
37
|
+
if (this._definition !== "" && phenomenonProps.definition.toLowerCase() !== this._definition.toLowerCase())
|
|
38
|
+
throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Phenomenon ${this.name} has an invalid 'definition' attribute.`);
|
|
39
|
+
else if (this._definition === "")
|
|
40
|
+
this._definition = phenomenonProps.definition;
|
|
41
|
+
}
|
|
42
|
+
async fromJSON(phenomenonProps) {
|
|
43
|
+
this.fromJSONSync(phenomenonProps);
|
|
44
|
+
}
|
|
45
|
+
async setDefinition(definition) {
|
|
46
|
+
this._definition = definition;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
* An abstract class used for schema editing.
|
|
52
|
+
*/
|
|
53
|
+
export class MutablePhenomenon extends Phenomenon {
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=Phenomenon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Phenomenon.js","sourceRoot":"","sources":["../../../src/Metadata/Phenomenon.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,YAAY;AACZ,MAAM,OAAO,UAAW,SAAQ,UAAU;IAIxC,YAAY,MAAc,EAAE,IAAY;QACtC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACpB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC,UAAU,CAAC;QAChD,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;IACxB,CAAC;IAED,IAAW,UAAU,KAAa,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAE5D;;;;OAIG;IACa,MAAM,CAAC,aAAsB,KAAK,EAAE,uBAAgC,KAAK;QACvF,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,oBAAoB,CAAQ,CAAC;QACzE,UAAU,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACxC,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,gBAAgB;IACA,KAAK,CAAC,KAAK,CAAC,SAAmB;QAC7C,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACjD,WAAW,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACxD,OAAO,WAAW,CAAC;IACrB,CAAC;IAEe,YAAY,CAAC,eAAgC;QAC3D,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;QACpC,IAAI,IAAI,CAAC,WAAW,KAAK,EAAE,IAAI,eAAe,CAAC,UAAU,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;YACxG,MAAM,IAAI,cAAc,CAAC,eAAe,CAAC,aAAa,EAAE,kBAAkB,IAAI,CAAC,IAAI,yCAAyC,CAAC,CAAC;aAC3H,IAAI,IAAI,CAAC,WAAW,KAAK,EAAE;YAC9B,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC,UAAU,CAAC;IAClD,CAAC;IAEe,KAAK,CAAC,QAAQ,CAAC,eAAgC;QAC7D,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;IACrC,CAAC;IAES,KAAK,CAAC,aAAa,CAAC,UAAkB;QAC9C,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAChC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAgB,iBAAkB,SAAQ,UAAU;CAGzD","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 { PhenomenonProps } from \"../Deserialization/JsonProps\";\r\nimport { SchemaItemType } from \"../ECObjects\";\r\nimport { ECObjectsError, ECObjectsStatus } from \"../Exception\";\r\nimport { Schema } from \"./Schema\";\r\nimport { SchemaItem } from \"./SchemaItem\";\r\n\r\n/** @beta */\r\nexport class Phenomenon extends SchemaItem {\r\n public override readonly schemaItemType!: SchemaItemType.Phenomenon; // eslint-disable-line\r\n protected _definition: string; // Contains a combination of Phenomena names which form this Phenomenon. Each Phenomena name is separated by a * and may have an exponent, specified using parentheses\r\n\r\n constructor(schema: Schema, name: string) {\r\n super(schema, name);\r\n this.schemaItemType = SchemaItemType.Phenomenon;\r\n this._definition = \"\";\r\n }\r\n\r\n public get definition(): string { return this._definition; }\r\n\r\n /**\r\n * Save this Phenomenon's properties to an object for serializing to JSON.\r\n * @param standalone Serialization includes only this object (as opposed to the full schema).\r\n * @param includeSchemaVersion Include the Schema's version information in the serialized object.\r\n */\r\n public override toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): PhenomenonProps {\r\n const schemaJson = super.toJSON(standalone, includeSchemaVersion) as any;\r\n schemaJson.definition = this.definition;\r\n return schemaJson;\r\n }\r\n\r\n /** @internal */\r\n public override async toXml(schemaXml: Document): Promise<Element> {\r\n const itemElement = await super.toXml(schemaXml);\r\n itemElement.setAttribute(\"definition\", this.definition);\r\n return itemElement;\r\n }\r\n\r\n public override fromJSONSync(phenomenonProps: PhenomenonProps) {\r\n super.fromJSONSync(phenomenonProps);\r\n if (this._definition !== \"\" && phenomenonProps.definition.toLowerCase() !== this._definition.toLowerCase())\r\n throw new ECObjectsError(ECObjectsStatus.InvalidECJson, `The Phenomenon ${this.name} has an invalid 'definition' attribute.`);\r\n else if (this._definition === \"\")\r\n this._definition = phenomenonProps.definition;\r\n }\r\n\r\n public override async fromJSON(phenomenonProps: PhenomenonProps) {\r\n this.fromJSONSync(phenomenonProps);\r\n }\r\n\r\n protected async setDefinition(definition: string) {\r\n this._definition = definition;\r\n }\r\n}\r\n\r\n/**\r\n * @internal\r\n * An abstract class used for schema editing.\r\n */\r\nexport abstract class MutablePhenomenon extends Phenomenon {\r\n public abstract override setDefinition(definition: string): Promise<void>;\r\n public abstract override setDisplayLabel(displayLabel: string): void;\r\n}\r\n"]}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Metadata
|
|
3
|
+
*/
|
|
4
|
+
import { EnumerationPropertyProps, NavigationPropertyProps, PrimitiveArrayPropertyProps, PrimitiveOrEnumPropertyBaseProps, PrimitivePropertyProps, PropertyProps, StructPropertyProps } from "../Deserialization/JsonProps";
|
|
5
|
+
import { PrimitiveType, StrengthDirection } from "../ECObjects";
|
|
6
|
+
import { AnyClass, LazyLoadedEnumeration, LazyLoadedKindOfQuantity, LazyLoadedPropertyCategory, LazyLoadedRelationshipClass } from "../Interfaces";
|
|
7
|
+
import { PropertyType } from "../PropertyTypes";
|
|
8
|
+
import { ECName } from "../ECName";
|
|
9
|
+
import { ECClass, StructClass } from "./Class";
|
|
10
|
+
import { CustomAttribute, CustomAttributeContainerProps, CustomAttributeSet } from "./CustomAttribute";
|
|
11
|
+
import { KindOfQuantity } from "./KindOfQuantity";
|
|
12
|
+
import { PropertyCategory } from "./PropertyCategory";
|
|
13
|
+
import { RelationshipClass } from "./RelationshipClass";
|
|
14
|
+
import { Schema } from "./Schema";
|
|
15
|
+
/**
|
|
16
|
+
* A common abstract class for all ECProperty types.
|
|
17
|
+
* @beta
|
|
18
|
+
*/
|
|
19
|
+
export declare abstract class Property implements CustomAttributeContainerProps {
|
|
20
|
+
protected _name: ECName;
|
|
21
|
+
protected _type: PropertyType;
|
|
22
|
+
protected _class: AnyClass;
|
|
23
|
+
protected _description?: string;
|
|
24
|
+
protected _label?: string;
|
|
25
|
+
protected _isReadOnly?: boolean;
|
|
26
|
+
protected _priority?: number;
|
|
27
|
+
protected _category?: LazyLoadedPropertyCategory;
|
|
28
|
+
protected _kindOfQuantity?: LazyLoadedKindOfQuantity;
|
|
29
|
+
private _customAttributes?;
|
|
30
|
+
constructor(ecClass: ECClass, name: string, type: PropertyType);
|
|
31
|
+
isArray(): this is AnyArrayProperty;
|
|
32
|
+
isPrimitive(): this is AnyPrimitiveProperty;
|
|
33
|
+
isStruct(): this is AnyStructProperty;
|
|
34
|
+
isEnumeration(): this is AnyEnumerationProperty;
|
|
35
|
+
isNavigation(): this is NavigationProperty;
|
|
36
|
+
get name(): string;
|
|
37
|
+
get class(): AnyClass;
|
|
38
|
+
get label(): string | undefined;
|
|
39
|
+
get description(): string | undefined;
|
|
40
|
+
get isReadOnly(): boolean;
|
|
41
|
+
get priority(): number;
|
|
42
|
+
get category(): LazyLoadedPropertyCategory | undefined;
|
|
43
|
+
get kindOfQuantity(): LazyLoadedKindOfQuantity | undefined;
|
|
44
|
+
get propertyType(): PropertyType;
|
|
45
|
+
get customAttributes(): CustomAttributeSet | undefined;
|
|
46
|
+
/** Returns the name in the format 'ClassName.PropertyName'. */
|
|
47
|
+
get fullName(): string;
|
|
48
|
+
/** Returns the schema of the class holding the property. */
|
|
49
|
+
get schema(): Schema;
|
|
50
|
+
getCategorySync(): PropertyCategory | undefined;
|
|
51
|
+
getKindOfQuantitySync(): KindOfQuantity | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Save this Property's properties to an object for serializing to JSON.
|
|
54
|
+
*/
|
|
55
|
+
toJSON(): PropertyProps;
|
|
56
|
+
/** @internal */
|
|
57
|
+
toXml(schemaXml: Document): Promise<Element>;
|
|
58
|
+
fromJSONSync(propertyProps: PropertyProps): void;
|
|
59
|
+
fromJSON(propertyProps: PropertyProps): Promise<void>;
|
|
60
|
+
protected addCustomAttribute(customAttribute: CustomAttribute): void;
|
|
61
|
+
protected setName(name: ECName): void;
|
|
62
|
+
/**
|
|
63
|
+
* @internal Used in schema editing.
|
|
64
|
+
*/
|
|
65
|
+
protected setDescription(description: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* @internal Used in schema editing.
|
|
68
|
+
*/
|
|
69
|
+
protected setLabel(label: string): void;
|
|
70
|
+
/**
|
|
71
|
+
* @internal Used in schema editing.
|
|
72
|
+
*/
|
|
73
|
+
protected setIsReadOnly(isReadOnly: boolean): void;
|
|
74
|
+
/**
|
|
75
|
+
* @internal Used in schema editing.
|
|
76
|
+
*/
|
|
77
|
+
protected setPriority(priority: number): void;
|
|
78
|
+
/**
|
|
79
|
+
* @internal Used in schema editing.
|
|
80
|
+
*/
|
|
81
|
+
protected setCategory(category: LazyLoadedPropertyCategory): void;
|
|
82
|
+
/**
|
|
83
|
+
* Retrieve all custom attributes in the current property and its base
|
|
84
|
+
* This is the async version of getCustomAttributesSync()
|
|
85
|
+
*/
|
|
86
|
+
getCustomAttributes(): Promise<CustomAttributeSet>;
|
|
87
|
+
/**
|
|
88
|
+
* Retrieve all custom attributes in the current property and its base.
|
|
89
|
+
*/
|
|
90
|
+
getCustomAttributesSync(): CustomAttributeSet;
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
static isProperty(object: any): object is AnyProperty;
|
|
95
|
+
}
|
|
96
|
+
/** @beta */
|
|
97
|
+
export declare abstract class PrimitiveOrEnumPropertyBase extends Property {
|
|
98
|
+
protected _extendedTypeName?: string;
|
|
99
|
+
protected _minLength?: number;
|
|
100
|
+
protected _maxLength?: number;
|
|
101
|
+
protected _minValue?: number;
|
|
102
|
+
protected _maxValue?: number;
|
|
103
|
+
get extendedTypeName(): string | undefined;
|
|
104
|
+
get minLength(): number | undefined;
|
|
105
|
+
get maxLength(): number | undefined;
|
|
106
|
+
get minValue(): number | undefined;
|
|
107
|
+
get maxValue(): number | undefined;
|
|
108
|
+
constructor(ecClass: ECClass, name: string, type: PropertyType);
|
|
109
|
+
/**
|
|
110
|
+
* Save this PrimitiveOrEnumPropertyBase's properties to an object for serializing to JSON.
|
|
111
|
+
*/
|
|
112
|
+
toJSON(): PrimitiveOrEnumPropertyBaseProps;
|
|
113
|
+
/** @internal */
|
|
114
|
+
toXml(schemaXml: Document): Promise<Element>;
|
|
115
|
+
fromJSONSync(propertyBaseProps: PrimitiveOrEnumPropertyBaseProps): void;
|
|
116
|
+
/**
|
|
117
|
+
* @internal Used in schema editing.
|
|
118
|
+
*/
|
|
119
|
+
protected setExtendedTypeName(extendedTypeName: string): void;
|
|
120
|
+
/**
|
|
121
|
+
* @internal Used in schema editing.
|
|
122
|
+
*/
|
|
123
|
+
protected setMinLength(minLength: number): void;
|
|
124
|
+
/**
|
|
125
|
+
* @internal Used in schema editing.
|
|
126
|
+
*/
|
|
127
|
+
protected setMaxLength(maxLength: number): void;
|
|
128
|
+
/**
|
|
129
|
+
* @internal Used in schema editing.
|
|
130
|
+
*/
|
|
131
|
+
protected setMinValue(minValue: number): void;
|
|
132
|
+
/**
|
|
133
|
+
* @internal Used in schema editing.
|
|
134
|
+
*/
|
|
135
|
+
protected setMaxValue(maxValue: number): void;
|
|
136
|
+
fromJSON(propertyBaseProps: PrimitiveOrEnumPropertyBaseProps): Promise<void>;
|
|
137
|
+
}
|
|
138
|
+
/** @beta */
|
|
139
|
+
export declare class PrimitiveProperty extends PrimitiveOrEnumPropertyBase {
|
|
140
|
+
get primitiveType(): PrimitiveType;
|
|
141
|
+
constructor(ecClass: ECClass, name: string, primitiveType?: PrimitiveType);
|
|
142
|
+
fromJSONSync(primitivePropertyProps: PrimitivePropertyProps): void;
|
|
143
|
+
fromJSON(primitivePropertyProps: PrimitivePropertyProps): Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* Save this PrimitiveProperty's properties to an object for serializing to JSON.
|
|
146
|
+
*/
|
|
147
|
+
toJSON(): PrimitivePropertyProps;
|
|
148
|
+
/** @internal */
|
|
149
|
+
toXml(schemaXml: Document): Promise<Element>;
|
|
150
|
+
}
|
|
151
|
+
/** @beta */
|
|
152
|
+
export declare class EnumerationProperty extends PrimitiveOrEnumPropertyBase {
|
|
153
|
+
protected _enumeration?: LazyLoadedEnumeration;
|
|
154
|
+
get enumeration(): LazyLoadedEnumeration | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* Save this EnumerationProperty's properties to an object for serializing to JSON.
|
|
157
|
+
*/
|
|
158
|
+
toJSON(): EnumerationPropertyProps;
|
|
159
|
+
constructor(ecClass: ECClass, name: string, type: LazyLoadedEnumeration);
|
|
160
|
+
fromJSONSync(enumerationPropertyProps: EnumerationPropertyProps): void;
|
|
161
|
+
/** @internal */
|
|
162
|
+
toXml(schemaXml: Document): Promise<Element>;
|
|
163
|
+
fromJSON(enumerationPropertyProps: EnumerationPropertyProps): Promise<void>;
|
|
164
|
+
}
|
|
165
|
+
/** @beta */
|
|
166
|
+
export declare class StructProperty extends Property {
|
|
167
|
+
protected _structClass: StructClass;
|
|
168
|
+
get structClass(): StructClass;
|
|
169
|
+
constructor(ecClass: ECClass, name: string, type: StructClass);
|
|
170
|
+
/**
|
|
171
|
+
* Save this StructProperty's properties to an object for serializing to JSON.
|
|
172
|
+
*/
|
|
173
|
+
toJSON(): StructPropertyProps;
|
|
174
|
+
/** @internal */
|
|
175
|
+
toXml(schemaXml: Document): Promise<Element>;
|
|
176
|
+
fromJSONSync(structPropertyProps: StructPropertyProps): void;
|
|
177
|
+
fromJSON(structPropertyProps: StructPropertyProps): Promise<void>;
|
|
178
|
+
}
|
|
179
|
+
/** @beta */
|
|
180
|
+
export declare class NavigationProperty extends Property {
|
|
181
|
+
protected _relationshipClass: LazyLoadedRelationshipClass;
|
|
182
|
+
protected _direction: StrengthDirection;
|
|
183
|
+
get relationshipClass(): LazyLoadedRelationshipClass;
|
|
184
|
+
getRelationshipClassSync(): RelationshipClass | undefined;
|
|
185
|
+
get direction(): StrengthDirection;
|
|
186
|
+
/**
|
|
187
|
+
* Save this NavigationProperty's properties to an object for serializing to JSON.
|
|
188
|
+
*/
|
|
189
|
+
toJSON(): NavigationPropertyProps;
|
|
190
|
+
/** @internal */
|
|
191
|
+
toXml(schemaXml: Document): Promise<Element>;
|
|
192
|
+
constructor(ecClass: ECClass, name: string, relationship: LazyLoadedRelationshipClass, direction?: StrengthDirection);
|
|
193
|
+
}
|
|
194
|
+
type Constructor<T> = new (...args: any[]) => T;
|
|
195
|
+
/** @beta */
|
|
196
|
+
export declare abstract class ArrayProperty extends Property {
|
|
197
|
+
protected _minOccurs: number;
|
|
198
|
+
protected _maxOccurs?: number;
|
|
199
|
+
get minOccurs(): number;
|
|
200
|
+
get maxOccurs(): number | undefined;
|
|
201
|
+
/**
|
|
202
|
+
* @internal Used in schema editing.
|
|
203
|
+
*/
|
|
204
|
+
protected setMinOccurs(minOccurs: number): void;
|
|
205
|
+
/**
|
|
206
|
+
* @internal Used in schema editing.
|
|
207
|
+
*/
|
|
208
|
+
protected setMaxOccurs(maxOccurs: number): void;
|
|
209
|
+
}
|
|
210
|
+
declare const PrimitiveArrayProperty_base: typeof PrimitiveProperty & Constructor<ArrayProperty>;
|
|
211
|
+
/** @beta */
|
|
212
|
+
export declare class PrimitiveArrayProperty extends PrimitiveArrayProperty_base {
|
|
213
|
+
constructor(ecClass: ECClass, name: string, primitiveType?: PrimitiveType);
|
|
214
|
+
/**
|
|
215
|
+
* Save this PrimitiveArrayProperty's properties to an object for serializing to JSON.
|
|
216
|
+
*/
|
|
217
|
+
toJSON(): PrimitiveArrayPropertyProps;
|
|
218
|
+
}
|
|
219
|
+
declare const EnumerationArrayProperty_base: typeof EnumerationProperty & Constructor<ArrayProperty>;
|
|
220
|
+
/** @beta */
|
|
221
|
+
export declare class EnumerationArrayProperty extends EnumerationArrayProperty_base {
|
|
222
|
+
constructor(ecClass: ECClass, name: string, type: LazyLoadedEnumeration);
|
|
223
|
+
}
|
|
224
|
+
declare const StructArrayProperty_base: typeof StructProperty & Constructor<ArrayProperty>;
|
|
225
|
+
/** @beta */
|
|
226
|
+
export declare class StructArrayProperty extends StructArrayProperty_base {
|
|
227
|
+
constructor(ecClass: ECClass, name: string, type: StructClass);
|
|
228
|
+
}
|
|
229
|
+
/** @beta */
|
|
230
|
+
export type AnyArrayProperty = PrimitiveArrayProperty | EnumerationArrayProperty | StructArrayProperty;
|
|
231
|
+
/** @beta */
|
|
232
|
+
export type AnyPrimitiveProperty = PrimitiveProperty | PrimitiveArrayProperty;
|
|
233
|
+
/** @beta */
|
|
234
|
+
export type AnyEnumerationProperty = EnumerationProperty | EnumerationArrayProperty;
|
|
235
|
+
/** @beta */
|
|
236
|
+
export type AnyStructProperty = StructProperty | StructArrayProperty;
|
|
237
|
+
/** @beta */
|
|
238
|
+
export type AnyProperty = AnyPrimitiveProperty | AnyEnumerationProperty | AnyStructProperty | NavigationProperty;
|
|
239
|
+
/**
|
|
240
|
+
* Hackish approach that works like a "friend class" so we can access protected members without making them public.
|
|
241
|
+
* @internal
|
|
242
|
+
*/
|
|
243
|
+
export declare abstract class MutableProperty extends Property {
|
|
244
|
+
abstract addCustomAttribute(customAttribute: CustomAttribute): void;
|
|
245
|
+
}
|
|
246
|
+
export {};
|
|
247
|
+
//# sourceMappingURL=Property.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Property.d.ts","sourceRoot":"","sources":["../../../src/Metadata/Property.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EACe,wBAAwB,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,gCAAgC,EACpI,sBAAsB,EAAE,aAAa,EAAE,mBAAmB,EAC3D,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAsB,aAAa,EAAyB,iBAAiB,EAA6B,MAAM,cAAc,CAAC;AAEtI,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AACnJ,OAAO,EAAE,YAAY,EAA2C,MAAM,kBAAkB,CAAC;AAEzF,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC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