(id: ElementId)
| 75 | } |
| 76 | |
| 77 | public getVertexById(id: ElementId): StoredVertex | undefined { |
| 78 | const [label, uuid] = parseElementId(id); |
| 79 | const collection = this.getVertexCollectionMap(label); |
| 80 | const data = collection.get(uuid); |
| 81 | if (data == null) { |
| 82 | return undefined; |
| 83 | } |
| 84 | const existing = this.#vertexIdentities.get(data); |
| 85 | if (existing != null) { |
| 86 | return existing; |
| 87 | } |
| 88 | const vertex: StoredVertex = { |
| 89 | "@type": "Vertex", |
| 90 | id, |
| 91 | properties: this.getVertexProperties(label, uuid, data), |
| 92 | }; |
| 93 | this.#vertexIdentities.set(data, vertex); |
| 94 | return vertex; |
| 95 | } |
| 96 | |
| 97 | public *getVerticesByIds(ids: ElementId[]): Iterable<StoredVertex> { |
| 98 | for (const id of ids) { |
no test coverage detected