comparison src/render/GraphView.ts @ 109:cbcd82d21356

cleanup
author drewp@bigasterisk.com
date Fri, 18 Mar 2022 12:00:33 -0700
parents 5e6840229a05
children 3cdbbd913f1d
comparison
equal deleted inserted replaced
108:5e6840229a05 109:cbcd82d21356
1 import Immutable from "immutable"; 1 import Immutable from "immutable";
2 import { html, TemplateResult } from "lit"; 2 import { html, TemplateResult } from "lit";
3 import { DataFactory, Literal, NamedNode, Quad, Store, Term } from "n3"; 3 import { NamedNode, Quad, Store, Term } from "n3";
4 import { AlignedTable, FreeStatements, Layout, PredRow, SubjRow } from "../layout/Layout";
5 import { SuffixLabels } from "../layout/suffixLabels";
6 import { ViewConfig } from "../layout/ViewConfig";
4 import { NodeDisplay } from "./NodeDisplay"; 7 import { NodeDisplay } from "./NodeDisplay";
5 import { SuffixLabels } from "../layout/suffixLabels";
6 import { AlignedTable, FreeStatements, Layout, PredRow, SubjRow } from "../layout/Layout";
7 import { TableDesc, ViewConfig } from "../layout/ViewConfig";
8 import { uniqueSortedTerms } from "../layout/rdf_value";
9
10 const { namedNode } = DataFactory;
11 8
12 type UriSet = Immutable.Set<NamedNode>; 9 type UriSet = Immutable.Set<NamedNode>;
13 const emptyUriSet = Immutable.Set<NamedNode>(); 10
14 // https://github.com/rdfjs/N3.js/issues/265
15 if ((Literal.prototype as any).hashCode === undefined) {
16 (Literal.prototype as any).hashCode = () => 0;
17 }
18 if ((NamedNode.prototype as any).hashCode === undefined) {
19 (NamedNode.prototype as any).hashCode = () => 0;
20 }
21 export class GraphView { 11 export class GraphView {
22 nodeDisplay!: NodeDisplay; 12 nodeDisplay!: NodeDisplay;
23 constructor( 13 constructor(
24 public dataSourceUrls: string[], 14 public dataSourceUrls: string[],
25 public graph: Store, 15 public graph: Store,