Skip to main content

plugins_dataConverter

perfect-graph / Modules / plugins/dataConverter

Module: plugins/dataConverter#

Table of contents#

Functions#

Functions#

convertJSONLDToGraphData#

â–¸ Const convertJSONLDToGraphData(jsonLDList, graph?): Object

Parameters#

NameType
jsonLDListRecord<string, any>[]
graphObject
graph.edgesObject
graph.nodesObject

Returns#

Object

NameType
edges{ source: string ; target: string }[]
nodesunknown[]

Defined in#

plugins/dataConverter/index.ts:164


convertRDFToGraphData#

â–¸ Const convertRDFToGraphData(): Promise<{ edges: { source: string ; target: string }[] ; nodes: unknown[] = nodeList }>

Returns#

Promise<{ edges: { source: string ; target: string }[] ; nodes: unknown[] = nodeList }>

Defined in#

plugins/dataConverter/index.ts:328


convertToJSONLD#

â–¸ Const convertToJSONLD(text): Promise<Record<string, any>[]>

Parameters#

NameType
textstring

Returns#

Promise<Record<string, any>[]>

Defined in#

plugins/dataConverter/index.ts:57


filterEdges#

â–¸ Const filterEdges(nodes): (edges: { source: string ; target: string }[]) => { source: string ; target: string }[]

Parameters#

NameType
nodes{ id: string }[]

Returns#

fn

â–¸ (edges): { source: string ; target: string }[]

Parameters#
NameType
edges{ source: string ; target: string }[]
Returns#

{ source: string ; target: string }[]

Defined in#

plugins/dataConverter/index.ts:228


sparqlResultToRDF#

â–¸ Const sparqlResultToRDF(sparqlResult): string

Parameters#

NameType
sparqlResultany

Returns#

string

Defined in#

plugins/dataConverter/index.ts:283