@itwin/ecschema-metadata 4.8.0-dev.3 → 4.8.0-dev.32
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 +41 -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/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/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/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/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/UnitProvider/SchemaUnitProvider.d.ts +1 -1
- package/lib/cjs/UnitProvider/SchemaUnitProvider.js +1 -1
- package/lib/cjs/UnitProvider/SchemaUnitProvider.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,8 @@
|
|
|
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
|
+
/** @internal */
|
|
6
|
+
export class AbstractParser {
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=AbstractParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbstractParser.js","sourceRoot":"","sources":["../../../src/Deserialization/AbstractParser.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAmB/F,gBAAgB;AAChB,MAAM,OAAgB,cAAc;CAiCnC","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\r\nimport {\r\n ConstantProps, CustomAttributeClassProps, EntityClassProps, EnumerationProps, InvertedUnitProps, KindOfQuantityProps, MixinProps,\r\n NavigationPropertyProps, PhenomenonProps, PrimitiveArrayPropertyProps, PrimitivePropertyProps, PropertyCategoryProps, RelationshipClassProps,\r\n SchemaItemFormatProps, SchemaItemUnitProps, SchemaProps, SchemaReferenceProps, StructArrayPropertyProps, StructClassProps, StructPropertyProps, UnitSystemProps,\r\n} from \"../Deserialization/JsonProps\";\r\nimport { CustomAttribute } from \"../Metadata/CustomAttribute\";\r\nimport { CustomAttributeClass } from \"../Metadata/CustomAttributeClass\";\r\n\r\ntype SchemaItemTuple<T> = Readonly<[string /** Name */, string /** SchemaItemType */, Readonly<T>]>;\r\ntype PropertyTuple<T> = Readonly<[string /** Name */, string /** Property */, Readonly<T>]>;\r\n\r\n/** @internal */\r\nexport type CustomAttributeProvider = (caClass: CustomAttributeClass) => CustomAttribute;\r\n\r\n/** @internal */\r\nexport type CAProviderTuple = Readonly<[string /** Full Name */, CustomAttributeProvider]>;\r\n\r\n/** @internal */\r\nexport abstract class AbstractParser<TItem = any, TProperty = TItem> {\r\n public abstract parseSchema(): SchemaProps;\r\n public abstract getReferences(): Iterable<SchemaReferenceProps>;\r\n\r\n public abstract getItems(): Iterable<SchemaItemTuple<TItem>>;\r\n public abstract findItem(itemName: string): SchemaItemTuple<TItem> | undefined;\r\n\r\n public abstract parseEntityClass(data: Readonly<TItem>): EntityClassProps;\r\n public abstract parseMixin(data: Readonly<TItem>): MixinProps;\r\n public abstract parseStructClass(data: Readonly<TItem>): StructClassProps;\r\n public abstract parseCustomAttributeClass(data: Readonly<TItem>): CustomAttributeClassProps;\r\n public abstract parseRelationshipClass(data: Readonly<TItem>): RelationshipClassProps;\r\n public abstract parseEnumeration(data: Readonly<TItem>): EnumerationProps;\r\n public abstract parseKindOfQuantity(data: Readonly<TItem>): KindOfQuantityProps;\r\n public abstract parsePropertyCategory(data: Readonly<TItem>): PropertyCategoryProps;\r\n public abstract parseUnit(data: Readonly<TItem>): SchemaItemUnitProps;\r\n public abstract parseInvertedUnit(data: Readonly<TItem>): InvertedUnitProps;\r\n public abstract parseConstant(data: Readonly<TItem>): ConstantProps;\r\n public abstract parsePhenomenon(data: Readonly<TItem>): PhenomenonProps;\r\n public abstract parseFormat(data: Readonly<TItem>): SchemaItemFormatProps;\r\n public abstract parseUnitSystem(data: Readonly<TItem>): UnitSystemProps;\r\n\r\n public abstract getProperties(data: Readonly<TItem>, itemName: string): Iterable<PropertyTuple<TProperty>>;\r\n public abstract parsePrimitiveProperty(data: Readonly<TProperty>): PrimitivePropertyProps;\r\n public abstract parseStructProperty(data: Readonly<TProperty>): StructPropertyProps;\r\n public abstract parsePrimitiveArrayProperty(data: Readonly<TProperty>): PrimitiveArrayPropertyProps;\r\n public abstract parseStructArrayProperty(data: Readonly<TProperty>): StructArrayPropertyProps;\r\n public abstract parseNavigationProperty(data: Readonly<TProperty>): NavigationPropertyProps;\r\n\r\n public abstract getSchemaCustomAttributeProviders(): Iterable<CAProviderTuple>;\r\n public abstract getClassCustomAttributeProviders(data: Readonly<TItem>): Iterable<CAProviderTuple>;\r\n public abstract getPropertyCustomAttributeProviders(data: Readonly<TProperty>): Iterable<CAProviderTuple>;\r\n public abstract getRelationshipConstraintCustomAttributeProviders(data: Readonly<TItem>): [Iterable<CAProviderTuple> /* source */, Iterable<CAProviderTuple> /* target */];\r\n}\r\n\r\n/** @internal */\r\n// eslint-disable-next-line @typescript-eslint/prefer-function-type\r\nexport interface AbstractParserConstructor<TSchema, TItem = any, TProperty = TItem> { new(obj: Readonly<TSchema>): AbstractParser<TItem, TProperty> }\r\n"]}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { SchemaContext } from "../Context";
|
|
2
|
+
import { SchemaInfo } from "../Interfaces";
|
|
3
|
+
import { Schema } from "../Metadata/Schema";
|
|
4
|
+
import { ISchemaPartVisitor } from "../SchemaPartVisitorDelegate";
|
|
5
|
+
import { AbstractParserConstructor } from "./AbstractParser";
|
|
6
|
+
/**
|
|
7
|
+
* This class properly handles the order the deserialization of ECSchemas and SchemaItems from serialized formats.
|
|
8
|
+
* For example, when deserializing an ECClass most times all base class should be de-serialized before the given class.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare class SchemaReadHelper<T = unknown> {
|
|
12
|
+
private _context;
|
|
13
|
+
private _visitorHelper?;
|
|
14
|
+
private _parserType;
|
|
15
|
+
private _parser;
|
|
16
|
+
private _schema?;
|
|
17
|
+
private _schemaInfo?;
|
|
18
|
+
constructor(parserType: AbstractParserConstructor<T>, context?: SchemaContext, visitor?: ISchemaPartVisitor);
|
|
19
|
+
/**
|
|
20
|
+
* Creates a complete SchemaInfo and starts parsing the schema from a serialized representation.
|
|
21
|
+
* The info and schema promise will be registered with the SchemaContext. The complete schema can be retrieved by
|
|
22
|
+
* calling getCachedSchema on the context.
|
|
23
|
+
* @param schema The Schema to populate
|
|
24
|
+
* @param rawSchema The serialized data to use to populate the Schema.
|
|
25
|
+
*/
|
|
26
|
+
readSchemaInfo<U extends Schema>(schema: U, rawSchema: T): Promise<SchemaInfo>;
|
|
27
|
+
/**
|
|
28
|
+
* Populates the given Schema from a serialized representation.
|
|
29
|
+
* @param schema The Schema to populate
|
|
30
|
+
* @param rawSchema The serialized data to use to populate the Schema.
|
|
31
|
+
*/
|
|
32
|
+
readSchema<U extends Schema>(schema: U, rawSchema: T): Promise<U>;
|
|
33
|
+
private loadSchema;
|
|
34
|
+
/**
|
|
35
|
+
* Populates the given Schema from a serialized representation.
|
|
36
|
+
* @param schema The Schema to populate
|
|
37
|
+
* @param rawSchema The serialized data to use to populate the Schema.
|
|
38
|
+
*/
|
|
39
|
+
readSchemaSync<U extends Schema>(schema: U, rawSchema: T): U;
|
|
40
|
+
/**
|
|
41
|
+
* Ensures that the schema references can be located and adds them to the schema.
|
|
42
|
+
* @param ref The object to read the SchemaReference's props from.
|
|
43
|
+
*/
|
|
44
|
+
private loadSchemaReference;
|
|
45
|
+
/**
|
|
46
|
+
* Ensures that the schema references can be located and adds them to the schema.
|
|
47
|
+
* @param ref The object to read the SchemaReference's props from.
|
|
48
|
+
*/
|
|
49
|
+
private loadSchemaReferenceSync;
|
|
50
|
+
/**
|
|
51
|
+
* Validates schema references against multiple EC rules.
|
|
52
|
+
* @param schema The schema to validate.
|
|
53
|
+
*/
|
|
54
|
+
private validateSchemaReferences;
|
|
55
|
+
/**
|
|
56
|
+
* Given the schema item object, the anticipated type and the name a schema item is created and loaded into the schema provided.
|
|
57
|
+
* @param schema The Schema the SchemaItem to.
|
|
58
|
+
* @param name The name of the schema item to be loaded.
|
|
59
|
+
* @param itemType The SchemaItemType of the item to load.
|
|
60
|
+
* @param schemaItemObject The Object to populate the SchemaItem with.
|
|
61
|
+
*/
|
|
62
|
+
private loadSchemaItem;
|
|
63
|
+
/**
|
|
64
|
+
* Given the schema item object, the anticipated type and the name a schema item is created and loaded into the schema provided.
|
|
65
|
+
* @param schema The Schema the SchemaItem to.
|
|
66
|
+
* @param name The name of the schema item to be loaded.
|
|
67
|
+
* @param itemType The SchemaItemType of the item to load.
|
|
68
|
+
* @param schemaItemObject The Object to populate the SchemaItem with.
|
|
69
|
+
*/
|
|
70
|
+
private loadSchemaItemSync;
|
|
71
|
+
/**
|
|
72
|
+
* Given the full (Schema.ItemName) or qualified (alias:ItemName) item name, returns
|
|
73
|
+
* a tuple of strings in the format ["SchemaName", "ItemName"]. The schema name may be
|
|
74
|
+
* empty if the item comes from the schema being parsed.
|
|
75
|
+
* @param fullOrQualifiedName The full or qualified name of the schema item.
|
|
76
|
+
* @param schema The schema that will be used to lookup the schema name by alias, if necessary.
|
|
77
|
+
*/
|
|
78
|
+
private static resolveSchemaAndItemName;
|
|
79
|
+
/**
|
|
80
|
+
* Finds the a SchemaItem matching the name first by checking the schema that is being deserialized. If it does
|
|
81
|
+
* not exist within the schema, the SchemaContext will be searched.
|
|
82
|
+
* @param name The full (Schema.ItemName) or qualified (alias:ItemName) name of the SchemaItem to search for.
|
|
83
|
+
* @param skipVisitor Used to break Mixin -appliesTo-> Entity -extends-> Mixin cycle.
|
|
84
|
+
* @param loadCallBack Only called if the SchemaItem had to be loaded.
|
|
85
|
+
* @return The SchemaItem if it had to be loaded, otherwise undefined.
|
|
86
|
+
*/
|
|
87
|
+
private findSchemaItem;
|
|
88
|
+
/**
|
|
89
|
+
* Finds the a SchemaItem matching the name first by checking the schema that is being deserialized. If it does
|
|
90
|
+
* not exist within the schema, the SchemaContext will be searched.
|
|
91
|
+
* @param name The full (Schema.ItemName) or qualified (alias:ItemName) name of the SchemaItem to search for.
|
|
92
|
+
* @param skipVisitor Used to break Mixin -appliesTo-> Entity -extends-> Mixin cycle.
|
|
93
|
+
* @param loadCallBack Only called if the SchemaItem had to be loaded.
|
|
94
|
+
* @return The SchemaItem if it had to be loaded, otherwise undefined.
|
|
95
|
+
*/
|
|
96
|
+
private findSchemaItemSync;
|
|
97
|
+
/**
|
|
98
|
+
* Load dependencies on phenomenon and unitSystem for a Unit object and load the Unit from its serialized format.
|
|
99
|
+
* @param unit The Unit object that we are loading dependencies for and "deserializing into".
|
|
100
|
+
* @param rawUnit The serialized unit data
|
|
101
|
+
*/
|
|
102
|
+
private loadUnit;
|
|
103
|
+
/**
|
|
104
|
+
* Load dependencies on phenomenon and unitSystem for a Unit object and load the Unit from its serialized format.
|
|
105
|
+
* @param unit The Unit object that we are loading dependencies for and "deserializing into".
|
|
106
|
+
* @param rawUnit The serialized unit data
|
|
107
|
+
*/
|
|
108
|
+
private loadUnitSync;
|
|
109
|
+
/**
|
|
110
|
+
* Load the persistence unit and presentation unit dependencies for a KindOfQuantity object and load the KoQ from its serialized format.
|
|
111
|
+
* @param koq The KindOfQuantity object that we are loading dependencies for and "deserializing into".
|
|
112
|
+
* @param rawKoQ The serialized kind of quantity data
|
|
113
|
+
*/
|
|
114
|
+
private loadKindOfQuantity;
|
|
115
|
+
/**
|
|
116
|
+
* Load the persistence unit and presentation unit dependencies for a KindOfQuantity object and load the KoQ from its serialized format.
|
|
117
|
+
* @param koq The KindOfQuantity object that we are loading dependencies for and "deserializing into".
|
|
118
|
+
* @param rawKoQ The serialized kind of quantity data
|
|
119
|
+
*/
|
|
120
|
+
private loadKindOfQuantitySync;
|
|
121
|
+
/**
|
|
122
|
+
* Load the phenomenon dependency for a Constant object and load the Constant from its serialized format.
|
|
123
|
+
* @param constant The Constant object that we are loading the phenomenon dependency for
|
|
124
|
+
* @param rawConstant The serialized constant data
|
|
125
|
+
*/
|
|
126
|
+
private loadConstant;
|
|
127
|
+
/**
|
|
128
|
+
* Load the phenomenon dependency for a Constant object and load the Constant from its serialized format.
|
|
129
|
+
* @param constant The Constant object that we are loading dependencies for and "deserializing into".
|
|
130
|
+
* @param rawConstant The serialized constant data
|
|
131
|
+
*/
|
|
132
|
+
private loadConstantSync;
|
|
133
|
+
/**
|
|
134
|
+
* Load the unit system and invertsUnit dependencies for an Inverted Unit object and load the Inverted Unit from its serialized format.
|
|
135
|
+
* @param invertedUnit The InvertedUnit object that we are loading dependencies for and "deserializing into".
|
|
136
|
+
* @param rawInvertedUnit The serialized inverted unit data.
|
|
137
|
+
*/
|
|
138
|
+
private loadInvertedUnit;
|
|
139
|
+
/**
|
|
140
|
+
* Load the unit system and invertsUnit dependencies for an Inverted Unit object and load the Inverted Unit from its serialized format.
|
|
141
|
+
* @param invertedUnit The InvertedUnit object that we are loading dependencies for and "deserializing into".
|
|
142
|
+
* @param rawInvertedUnit The serialized inverted unit data.
|
|
143
|
+
*/
|
|
144
|
+
private loadInvertedUnitSync;
|
|
145
|
+
/**
|
|
146
|
+
* Load the unit dependencies for a Format object and load the Format from its serialized format.
|
|
147
|
+
* @param format The Format object that we are loading dependencies for and "deserializing into".
|
|
148
|
+
* @param rawFormat The serialized format data.
|
|
149
|
+
*/
|
|
150
|
+
private loadFormat;
|
|
151
|
+
/**
|
|
152
|
+
* Load the unit dependencies for a Format object and load the Format from its serialized format.
|
|
153
|
+
* @param format The Format object that we are loading dependencies for and "deserializing into".
|
|
154
|
+
* @param rawFormat The serialized format data.
|
|
155
|
+
*/
|
|
156
|
+
private loadFormatSync;
|
|
157
|
+
/**
|
|
158
|
+
* Load the base class and property type dependencies for an ECClass object and load the ECClass (and its properties) from its serialized format.
|
|
159
|
+
* @param classObj The ECClass object that we are loading dependencies for and "deserializing into".
|
|
160
|
+
* @param classProps The parsed class props object.
|
|
161
|
+
* @param rawClass The serialized class data.
|
|
162
|
+
*/
|
|
163
|
+
private loadClass;
|
|
164
|
+
/**
|
|
165
|
+
* Load the base class and property type dependencies for an ECClass object and load the ECClass (and its properties) from its serialized format.
|
|
166
|
+
* @param classObj The ECClass object that we are loading dependencies for and "deserializing into".
|
|
167
|
+
* @param classProps The parsed class props object.
|
|
168
|
+
* @param rawClass The serialized class data.
|
|
169
|
+
*/
|
|
170
|
+
private loadClassSync;
|
|
171
|
+
/**
|
|
172
|
+
* Load the mixin, base class, and property type dependencies for an EntityClass object and load the EntityClass (and properties) from its serialized format.
|
|
173
|
+
* @param entity The EntityClass that we are loading dependencies for and "deserializing into".
|
|
174
|
+
* @param rawEntity The serialized entity class data.
|
|
175
|
+
*/
|
|
176
|
+
private loadEntityClass;
|
|
177
|
+
/**
|
|
178
|
+
* Load the mixin, base class, and property type dependencies for an EntityClass object and load the EntityClass (and properties) from its serialized format.
|
|
179
|
+
* @param entity The EntityClass that we are loading dependencies for and "deserializing into".
|
|
180
|
+
* @param rawEntity The serialized entity class data.
|
|
181
|
+
*/
|
|
182
|
+
private loadEntityClassSync;
|
|
183
|
+
/**
|
|
184
|
+
* Load the appliesTo class, base class, and property type dependencies for a Mixin object and load the Mixin (and properties) from its serialized format.
|
|
185
|
+
* @param mixin The Mixin that we are loading dependencies for and "deserializing into".
|
|
186
|
+
* @param rawMixin The serialized mixin data.
|
|
187
|
+
*/
|
|
188
|
+
private loadMixin;
|
|
189
|
+
/**
|
|
190
|
+
* Load the appliesTo class, base class, and property type dependencies for a Mixin object and load the Mixin (and properties) from its serialized format.
|
|
191
|
+
* @param mixin The Mixin that we are loading dependencies for and "deserializing into".
|
|
192
|
+
* @param rawMixin The serialized mixin data.
|
|
193
|
+
*/
|
|
194
|
+
private loadMixinSync;
|
|
195
|
+
/**
|
|
196
|
+
* Load the relationship constraint, base class, and property type dependencies for a RelationshipClass object and load the RelationshipClass (and properties) from its serialized format.
|
|
197
|
+
* @param rel The RelationshipClass that we are loading dependencies for and "deserializing into".
|
|
198
|
+
* @param rawRel The serialized relationship class data.
|
|
199
|
+
*/
|
|
200
|
+
private loadRelationshipClass;
|
|
201
|
+
/**
|
|
202
|
+
* Load the relationship constraint, base class, and property type dependencies for a RelationshipClass object and load the RelationshipClass (and properties) from its serialized format.
|
|
203
|
+
* @param rel The RelationshipClass that we are loading dependencies for and "deserializing into".
|
|
204
|
+
* @param rawRel The serialized relationship class data.
|
|
205
|
+
*/
|
|
206
|
+
private loadRelationshipClassSync;
|
|
207
|
+
/**
|
|
208
|
+
* Load the abstract constraint and constraint class dependencies for a RelationshipConstraint object and load the RelationshipConstraint from its parsed props.
|
|
209
|
+
* @param relConstraint The RelationshipConstraint that we are loading dependencies for and "deserializing into".
|
|
210
|
+
* @param props The parsed relationship constraint props.
|
|
211
|
+
*/
|
|
212
|
+
private loadRelationshipConstraint;
|
|
213
|
+
/**
|
|
214
|
+
* Load the abstract constraint and constraint class dependencies for a RelationshipConstraint object and load the RelationshipConstraint from its parsed props.
|
|
215
|
+
* @param relConstraint The RelationshipConstraint that we are loading dependencies for and "deserializing into".
|
|
216
|
+
* @param props The parsed relationship constraint props.
|
|
217
|
+
*/
|
|
218
|
+
private loadRelationshipConstraintSync;
|
|
219
|
+
/**
|
|
220
|
+
* Load the type dependencies for a serialized property, then creates and deserialized the Property object in the given ECClass.
|
|
221
|
+
* @param classObj The ECClass that the Property should be created in.
|
|
222
|
+
* @param propName The name of the Property.
|
|
223
|
+
* @param propType The (serialized string) kind of property to create.
|
|
224
|
+
* @param rawProperty The serialized property data.
|
|
225
|
+
*/
|
|
226
|
+
private loadPropertyTypes;
|
|
227
|
+
/**
|
|
228
|
+
* Load the type dependencies for a serialized property, then creates and deserialized the Property object in the given ECClass.
|
|
229
|
+
* @param classObj The ECClass that the Property should be created in.
|
|
230
|
+
* @param propName The name of the Property.
|
|
231
|
+
* @param propType The (serialized string) kind of property to create.
|
|
232
|
+
* @param rawProperty The serialized property data.
|
|
233
|
+
*/
|
|
234
|
+
private loadPropertyTypesSync;
|
|
235
|
+
/**
|
|
236
|
+
* Load the propertyCategory, kindOfQuantity, and customAttribute dependencies for a Property object and load the Property from its parsed props.
|
|
237
|
+
* @param propertyObj The Property that we are loading dependencies for and "deserializing into".
|
|
238
|
+
* @param props The parsed property props.
|
|
239
|
+
* @param rawProperty The serialized property data.
|
|
240
|
+
*/
|
|
241
|
+
private loadProperty;
|
|
242
|
+
/**
|
|
243
|
+
* Load the propertyCategory, kindOfQuantity, and customAttribute dependencies for a Property object and load the Property from its parsed props.
|
|
244
|
+
* @param propertyObj The Property that we are loading dependencies for and "deserializing into".
|
|
245
|
+
* @param props The parsed property props.
|
|
246
|
+
* @param rawProperty The serialized property data.
|
|
247
|
+
*/
|
|
248
|
+
private loadPropertySync;
|
|
249
|
+
/**
|
|
250
|
+
* Load the customAttribute class dependencies for a set of CustomAttribute objects and add
|
|
251
|
+
* them to a given custom attribute container.
|
|
252
|
+
* @param container The CustomAttributeContainer that each CustomAttribute will be added to.
|
|
253
|
+
* @param customAttributes An iterable set of parsed CustomAttribute objects.
|
|
254
|
+
*/
|
|
255
|
+
private loadCustomAttributes;
|
|
256
|
+
/**
|
|
257
|
+
* Load the customAttribute class dependencies for a set of CustomAttribute objects and add them to a given custom attribute container.
|
|
258
|
+
* @param container The CustomAttributeContainer that each CustomAttribute will be added to.
|
|
259
|
+
* @param customAttributes An iterable set of parsed CustomAttribute objects.
|
|
260
|
+
*/
|
|
261
|
+
private loadCustomAttributesSync;
|
|
262
|
+
}
|
|
263
|
+
//# sourceMappingURL=Helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Helper.d.ts","sourceRoot":"","sources":["../../../src/Deserialization/Helper.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAA2B,UAAU,EAAE,MAAM,eAAe,CAAC;AAWpE,OAAO,EAAiB,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAI3D,OAAO,EAAE,kBAAkB,EAA6B,MAAM,8BAA8B,CAAC;AAE7F,OAAO,EAAkB,yBAAyB,EAAmB,MAAM,kBAAkB,CAAC;AAO9F;;;;GAIG;AACH,qBAAa,gBAAgB,CAAC,CAAC,GAAG,OAAO;IACvC,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,cAAc,CAAC,CAA4B;IACnD,OAAO,CAAC,WAAW,CAAwC;IAC3D,OAAO,CAAC,OAAO,CAA2B;IAI1C,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,WAAW,CAAC,CAAa;gBAErB,UAAU,EAAE,yBAAyB,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,kBAAkB;IAM3G;;;;;;OAMG;IACU,cAAc,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IA+B3F;;;;OAIG;IACU,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;YAahE,UAAU;IAgCxB;;;;OAIG;IACI,cAAc,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC;IA0CnE;;;OAGG;YACW,mBAAmB;IAkBjC;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAqB/B;;;OAGG;IACH,OAAO,CAAE,wBAAwB;IAkBjC;;;;;;OAMG;YACW,cAAc;IAuE5B;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IAsE1B;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAcvC;;;;;;;OAOG;YACW,cAAc;IAmC5B;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IA+B1B;;;;OAIG;YACW,QAAQ;IAStB;;;;OAIG;IACH,OAAO,CAAC,YAAY;IASpB;;;;OAIG;YACW,kBAAkB;IAehC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAc9B;;;;OAIG;YACW,YAAY;IAO1B;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAOxB;;;;OAIG;YACW,gBAAgB;IAS9B;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAS5B;;;;OAIG;YACW,UAAU;IAYxB;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAatB;;;;;OAKG;YACW,SAAS;IAsBvB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAsBrB;;;;OAIG;YACW,eAAe;IAY7B;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAY3B;;;;OAIG;YACW,SAAS;IAavB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAarB;;;;OAIG;YACW,qBAAqB;IAWnC;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;IAWjC;;;;OAIG;YACW,0BAA0B;IAYxC;;;;OAIG;IACH,OAAO,CAAC,8BAA8B;IAatC;;;;;;OAMG;YACW,iBAAiB;IA6C/B;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;IA4C7B;;;;;OAKG;YACW,YAAY;IAa1B;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IAaxB;;;;;OAKG;YACW,oBAAoB;IAmBlC;;;;OAIG;IACH,OAAO,CAAC,wBAAwB;CAWjC"}
|