rdf-stores
Version:
A TypeScript/JavaScript implementation of the RDF/JS store interface with support for quoted triples.
26 lines (25 loc) • 1.13 kB
TypeScript
import type * as RDF from '@rdfjs/types';
import type { ITermDictionary } from './ITermDictionary';
/**
* A term dictionary for quoted triples.
*
* Plain terms and quoted triples are stored in separate dictionaries.
*
* Finding quoted triples is done by iterating over all quoted triples, and filtering by the matching ones.
*/
export declare class TermDictionaryQuoted implements ITermDictionary<number> {
static readonly BITMASK: number;
private readonly plainTermDictionary;
private readonly quotedTriplesDictionary;
private readonly dataFactory;
readonly features: {
quotedTriples: boolean;
};
constructor(plainTermDictionary: ITermDictionary<number>, quotedTriplesDictionary: ITermDictionary<number>, dataFactory?: RDF.DataFactory);
encode(term: RDF.Term): number;
encodeOptional(term: RDF.Term): number | undefined;
decode(encoding: number): RDF.Term;
encodings(): IterableIterator<number>;
findQuotedTriples(quotedTriplePattern: RDF.Quad): IterableIterator<RDF.Term>;
findQuotedTriplesEncoded(quotedTriplePattern: RDF.Quad): IterableIterator<number>;
}