This commit is contained in:
felix
2026-09-14 13:57:42 +02:00
commit 4ef33c6417
951 changed files with 155793 additions and 0 deletions

21
node_modules/rdf-data-factory/LICENSE.txt generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright © 2020 - now Ruben Taelman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

206
node_modules/rdf-data-factory/README.md generated vendored Normal file
View File

@@ -0,0 +1,206 @@
# RDF Data Factory
[![Build status](https://github.com/rubensworks/rdf-data-factory.js/workflows/CI/badge.svg)](https://github.com/rubensworks/rdf-data-factory.js/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/github/rubensworks/rdf-data-factory.js/badge.svg?branch=master)](https://coveralls.io/github/rubensworks/rdf-data-factory.js?branch=master)
[![npm version](https://badge.fury.io/js/rdf-data-factory.svg)](https://www.npmjs.com/package/rdf-data-factory)
This package contains an implementation of the [RDF/JS Data model](http://rdf.js.org/data-model-spec/).
It works in both JavaScript and TypeScript.
Concretely, it provides an implementation of the following interfaces:
* [`DataFactory`](http://rdf.js.org/data-model-spec/#datafactory-interface): A factory for instantiating RDF terms and quads.
* [`NamedNode`](http://rdf.js.org/data-model-spec/#namednode-interface): A term that contains an IRI.
* [`BlankNode`](http://rdf.js.org/data-model-spec/#blanknode-interface): A term that represents an RDF blank node with a label.
* [`Literal`](http://rdf.js.org/data-model-spec/#literal-interface): A term that represents an RDF literal, containing a string with an optional language tag or datatype.
* [`Variable`](http://rdf.js.org/data-model-spec/#variable-interface): A term that represents a variable.
* [`DefaultGraph`](http://rdf.js.org/data-model-spec/#defaultgraph-interface): A singleton term instance that represents the default graph.
If using TypeScript, it is recommended to use this in conjunction with [`@types/rdf-js`](https://www.npmjs.com/package/@types/rdf-js).
## Installation
```bash
$ npm install rdf-data-factory
```
or
```bash
$ yarn add rdf-data-factory
```
This package also works out-of-the-box in browsers via tools such as [webpack](https://webpack.js.org/) and [browserify](http://browserify.org/).
## Usage
It is recommended to always create terms via a `DataFactory` instance:
```typescript
import { DataFactory } from 'rdf-data-factory';
import * as RDF from 'rdf-js';
const factory: RDF.DataFactory = new DataFactory();
```
You can pass the following option to define a blank node prefix:
```typescript
const factory: RDF.DataFactory = new DataFactory({ blankNodePrefix: 'bnode_' });
```
If no `blankNodePrefix` is passed, it will generate a unique prefix of the form `df_[0-9]+_`,
which ensures there will be no blank nodes clashes when instantiating multiple factories.
### Creating named nodes
```typescript
const term: RDF.NamedNode = factory.namedNode('http://example.org');
console.log(term.value); // 'http://example.org'
console.log(term.termType); // 'NamedNode'
console.log(term.equals(term)); // true
```
### Creating blank nodes
With a given blank node label:
```typescript
const term: RDF.BlankNode = factory.blankNode('bnode');
console.log(term.value); // 'bnode'
console.log(term.termType); // 'BlankNode'
console.log(term.equals(term)); // true
```
Autogenerate a blank node label using an internal blank node counter:
```typescript
const term: RDF.BlankNode = factory.blankNode();
console.log(term.value); // 'df-0'
console.log(term.termType); // 'BlankNode'
console.log(term.equals(term)); // true
```
Reset the blank node label counter:
```typescript
factory.resetBlankNodeCounter();
```
### Creating literals
Plain string literal:
```typescript
const term: RDF.Literal = factory.literal('abc');
console.log(term.value); // 'abc'
console.log(term.termType); // 'Literal'
console.log(term.language); // ''
console.log(term.datatype); // namedNode('http://www.w3.org/2001/XMLSchema#string')
console.log(term.equals(term)); // true
```
Languaged tagged string literal:
```typescript
const term: RDF.Literal = factory.literal('abc', 'en-us');
console.log(term.value); // 'abc'
console.log(term.termType); // 'Literal'
console.log(term.language); // 'en-us'
console.log(term.datatype); // namedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#langString')
console.log(term.equals(term)); // true
```
Datatyped literal:
```typescript
const term: RDF.Literal = factory.literal('1.2', factory.namedNode('http://www.w3.org/2001/XMLSchema#double'));
console.log(term.value); // 'abc'
console.log(term.termType); // 'Literal'
console.log(term.language); // ''
console.log(term.datatype); // namedNode('http://www.w3.org/2001/XMLSchema#double')
console.log(term.equals(term)); // true
```
### Creating variables
```typescript
const term: RDF.Variable = factory.variable('myVar');
console.log(term.value); // 'myVar'
console.log(term.termType); // 'Variable'
console.log(term.equals(term)); // true
```
### Getting the default graph
This will always produce the same default graph instance;
```typescript
const term: RDF.DefaultGraph = factory.defaultGraph();
console.log(term.value); // ''
console.log(term.termType); // 'DefaultGraph'
console.log(term.equals(term)); // true
```
### Creating quads
Create a triple in the default graph:
```typescript
const quad: RDF.Quad = factory.quad(
factory.namedNode('ex:s'),
factory.namedNode('ex:p'),
factory.literal('o'),
);
console.log(term.subject); // An RDF.Term
console.log(term.predicate); // An RDF.Term
console.log(term.object); // An RDF.Term
console.log(term.graph); // An RDF.Term, in this case defaultGraph()
console.log(quad.equals(quad)); // true
```
Create a triple in a named graph:
```typescript
const quad: RDF.Quad = factory.quad(
factory.namedNode('ex:s'),
factory.namedNode('ex:p'),
factory.literal('o'),
factory.namedNode('ex:g'),
);
console.log(term.subject); // An RDF.Term
console.log(term.predicate); // An RDF.Term
console.log(term.object); // An RDF.Term
console.log(term.graph); // An RDF.Term
console.log(quad.equals(quad)); // true
```
Since a `Quad` is also a `Term`, it is possible to annotate `Quad`'s by nesting them:
```typescript
const quad: RDF.Quad = factory.quad(
factory.quad(
factory.namedNode('ex:s'),
factory.namedNode('ex:p1'),
factory.literal('o'),
),
factory.namedNode('ex:p2'),
factory.literal('o'),
);
```
### Copying terms
Create a deep copy of the given term:
```typescript
const term1 = factory.namedNode('ex:s');
const term1 = factory.fromTerm(term1);
```
This is useful if you need to transform terms from another data factory.
### Copying quads
Create a deep copy of the given quad:
```typescript
const quad1: RDF.Quad = factory.quad(
factory.namedNode('ex:s'),
factory.namedNode('ex:p'),
factory.literal('o'),
);
const quad2 = factory.fromQuad(quad1);
```
This is useful if you need to transform quads from another data factory.
_Nested quads will be copied recursively to produce an actual deep copy._
## License
This software is written by [Ruben Taelman](http://rubensworks.net/).
This code is released under the [MIT license](http://opensource.org/licenses/MIT).

7
node_modules/rdf-data-factory/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
export * from './lib/BlankNode';
export * from './lib/DataFactory';
export * from './lib/DefaultGraph';
export * from './lib/Literal';
export * from './lib/NamedNode';
export * from './lib/Quad';
export * from './lib/Variable';

24
node_modules/rdf-data-factory/index.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./lib/BlankNode"), exports);
__exportStar(require("./lib/DataFactory"), exports);
__exportStar(require("./lib/DefaultGraph"), exports);
__exportStar(require("./lib/Literal"), exports);
__exportStar(require("./lib/NamedNode"), exports);
__exportStar(require("./lib/Quad"), exports);
__exportStar(require("./lib/Variable"), exports);
//# sourceMappingURL=index.js.map

1
node_modules/rdf-data-factory/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,oDAAkC;AAClC,qDAAmC;AACnC,gDAA8B;AAC9B,kDAAgC;AAChC,6CAA2B;AAC3B,iDAA+B","sourcesContent":["export * from './lib/BlankNode';\nexport * from './lib/DataFactory';\nexport * from './lib/DefaultGraph';\nexport * from './lib/Literal';\nexport * from './lib/NamedNode';\nexport * from './lib/Quad';\nexport * from './lib/Variable';\n"]}

10
node_modules/rdf-data-factory/lib/BlankNode.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import type * as RDF from '@rdfjs/types';
/**
* A term that represents an RDF blank node with a label.
*/
export declare class BlankNode implements RDF.BlankNode {
readonly termType = "BlankNode";
readonly value: string;
constructor(value: string);
equals(other?: RDF.Term | null): boolean;
}

17
node_modules/rdf-data-factory/lib/BlankNode.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BlankNode = void 0;
/**
* A term that represents an RDF blank node with a label.
*/
class BlankNode {
constructor(value) {
this.termType = 'BlankNode';
this.value = value;
}
equals(other) {
return !!other && other.termType === 'BlankNode' && other.value === this.value;
}
}
exports.BlankNode = BlankNode;
//# sourceMappingURL=BlankNode.js.map

1
node_modules/rdf-data-factory/lib/BlankNode.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"BlankNode.js","sourceRoot":"","sources":["BlankNode.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,SAAS;IAIpB,YAAmB,KAAa;QAHhB,aAAQ,GAAG,WAAW,CAAC;QAIrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,KAAuB;QACnC,OAAO,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,KAAK,WAAW,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;IACjF,CAAC;CACF;AAXD,8BAWC","sourcesContent":["import type * as RDF from '@rdfjs/types';\n\n/**\n * A term that represents an RDF blank node with a label.\n */\nexport class BlankNode implements RDF.BlankNode {\n public readonly termType = 'BlankNode';\n public readonly value: string;\n\n public constructor(value: string) {\n this.value = value;\n }\n\n public equals(other?: RDF.Term | null): boolean {\n return !!other && other.termType === 'BlankNode' && other.value === this.value;\n }\n}\n"]}

79
node_modules/rdf-data-factory/lib/DataFactory.d.ts generated vendored Normal file
View File

@@ -0,0 +1,79 @@
import type * as RDF from '@rdfjs/types';
import { BlankNode } from './BlankNode';
import { DefaultGraph } from './DefaultGraph';
import { Literal } from './Literal';
import { NamedNode } from './NamedNode';
import { Quad } from './Quad';
import { Variable } from './Variable';
/**
* A factory for instantiating RDF terms and quads.
*/
export declare class DataFactory<Q extends RDF.BaseQuad = RDF.Quad> implements RDF.DataFactory<Q> {
private readonly blankNodePrefix;
private blankNodeCounter;
constructor(options?: IDataFactoryOptions);
/**
* @param value The IRI for the named node.
* @return A new instance of NamedNode.
* @see NamedNode
*/
namedNode<Iri extends string = string>(value: Iri): NamedNode<Iri>;
/**
* @param value The optional blank node identifier.
* @return A new instance of BlankNode.
* If the `value` parameter is undefined a new identifier
* for the blank node is generated for each call.
* @see BlankNode
*/
blankNode(value?: string): BlankNode;
/**
* @param value The literal value.
* @param languageOrDatatype The optional language or datatype.
* If `languageOrDatatype` is a NamedNode,
* then it is used for the value of `NamedNode.datatype`.
* Otherwise `languageOrDatatype` is used for the value
* of `NamedNode.language`.
* @return A new instance of Literal.
* @see Literal
*/
literal(value: string, languageOrDatatype?: string | RDF.NamedNode): Literal;
/**
* This method is optional.
* @param value The variable name
* @return A new instance of Variable.
* @see Variable
*/
variable(value: string): Variable;
/**
* @return An instance of DefaultGraph.
*/
defaultGraph(): DefaultGraph;
/**
* @param subject The quad subject term.
* @param predicate The quad predicate term.
* @param object The quad object term.
* @param graph The quad graph term.
* @return A new instance of Quad.
* @see Quad
*/
quad(subject: Q['subject'], predicate: Q['predicate'], object: Q['object'], graph?: Q['graph']): Q & Quad;
/**
* Create a deep copy of the given term using this data factory.
* @param original An RDF term.
* @return A deep copy of the given term.
*/
fromTerm<T extends RDF.Term>(original: T): (T extends RDF.NamedNode ? NamedNode : (T extends RDF.BlankNode ? BlankNode : (T extends RDF.Literal ? Literal : (T extends RDF.Variable ? Variable : (T extends RDF.DefaultGraph ? DefaultGraph : (T extends Q ? Q : unknown))))));
/**
* Create a deep copy of the given quad using this data factory.
* @param original An RDF quad.
* @return A deep copy of the given quad.
*/
fromQuad(original: Q): Q;
/**
* Reset the internal blank node counter.
*/
resetBlankNodeCounter(): void;
}
export interface IDataFactoryOptions {
blankNodePrefix?: string;
}

122
node_modules/rdf-data-factory/lib/DataFactory.js generated vendored Normal file
View File

@@ -0,0 +1,122 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataFactory = void 0;
const BlankNode_1 = require("./BlankNode");
const DefaultGraph_1 = require("./DefaultGraph");
const Literal_1 = require("./Literal");
const NamedNode_1 = require("./NamedNode");
const Quad_1 = require("./Quad");
const Variable_1 = require("./Variable");
let dataFactoryCounter = 0;
/**
* A factory for instantiating RDF terms and quads.
*/
class DataFactory {
constructor(options) {
this.blankNodeCounter = 0;
options = options || {};
this.blankNodePrefix = options.blankNodePrefix || `df_${dataFactoryCounter++}_`;
}
/**
* @param value The IRI for the named node.
* @return A new instance of NamedNode.
* @see NamedNode
*/
namedNode(value) {
return new NamedNode_1.NamedNode(value);
}
/**
* @param value The optional blank node identifier.
* @return A new instance of BlankNode.
* If the `value` parameter is undefined a new identifier
* for the blank node is generated for each call.
* @see BlankNode
*/
blankNode(value) {
return new BlankNode_1.BlankNode(value || `${this.blankNodePrefix}${this.blankNodeCounter++}`);
}
/**
* @param value The literal value.
* @param languageOrDatatype The optional language or datatype.
* If `languageOrDatatype` is a NamedNode,
* then it is used for the value of `NamedNode.datatype`.
* Otherwise `languageOrDatatype` is used for the value
* of `NamedNode.language`.
* @return A new instance of Literal.
* @see Literal
*/
literal(value, languageOrDatatype) {
return new Literal_1.Literal(value, languageOrDatatype);
}
/**
* This method is optional.
* @param value The variable name
* @return A new instance of Variable.
* @see Variable
*/
variable(value) {
return new Variable_1.Variable(value);
}
/**
* @return An instance of DefaultGraph.
*/
defaultGraph() {
return DefaultGraph_1.DefaultGraph.INSTANCE;
}
/**
* @param subject The quad subject term.
* @param predicate The quad predicate term.
* @param object The quad object term.
* @param graph The quad graph term.
* @return A new instance of Quad.
* @see Quad
*/
quad(subject, predicate, object, graph) {
return new Quad_1.Quad(subject, predicate, object, graph || this.defaultGraph());
}
/**
* Create a deep copy of the given term using this data factory.
* @param original An RDF term.
* @return A deep copy of the given term.
*/
fromTerm(original) {
// TODO: remove nasty any casts when this TS bug has been fixed:
// https://github.com/microsoft/TypeScript/issues/26933
switch (original.termType) {
case 'NamedNode':
return this.namedNode(original.value);
case 'BlankNode':
return this.blankNode(original.value);
case 'Literal':
if (original.language) {
return this.literal(original.value, original.language);
}
if (!original.datatype.equals(Literal_1.Literal.XSD_STRING)) {
return this.literal(original.value, this.fromTerm(original.datatype));
}
return this.literal(original.value);
case 'Variable':
return this.variable(original.value);
case 'DefaultGraph':
return this.defaultGraph();
case 'Quad':
return this.quad(this.fromTerm(original.subject), this.fromTerm(original.predicate), this.fromTerm(original.object), this.fromTerm(original.graph));
}
}
/**
* Create a deep copy of the given quad using this data factory.
* @param original An RDF quad.
* @return A deep copy of the given quad.
*/
fromQuad(original) {
return this.fromTerm(original);
}
/**
* Reset the internal blank node counter.
*/
resetBlankNodeCounter() {
this.blankNodeCounter = 0;
}
}
exports.DataFactory = DataFactory;
//# sourceMappingURL=DataFactory.js.map

1
node_modules/rdf-data-factory/lib/DataFactory.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

12
node_modules/rdf-data-factory/lib/DefaultGraph.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import type * as RDF from '@rdfjs/types';
/**
* A singleton term instance that represents the default graph.
* It's only allowed to assign a DefaultGraph to the .graph property of a Quad.
*/
export declare class DefaultGraph implements RDF.DefaultGraph {
static INSTANCE: DefaultGraph;
readonly termType = "DefaultGraph";
readonly value = "";
private constructor();
equals(other?: RDF.Term | null): boolean;
}

20
node_modules/rdf-data-factory/lib/DefaultGraph.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DefaultGraph = void 0;
/**
* A singleton term instance that represents the default graph.
* It's only allowed to assign a DefaultGraph to the .graph property of a Quad.
*/
class DefaultGraph {
constructor() {
this.termType = 'DefaultGraph';
this.value = '';
// Private constructor
}
equals(other) {
return !!other && other.termType === 'DefaultGraph';
}
}
exports.DefaultGraph = DefaultGraph;
DefaultGraph.INSTANCE = new DefaultGraph();
//# sourceMappingURL=DefaultGraph.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"DefaultGraph.js","sourceRoot":"","sources":["DefaultGraph.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,YAAY;IAMvB;QAHgB,aAAQ,GAAG,cAAc,CAAC;QAC1B,UAAK,GAAG,EAAE,CAAC;QAGzB,sBAAsB;IACxB,CAAC;IAEM,MAAM,CAAC,KAAuB;QACnC,OAAO,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,KAAK,cAAc,CAAC;IACtD,CAAC;;AAZH,oCAaC;AAZe,qBAAQ,GAAG,IAAI,YAAY,EAAE,CAAC","sourcesContent":["import type * as RDF from '@rdfjs/types';\n\n/**\n * A singleton term instance that represents the default graph.\n * It's only allowed to assign a DefaultGraph to the .graph property of a Quad.\n */\nexport class DefaultGraph implements RDF.DefaultGraph {\n public static INSTANCE = new DefaultGraph();\n\n public readonly termType = 'DefaultGraph';\n public readonly value = '';\n\n private constructor() {\n // Private constructor\n }\n\n public equals(other?: RDF.Term | null): boolean {\n return !!other && other.termType === 'DefaultGraph';\n }\n}\n"]}

14
node_modules/rdf-data-factory/lib/Literal.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
import type * as RDF from '@rdfjs/types';
/**
* A term that represents an RDF literal, containing a string with an optional language tag or datatype.
*/
export declare class Literal implements RDF.Literal {
readonly termType = "Literal";
readonly value: string;
readonly language: string;
readonly datatype: RDF.NamedNode;
static readonly RDF_LANGUAGE_STRING: RDF.NamedNode;
static readonly XSD_STRING: RDF.NamedNode;
constructor(value: string, languageOrDatatype?: string | RDF.NamedNode);
equals(other?: RDF.Term | null): boolean;
}

33
node_modules/rdf-data-factory/lib/Literal.js generated vendored Normal file
View File

@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Literal = void 0;
const NamedNode_1 = require("./NamedNode");
/**
* A term that represents an RDF literal, containing a string with an optional language tag or datatype.
*/
class Literal {
constructor(value, languageOrDatatype) {
this.termType = 'Literal';
this.value = value;
if (typeof languageOrDatatype === 'string') {
this.language = languageOrDatatype;
this.datatype = Literal.RDF_LANGUAGE_STRING;
}
else if (languageOrDatatype) {
this.language = '';
this.datatype = languageOrDatatype;
}
else {
this.language = '';
this.datatype = Literal.XSD_STRING;
}
}
equals(other) {
return !!other && other.termType === 'Literal' && other.value === this.value &&
other.language === this.language && this.datatype.equals(other.datatype);
}
}
exports.Literal = Literal;
Literal.RDF_LANGUAGE_STRING = new NamedNode_1.NamedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#langString');
Literal.XSD_STRING = new NamedNode_1.NamedNode('http://www.w3.org/2001/XMLSchema#string');
//# sourceMappingURL=Literal.js.map

1
node_modules/rdf-data-factory/lib/Literal.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Literal.js","sourceRoot":"","sources":["Literal.ts"],"names":[],"mappings":";;;AACA,2CAAwC;AAExC;;GAEG;AACH,MAAa,OAAO;IAYlB,YAAmB,KAAa,EAAE,kBAA2C;QAX7D,aAAQ,GAAG,SAAS,CAAC;QAYnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;YAC1C,IAAI,CAAC,QAAQ,GAAG,kBAAkB,CAAC;YACnC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC;SAC7C;aAAM,IAAI,kBAAkB,EAAE;YAC7B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;YACnB,IAAI,CAAC,QAAQ,GAAG,kBAAkB,CAAC;SACpC;aAAM;YACL,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;YACnB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;SACpC;IACH,CAAC;IAEM,MAAM,CAAC,KAAuB;QACnC,OAAO,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK;YAC1E,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC7E,CAAC;;AA7BH,0BA8BC;AAxBwB,2BAAmB,GAC1C,IAAI,qBAAS,CAAC,uDAAuD,CAAC,CAAC;AAEhD,kBAAU,GACjC,IAAI,qBAAS,CAAC,yCAAyC,CAAC,CAAC","sourcesContent":["import type * as RDF from '@rdfjs/types';\nimport { NamedNode } from './NamedNode';\n\n/**\n * A term that represents an RDF literal, containing a string with an optional language tag or datatype.\n */\nexport class Literal implements RDF.Literal {\n public readonly termType = 'Literal';\n public readonly value: string;\n public readonly language: string;\n public readonly datatype: RDF.NamedNode;\n\n public static readonly RDF_LANGUAGE_STRING: RDF.NamedNode =\n new NamedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#langString');\n\n public static readonly XSD_STRING: RDF.NamedNode =\n new NamedNode('http://www.w3.org/2001/XMLSchema#string');\n\n public constructor(value: string, languageOrDatatype?: string | RDF.NamedNode) {\n this.value = value;\n if (typeof languageOrDatatype === 'string') {\n this.language = languageOrDatatype;\n this.datatype = Literal.RDF_LANGUAGE_STRING;\n } else if (languageOrDatatype) {\n this.language = '';\n this.datatype = languageOrDatatype;\n } else {\n this.language = '';\n this.datatype = Literal.XSD_STRING;\n }\n }\n\n public equals(other?: RDF.Term | null): boolean {\n return !!other && other.termType === 'Literal' && other.value === this.value &&\n other.language === this.language && this.datatype.equals(other.datatype);\n }\n}\n"]}

10
node_modules/rdf-data-factory/lib/NamedNode.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import type * as RDF from '@rdfjs/types';
/**
* A term that contains an IRI.
*/
export declare class NamedNode<Iri extends string = string> implements RDF.NamedNode<Iri> {
readonly termType = "NamedNode";
readonly value: Iri;
constructor(value: Iri);
equals(other?: RDF.Term | null): boolean;
}

17
node_modules/rdf-data-factory/lib/NamedNode.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NamedNode = void 0;
/**
* A term that contains an IRI.
*/
class NamedNode {
constructor(value) {
this.termType = 'NamedNode';
this.value = value;
}
equals(other) {
return !!other && other.termType === 'NamedNode' && other.value === this.value;
}
}
exports.NamedNode = NamedNode;
//# sourceMappingURL=NamedNode.js.map

1
node_modules/rdf-data-factory/lib/NamedNode.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"NamedNode.js","sourceRoot":"","sources":["NamedNode.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,SAAS;IAIpB,YAAmB,KAAU;QAHb,aAAQ,GAAG,WAAW,CAAC;QAIrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,KAAuB;QACnC,OAAO,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,KAAK,WAAW,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;IACjF,CAAC;CACF;AAXD,8BAWC","sourcesContent":["import type * as RDF from '@rdfjs/types';\n\n/**\n * A term that contains an IRI.\n */\nexport class NamedNode<Iri extends string = string> implements RDF.NamedNode<Iri> {\n public readonly termType = 'NamedNode';\n public readonly value: Iri;\n\n public constructor(value: Iri) {\n this.value = value;\n }\n\n public equals(other?: RDF.Term | null): boolean {\n return !!other && other.termType === 'NamedNode' && other.value === this.value;\n }\n}\n"]}

15
node_modules/rdf-data-factory/lib/Quad.d.ts generated vendored Normal file
View File

@@ -0,0 +1,15 @@
import type * as RDF from '@rdfjs/types';
/**
* An instance of DefaultGraph represents the default graph.
* It's only allowed to assign a DefaultGraph to the .graph property of a Quad.
*/
export declare class Quad implements RDF.BaseQuad {
readonly termType = "Quad";
readonly value = "";
readonly subject: RDF.Term;
readonly predicate: RDF.Term;
readonly object: RDF.Term;
readonly graph: RDF.Term;
constructor(subject: RDF.Term, predicate: RDF.Term, object: RDF.Term, graph: RDF.Term);
equals(other?: RDF.Term | null): boolean;
}

27
node_modules/rdf-data-factory/lib/Quad.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Quad = void 0;
/**
* An instance of DefaultGraph represents the default graph.
* It's only allowed to assign a DefaultGraph to the .graph property of a Quad.
*/
class Quad {
constructor(subject, predicate, object, graph) {
this.termType = 'Quad';
this.value = '';
this.subject = subject;
this.predicate = predicate;
this.object = object;
this.graph = graph;
}
equals(other) {
// `|| !other.termType` is for backwards-compatibility with old factories without RDF* support.
return !!other && (other.termType === 'Quad' || !other.termType) &&
this.subject.equals(other.subject) &&
this.predicate.equals(other.predicate) &&
this.object.equals(other.object) &&
this.graph.equals(other.graph);
}
}
exports.Quad = Quad;
//# sourceMappingURL=Quad.js.map

1
node_modules/rdf-data-factory/lib/Quad.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Quad.js","sourceRoot":"","sources":["Quad.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,IAAI;IAQf,YACE,OAAiB,EACjB,SAAmB,EACnB,MAAgB,EAChB,KAAe;QAXD,aAAQ,GAAG,MAAM,CAAC;QAClB,UAAK,GAAG,EAAE,CAAC;QAYzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,KAAuB;QACnC,+FAA+F;QAC/F,OAAO,CAAC,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;YAC9D,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;YAClC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC;YACtC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;YAChC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;CACF;AA5BD,oBA4BC","sourcesContent":["import type * as RDF from '@rdfjs/types';\n\n/**\n * An instance of DefaultGraph represents the default graph.\n * It's only allowed to assign a DefaultGraph to the .graph property of a Quad.\n */\nexport class Quad implements RDF.BaseQuad {\n public readonly termType = 'Quad';\n public readonly value = '';\n public readonly subject: RDF.Term;\n public readonly predicate: RDF.Term;\n public readonly object: RDF.Term;\n public readonly graph: RDF.Term;\n\n public constructor(\n subject: RDF.Term,\n predicate: RDF.Term,\n object: RDF.Term,\n graph: RDF.Term,\n ) {\n this.subject = subject;\n this.predicate = predicate;\n this.object = object;\n this.graph = graph;\n }\n\n public equals(other?: RDF.Term | null): boolean {\n // `|| !other.termType` is for backwards-compatibility with old factories without RDF* support.\n return !!other && (other.termType === 'Quad' || !other.termType) &&\n this.subject.equals(other.subject) &&\n this.predicate.equals(other.predicate) &&\n this.object.equals(other.object) &&\n this.graph.equals(other.graph);\n }\n}\n"]}

10
node_modules/rdf-data-factory/lib/Variable.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import type * as RDF from '@rdfjs/types';
/**
* A term that represents a variable.
*/
export declare class Variable implements RDF.Variable {
readonly termType = "Variable";
readonly value: string;
constructor(value: string);
equals(other?: RDF.Term | null): boolean;
}

17
node_modules/rdf-data-factory/lib/Variable.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Variable = void 0;
/**
* A term that represents a variable.
*/
class Variable {
constructor(value) {
this.termType = 'Variable';
this.value = value;
}
equals(other) {
return !!other && other.termType === 'Variable' && other.value === this.value;
}
}
exports.Variable = Variable;
//# sourceMappingURL=Variable.js.map

1
node_modules/rdf-data-factory/lib/Variable.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Variable.js","sourceRoot":"","sources":["Variable.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAa,QAAQ;IAInB,YAAmB,KAAa;QAHhB,aAAQ,GAAG,UAAU,CAAC;QAIpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,KAAuB;QACnC,OAAO,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,KAAK,UAAU,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;IAChF,CAAC;CACF;AAXD,4BAWC","sourcesContent":["import type * as RDF from '@rdfjs/types';\n\n/**\n * A term that represents a variable.\n */\nexport class Variable implements RDF.Variable {\n public readonly termType = 'Variable';\n public readonly value: string;\n\n public constructor(value: string) {\n this.value = value;\n }\n\n public equals(other?: RDF.Term | null): boolean {\n return !!other && other.termType === 'Variable' && other.value === this.value;\n }\n}\n"]}

91
node_modules/rdf-data-factory/package.json generated vendored Normal file
View File

@@ -0,0 +1,91 @@
{
"name": "rdf-data-factory",
"version": "1.1.3",
"description": "A TypeScript/JavaScript implementation of the RDF/JS data factory.",
"keywords": [
"rdf",
"rdfjs",
"data factory",
"factory",
"data model",
"rdf terms"
],
"main": "index.js",
"typings": "index",
"repository": "git@github.com:rubensworks/rdf-data-factory.js.git",
"author": "Ruben Taelman <rubensworks@gmail.com>",
"bugs": {
"url": "https://github.com/rubensworks/rdf-data-factory.js/issues"
},
"homepage": "https://github.com/rubensworks/rdf-data-factory.js#readme",
"license": "MIT",
"files": [
"lib/**/*.d.ts",
"lib/**/*.js",
"lib/**/*.js.map",
"index.d.ts",
"index.js.map",
"index.js"
],
"dependencies": {
"@rdfjs/types": "^1.0.0"
},
"pre-commit": [
"build",
"lint",
"test"
],
"devDependencies": {
"@rubensworks/eslint-config": "^1.0.0",
"@types/jest": "^27.0.0",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"coveralls": "^3.0.0",
"eslint": "^7.9.0",
"eslint-config-es": "^3.23.0",
"eslint-import-resolver-typescript": "^2.3.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jest": "^24.0.2",
"eslint-plugin-tsdoc": "^0.2.7",
"eslint-plugin-unused-imports": "^1.0.0",
"jest": "^27.0.0",
"jest-rdf": "^1.5.0",
"manual-git-changelog": "^1.0.0",
"pre-commit": "^1.2.2",
"ts-jest": "^27.0.0",
"typescript": "^4.0.2"
},
"jest": {
"transform": {
"^.+\\.ts$": "ts-jest"
},
"transformIgnorePatterns": [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"
],
"testRegex": "(/test/.*|(\\.|/)(test|spec))\\.ts$",
"moduleFileExtensions": [
"ts",
"js"
],
"collectCoverage": true,
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
}
},
"scripts": {
"test": "jest ${1}",
"test-watch": "jest ${1} --watch",
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls",
"lint": "eslint . --ext .ts --cache",
"build": "tsc",
"validate": "npm ls",
"prepare": "npm run build",
"version": "manual-git-changelog onversion"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}