Skip to content

Commit

Permalink
Use @ontologies packages v2 rc
Browse files Browse the repository at this point in the history
  • Loading branch information
Fletcher91 committed Feb 2, 2021
1 parent 53a6b92 commit e7859b6
Show file tree
Hide file tree
Showing 33 changed files with 129 additions and 122 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@
},
"devDependencies": {
"@ontola/memoized-hash-factory": "^2.0.1",
"@ontologies/as": "^1.0.1",
"@ontologies/core": "^2.0.1",
"@ontologies/dcterms": "^1.0.0",
"@ontologies/ld": "^1.0.0",
"@ontologies/owl": "^1.0.0",
"@ontologies/rdf": "^1.0.0",
"@ontologies/rdfs": "^1.0.0",
"@ontologies/schema": "^1.0.0",
"@ontologies/shacl": "^1.0.0",
"@ontologies/xsd": "^1.0.0",
"@ontologies/as": "^2.0.0-rc.1",
"@ontologies/core": "^2.0.2",
"@ontologies/dcterms": "^2.0.0-rc.1",
"@ontologies/ld": "^2.0.0-rc.1",
"@ontologies/owl": "^2.0.0-rc.1",
"@ontologies/rdf": "^2.0.0-rc.1",
"@ontologies/rdfs": "^2.0.0-rc.1",
"@ontologies/schema": "^2.0.0-rc.1",
"@ontologies/shacl": "^2.0.0-rc.1",
"@ontologies/xsd": "^2.0.0-rc.1",
"@pika/pack": "^0.5.0",
"@pika/plugin-build-node": "^0.9.2",
"@pika/plugin-build-web": "^0.9.2",
Expand Down
2 changes: 1 addition & 1 deletion src/ComponentStore.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import rdfs from "@ontologies/rdfs";
import * as rdfs from "@ontologies/rdfs";

import { id } from "./factoryHelpers";
import ll from "./ontology/ll";
Expand Down
4 changes: 2 additions & 2 deletions src/LinkedRenderStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import rdfFactory, {
Term,
TermType,
} from "@ontologies/core";
import rdf from "@ontologies/rdf";
import schema from "@ontologies/schema";
import * as rdf from "@ontologies/rdf";
import * as schema from "@ontologies/schema";

import { ComponentStore } from "./ComponentStore";
import { equals, id } from "./factoryHelpers";
Expand Down
6 changes: 3 additions & 3 deletions src/RDFStore.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DataFactory, Feature, QuadPosition } from "@ontologies/core";
import ld from "@ontologies/ld";
import rdf from "@ontologies/rdf";
import rdfs from "@ontologies/rdfs";
import * as ld from "@ontologies/ld";
import * as rdf from "@ontologies/rdf";
import * as rdfs from "@ontologies/rdfs";

import { equals, id } from "./factoryHelpers";
import ll from "./ontology/ll";
Expand Down
4 changes: 2 additions & 2 deletions src/Schema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import rdf from "@ontologies/rdf";
import rdfs from "@ontologies/rdfs";
import * as rdf from "@ontologies/rdf";
import * as rdfs from "@ontologies/rdfs";
import { id } from "./factoryHelpers";
import RDFIndex from "./store/RDFIndex";

Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/ComponentStore.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import "jest";
import "./useHashFactory";

import rdfFactory from "@ontologies/core";
import rdfs from "@ontologies/rdfs";
import schema from "@ontologies/schema";
import * as rdfs from "@ontologies/rdfs";
import * as schema from "@ontologies/schema";

import { ComponentStore } from "../ComponentStore";
import { RDFStore } from "../RDFStore";
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/LinkedRenderStore.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import "./useHashFactory";

import rdfFactory, { Quad } from "@ontologies/core";
import owl from "@ontologies/owl";
import rdf from "@ontologies/rdf";
import schema from "@ontologies/schema";
import * as rdf from "@ontologies/rdf";
import * as schema from "@ontologies/schema";
import { LinkedRenderStore } from "../LinkedRenderStore";

import { getBasicStore } from "../testUtilities";
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/LinkedRenderStore/components.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import rdfFactory, { NamedNode } from "@ontologies/core";
import rdf from "@ontologies/rdf";
import schema from "@ontologies/schema";
import * as rdf from "@ontologies/rdf";
import * as schema from "@ontologies/schema";

import { RENDER_CLASS_NAME } from "../../ComponentStore";
import { LinkedRenderStore } from "../../LinkedRenderStore";
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/LinkedRenderStore/data.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import rdfFactory from "@ontologies/core";
import rdfs from "@ontologies/rdfs";
import * as rdfs from "@ontologies/rdfs";
import { getBasicStore } from "../../testUtilities";

import {
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/LinkedRenderStore/findSubject.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import rdfFactory from "@ontologies/core";
import rdf from "@ontologies/rdf";
import schema from "@ontologies/schema";
import * as rdf from "@ontologies/rdf";
import * as schema from "@ontologies/schema";

import { getBasicStore } from "../../testUtilities";

Expand Down
8 changes: 4 additions & 4 deletions src/__tests__/LinkedRenderStore/fixtures.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import rdfFactory from "@ontologies/core";
import dcterms from "@ontologies/dcterms";
import rdf from "@ontologies/rdf";
import rdfs from "@ontologies/rdfs";
import schema from "@ontologies/schema";
import * as dcterms from "@ontologies/dcterms";
import * as rdf from "@ontologies/rdf";
import * as rdfs from "@ontologies/rdfs";
import * as schema from "@ontologies/schema";

import { RENDER_CLASS_NAME } from "../../ComponentStore";
import { createNS } from "../../rdf";
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/LinkedRenderStore/network.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import "jest";
import "../useHashFactory";

import rdfFactory from "@ontologies/core";
import rdf from "@ontologies/rdf";
import rdfs from "@ontologies/rdfs";
import schema from "@ontologies/schema";
import * as rdf from "@ontologies/rdf";
import * as rdfs from "@ontologies/rdfs";
import * as schema from "@ontologies/schema";

import { getBasicStore } from "../../testUtilities";

Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/LinkedRenderStore/render.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import rdfFactory from "@ontologies/core";
import rdfs from "@ontologies/rdfs";
import schema from "@ontologies/schema";
import * as rdfs from "@ontologies/rdfs";
import * as schema from "@ontologies/schema";

import { LinkedRenderStore } from "../../LinkedRenderStore";
import { getBasicStore } from "../../testUtilities";
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/LinkedRenderStore/subscriptions.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import rdfFactory from "@ontologies/core";
import schema from "@ontologies/schema";
import * as schema from "@ontologies/schema";

import { getBasicStore } from "../../testUtilities";
import { SubscriptionRegistrationBase } from "../../types";
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/ProcessBroadcast.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import "./useHashFactory";

import rdfFactory from "@ontologies/core";
import rdfx from "@ontologies/rdf";
import rdfs from "@ontologies/rdfs";
import schema from "@ontologies/schema";
import * as rdfx from "@ontologies/rdf";
import * as rdfs from "@ontologies/rdfs";
import * as schema from "@ontologies/schema";
import "jest";

import ex from "../ontology/ex";
Expand Down
8 changes: 4 additions & 4 deletions src/__tests__/RDFStore.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import "./useHashFactory";

import rdfFactory, { Quadruple } from "@ontologies/core";
import owl from "@ontologies/owl";
import rdf from "@ontologies/rdf";
import rdfs from "@ontologies/rdfs";
import schema from "@ontologies/schema";
import xsd from "@ontologies/xsd";
import * as rdf from "@ontologies/rdf";
import * as rdfs from "@ontologies/rdfs";
import * as schema from "@ontologies/schema";
import * as xsd from "@ontologies/xsd";

import ll from "../ontology/ll";
import { createNS } from "../rdf";
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/Schema.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import "../__tests__/useHashFactory";

import rdfFactory from "@ontologies/core";
import rdf from "@ontologies/rdf";
import rdfs from "@ontologies/rdfs";
import * as rdf from "@ontologies/rdf";
import * as rdfs from "@ontologies/rdfs";
import schemaNS from "@ontologies/schema";
import "jest";

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/factoryHelpers.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "jest";

import rdfFactory from "@ontologies/core";
import schema from "@ontologies/schema";
import * as schema from "@ontologies/schema";
import { equals, id } from "../factoryHelpers";

describe("factoryHelpers", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/factoryHelpersHashFactory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import "jest";
import "./useHashFactory";

import rdfFactory from "@ontologies/core";
import schema from "@ontologies/schema";
import * as schema from "@ontologies/schema";
import { equals, id } from "../factoryHelpers";

describe("factoryHelpers", () => {
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/utilities.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import "./useHashFactory";

import rdfFactory from "@ontologies/core";
import rdfx from "@ontologies/rdf";
import rdfs from "@ontologies/rdfs";
import schema from "@ontologies/schema";
import * as rdfx from "@ontologies/rdf";
import * as rdfs from "@ontologies/rdfs";
import * as schema from "@ontologies/schema";
import "jest";

import example from "../ontology/example";
Expand Down
4 changes: 2 additions & 2 deletions src/processor/DataProcessor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import rdfFactory, { isBlankNode, QuadPosition, TermType } from "@ontologies/core";
import schema from "@ontologies/schema";
import xsd from "@ontologies/xsd";
import * as schema from "@ontologies/schema";
import * as xsd from "@ontologies/xsd";
import { site } from "@rdfdev/iri";
import {
BAD_REQUEST,
Expand Down
2 changes: 1 addition & 1 deletion src/processor/DataToGraph.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import rdfFactory, { Literal, LowLevelStore, NamedNode, Node, TermType } from "@ontologies/core";
import rdf from "@ontologies/rdf";
import * as rdf from "@ontologies/rdf";

import ll from "../ontology/ll";
import RDFIndex from "../store/RDFIndex";
Expand Down
6 changes: 3 additions & 3 deletions src/processor/__tests__/DataProcessor.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import "../../__tests__/useHashFactory";

import rdfFactory from "@ontologies/core";
import rdfx from "@ontologies/rdf";
import rdfs from "@ontologies/rdfs";
import schema from "@ontologies/schema";
import * as rdfx from "@ontologies/rdf";
import * as rdfs from "@ontologies/rdfs";
import * as schema from "@ontologies/schema";
import {
BAD_REQUEST,
INTERNAL_SERVER_ERROR,
Expand Down
6 changes: 3 additions & 3 deletions src/processor/__tests__/DataToGraph.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import "../../__tests__/useHashFactory";

import rdfFactory, { TermType } from "@ontologies/core";
import rdf from "@ontologies/rdf";
import schema from "@ontologies/schema";
import xsd from "@ontologies/xsd";
import * as rdf from "@ontologies/rdf";
import * as schema from "@ontologies/schema";
import * as xsd from "@ontologies/xsd";
import "jest";

import ex from "../../ontology/ex";
Expand Down
4 changes: 2 additions & 2 deletions src/schema/__tests__/rdfs.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import "../../__tests__/useHashFactory";

import rdfFactory, { Node } from "@ontologies/core";
import rdfx from "@ontologies/rdf";
import rdfs from "@ontologies/rdfs";
import * as rdfx from "@ontologies/rdf";
import * as rdfs from "@ontologies/rdfs";
import schemaNS from "@ontologies/schema";
import "jest";

Expand Down
4 changes: 2 additions & 2 deletions src/schema/owl.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import rdfFactory, { NamedNode, Quad } from "@ontologies/core";
import owl from "@ontologies/owl";
import { sameAs } from "@ontologies/owl";

import { SomeNode, VocabularyProcessingContext, VocabularyProcessor } from "../types";

Expand Down Expand Up @@ -69,7 +69,7 @@ import { SomeNode, VocabularyProcessingContext, VocabularyProcessor } from "../t
// const nsOWLqualifiedCardinality = NS.owl("qualifiedCardinality");
// const nsOWLReflexiveProperty = NS.owl("ReflexiveProperty");
// const nsOWLRestriction = NS.owl("Restriction");
const nsOWLsameAs = owl.sameAs;
const nsOWLsameAs = sameAs;
// const nsOWLsomeValuesFrom = NS.owl("someValuesFrom");
// const nsOWLsourceIndividual = NS.owl("sourceIndividual");
// const nsOWLSymmetricProperty = NS.owl("SymmetricProperty");
Expand Down
4 changes: 2 additions & 2 deletions src/schema/rdfs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import rdfFactory, { NamedNode, Quad, TermType } from "@ontologies/core";
import rdf from "@ontologies/rdf";
import rdfs from "@ontologies/rdfs";
import * as rdf from "@ontologies/rdf";
import * as rdfs from "@ontologies/rdfs";

import { equals, id } from "../factoryHelpers";
import { VocabularyProcessingContext, VocabularyProcessor } from "../types";
Expand Down
4 changes: 2 additions & 2 deletions src/store/Equatable.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Taken, stripped and modified from rdflib.js */

import { isNode, TermType } from "@ontologies/core";
import owl from "@ontologies/owl";
import { sameAs } from "@ontologies/owl";

import { equals, id } from "../factoryHelpers";
import { NamedNode, Node, Quad, SomeTerm, Term } from "../rdf";
Expand All @@ -27,7 +27,7 @@ export function Equatable<BC extends Constructable<IndexedStore & BasicStore>>(b
super(...args);

this.addDataCallback((quad: Quad) => {
if (equals(quad.predicate, owl.sameAs)) {
if (equals(quad.predicate, sameAs)) {
this.equate(quad.subject, quad.object as Node);
}
});
Expand Down
6 changes: 3 additions & 3 deletions src/store/__tests__/BasicStore.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import "../../__tests__/useHashFactory";

import rdf, { DataFactory } from "@ontologies/core";
import owl from "@ontologies/owl";
import rdfx from "@ontologies/rdf";
import rdfs from "@ontologies/rdfs";
import schema from "@ontologies/schema";
import * as rdfx from "@ontologies/rdf";
import * as rdfs from "@ontologies/rdfs";
import * as schema from "@ontologies/schema";
import "jest";

import BasicStore from "../BasicStore";
Expand Down
6 changes: 3 additions & 3 deletions src/store/__tests__/RDFIndex.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import "../../__tests__/useHashFactory";

import rdf from "@ontologies/core";
import owl from "@ontologies/owl";
import rdfx from "@ontologies/rdf";
import rdfs from "@ontologies/rdfs";
import schema from "@ontologies/schema";
import * as rdfx from "@ontologies/rdf";
import * as rdfs from "@ontologies/rdfs";
import * as schema from "@ontologies/schema";
import "jest";

import RDFIndex from "../RDFIndex";
Expand Down
6 changes: 3 additions & 3 deletions src/store/__tests__/deltaProcessor.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import "../../__tests__/useHashFactory";

import rdfFactory, { LowLevelStore, NamedNode, Quadruple } from "@ontologies/core";
import ld from "@ontologies/ld";
import rdf from "@ontologies/rdf";
import schema from "@ontologies/schema";
import * as ld from "@ontologies/ld";
import * as rdf from "@ontologies/rdf";
import * as schema from "@ontologies/schema";
import "jest";

import ex from "../../ontology/ex";
Expand Down
4 changes: 2 additions & 2 deletions src/utilities.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* global chrome */
import rdfFactory, { TermType } from "@ontologies/core";
import rdf from "@ontologies/rdf";
import rdfs from "@ontologies/rdfs";
import * as rdf from "@ontologies/rdf";
import * as rdfs from "@ontologies/rdfs";
import { BlankNode, Literal, NamedNode, Quad, Term } from "./rdf";

import { SomeNode } from "./types";
Expand Down
Loading

0 comments on commit e7859b6

Please sign in to comment.