Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
scsewall committed Sep 19, 2018
1 parent 2dfdba9 commit b7d4536
Show file tree
Hide file tree
Showing 15 changed files with 308 additions and 298 deletions.
2 changes: 1 addition & 1 deletion docs/core/bis/intro/elementaspect-fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

ElementAspects have a special relationship with Elements. Every ElementAspect instance is associated (through an EC relationship) to exactly one Element instance. ElementAspect instances are never shared among Element instances. An Element *owns* its ElementAspects; if the Element is deleted its ElementAspects are also deleted.

TODO: add figure
<!-- TODO: add figure -->

## Core ElementAspect Types

Expand Down
2 changes: 1 addition & 1 deletion docs/core/learning/IModelHub.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[iModelHub](http:/www.iModelHub.com) is a cloud service for managing and coordinating access to [iModels](./iModels).

Like [Git](https://git-scm.com/) repositories for source code, in the iModel ecosystem copies of iModels are distributed widely in [Briefcases](../learning/backend/Briefcases). In fact, iModelHub's primary purpose is *not* to hold or process copies of iModels (it does so only to facilitate Briefcase checkout.) Rather, iModelHub's main role is to maintain the sequence of [ChangeSets](../learning/backend/ChangeSets) that forms an iModel's [Timeline](#the-timeline-of-changes-to-an-imodel). Like and accounting system does for financial transactions, iModelHub holds a ledger of all changes to an iModel.
Like [Git](https://git-scm.com/) repositories for source code, in the iModel ecosystem copies of iModels are distributed widely in [briefcases](../Glossary.md#briefcase). In fact, iModelHub's primary purpose is *not* to hold or process copies of iModels (it does so only to facilitate Briefcase checkout.) Rather, iModelHub's main role is to maintain the sequence of [ChangeSets](../Glossary.md#changeset) that forms an iModel's [Timeline](#the-timeline-of-changes-to-an-imodel). Like an accounting system does for financial transactions, iModelHub holds a ledger of all changes to an iModel.

iModelHub accepts ChangeSets from iModel.js [backends](../learning/backend/index) through a process called [*Check In*](#upload-changesets), and sends them to other validated users when requested through a process called [*Synchronization*](#download-changesets). iModel.js applications determine when and how to Check In and Synchronize.

Expand Down
17 changes: 17 additions & 0 deletions docs/core/learning/backend/AccessElementAspects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Accessing ElementAspects

An [ElementAspect]($backend) is an in-memory representation of a [BIS ElementAspect](../../bis/intro/elementaspect-fundamentals.md).

There can be `[0..1]` instances of [ElementUniqueAspect]($backend) per ElementAspect class per Element instance.

``` ts
[[include:Elements.getUniqueAspect]]
```

---

There can be `[0..N]` instances of [ElementMultiAspect]($backend) per ElementAspect class per Element instance.

``` ts
[[include:Elements.getMultiAspects]]
```
2 changes: 1 addition & 1 deletion docs/core/learning/backend/AccessModels.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Accessing Models

An [IModelDb]($backend) is an in-memory representation of a [BIS Model](../../bis/intro/model-fundamentals.md).
A [Model]($backend) is an in-memory representation of a [BIS Model](../../bis/intro/model-fundamentals.md).

The [IModelDb.Models]($backend) class represents the collection of Models in an iModel. It has methods to find model Ids and to load Model objects.

Expand Down
7 changes: 0 additions & 7 deletions docs/core/learning/backend/Briefcases.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/core/learning/backend/ChangeSets.md

This file was deleted.

3 changes: 2 additions & 1 deletion docs/core/learning/backend/CreateModels.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Creating Models

To insert a new [Model]($backend) into an iModelDb,

1. Create and insert the modeled element.
1. Create and insert the model, refering to the modeled element.
2. Create and insert the model, referring to the modeled element.

Here are some examples:

Expand Down
3 changes: 2 additions & 1 deletion docs/core/learning/backend/ReserveCodes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Reserving Codes

A [Code]($common) is an in-memory representation of a [BIS Code](../../bis/intro/glossary.md#code).

You can assign a Code to an an Element by setting the [Element.code]($backend) property and then inserting or updating the element.

You must *reserve* a Code before assigning it. See [code reservation](./ConcurrencyControl.md#code-reservation) for details.
You must *reserve* a Code before assigning it. See [code reservation](./ConcurrencyControl.md#code-reservation) for details.
5 changes: 3 additions & 2 deletions docs/core/learning/backend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ App backends, services, and agents must depend on @bentley/imodeljs-backend.
* [Open an IModelDb](./IModelDb.md)
* [Synchronizing with iModelHub](./IModelDbSync.md)
* [Writing to an IModelDb](./IModelDbReadwrite.md)
* [Concurrency control](./ConcurrencyControl.md)
* [Concurrency control](./ConcurrencyControl.md)

* Working with Schemas and Elements in TypeScript
* [Working with Schemas and Elements in TypeScript](./SchemasAndElementsInTypeScript.md)

* Loading and Creating Elements, Aspects, and Models
* Loading and Creating Elements, ElementAspects, and Models
* [Access Elements](./AccessElements.md)
* [Create Elements](./CreateElements.md)
* [Access ElementAspects](./AccessElementAspects.md)
* [Access Models](./AccessModels.md)
* [Create Models](./CreateModels.md)

Expand Down
4 changes: 3 additions & 1 deletion docs/core/learning/common/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Common Packages

Common packages contain TypeScript classes and other types that can be used by both [frontends](..\frontend\index.md) and [backends](..\backend\index.md).
These packages adhere to the frontend constraints of running within a web browser (for example, no file system access) but are equally relevant on either the frontend or backend.

The iModel.js common libraries are contained in the following npm packages:

* `@bentley/imodeljs-common`
* `@bentley/imodeljs-clients`
* `@bentley/bentleyjs-core`
* `@bentley/geometry-core`
* `@bentley/bentleyjs-core`
4 changes: 2 additions & 2 deletions docs/core/learning/frontend/IModelConnection.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# IModelConnection

The frontend of an app does not open a briefcase directly. Instead, it "connects" to a briefcase that is managed by a [backend](../backend/index.md).
The frontend of an app does not open a briefcase directly. Instead, it remotely "connects" to a briefcase that is managed by a [backend](../backend/index.md).

[IModelConnection]($frontend) is the main class used by frontends to access iModels. It is a handy wrapper around the [IModelReadRpcInterface]($common). It makes it easy for frontend code to get access to a particular iModel and then read and write elements and models.
[IModelConnection]($frontend) is the main class used by frontends to access iModels. It is a handy wrapper around the [IModelReadRpcInterface]($common). It makes it easy for frontend code to get access to a particular iModel and then read and write element and model properties.

The frontend must obtain an [AccessToken](../common/AccessToken.md) in order to open an IModelConnection. [IModelConnection.open]($frontend) takes that as an argument.
2 changes: 1 addition & 1 deletion docs/core/learning/frontend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The iModel.js frontend library is delivered in the **npm package** `@bentley/imo
### Supported

* Chrome
* Chrome (recommended for development)
* Firefox
* Safari
* Edge
Expand Down
2 changes: 1 addition & 1 deletion docs/core/learning/iModels.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

An iModel is a distributed relational database, based on [SQLite](https://www.sqlite.org/index.html), with a schema defined by [BIS](../bis/index). An iModel holds information about a single infrastructure asset. iModels may contain physical and functional models, drawings, specifications, analytical models, etc.

Many copies of an iModel may be extant simultaneously, each held in a [*Briefcase*](../learning/backend/Briefcases) and synchronized via [*ChangeSets*](../learning/backend/ChangeSets) from [iModelHub](./iModelHub). For programmers, a helpful analogy is Git and GitHub. In the same manner that every programmer has a full copy of a source code repository, with iModels every user has a full copy of the database.
Many copies of an iModel may be extant simultaneously, each held in a [briefcase](../Glossary.md#briefcase) and synchronized via [ChangeSets](../Glossary.md#changeset) from [iModelHub](./iModelHub). For programmers, a helpful analogy is Git and GitHub. In the same manner that every programmer has a full copy of a source code repository, with iModels every user has a full copy of the database.

## Every iModel has a GUID

Expand Down
Loading

0 comments on commit b7d4536

Please sign in to comment.