@itwin/core-backend 3.4.0-dev.2 → 3.4.0-dev.3
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/lib/cjs/ElementTreeWalker.d.ts +140 -0
- package/lib/cjs/ElementTreeWalker.d.ts.map +1 -0
- package/lib/cjs/ElementTreeWalker.js +376 -0
- package/lib/cjs/ElementTreeWalker.js.map +1 -0
- package/lib/cjs/core-backend.d.ts +1 -0
- package/lib/cjs/core-backend.d.ts.map +1 -1
- package/lib/cjs/core-backend.js +1 -0
- package/lib/cjs/core-backend.js.map +1 -1
- package/package.json +14 -14
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Elements
|
|
3
|
+
*/
|
|
4
|
+
import { Id64String } from "@itwin/core-bentley";
|
|
5
|
+
import { IModelDb } from "./IModelDb";
|
|
6
|
+
import { Model } from "./Model";
|
|
7
|
+
/** @beta */
|
|
8
|
+
export interface ElementTreeWalkerModelInfo {
|
|
9
|
+
model: Model;
|
|
10
|
+
isDefinitionModel: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** Records the path that a tree search took to reach an element or model. This object is immutable.
|
|
13
|
+
* @beta
|
|
14
|
+
*/
|
|
15
|
+
export declare class ElementTreeWalkerScope {
|
|
16
|
+
readonly topElement: Id64String;
|
|
17
|
+
/** path of parent elements and enclosing models */
|
|
18
|
+
readonly path: Array<Id64String | ElementTreeWalkerModelInfo>;
|
|
19
|
+
/** cached info about the immediately enclosing model (i.e., the last model in path) */
|
|
20
|
+
readonly enclosingModelInfo: ElementTreeWalkerModelInfo;
|
|
21
|
+
constructor(topElement: Id64String, model: Model);
|
|
22
|
+
constructor(enclosingScope: ElementTreeWalkerScope, newScope: Id64String | Model);
|
|
23
|
+
get enclosingModel(): Model;
|
|
24
|
+
get inDefinitionModel(): boolean;
|
|
25
|
+
get inRepositoryModel(): boolean;
|
|
26
|
+
static createTopScope(iModel: IModelDb, topElementId: Id64String): ElementTreeWalkerScope;
|
|
27
|
+
private fmtItem;
|
|
28
|
+
toString(): string;
|
|
29
|
+
}
|
|
30
|
+
/** Does a depth-first search on the tree defined by an element and its sub-models and children.
|
|
31
|
+
* Sub-models are visited before their modeled elements, and children are visited before their parents.
|
|
32
|
+
*
|
|
33
|
+
* The following callbacks allow the subclass to exclude elements and sub-trees from the search:
|
|
34
|
+
* * [[ElementTreeBottomUp.shouldExploreModel]], [[ElementTreeBottomUp.shouldExploreChildren]]
|
|
35
|
+
* * [[ElementTreeBottomUp.shouldVisitElement]], [[ElementTreeBottomUp.shouldVisitModel]]
|
|
36
|
+
*
|
|
37
|
+
* The [[ElementTreeBottomUp.visitElement]] and [[ElementTreeBottomUp.visitModel]] callbacks allow
|
|
38
|
+
* the subclass to process the elements and models that are encountered in the search.
|
|
39
|
+
* @beta
|
|
40
|
+
*/
|
|
41
|
+
export declare abstract class ElementTreeBottomUp {
|
|
42
|
+
protected _iModel: IModelDb;
|
|
43
|
+
constructor(_iModel: IModelDb);
|
|
44
|
+
/** Return true if the search should recurse into this model */
|
|
45
|
+
protected shouldExploreModel(_model: Model, _scope: ElementTreeWalkerScope): boolean;
|
|
46
|
+
/** Return true if the search should recurse into the children (if any) of this element */
|
|
47
|
+
protected shouldExploreChildren(_parentId: Id64String, _scope: ElementTreeWalkerScope): boolean;
|
|
48
|
+
/** Return true if the search should visit this element */
|
|
49
|
+
protected shouldVisitElement(_elementId: Id64String, _scope: ElementTreeWalkerScope): boolean;
|
|
50
|
+
/** Return true if the search should visit this model */
|
|
51
|
+
protected shouldVisitModel(_model: Model, _scope: ElementTreeWalkerScope): boolean;
|
|
52
|
+
/** Called to visit a model */
|
|
53
|
+
protected abstract visitModel(model: Model, scope: ElementTreeWalkerScope): void;
|
|
54
|
+
/** Called to visit an element */
|
|
55
|
+
protected abstract visitElement(elementId: Id64String, scope: ElementTreeWalkerScope): void;
|
|
56
|
+
/** The main tree-walking function */
|
|
57
|
+
protected processElementTree(element: Id64String, scope: ElementTreeWalkerScope): void;
|
|
58
|
+
/** process the children of the specified parent element */
|
|
59
|
+
private _processChildren;
|
|
60
|
+
/** process the elements in the specified model */
|
|
61
|
+
private _processSubModel;
|
|
62
|
+
}
|
|
63
|
+
/** Deletes an entire element tree, including sub-models and child elements.
|
|
64
|
+
* Items are deleted in bottom-up order. Definitions and Subjects are deleted after normal elements.
|
|
65
|
+
* @beta
|
|
66
|
+
*/
|
|
67
|
+
export declare class ElementTreeDeleter extends ElementTreeBottomUp {
|
|
68
|
+
private _special;
|
|
69
|
+
private _topElement;
|
|
70
|
+
private _topScope;
|
|
71
|
+
constructor(iModel: IModelDb, topElement: Id64String, scope?: ElementTreeWalkerScope);
|
|
72
|
+
protected shouldExploreModel(_model: Model): boolean;
|
|
73
|
+
protected shouldVisitElement(_elementId: Id64String): boolean;
|
|
74
|
+
protected visitModel(model: Model, _scope: ElementTreeWalkerScope): void;
|
|
75
|
+
protected visitElement(elementId: Id64String, _scope: ElementTreeWalkerScope): void;
|
|
76
|
+
/** Delete the element tree. */
|
|
77
|
+
deleteElementTree(): void;
|
|
78
|
+
}
|
|
79
|
+
/** Does a breadth-first search on the tree defined by an element and its sub-models and children.
|
|
80
|
+
* Parents are visited first, then children, then sub-models.
|
|
81
|
+
* The subclass can "prune" sub-trees from the search. When a sub-tree is "pruned" the search does *not* recurse into it.
|
|
82
|
+
* If a sub-tree is not pruned, then the search does recurse into it.
|
|
83
|
+
* @beta
|
|
84
|
+
*/
|
|
85
|
+
declare abstract class ElementTreeTopDown {
|
|
86
|
+
protected _iModel: IModelDb;
|
|
87
|
+
constructor(_iModel: IModelDb);
|
|
88
|
+
/** Should the search *not* recurse into this sub-tree? */
|
|
89
|
+
protected shouldPrune(_elementId: Id64String, _scope: ElementTreeWalkerScope): boolean;
|
|
90
|
+
protected abstract prune(_elementId: Id64String, _scope: ElementTreeWalkerScope): void;
|
|
91
|
+
protected processElementTree(element: Id64String, scope: ElementTreeWalkerScope): void;
|
|
92
|
+
private _processChildren;
|
|
93
|
+
private _processSubModel;
|
|
94
|
+
}
|
|
95
|
+
/** Signature of the filter function used by ElementSubTreeDeleter.
|
|
96
|
+
* @param elementId The sub-tree parent element.
|
|
97
|
+
* @param scope The path followed by the top-down search to the element
|
|
98
|
+
* @return true if the element and its children and sub-models should be deleted.
|
|
99
|
+
* @beta
|
|
100
|
+
*/
|
|
101
|
+
export declare type ElementSubTreeDeleteFilter = (elementId: Id64String, scope: ElementTreeWalkerScope) => boolean;
|
|
102
|
+
/** Deletes the element sub-trees that are chosen by a supplied filter function.
|
|
103
|
+
* This class uses ElementTreeTopDown to visit element sub-trees in top-down order.
|
|
104
|
+
* When the filter function chooses a sub-tree, this class uses ElementTreeDeleter to delete it.
|
|
105
|
+
* Note that when a sub-tree is selected and deleted, its children and sub-models are not visited.
|
|
106
|
+
* @beta
|
|
107
|
+
*/
|
|
108
|
+
export declare class ElementSubTreeDeleter extends ElementTreeTopDown {
|
|
109
|
+
private _special;
|
|
110
|
+
private _topElement;
|
|
111
|
+
private _topScope;
|
|
112
|
+
private _shouldPruneCb;
|
|
113
|
+
/** Construct an ElementSubTreeDeleter. @see pruneElementTree.
|
|
114
|
+
* @param iModel The iModel
|
|
115
|
+
* @param topElement Where to start the search.
|
|
116
|
+
* @param shouldPruneCb Callback that selects sub-trees that should be deleted.
|
|
117
|
+
*/
|
|
118
|
+
constructor(iModel: IModelDb, topElement: Id64String, shouldPruneCb: ElementSubTreeDeleteFilter, scope?: ElementTreeWalkerScope);
|
|
119
|
+
protected shouldPrune(elementId: Id64String, scope: ElementTreeWalkerScope): boolean;
|
|
120
|
+
protected prune(elementId: Id64String, scope: ElementTreeWalkerScope): void;
|
|
121
|
+
/** Traverses the tree of elements, beginning with the top element, and deletes all selected sub-trees. */
|
|
122
|
+
pruneElementTree(): void;
|
|
123
|
+
}
|
|
124
|
+
/** Deletes an element tree starting with the specified top element. The top element is also deleted. Uses ElementTreeDeleter.
|
|
125
|
+
* @param iModel The iModel
|
|
126
|
+
* @param topElement The parent of the sub-tree
|
|
127
|
+
* @beta
|
|
128
|
+
*/
|
|
129
|
+
export declare function deleteElementTree(iModel: IModelDb, topElement: Id64String): void;
|
|
130
|
+
/** Deletes all element sub-trees that are selected by the supplied filter. Uses ElementSubTreeDeleter.
|
|
131
|
+
* If the filter selects the top element itself, then the entire tree (including the top element) is deleted.
|
|
132
|
+
* That has the same effect as calling [[deleteElementTree]] on the top element.
|
|
133
|
+
* @param iModel The iModel
|
|
134
|
+
* @param topElement Where to start the search.
|
|
135
|
+
* @param filter Callback that selects sub-trees that should be deleted.
|
|
136
|
+
* @beta
|
|
137
|
+
*/
|
|
138
|
+
export declare function deleteElementSubTrees(iModel: IModelDb, topElement: Id64String, filter: ElementSubTreeDeleteFilter): void;
|
|
139
|
+
export {};
|
|
140
|
+
//# sourceMappingURL=ElementTreeWalker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ElementTreeWalker.d.ts","sourceRoot":"","sources":["../../src/ElementTreeWalker.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAA+B,UAAU,EAAoB,MAAM,qBAAqB,CAAC;AAKhG,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAmB,KAAK,EAAE,MAAM,SAAS,CAAC;AAIjD,YAAY;AACZ,MAAM,WAAW,0BAA0B;IAAG,KAAK,EAAE,KAAK,CAAC;IAAC,iBAAiB,EAAE,OAAO,CAAA;CAAE;AAwBxF;;GAEG;AACH,qBAAa,sBAAsB;IACjC,SAAgB,UAAU,EAAE,UAAU,CAAM;IAC5C,mDAAmD;IACnD,SAAgB,IAAI,EAAE,KAAK,CAAC,UAAU,GAAG,0BAA0B,CAAC,CAAM;IAC1E,uFAAuF;IACvF,SAAgB,kBAAkB,EAAE,0BAA0B,CAAC;gBAEnD,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK;gBACpC,cAAc,EAAE,sBAAsB,E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B;IAE1C,OAAO,CAAC,cAAc,CAA6B;IAEnD;;;;OAIG;gBACgB,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,0BAA0B,EAAE,KAAK,CAAC,EAAE,sBAAsB;cAOnH,WAAW,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,sBAAsB,GAAG,OAAO;IAE7F,SAAS,CAAC,KAAK,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,sBAAsB,GAAG,IAAI;IAO3E,0GAA0G;IACnG,gBAAgB;CAIxB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CAGhF;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,0BAA0B,GAAG,IAAI,CAGxH"}
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteElementSubTrees = exports.deleteElementTree = exports.ElementSubTreeDeleter = exports.ElementTreeDeleter = exports.ElementTreeBottomUp = exports.ElementTreeWalkerScope = void 0;
|
|
4
|
+
/*---------------------------------------------------------------------------------------------
|
|
5
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
+
*--------------------------------------------------------------------------------------------*/
|
|
8
|
+
/** @packageDocumentation
|
|
9
|
+
* @module Elements
|
|
10
|
+
*/
|
|
11
|
+
const core_bentley_1 = require("@itwin/core-bentley");
|
|
12
|
+
const core_common_1 = require("@itwin/core-common");
|
|
13
|
+
const BackendLoggerCategory_1 = require("./BackendLoggerCategory");
|
|
14
|
+
const Category_1 = require("./Category");
|
|
15
|
+
const Element_1 = require("./Element");
|
|
16
|
+
const IModelDb_1 = require("./IModelDb");
|
|
17
|
+
const Model_1 = require("./Model");
|
|
18
|
+
const loggerCategory = `${BackendLoggerCategory_1.BackendLoggerCategory.IModelDb}.ElementTreeWalker`;
|
|
19
|
+
function isModelEmpty(iModel, modelId) {
|
|
20
|
+
return iModel.withPreparedStatement(`select count(*) from ${Element_1.Element.classFullName} where Model.Id = ?`, (stmt) => {
|
|
21
|
+
stmt.bindId(1, modelId);
|
|
22
|
+
stmt.step();
|
|
23
|
+
return stmt.getValue(0).getInteger() === 0;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function isDefinitionModel(model) {
|
|
27
|
+
return (model.id !== core_common_1.IModel.repositoryModelId) && (model instanceof Model_1.DefinitionModel);
|
|
28
|
+
}
|
|
29
|
+
var ElementPruningClassification;
|
|
30
|
+
(function (ElementPruningClassification) {
|
|
31
|
+
ElementPruningClassification[ElementPruningClassification["PRUNING_CLASS_Normal"] = 0] = "PRUNING_CLASS_Normal";
|
|
32
|
+
ElementPruningClassification[ElementPruningClassification["PRUNING_CLASS_Subject"] = 1] = "PRUNING_CLASS_Subject";
|
|
33
|
+
ElementPruningClassification[ElementPruningClassification["PRUNING_CLASS_Definition"] = 2] = "PRUNING_CLASS_Definition";
|
|
34
|
+
ElementPruningClassification[ElementPruningClassification["PRUNING_CLASS_DefinitionPartition"] = 3] = "PRUNING_CLASS_DefinitionPartition";
|
|
35
|
+
})(ElementPruningClassification || (ElementPruningClassification = {}));
|
|
36
|
+
function classifyElementForPruning(iModel, elementId) {
|
|
37
|
+
const el = iModel.elements.getElement(elementId);
|
|
38
|
+
return (el instanceof Element_1.Subject) ? ElementPruningClassification.PRUNING_CLASS_Subject :
|
|
39
|
+
(el instanceof Element_1.DefinitionElement) ? ElementPruningClassification.PRUNING_CLASS_Definition :
|
|
40
|
+
(el instanceof Element_1.DefinitionPartition) ? ElementPruningClassification.PRUNING_CLASS_DefinitionPartition :
|
|
41
|
+
ElementPruningClassification.PRUNING_CLASS_Normal;
|
|
42
|
+
}
|
|
43
|
+
/** Records the path that a tree search took to reach an element or model. This object is immutable.
|
|
44
|
+
* @beta
|
|
45
|
+
*/
|
|
46
|
+
class ElementTreeWalkerScope {
|
|
47
|
+
constructor(arg1, arg2) {
|
|
48
|
+
this.topElement = "";
|
|
49
|
+
/** path of parent elements and enclosing models */
|
|
50
|
+
this.path = [];
|
|
51
|
+
if (typeof arg1 === "string") {
|
|
52
|
+
// normal constructor
|
|
53
|
+
(0, core_bentley_1.assert)(arg2 instanceof Model_1.Model);
|
|
54
|
+
this.topElement = arg1;
|
|
55
|
+
this.path.push(this.enclosingModelInfo = { model: arg2, isDefinitionModel: isDefinitionModel(arg2) });
|
|
56
|
+
}
|
|
57
|
+
else if (arg1 instanceof ElementTreeWalkerScope) {
|
|
58
|
+
// copy-like constructor
|
|
59
|
+
this.topElement = arg1.topElement;
|
|
60
|
+
this.path = [...arg1.path];
|
|
61
|
+
if (typeof arg2 === "string") {
|
|
62
|
+
// with new parent
|
|
63
|
+
this.path.push(arg2);
|
|
64
|
+
this.enclosingModelInfo = arg1.enclosingModelInfo;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
// with new enclosing model
|
|
68
|
+
this.path.push(this.enclosingModelInfo = { model: arg2, isDefinitionModel: isDefinitionModel(arg2) });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
throw new Error("invalid constructor signature");
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
get enclosingModel() { return this.enclosingModelInfo.model; }
|
|
76
|
+
get inDefinitionModel() { return this.enclosingModelInfo.isDefinitionModel; } // NB: this will return false for the RepositoryModel!
|
|
77
|
+
get inRepositoryModel() { return this.enclosingModelInfo.model.id === IModelDb_1.IModelDb.repositoryModelId; }
|
|
78
|
+
static createTopScope(iModel, topElementId) {
|
|
79
|
+
const topElement = iModel.elements.getElement(topElementId);
|
|
80
|
+
const topElementModel = iModel.models.getModel(topElement.model);
|
|
81
|
+
return new ElementTreeWalkerScope(topElementId, topElementModel);
|
|
82
|
+
}
|
|
83
|
+
fmtItem(v) {
|
|
84
|
+
if (typeof v === "string")
|
|
85
|
+
return `element ${v}`;
|
|
86
|
+
return `model ${v.model.id} ${v.isDefinitionModel ? "(DEFN)" : ""}`;
|
|
87
|
+
}
|
|
88
|
+
toString() {
|
|
89
|
+
return `[ ${this.path.map((v) => this.fmtItem(v)).join(" / ")} ]`;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.ElementTreeWalkerScope = ElementTreeWalkerScope;
|
|
93
|
+
function fmtElement(iModel, elementId) {
|
|
94
|
+
const el = iModel.elements.getElement(elementId);
|
|
95
|
+
return `${el.id} ${el.classFullName} ${el.code.value} ${el.getDisplayLabel()}`;
|
|
96
|
+
}
|
|
97
|
+
function fmtModel(model) {
|
|
98
|
+
return `${model.id} ${model.classFullName} ${model.name}`;
|
|
99
|
+
}
|
|
100
|
+
let isTraceEnabledChecked = -1;
|
|
101
|
+
function isTraceEnabled() {
|
|
102
|
+
if (isTraceEnabledChecked === -1)
|
|
103
|
+
isTraceEnabledChecked = core_bentley_1.Logger.isEnabled(loggerCategory, core_bentley_1.LogLevel.Trace) ? 1 : 0;
|
|
104
|
+
return isTraceEnabledChecked === 1;
|
|
105
|
+
}
|
|
106
|
+
function logElement(op, iModel, elementId, scope) {
|
|
107
|
+
if (isTraceEnabled())
|
|
108
|
+
core_bentley_1.Logger.logTrace(loggerCategory, `${op} ${fmtElement(iModel, elementId)} ${scope === null || scope === void 0 ? void 0 : scope.toString()}`);
|
|
109
|
+
}
|
|
110
|
+
function logModel(op, iModel, modelId, scope) {
|
|
111
|
+
if (!isTraceEnabled())
|
|
112
|
+
return;
|
|
113
|
+
const model = iModel.models.getModel(modelId);
|
|
114
|
+
core_bentley_1.Logger.logTrace(loggerCategory, `${op} ${fmtModel(model)} ${scope === null || scope === void 0 ? void 0 : scope.toString()}`);
|
|
115
|
+
}
|
|
116
|
+
/** Does a depth-first search on the tree defined by an element and its sub-models and children.
|
|
117
|
+
* Sub-models are visited before their modeled elements, and children are visited before their parents.
|
|
118
|
+
*
|
|
119
|
+
* The following callbacks allow the subclass to exclude elements and sub-trees from the search:
|
|
120
|
+
* * [[ElementTreeBottomUp.shouldExploreModel]], [[ElementTreeBottomUp.shouldExploreChildren]]
|
|
121
|
+
* * [[ElementTreeBottomUp.shouldVisitElement]], [[ElementTreeBottomUp.shouldVisitModel]]
|
|
122
|
+
*
|
|
123
|
+
* The [[ElementTreeBottomUp.visitElement]] and [[ElementTreeBottomUp.visitModel]] callbacks allow
|
|
124
|
+
* the subclass to process the elements and models that are encountered in the search.
|
|
125
|
+
* @beta
|
|
126
|
+
*/
|
|
127
|
+
class ElementTreeBottomUp {
|
|
128
|
+
constructor(_iModel) {
|
|
129
|
+
this._iModel = _iModel;
|
|
130
|
+
}
|
|
131
|
+
/** Return true if the search should recurse into this model */
|
|
132
|
+
shouldExploreModel(_model, _scope) { return true; }
|
|
133
|
+
/** Return true if the search should recurse into the children (if any) of this element */
|
|
134
|
+
shouldExploreChildren(_parentId, _scope) { return true; }
|
|
135
|
+
/** Return true if the search should visit this element */
|
|
136
|
+
shouldVisitElement(_elementId, _scope) { return true; }
|
|
137
|
+
/** Return true if the search should visit this model */
|
|
138
|
+
shouldVisitModel(_model, _scope) { return true; }
|
|
139
|
+
/** The main tree-walking function */
|
|
140
|
+
processElementTree(element, scope) {
|
|
141
|
+
const subModel = this._iModel.models.tryGetModel(element);
|
|
142
|
+
if (subModel !== undefined) {
|
|
143
|
+
if (this.shouldExploreModel(subModel, scope))
|
|
144
|
+
this._processSubModel(subModel, scope);
|
|
145
|
+
if (this.shouldVisitModel(subModel, scope))
|
|
146
|
+
this.visitModel(subModel, scope);
|
|
147
|
+
}
|
|
148
|
+
if (this.shouldExploreChildren(element, scope))
|
|
149
|
+
this._processChildren(element, scope);
|
|
150
|
+
if (this.shouldVisitElement(element, scope))
|
|
151
|
+
this.visitElement(element, scope);
|
|
152
|
+
}
|
|
153
|
+
/** process the children of the specified parent element */
|
|
154
|
+
_processChildren(parentElement, parentScope) {
|
|
155
|
+
const children = this._iModel.elements.queryChildren(parentElement);
|
|
156
|
+
if (children.length === 0)
|
|
157
|
+
return;
|
|
158
|
+
const childrenScope = new ElementTreeWalkerScope(parentScope, parentElement);
|
|
159
|
+
for (const childElement of children)
|
|
160
|
+
this.processElementTree(childElement, childrenScope);
|
|
161
|
+
}
|
|
162
|
+
/** process the elements in the specified model */
|
|
163
|
+
_processSubModel(model, parenScope) {
|
|
164
|
+
const scope = new ElementTreeWalkerScope(parenScope, model);
|
|
165
|
+
// Visit only the top-level parents. processElementTree will visit their children (bottom-up).
|
|
166
|
+
model.iModel.withPreparedStatement(`select ECInstanceId from bis:Element where Model.id=? and Parent.Id is null`, (stmt) => {
|
|
167
|
+
stmt.bindId(1, model.id);
|
|
168
|
+
while (stmt.step() === core_bentley_1.DbResult.BE_SQLITE_ROW) {
|
|
169
|
+
const elementId = stmt.getValue(0).getId();
|
|
170
|
+
this.processElementTree(elementId, scope);
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
exports.ElementTreeBottomUp = ElementTreeBottomUp;
|
|
176
|
+
/** Helper class that manages the deletion of definitions and subjects */
|
|
177
|
+
class SpecialElements {
|
|
178
|
+
constructor() {
|
|
179
|
+
this.definitionModels = [];
|
|
180
|
+
this.definitions = [];
|
|
181
|
+
this.subjects = [];
|
|
182
|
+
}
|
|
183
|
+
recordSpecialElement(iModel, elementId) {
|
|
184
|
+
// Defer Definitions and Subjects
|
|
185
|
+
const cls = classifyElementForPruning(iModel, elementId);
|
|
186
|
+
if (cls === ElementPruningClassification.PRUNING_CLASS_Subject) {
|
|
187
|
+
this.subjects.push(elementId);
|
|
188
|
+
return true;
|
|
189
|
+
}
|
|
190
|
+
else if (cls === ElementPruningClassification.PRUNING_CLASS_Definition) {
|
|
191
|
+
this.definitions.push(elementId);
|
|
192
|
+
return true;
|
|
193
|
+
}
|
|
194
|
+
else if (cls === ElementPruningClassification.PRUNING_CLASS_DefinitionPartition) {
|
|
195
|
+
this.definitionModels.push(elementId);
|
|
196
|
+
return true;
|
|
197
|
+
}
|
|
198
|
+
return false; // not a special element
|
|
199
|
+
}
|
|
200
|
+
// It's dangerous to pass a mixture of SubCategories and Categories to deleteDefinitionElements.
|
|
201
|
+
// That function will delete the Categories first, which automatically deletes all their child
|
|
202
|
+
// SubCategories (in native code). If a SubCategory in the list is one of those children, then
|
|
203
|
+
// deleteDefinitionElements will try and fail with an exception to delete that SubCategory in a subsequent step.
|
|
204
|
+
// To work around this, we delete the SubCategories first, then everything else.
|
|
205
|
+
_siftSpecialElements(iModel) {
|
|
206
|
+
const subCategories = [];
|
|
207
|
+
const other = [];
|
|
208
|
+
this.definitions.forEach((elementId) => {
|
|
209
|
+
if (iModel.elements.tryGetElement(elementId, Category_1.SubCategory) !== undefined)
|
|
210
|
+
subCategories.push(elementId);
|
|
211
|
+
else
|
|
212
|
+
other.push(elementId);
|
|
213
|
+
});
|
|
214
|
+
return [subCategories, other];
|
|
215
|
+
}
|
|
216
|
+
deleteSpecialElements(iModel) {
|
|
217
|
+
for (const definitions of this._siftSpecialElements(iModel)) {
|
|
218
|
+
if (isTraceEnabled())
|
|
219
|
+
definitions.forEach((e) => logElement("try delete", iModel, e));
|
|
220
|
+
iModel.elements.deleteDefinitionElements(definitions); // will not deleted definitions that are still in use.
|
|
221
|
+
}
|
|
222
|
+
for (const m of this.definitionModels) {
|
|
223
|
+
if (!isModelEmpty(iModel, m)) {
|
|
224
|
+
logModel("Model not empty - cannot delete - may contain Definitions that are still in use", iModel, m);
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
logModel("delete", iModel, m);
|
|
228
|
+
iModel.models.deleteModel(m);
|
|
229
|
+
iModel.elements.deleteElement(m);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
for (const e of this.subjects) {
|
|
233
|
+
if (iModel.elements.queryChildren(e).length !== 0) {
|
|
234
|
+
logElement("Subject still has children - cannot delete - may have child DefinitionModels", iModel, e);
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
logElement("delete", iModel, e);
|
|
238
|
+
iModel.elements.deleteElement(e);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
/** Deletes an entire element tree, including sub-models and child elements.
|
|
244
|
+
* Items are deleted in bottom-up order. Definitions and Subjects are deleted after normal elements.
|
|
245
|
+
* @beta
|
|
246
|
+
*/
|
|
247
|
+
class ElementTreeDeleter extends ElementTreeBottomUp {
|
|
248
|
+
constructor(iModel, topElement, scope) {
|
|
249
|
+
super(iModel);
|
|
250
|
+
this._special = new SpecialElements();
|
|
251
|
+
this._topElement = topElement;
|
|
252
|
+
this._topScope = scope !== null && scope !== void 0 ? scope : ElementTreeWalkerScope.createTopScope(this._iModel, this._topElement);
|
|
253
|
+
}
|
|
254
|
+
shouldExploreModel(_model) { return true; }
|
|
255
|
+
shouldVisitElement(_elementId) { return true; }
|
|
256
|
+
visitModel(model, _scope) {
|
|
257
|
+
if (isDefinitionModel(model))
|
|
258
|
+
return; // we recorded definition models in visitElement when we encountered the DefinitionPartition elements.
|
|
259
|
+
// visitElement was called first, and it deleted the elements in the model. So, now it's safe to delete the model itself.
|
|
260
|
+
// TODO: will fail if model has an element that is sub-modeled by a **DefinitionModel**. I hope that never occurs!
|
|
261
|
+
logModel("delete", this._iModel, model.id, _scope);
|
|
262
|
+
model.delete();
|
|
263
|
+
}
|
|
264
|
+
visitElement(elementId, _scope) {
|
|
265
|
+
if (!this._special.recordSpecialElement(this._iModel, elementId)) {
|
|
266
|
+
logElement("delete", this._iModel, elementId, _scope);
|
|
267
|
+
this._iModel.elements.deleteElement(elementId);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
/** Delete the element tree. */
|
|
271
|
+
deleteElementTree() {
|
|
272
|
+
this.processElementTree(this._topElement, this._topScope); // Delete the "normal" elements and record the special elements for deferred processing
|
|
273
|
+
this._special.deleteSpecialElements(this._iModel);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
exports.ElementTreeDeleter = ElementTreeDeleter;
|
|
277
|
+
/** Does a breadth-first search on the tree defined by an element and its sub-models and children.
|
|
278
|
+
* Parents are visited first, then children, then sub-models.
|
|
279
|
+
* The subclass can "prune" sub-trees from the search. When a sub-tree is "pruned" the search does *not* recurse into it.
|
|
280
|
+
* If a sub-tree is not pruned, then the search does recurse into it.
|
|
281
|
+
* @beta
|
|
282
|
+
*/
|
|
283
|
+
class ElementTreeTopDown {
|
|
284
|
+
constructor(_iModel) {
|
|
285
|
+
this._iModel = _iModel;
|
|
286
|
+
}
|
|
287
|
+
/** Should the search *not* recurse into this sub-tree? */
|
|
288
|
+
shouldPrune(_elementId, _scope) { return false; }
|
|
289
|
+
processElementTree(element, scope) {
|
|
290
|
+
if (this.shouldPrune(element, scope)) {
|
|
291
|
+
this.prune(element, scope);
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
this._processChildren(element, scope);
|
|
295
|
+
const subModel = this._iModel.models.tryGetModel(element);
|
|
296
|
+
if (subModel !== undefined) {
|
|
297
|
+
this._processSubModel(subModel, scope);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
_processChildren(element, scope) {
|
|
301
|
+
let parentScope;
|
|
302
|
+
for (const childElement of this._iModel.elements.queryChildren(element)) {
|
|
303
|
+
if (parentScope === undefined)
|
|
304
|
+
parentScope = new ElementTreeWalkerScope(scope, element);
|
|
305
|
+
this.processElementTree(childElement, parentScope);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
_processSubModel(subModel, scope) {
|
|
309
|
+
const subModelScope = new ElementTreeWalkerScope(scope, subModel);
|
|
310
|
+
// Visit only the top-level parents. processElementTree will recurse into their children.
|
|
311
|
+
this._iModel.withPreparedStatement(`select ECInstanceId from bis:Element where Model.id=? and Parent.Id is null`, (stmt) => {
|
|
312
|
+
stmt.bindId(1, subModel.id);
|
|
313
|
+
while (stmt.step() === core_bentley_1.DbResult.BE_SQLITE_ROW) {
|
|
314
|
+
const elementId = stmt.getValue(0).getId();
|
|
315
|
+
this.processElementTree(elementId, subModelScope);
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
/** Deletes the element sub-trees that are chosen by a supplied filter function.
|
|
321
|
+
* This class uses ElementTreeTopDown to visit element sub-trees in top-down order.
|
|
322
|
+
* When the filter function chooses a sub-tree, this class uses ElementTreeDeleter to delete it.
|
|
323
|
+
* Note that when a sub-tree is selected and deleted, its children and sub-models are not visited.
|
|
324
|
+
* @beta
|
|
325
|
+
*/
|
|
326
|
+
class ElementSubTreeDeleter extends ElementTreeTopDown {
|
|
327
|
+
/** Construct an ElementSubTreeDeleter. @see pruneElementTree.
|
|
328
|
+
* @param iModel The iModel
|
|
329
|
+
* @param topElement Where to start the search.
|
|
330
|
+
* @param shouldPruneCb Callback that selects sub-trees that should be deleted.
|
|
331
|
+
*/
|
|
332
|
+
constructor(iModel, topElement, shouldPruneCb, scope) {
|
|
333
|
+
super(iModel);
|
|
334
|
+
this._special = new SpecialElements();
|
|
335
|
+
this._topElement = topElement;
|
|
336
|
+
this._topScope = scope !== null && scope !== void 0 ? scope : ElementTreeWalkerScope.createTopScope(this._iModel, this._topElement);
|
|
337
|
+
this._shouldPruneCb = shouldPruneCb;
|
|
338
|
+
}
|
|
339
|
+
shouldPrune(elementId, scope) { return this._shouldPruneCb(elementId, scope); }
|
|
340
|
+
prune(elementId, scope) {
|
|
341
|
+
if (!this._special.recordSpecialElement(this._iModel, elementId)) {
|
|
342
|
+
const del = new ElementTreeDeleter(this._iModel, elementId, scope);
|
|
343
|
+
del.deleteElementTree();
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
/** Traverses the tree of elements, beginning with the top element, and deletes all selected sub-trees. */
|
|
347
|
+
pruneElementTree() {
|
|
348
|
+
this.processElementTree(this._topElement, this._topScope); // deletes normal elements and their sub-trees, defers special elements
|
|
349
|
+
this._special.deleteSpecialElements(this._iModel);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
exports.ElementSubTreeDeleter = ElementSubTreeDeleter;
|
|
353
|
+
/** Deletes an element tree starting with the specified top element. The top element is also deleted. Uses ElementTreeDeleter.
|
|
354
|
+
* @param iModel The iModel
|
|
355
|
+
* @param topElement The parent of the sub-tree
|
|
356
|
+
* @beta
|
|
357
|
+
*/
|
|
358
|
+
function deleteElementTree(iModel, topElement) {
|
|
359
|
+
const del = new ElementTreeDeleter(iModel, topElement);
|
|
360
|
+
del.deleteElementTree();
|
|
361
|
+
}
|
|
362
|
+
exports.deleteElementTree = deleteElementTree;
|
|
363
|
+
/** Deletes all element sub-trees that are selected by the supplied filter. Uses ElementSubTreeDeleter.
|
|
364
|
+
* If the filter selects the top element itself, then the entire tree (including the top element) is deleted.
|
|
365
|
+
* That has the same effect as calling [[deleteElementTree]] on the top element.
|
|
366
|
+
* @param iModel The iModel
|
|
367
|
+
* @param topElement Where to start the search.
|
|
368
|
+
* @param filter Callback that selects sub-trees that should be deleted.
|
|
369
|
+
* @beta
|
|
370
|
+
*/
|
|
371
|
+
function deleteElementSubTrees(iModel, topElement, filter) {
|
|
372
|
+
const del = new ElementSubTreeDeleter(iModel, topElement, filter);
|
|
373
|
+
del.pruneElementTree();
|
|
374
|
+
}
|
|
375
|
+
exports.deleteElementSubTrees = deleteElementSubTrees;
|
|
376
|
+
//# sourceMappingURL=ElementTreeWalker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ElementTreeWalker.js","sourceRoot":"","sources":["../../src/ElementTreeWalker.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAgG;AAChG,oDAA4C;AAC5C,mEAAgE;AAChE,yCAAyC;AACzC,uCAAqF;AACrF,yCAAsC;AACtC,mCAAiD;AAEjD,MAAM,c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,qBAAqB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IAClE,GAAG,CAAC,gBAAgB,EAAE,CAAC;AACzB,CAAC;AAHD,sDAGC","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 Elements\r\n */\r\nimport { assert, DbResult, Id64Array, Id64String, Logger, LogLevel } from \"@itwin/core-bentley\";\r\nimport { IModel } from \"@itwin/core-common\";\r\nimport { BackendLoggerCategory } from \"./BackendLoggerCategory\";\r\nimport { SubCategory } from \"./Category\";\r\nimport { DefinitionElement, DefinitionPartition, Element, Subject } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { DefinitionModel, Model } from \"./Model\";\r\n\r\nconst loggerCategory = `${BackendLoggerCategory.IModelDb}.ElementTreeWalker`;\r\n\r\n/** @beta */\r\nexport interface ElementTreeWalkerModelInfo { model: Model, isDefinitionModel: boolean }\r\n\r\nfunction isModelEmpty(iModel: IModelDb, modelId: Id64String): boolean {\r\n return iModel.withPreparedStatement(`select count(*) from ${Element.classFullName} where Model.Id = ?`, (stmt) => {\r\n stmt.bindId(1, modelId);\r\n stmt.step();\r\n return stmt.getValue(0).getInteger() === 0;\r\n });\r\n}\r\n\r\nfunction isDefinitionModel(model: Model): boolean {\r\n return (model.id !== IModel.repositoryModelId) && (model instanceof DefinitionModel);\r\n}\r\n\r\nenum ElementPruningClassification { PRUNING_CLASS_Normal = 0, PRUNING_CLASS_Subject = 1, PRUNING_CLASS_Definition = 2, PRUNING_CLASS_DefinitionPartition = 3, }\r\n\r\nfunction classifyElementForPruning(iModel: IModelDb, elementId: Id64String): ElementPruningClassification {\r\n const el = iModel.elements.getElement(elementId);\r\n return (el instanceof Subject) ? ElementPruningClassification.PRUNING_CLASS_Subject :\r\n (el instanceof DefinitionElement) ? ElementPruningClassification.PRUNING_CLASS_Definition :\r\n (el instanceof DefinitionPartition) ? ElementPruningClassification.PRUNING_CLASS_DefinitionPartition :\r\n ElementPruningClassification.PRUNING_CLASS_Normal;\r\n}\r\n\r\n/** Records the path that a tree search took to reach an element or model. This object is immutable.\r\n * @beta\r\n */\r\nexport class ElementTreeWalkerScope {\r\n public readonly topElement: Id64String = \"\";\r\n /** path of parent elements and enclosing models */\r\n public readonly path: Array<Id64String | ElementTreeWalkerModelInfo> = [];\r\n /** cached info about the immediately enclosing model (i.e., the last model in path) */\r\n public readonly enclosingModelInfo: ElementTreeWalkerModelInfo;\r\n\r\n constructor(topElement: Id64String, model: Model);\r\n constructor(enclosingScope: ElementTreeWalkerScope, newScope: Id64String | Model);\r\n constructor(arg1: Id64String | ElementTreeWalkerScope, arg2: Model | Id64String) {\r\n if (typeof arg1 === \"string\") {\r\n // normal constructor\r\n assert(arg2 instanceof Model);\r\n this.topElement = arg1;\r\n this.path.push(this.enclosingModelInfo = { model: arg2, isDefinitionModel: isDefinitionModel(arg2) });\r\n } else if (arg1 instanceof ElementTreeWalkerScope) {\r\n // copy-like constructor\r\n this.topElement = arg1.topElement;\r\n this.path = [...arg1.path];\r\n if (typeof arg2 === \"string\") {\r\n // with new parent\r\n this.path.push(arg2);\r\n this.enclosingModelInfo = arg1.enclosingModelInfo;\r\n } else {\r\n // with new enclosing model\r\n this.path.push(this.enclosingModelInfo = { model: arg2, isDefinitionModel: isDefinitionModel(arg2) });\r\n }\r\n } else {\r\n throw new Error(\"invalid constructor signature\");\r\n }\r\n }\r\n\r\n public get enclosingModel(): Model { return this.enclosingModelInfo.model; }\r\n public get inDefinitionModel(): boolean { return this.enclosingModelInfo.isDefinitionModel; } // NB: this will return false for the RepositoryModel!\r\n public get inRepositoryModel(): boolean { return this.enclosingModelInfo.model.id === IModelDb.repositoryModelId; }\r\n\r\n public static createTopScope(iModel: IModelDb, topElementId: Id64String) {\r\n const topElement = iModel.elements.getElement(topElementId);\r\n const topElementModel = iModel.models.getModel(topElement.model);\r\n return new ElementTreeWalkerScope(topElementId, topElementModel);\r\n }\r\n\r\n private fmtItem(v: Id64String | ElementTreeWalkerModelInfo): string {\r\n if (typeof v === \"string\")\r\n return `element ${v}`;\r\n return `model ${v.model.id} ${v.isDefinitionModel ? \"(DEFN)\" : \"\"}`;\r\n }\r\n\r\n public toString(): string {\r\n return `[ ${this.path.map((v) => this.fmtItem(v)).join(\" / \")} ]`;\r\n }\r\n}\r\n\r\nfunction fmtElement(iModel: IModelDb, elementId: Id64String): string {\r\n const el = iModel.elements.getElement(elementId);\r\n return `${el.id} ${el.classFullName} ${el.code.value} ${el.getDisplayLabel()}`;\r\n}\r\n\r\nfunction fmtModel(model: Model): string {\r\n return `${model.id} ${model.classFullName} ${model.name}`;\r\n}\r\n\r\nlet isTraceEnabledChecked = -1;\r\n\r\nfunction isTraceEnabled(): boolean {\r\n if (isTraceEnabledChecked === -1)\r\n isTraceEnabledChecked = Logger.isEnabled(loggerCategory, LogLevel.Trace) ? 1 : 0;\r\n return isTraceEnabledChecked === 1;\r\n}\r\n\r\nfunction logElement(op: string, iModel: IModelDb, elementId: Id64String, scope?: ElementTreeWalkerScope): void {\r\n if (isTraceEnabled())\r\n Logger.logTrace(loggerCategory, `${op} ${fmtElement(iModel, elementId)} ${scope?.toString()}`);\r\n}\r\n\r\nfunction logModel(op: string, iModel: IModelDb, modelId: Id64String, scope?: ElementTreeWalkerScope): void {\r\n if (!isTraceEnabled())\r\n return;\r\n const model: Model = iModel.models.getModel(modelId);\r\n Logger.logTrace(loggerCategory, `${op} ${fmtModel(model)} ${scope?.toString()}`);\r\n}\r\n\r\n/** Does a depth-first search on the tree defined by an element and its sub-models and children.\r\n * Sub-models are visited before their modeled elements, and children are visited before their parents.\r\n *\r\n * The following callbacks allow the subclass to exclude elements and sub-trees from the search:\r\n * * [[ElementTreeBottomUp.shouldExploreModel]], [[ElementTreeBottomUp.shouldExploreChildren]]\r\n * * [[ElementTreeBottomUp.shouldVisitElement]], [[ElementTreeBottomUp.shouldVisitModel]]\r\n *\r\n * The [[ElementTreeBottomUp.visitElement]] and [[ElementTreeBottomUp.visitModel]] callbacks allow\r\n * the subclass to process the elements and models that are encountered in the search.\r\n * @beta\r\n */\r\nexport abstract class ElementTreeBottomUp {\r\n constructor(protected _iModel: IModelDb) { }\r\n\r\n /** Return true if the search should recurse into this model */\r\n protected shouldExploreModel(_model: Model, _scope: ElementTreeWalkerScope): boolean { return true; }\r\n /** Return true if the search should recurse into the children (if any) of this element */\r\n protected shouldExploreChildren(_parentId: Id64String, _scope: ElementTreeWalkerScope): boolean { return true; }\r\n /** Return true if the search should visit this element */\r\n protected shouldVisitElement(_elementId: Id64String, _scope: ElementTreeWalkerScope): boolean { return true; }\r\n /** Return true if the search should visit this model */\r\n protected shouldVisitModel(_model: Model, _scope: ElementTreeWalkerScope): boolean { return true; }\r\n\r\n /** Called to visit a model */\r\n protected abstract visitModel(model: Model, scope: ElementTreeWalkerScope): void;\r\n\r\n /** Called to visit an element */\r\n protected abstract visitElement(elementId: Id64String, scope: ElementTreeWalkerScope): void;\r\n\r\n /** The main tree-walking function */\r\n protected processElementTree(element: Id64String, scope: ElementTreeWalkerScope) {\r\n const subModel = this._iModel.models.tryGetModel<Model>(element);\r\n if (subModel !== undefined) {\r\n if (this.shouldExploreModel(subModel, scope))\r\n this._processSubModel(subModel, scope);\r\n\r\n if (this.shouldVisitModel(subModel, scope))\r\n this.visitModel(subModel, scope);\r\n }\r\n\r\n if (this.shouldExploreChildren(element, scope))\r\n this._processChildren(element, scope);\r\n\r\n if (this.shouldVisitElement(element, scope))\r\n this.visitElement(element, scope);\r\n }\r\n\r\n /** process the children of the specified parent element */\r\n private _processChildren(parentElement: Id64String, parentScope: ElementTreeWalkerScope): void {\r\n const children = this._iModel.elements.queryChildren(parentElement);\r\n if (children.length === 0)\r\n return;\r\n\r\n const childrenScope = new ElementTreeWalkerScope(parentScope, parentElement);\r\n\r\n for (const childElement of children)\r\n this.processElementTree(childElement, childrenScope);\r\n }\r\n\r\n /** process the elements in the specified model */\r\n private _processSubModel(model: Model, parenScope: ElementTreeWalkerScope): void {\r\n const scope = new ElementTreeWalkerScope(parenScope, model);\r\n // Visit only the top-level parents. processElementTree will visit their children (bottom-up).\r\n model.iModel.withPreparedStatement(`select ECInstanceId from bis:Element where Model.id=? and Parent.Id is null`, (stmt) => {\r\n stmt.bindId(1, model.id);\r\n while (stmt.step() === DbResult.BE_SQLITE_ROW) {\r\n const elementId = stmt.getValue(0).getId();\r\n this.processElementTree(elementId, scope);\r\n }\r\n });\r\n }\r\n}\r\n\r\n/** Helper class that manages the deletion of definitions and subjects */\r\nclass SpecialElements {\r\n public definitionModels: Id64Array = [];\r\n public definitions: Id64Array = [];\r\n public subjects: Id64Array = [];\r\n\r\n public recordSpecialElement(iModel: IModelDb, elementId: Id64String): boolean {\r\n // Defer Definitions and Subjects\r\n const cls = classifyElementForPruning(iModel, elementId);\r\n if (cls === ElementPruningClassification.PRUNING_CLASS_Subject) {\r\n this.subjects.push(elementId);\r\n return true;\r\n } else if (cls === ElementPruningClassification.PRUNING_CLASS_Definition) {\r\n this.definitions.push(elementId);\r\n return true;\r\n } else if (cls === ElementPruningClassification.PRUNING_CLASS_DefinitionPartition) {\r\n this.definitionModels.push(elementId);\r\n return true;\r\n }\r\n return false; // not a special element\r\n }\r\n\r\n // It's dangerous to pass a mixture of SubCategories and Categories to deleteDefinitionElements.\r\n // That function will delete the Categories first, which automatically deletes all their child\r\n // SubCategories (in native code). If a SubCategory in the list is one of those children, then\r\n // deleteDefinitionElements will try and fail with an exception to delete that SubCategory in a subsequent step.\r\n // To work around this, we delete the SubCategories first, then everything else.\r\n private _siftSpecialElements(iModel: IModelDb): Array<string[]> {\r\n const subCategories: Id64Array = [];\r\n const other: Id64Array = [];\r\n this.definitions.forEach((elementId) => {\r\n if (iModel.elements.tryGetElement(elementId, SubCategory) !== undefined)\r\n subCategories.push(elementId);\r\n else\r\n other.push(elementId);\r\n });\r\n return [subCategories, other];\r\n }\r\n\r\n public deleteSpecialElements(iModel: IModelDb) {\r\n for (const definitions of this._siftSpecialElements(iModel)) {\r\n if (isTraceEnabled()) definitions.forEach((e) => logElement(\"try delete\", iModel, e));\r\n iModel.elements.deleteDefinitionElements(definitions); // will not deleted definitions that are still in use.\r\n }\r\n\r\n for (const m of this.definitionModels) {\r\n if (!isModelEmpty(iModel, m)) {\r\n logModel(\"Model not empty - cannot delete - may contain Definitions that are still in use\", iModel, m);\r\n } else {\r\n logModel(\"delete\", iModel, m);\r\n iModel.models.deleteModel(m);\r\n iModel.elements.deleteElement(m);\r\n }\r\n }\r\n\r\n for (const e of this.subjects) {\r\n if (iModel.elements.queryChildren(e).length !== 0) {\r\n logElement(\"Subject still has children - cannot delete - may have child DefinitionModels\", iModel, e);\r\n } else {\r\n logElement(\"delete\", iModel, e);\r\n iModel.elements.deleteElement(e);\r\n }\r\n }\r\n }\r\n}\r\n\r\n/** Deletes an entire element tree, including sub-models and child elements.\r\n * Items are deleted in bottom-up order. Definitions and Subjects are deleted after normal elements.\r\n * @beta\r\n */\r\nexport class ElementTreeDeleter extends ElementTreeBottomUp {\r\n private _special: SpecialElements = new SpecialElements();\r\n private _topElement: Id64String;\r\n private _topScope: ElementTreeWalkerScope;\r\n\r\n public constructor(iModel: IModelDb, topElement: Id64String, scope?: ElementTreeWalkerScope) {\r\n super(iModel);\r\n this._topElement = topElement;\r\n this._topScope = scope ?? ElementTreeWalkerScope.createTopScope(this._iModel, this._topElement);\r\n }\r\n\r\n protected override shouldExploreModel(_model: Model): boolean { return true; }\r\n protected override shouldVisitElement(_elementId: Id64String): boolean { return true; }\r\n\r\n protected override visitModel(model: Model, _scope: ElementTreeWalkerScope): void {\r\n if (isDefinitionModel(model))\r\n return; // we recorded definition models in visitElement when we encountered the DefinitionPartition elements.\r\n\r\n // visitElement was called first, and it deleted the elements in the model. So, now it's safe to delete the model itself.\r\n // TODO: will fail if model has an element that is sub-modeled by a **DefinitionModel**. I hope that never occurs!\r\n logModel(\"delete\", this._iModel, model.id, _scope);\r\n model.delete();\r\n }\r\n\r\n protected override visitElement(elementId: Id64String, _scope: ElementTreeWalkerScope): void {\r\n if (!this._special.recordSpecialElement(this._iModel, elementId)) {\r\n logElement(\"delete\", this._iModel, elementId, _scope);\r\n this._iModel.elements.deleteElement(elementId);\r\n }\r\n }\r\n\r\n /** Delete the element tree. */\r\n public deleteElementTree(): void {\r\n this.processElementTree(this._topElement, this._topScope); // Delete the \"normal\" elements and record the special elements for deferred processing\r\n this._special.deleteSpecialElements(this._iModel);\r\n }\r\n\r\n}\r\n\r\n/** Does a breadth-first search on the tree defined by an element and its sub-models and children.\r\n * Parents are visited first, then children, then sub-models.\r\n * The subclass can \"prune\" sub-trees from the search. When a sub-tree is \"pruned\" the search does *not* recurse into it.\r\n * If a sub-tree is not pruned, then the search does recurse into it.\r\n * @beta\r\n */\r\nabstract class ElementTreeTopDown {\r\n constructor(protected _iModel: IModelDb) { }\r\n\r\n /** Should the search *not* recurse into this sub-tree? */\r\n protected shouldPrune(_elementId: Id64String, _scope: ElementTreeWalkerScope): boolean { return false; }\r\n\r\n protected abstract prune(_elementId: Id64String, _scope: ElementTreeWalkerScope): void;\r\n\r\n protected processElementTree(element: Id64String, scope: ElementTreeWalkerScope) {\r\n\r\n if (this.shouldPrune(element, scope)) {\r\n this.prune(element, scope);\r\n return;\r\n }\r\n\r\n this._processChildren(element, scope);\r\n\r\n const subModel = this._iModel.models.tryGetModel<Model>(element);\r\n if (subModel !== undefined) {\r\n this._processSubModel(subModel, scope);\r\n }\r\n }\r\n\r\n private _processChildren(element: Id64String, scope: ElementTreeWalkerScope) {\r\n let parentScope: ElementTreeWalkerScope | undefined;\r\n for (const childElement of this._iModel.elements.queryChildren(element)) {\r\n if (parentScope === undefined)\r\n parentScope = new ElementTreeWalkerScope(scope, element);\r\n this.processElementTree(childElement, parentScope);\r\n }\r\n }\r\n\r\n private _processSubModel(subModel: Model, scope: ElementTreeWalkerScope) {\r\n const subModelScope = new ElementTreeWalkerScope(scope, subModel);\r\n // Visit only the top-level parents. processElementTree will recurse into their children.\r\n this._iModel.withPreparedStatement(`select ECInstanceId from bis:Element where Model.id=? and Parent.Id is null`, (stmt) => {\r\n stmt.bindId(1, subModel.id);\r\n while (stmt.step() === DbResult.BE_SQLITE_ROW) {\r\n const elementId = stmt.getValue(0).getId();\r\n this.processElementTree(elementId, subModelScope);\r\n }\r\n });\r\n }\r\n\r\n}\r\n\r\n/** Signature of the filter function used by ElementSubTreeDeleter.\r\n * @param elementId The sub-tree parent element.\r\n * @param scope The path followed by the top-down search to the element\r\n * @return true if the element and its children and sub-models should be deleted.\r\n * @beta\r\n */\r\nexport type ElementSubTreeDeleteFilter = (elementId: Id64String, scope: ElementTreeWalkerScope) => boolean;\r\n\r\n/** Deletes the element sub-trees that are chosen by a supplied filter function.\r\n * This class uses ElementTreeTopDown to visit element sub-trees in top-down order.\r\n * When the filter function chooses a sub-tree, this class uses ElementTreeDeleter to delete it.\r\n * Note that when a sub-tree is selected and deleted, its children and sub-models are not visited.\r\n * @beta\r\n */\r\nexport class ElementSubTreeDeleter extends ElementTreeTopDown {\r\n private _special: SpecialElements = new SpecialElements();\r\n\r\n private _topElement: Id64String;\r\n private _topScope: ElementTreeWalkerScope;\r\n\r\n private _shouldPruneCb: ElementSubTreeDeleteFilter;\r\n\r\n /** Construct an ElementSubTreeDeleter. @see pruneElementTree.\r\n * @param iModel The iModel\r\n * @param topElement Where to start the search.\r\n * @param shouldPruneCb Callback that selects sub-trees that should be deleted.\r\n */\r\n public constructor(iModel: IModelDb, topElement: Id64String, shouldPruneCb: ElementSubTreeDeleteFilter, scope?: ElementTreeWalkerScope) {\r\n super(iModel);\r\n this._topElement = topElement;\r\n this._topScope = scope ?? ElementTreeWalkerScope.createTopScope(this._iModel, this._topElement);\r\n this._shouldPruneCb = shouldPruneCb;\r\n }\r\n\r\n protected override shouldPrune(elementId: Id64String, scope: ElementTreeWalkerScope): boolean { return this._shouldPruneCb(elementId, scope); }\r\n\r\n protected prune(elementId: Id64String, scope: ElementTreeWalkerScope): void {\r\n if (!this._special.recordSpecialElement(this._iModel, elementId)) {\r\n const del = new ElementTreeDeleter(this._iModel, elementId, scope);\r\n del.deleteElementTree();\r\n }\r\n }\r\n\r\n /** Traverses the tree of elements, beginning with the top element, and deletes all selected sub-trees. */\r\n public pruneElementTree() {\r\n this.processElementTree(this._topElement, this._topScope); // deletes normal elements and their sub-trees, defers special elements\r\n this._special.deleteSpecialElements(this._iModel);\r\n }\r\n}\r\n\r\n/** Deletes an element tree starting with the specified top element. The top element is also deleted. Uses ElementTreeDeleter.\r\n * @param iModel The iModel\r\n * @param topElement The parent of the sub-tree\r\n * @beta\r\n */\r\nexport function deleteElementTree(iModel: IModelDb, topElement: Id64String): void {\r\n const del = new ElementTreeDeleter(iModel, topElement);\r\n del.deleteElementTree();\r\n}\r\n\r\n/** Deletes all element sub-trees that are selected by the supplied filter. Uses ElementSubTreeDeleter.\r\n * If the filter selects the top element itself, then the entire tree (including the top element) is deleted.\r\n * That has the same effect as calling [[deleteElementTree]] on the top element.\r\n * @param iModel The iModel\r\n * @param topElement Where to start the search.\r\n * @param filter Callback that selects sub-trees that should be deleted.\r\n * @beta\r\n */\r\nexport function deleteElementSubTrees(iModel: IModelDb, topElement: Id64String, filter: ElementSubTreeDeleteFilter): void {\r\n const del = new ElementSubTreeDeleter(iModel, topElement, filter);\r\n del.pruneElementTree();\r\n}\r\n"]}
|
|
@@ -10,6 +10,7 @@ export * from "./ECSchemaXmlContext";
|
|
|
10
10
|
export * from "./ECSqlStatement";
|
|
11
11
|
export * from "./Element";
|
|
12
12
|
export * from "./ElementAspect";
|
|
13
|
+
export * from "./ElementTreeWalker";
|
|
13
14
|
export * from "./Entity";
|
|
14
15
|
export * from "./ExportGraphics";
|
|
15
16
|
export * from "./ExternalSource";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-backend.d.ts","sourceRoot":"","sources":["../../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Ac,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAE3B;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
|
|
1
|
+
{"version":3,"file":"core-backend.d.ts","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,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G;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
|
package/lib/cjs/core-backend.js
CHANGED
|
@@ -27,6 +27,7 @@ __exportStar(require("./ECSchemaXmlContext"), exports);
|
|
|
27
27
|
__exportStar(require("./ECSqlStatement"), exports);
|
|
28
28
|
__exportStar(require("./Element"), exports);
|
|
29
29
|
__exportStar(require("./ElementAspect"), exports);
|
|
30
|
+
__exportStar(require("./ElementTreeWalker"), exports);
|
|
30
31
|
__exportStar(require("./Entity"), exports);
|
|
31
32
|
__exportStar(require("./ExportGraphics"), exports);
|
|
32
33
|
__exportStar(require("./ExternalSource"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,6CAA2B;AAC3B,yDAAuC;AACvC,sDAAoC;AACpC,kDAAgC;AAChC,8CAA4B;AAC5B,iDAA+B;AAC/B,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,2CAAyB;AACzB,mDAAiC;AACjC,mDAAiC;AACjC,6CAA2B;AAC3B,4CAA0B;AAC1B,+CAA6B;AAC7B,qDAAmC;AACnC,iDAA+B;AAC/B,4CAA0B;AAC1B,+CAA6B;AAC7B,8CAA4B;AAC5B,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,2DAAyC;AACzC,+CAA6B;AAC7B,2CAAyB;AACzB,oDAAkC;AAClC,6CAA2B;AAC3B,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC;AACpC,6DAA2C;AAC3C,+DAA6C;AAC7C,0DAAwC;AACxC,4DAA0C;AAC1C,4DAA6F;AAApF,8GAAA,WAAW,OAAA;AAAE,iHAAA,cAAc,OAAA;AAAE,uHAAA,oBAAoB,OAAA;AAC1D,uDAAqC;AACrC,+CAA6B;AAC7B,uDAAqC;AACrC,4CAA0B;AAC1B,qDAAmC;AACnC,+CAA6B;AAC7B,wDAAsC;AACtC,2DAAyC;AACzC,6CAA2B;AAC3B,qDAAmC;AACnC,oDAAkC;AAClC,uDAAqC;AACrC,8DAA4C;AAC5C,wDAAsC;AACtC,6CAA2B,CAAC,eAAe;AAE3C;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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\nexport * from \"./BriefcaseManager\";\r\nexport * from \"./Category\";\r\nexport * from \"./ChangeSummaryManager\";\r\nexport * from \"./CheckpointManager\";\r\nexport * from \"./ClassRegistry\";\r\nexport * from \"./CodeSpecs\";\r\nexport * from \"./DisplayStyle\";\r\nexport * from \"./ECDb\";\r\nexport * from \"./ECSchemaXmlContext\";\r\nexport * from \"./ECSqlStatement\";\r\nexport * from \"./Element\";\r\nexport * from \"./ElementAspect\";\r\nexport * from \"./Entity\";\r\nexport * from \"./ExportGraphics\";\r\nexport * from \"./ExternalSource\";\r\nexport * from \"./LocalHub\";\r\nexport * from \"./HubMock\";\r\nexport * from \"./IModelJsFs\";\r\nexport * from \"./BackendHubAccess\";\r\nexport * from \"./Relationship\";\r\nexport * from \"./Texture\";\r\nexport * from \"./TxnManager\";\r\nexport * from \"./LineStyle\";\r\nexport * from \"./BackendLoggerCategory\";\r\nexport * from \"./Material\";\r\nexport * from \"./Model\";\r\nexport * from \"./NavigationRelationship\";\r\nexport * from \"./RpcBackend\";\r\nexport * from \"./Schema\";\r\nexport * from \"./SqliteStatement\";\r\nexport * from \"./SQLiteDb\";\r\nexport * from \"./ViewDefinition\";\r\nexport * from \"./BisCoreSchema\";\r\nexport * from \"./ChangedElementsDb\";\r\nexport * from \"./domains/FunctionalSchema\";\r\nexport * from \"./domains/FunctionalElements\";\r\nexport * from \"./domains/GenericSchema\";\r\nexport * from \"./domains/GenericElements\";\r\nexport { CloudSqlite, IModelJsNative, NativeLoggerCategory } from \"@bentley/imodeljs-native\";\r\nexport * from \"./IModelCloneContext\";\r\nexport * from \"./IModelHost\";\r\nexport * from \"./IModelSchemaLoader\";\r\nexport * from \"./IpcHost\";\r\nexport * from \"./NativeAppStorage\";\r\nexport * from \"./NativeHost\";\r\nexport * from \"./CloudStorageBackend\";\r\nexport * from \"./AliCloudStorageService\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./LocalhostIpcHost\";\r\nexport * from \"./ElementGraphics\";\r\nexport * from \"./workspace/Settings\";\r\nexport * from \"./workspace/SettingsSchemas\";\r\nexport * from \"./workspace/Workspace\";\r\nexport * from \"./IModelDb\"; // must be last\r\n\r\n/** @docs-package-description\r\n * The core-backend package always runs on the computer with a local Briefcase.\r\n *\r\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\r\n */\r\n/**\r\n * @docs-group-description IModelHost\r\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\r\n * See [the learning article]($docs/learning/backend/IModelHost.md).\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Classes for working with [iModels]($docs/learning/iModels.md).\r\n * See [the learning article]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Schema\r\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\r\n */\r\n/**\r\n * @docs-group-description Models\r\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Elements\r\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ViewDefinitions\r\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\r\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\r\n */\r\n/**\r\n * @docs-group-description Relationships\r\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\r\n */\r\n/**\r\n * @docs-group-description ElementAspects\r\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Categories\r\n * Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Classes for defining the appearance of element geometry\r\n */\r\n/**\r\n * @docs-group-description ECDb\r\n * Classes for working with ECDb.\r\n */\r\n/**\r\n * @docs-group-description SQLiteDb\r\n * Classes for working with SQLiteDb.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Mobile/Desktop Application.\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\r\n */\r\n/**\r\n * @docs-group-description SQLite\r\n * Classes for working directly with SQLite\r\n */\r\n/**\r\n * @docs-group-description Portability\r\n * Classes to help write [portable apps]($docs/learning/Portability.md) and libraries that will run on any platform, including web apps, node services, Electron desktops apps, and mobile apps.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description CloudStorageBackend\r\n * Classes for working with cloud storage.\r\n */\r\n/**\r\n * @docs-group-description AliCloudStorageService\r\n * Classes for working with cloud storage using AliCloud.\r\n */\r\n/**\r\n * @docs-group-description Authentication\r\n * Classes for working with Authentication.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * APIs for working with tile graphics.\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description Workspace\r\n * APIs for loading and using Settings and Workspace resources\r\n */\r\n/**\r\n * @docs-group-description ViewStateHydrator\r\n * Class responsible for loading ViewStates.\r\n */\r\n"]}
|
|
1
|
+
{"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,6CAA2B;AAC3B,yDAAuC;AACvC,sDAAoC;AACpC,kDAAgC;AAChC,8CAA4B;AAC5B,iDAA+B;AAC/B,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,sDAAoC;AACpC,2CAAyB;AACzB,mDAAiC;AACjC,mDAAiC;AACjC,6CAA2B;AAC3B,4CAA0B;AAC1B,+CAA6B;AAC7B,qDAAmC;AACnC,iDAA+B;AAC/B,4CAA0B;AAC1B,+CAA6B;AAC7B,8CAA4B;AAC5B,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,2DAAyC;AACzC,+CAA6B;AAC7B,2CAAyB;AACzB,oDAAkC;AAClC,6CAA2B;AAC3B,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC;AACpC,6DAA2C;AAC3C,+DAA6C;AAC7C,0DAAwC;AACxC,4DAA0C;AAC1C,4DAA6F;AAApF,8GAAA,WAAW,OAAA;AAAE,iHAAA,cAAc,OAAA;AAAE,uHAAA,oBAAoB,OAAA;AAC1D,uDAAqC;AACrC,+CAA6B;AAC7B,uDAAqC;AACrC,4CAA0B;AAC1B,qDAAmC;AACnC,+CAA6B;AAC7B,wDAAsC;AACtC,2DAAyC;AACzC,6CAA2B;AAC3B,qDAAmC;AACnC,oDAAkC;AAClC,uDAAqC;AACrC,8DAA4C;AAC5C,wDAAsC;AACtC,6CAA2B,CAAC,eAAe;AAE3C;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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\nexport * from \"./BriefcaseManager\";\r\nexport * from \"./Category\";\r\nexport * from \"./ChangeSummaryManager\";\r\nexport * from \"./CheckpointManager\";\r\nexport * from \"./ClassRegistry\";\r\nexport * from \"./CodeSpecs\";\r\nexport * from \"./DisplayStyle\";\r\nexport * from \"./ECDb\";\r\nexport * from \"./ECSchemaXmlContext\";\r\nexport * from \"./ECSqlStatement\";\r\nexport * from \"./Element\";\r\nexport * from \"./ElementAspect\";\r\nexport * from \"./ElementTreeWalker\";\r\nexport * from \"./Entity\";\r\nexport * from \"./ExportGraphics\";\r\nexport * from \"./ExternalSource\";\r\nexport * from \"./LocalHub\";\r\nexport * from \"./HubMock\";\r\nexport * from \"./IModelJsFs\";\r\nexport * from \"./BackendHubAccess\";\r\nexport * from \"./Relationship\";\r\nexport * from \"./Texture\";\r\nexport * from \"./TxnManager\";\r\nexport * from \"./LineStyle\";\r\nexport * from \"./BackendLoggerCategory\";\r\nexport * from \"./Material\";\r\nexport * from \"./Model\";\r\nexport * from \"./NavigationRelationship\";\r\nexport * from \"./RpcBackend\";\r\nexport * from \"./Schema\";\r\nexport * from \"./SqliteStatement\";\r\nexport * from \"./SQLiteDb\";\r\nexport * from \"./ViewDefinition\";\r\nexport * from \"./BisCoreSchema\";\r\nexport * from \"./ChangedElementsDb\";\r\nexport * from \"./domains/FunctionalSchema\";\r\nexport * from \"./domains/FunctionalElements\";\r\nexport * from \"./domains/GenericSchema\";\r\nexport * from \"./domains/GenericElements\";\r\nexport { CloudSqlite, IModelJsNative, NativeLoggerCategory } from \"@bentley/imodeljs-native\";\r\nexport * from \"./IModelCloneContext\";\r\nexport * from \"./IModelHost\";\r\nexport * from \"./IModelSchemaLoader\";\r\nexport * from \"./IpcHost\";\r\nexport * from \"./NativeAppStorage\";\r\nexport * from \"./NativeHost\";\r\nexport * from \"./CloudStorageBackend\";\r\nexport * from \"./AliCloudStorageService\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./LocalhostIpcHost\";\r\nexport * from \"./ElementGraphics\";\r\nexport * from \"./workspace/Settings\";\r\nexport * from \"./workspace/SettingsSchemas\";\r\nexport * from \"./workspace/Workspace\";\r\nexport * from \"./IModelDb\"; // must be last\r\n\r\n/** @docs-package-description\r\n * The core-backend package always runs on the computer with a local Briefcase.\r\n *\r\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\r\n */\r\n/**\r\n * @docs-group-description IModelHost\r\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\r\n * See [the learning article]($docs/learning/backend/IModelHost.md).\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Classes for working with [iModels]($docs/learning/iModels.md).\r\n * See [the learning article]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Schema\r\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\r\n */\r\n/**\r\n * @docs-group-description Models\r\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Elements\r\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ViewDefinitions\r\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\r\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\r\n */\r\n/**\r\n * @docs-group-description Relationships\r\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\r\n */\r\n/**\r\n * @docs-group-description ElementAspects\r\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Categories\r\n * Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Classes for defining the appearance of element geometry\r\n */\r\n/**\r\n * @docs-group-description ECDb\r\n * Classes for working with ECDb.\r\n */\r\n/**\r\n * @docs-group-description SQLiteDb\r\n * Classes for working with SQLiteDb.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Mobile/Desktop Application.\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\r\n */\r\n/**\r\n * @docs-group-description SQLite\r\n * Classes for working directly with SQLite\r\n */\r\n/**\r\n * @docs-group-description Portability\r\n * Classes to help write [portable apps]($docs/learning/Portability.md) and libraries that will run on any platform, including web apps, node services, Electron desktops apps, and mobile apps.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description CloudStorageBackend\r\n * Classes for working with cloud storage.\r\n */\r\n/**\r\n * @docs-group-description AliCloudStorageService\r\n * Classes for working with cloud storage using AliCloud.\r\n */\r\n/**\r\n * @docs-group-description Authentication\r\n * Classes for working with Authentication.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * APIs for working with tile graphics.\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description Workspace\r\n * APIs for loading and using Settings and Workspace resources\r\n */\r\n/**\r\n * @docs-group-description ViewStateHydrator\r\n * Class responsible for loading ViewStates.\r\n */\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-backend",
|
|
3
|
-
"version": "3.4.0-dev.
|
|
3
|
+
"version": "3.4.0-dev.3",
|
|
4
4
|
"description": "iTwin.js backend components",
|
|
5
5
|
"main": "lib/cjs/core-backend.js",
|
|
6
6
|
"typings": "lib/cjs/core-backend",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"url": "http://www.bentley.com"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@itwin/core-bentley": "^3.4.0-dev.
|
|
28
|
-
"@itwin/core-common": "^3.4.0-dev.
|
|
29
|
-
"@itwin/core-geometry": "^3.4.0-dev.
|
|
30
|
-
"@itwin/ecschema-metadata": "^3.4.0-dev.
|
|
27
|
+
"@itwin/core-bentley": "^3.4.0-dev.3",
|
|
28
|
+
"@itwin/core-common": "^3.4.0-dev.3",
|
|
29
|
+
"@itwin/core-geometry": "^3.4.0-dev.3",
|
|
30
|
+
"@itwin/ecschema-metadata": "^3.4.0-dev.3",
|
|
31
31
|
"@opentelemetry/api": "^1.0.4"
|
|
32
32
|
},
|
|
33
33
|
"peerDependenciesMeta": {
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"NOTE: All tools used by scripts in this package must be listed as devDependencies"
|
|
44
44
|
],
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@itwin/build-tools": "3.4.0-dev.
|
|
47
|
-
"@itwin/core-bentley": "3.4.0-dev.
|
|
48
|
-
"@itwin/core-common": "3.4.0-dev.
|
|
49
|
-
"@itwin/core-geometry": "3.4.0-dev.
|
|
50
|
-
"@itwin/core-webpack-tools": "3.4.0-dev.
|
|
51
|
-
"@itwin/ecschema-metadata": "3.4.0-dev.
|
|
52
|
-
"@itwin/eslint-plugin": "3.4.0-dev.
|
|
46
|
+
"@itwin/build-tools": "3.4.0-dev.3",
|
|
47
|
+
"@itwin/core-bentley": "3.4.0-dev.3",
|
|
48
|
+
"@itwin/core-common": "3.4.0-dev.3",
|
|
49
|
+
"@itwin/core-geometry": "3.4.0-dev.3",
|
|
50
|
+
"@itwin/core-webpack-tools": "3.4.0-dev.3",
|
|
51
|
+
"@itwin/ecschema-metadata": "3.4.0-dev.3",
|
|
52
|
+
"@itwin/eslint-plugin": "3.4.0-dev.3",
|
|
53
53
|
"@opentelemetry/api": "^1.0.4",
|
|
54
54
|
"@types/chai": "4.3.1",
|
|
55
55
|
"@types/chai-as-promised": "^7",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@azure/storage-blob": "^12.7.0",
|
|
82
|
-
"@bentley/imodeljs-native": "3.
|
|
83
|
-
"@itwin/core-telemetry": "3.4.0-dev.
|
|
82
|
+
"@bentley/imodeljs-native": "3.4.0",
|
|
83
|
+
"@itwin/core-telemetry": "3.4.0-dev.3",
|
|
84
84
|
"form-data": "^2.3.2",
|
|
85
85
|
"fs-extra": "^8.1.0",
|
|
86
86
|
"json5": "^2.2.0",
|