UNPKG

@savantly/ngx-gremlin

Version:

Gremlin client [Tinkerpop] for an Angular app

47 lines (46 loc) 1.7 kB
import { D3Node } from './nodes/d3Node'; import { GremlinLink } from './nodes/gremlinLink'; import { TinkerNode } from './nodes/tinkerNode'; import { GremlinQueryResponse } from '@savantly/gremlin-js'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; export declare enum GraphsonFormat { GraphSON1 = 1, GraphSON2 = 2, GraphSON3 = 3, } export declare class ArrangedGraphData { nodes: D3Node[]; links: D3Node[]; } export declare class KV { key: string; value: string; } export declare class GraphexpService { private gremlinService; COMMUNICATION_METHOD: GraphsonFormat; graphInfoData: BehaviorSubject<any>; nodeNames: BehaviorSubject<string[]>; nodeProperties: BehaviorSubject<string[]>; edgeProperties: BehaviorSubject<string[]>; node_limit_per_request: number; queryGraphInfo(): void; queryNodes(field: string, value: string): Promise<ArrangedGraphData>; getRelatedNodes(d: any): Promise<ArrangedGraphData>; createNode(label: string, properties: KV[]): Promise<TinkerNode>; createLink(item: GremlinLink): Promise<TinkerNode>; executeQuery(gremlin: string, bindings?: {}): Promise<GremlinQueryResponse>; private handleGraphInfo(data); private graphson3to1(data); private arrangeData(data); private arrange_datav3(data); private arrange_datav2(data); private extract_infov2(data); private extract_infov3(data); private get_vertex_prop_in_list(vertexProperty); private idIndex(list, elem); private make_properties_list(data); private isInt(value); updateSelection(edge: D3Node): void; constructor(options: any); }