lincd
Version:
LINCD is a JavaScript library for building user interfaces with linked data (also known as 'structured data', or RDF)
54 lines (53 loc) • 2.95 kB
TypeScript
import { CoreSet } from './CoreSet';
import { NamedNode, Node } from '../models';
import { Shape } from '../shapes/Shape';
import { IGraphObjectSet } from '../interfaces/IGraphObjectSet';
import { QuadSet } from './QuadSet';
import { QuadArray } from './QuadArray';
import { NodeSet } from './NodeSet';
import { ICoreIterable } from '../interfaces/ICoreIterable';
export declare class ShapeSet<R extends Shape = Shape> extends CoreSet<R> implements IGraphObjectSet<R> {
constructor(iterable?: Iterable<R>);
/**
* Returns true if this set contains the exact same shape OR a shape that has same node and is an instance of the same class as the given shape
* Why? you can create two identical shapes of the same node, but they are not the same instance
* To avoid having to account for that, by default, ShapeSets return true if the node matches and the shapes are instances of the same class
* @param value the shape you want to check for
* @param matchOnNodes set to false if you only want to check for true matches of identical instances
*/
has(value: R, matchOnNodes?: boolean): boolean;
delete(value: R): boolean;
getProperties(includeFromIncomingArcs?: boolean): NodeSet<NamedNode>;
concat(...sets: ICoreIterable<R>[]): this;
getInverseProperties(): NodeSet<NamedNode>;
getOne(property: NamedNode): Node | undefined;
/**
* Returns a NodeSet containing the merged results of node.get(property) for each node in this set
* @param property
* @returns {NodeSet}
*/
getAll(property: NamedNode): NodeSet;
getOneFromPath(...properties: NamedNode[]): Node | undefined;
getAllFromPath(...properties: NamedNode[]): NodeSet;
getOneInverse(property: NamedNode): NamedNode | undefined;
getAllInverse(property: NamedNode): NodeSet<NamedNode>;
getMultipleInverse(properties: ICoreIterable<NamedNode>): NodeSet;
getMultiple(properties: ICoreIterable<NamedNode>): NodeSet;
getDeep(property: NamedNode, maxDepth?: number): NodeSet;
getQuads(property: NamedNode): QuadSet;
getInverseQuads(property: NamedNode): QuadSet | any;
getAllQuads(includeAsObject?: boolean, includeImplicit?: boolean): QuadArray;
getAllInverseQuads(includeImplicit?: boolean): QuadArray;
where(property: NamedNode, value: Node): this;
getWhere(property: NamedNode, value: Node): Shape | undefined;
setEach(property: NamedNode, value: Node): boolean;
msetEach(property: NamedNode, values: ICoreIterable<Node>): boolean;
updateEach(property: NamedNode, value: Node): boolean;
mupdateEach(property: NamedNode, values: ICoreIterable<Node>): boolean;
unsetEach(property: NamedNode, value: Node): boolean;
unsetAllEach(property: NamedNode): boolean;
getNodes(): NodeSet;
promiseLoaded(loadInverseProperties?: boolean): Promise<boolean>;
isLoaded(includingInverseProperties?: boolean): boolean;
toString(): string;
}