Skip to content
  1. API

parse

Ogma static toolbox for data imports, use as Ogma.parse.*.

parse.gexf(content)

Parse a GEXF string and return the raw graph.

Arguments

  • content string

Returns

parse.gexfFromUrl(url)

Fetch and parse a GEXF file and return the raw graph.

Arguments

  • url string

Returns

parse.graphml(content[, xmlparser])

Parse a GraphML string and return the raw graph.

Arguments

  • content string GraphML string to transform custom JSON format into Ogma's RawGraph
  • xmlparser(optional) DOMParser DOMParser instance to use for parsing the XML

Returns

parse.graphmlFromUrl(url[, xmlparser])

Fetch and parse a GraphML file and return the raw graph.

Arguments

  • url string
  • xmlparser(optional) DOMParser DOMParser instance to use for parsing the XML

Returns

parse.janus(content)

Parse the result of a JanusGraph query into an Ogma graph.

Arguments

  • content object Response of the gremlin-client library ("gremlin-client")

Returns

parse.json(content[, transform])

Parse a JSON string and return the raw graph.

Arguments

  • content string
  • transform(optional) function(json: object | unknown[]): RawGraph Function to transform custom JSON format into Ogma's RawGraph

Returns

parse.jsonFromUrl(url[, transform])

Fetch and parse a JSON file and return the raw graph.

Arguments

  • url string
  • transform(optional) function(json: object | unknown[]): RawGraph Function to transform custom JSON format into Ogma's RawGraph

Returns

parse.mtx(content)

Parse a Matrix Market file (.mtx)

Arguments

  • content string

Returns

parse.mtxFromUrl(url)

Loads and parses a Matrix Market file (.mtx)

Arguments

  • url string

Returns

parse.neo4j(content)

Arguments

  • content object Response of the Neo4j Bolt driver ("neo4j-javascript-driver")

Returns