Skip to content
  1. API
  2. Ogma

Ogma.parse

Import API: functions to import graphs from various formats.

ogma.parse.gexf(content) deprecated

Parse a GEXF string and return the raw graph. Use Ogma.parse.gexfFromUrl instead.

Arguments

  • content string

Returns

ogma.parse.gexfFromUrl(url) deprecated

Fetch and parse a GEXF file and return the raw graph. Use Ogma.parse.gexfFromUrl instead.

Arguments

  • url string

Returns

ogma.parse.graphml(content) deprecated

Arguments

  • content string GraphML string

Returns

ogma.parse.graphmlFromUrl(content) deprecated

Arguments

  • content string GraphML string

Returns

ogma.parse.janus(content) deprecated

Parse the result of a JanusGraph query into an Ogma graph. Use Ogma.parse.janus instead.

Arguments

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

Returns

ogma.parse.json(content[, transform]) deprecated

Parse a JSON string and return the raw graph. Use Ogma.parse.json instead.

Arguments

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

Returns

ogma.parse.jsonFromUrl(url[, transform]) deprecated

Fetch and parse a JSON file and return the raw graph. Use Ogma.parse.jsonFromUrl instead.

Arguments

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

Returns

ogma.parse.neo4j(content) deprecated

Parse the result of a Neo4J query into an Ogma graph. Use Ogma.parse.neo4j instead.

The parsed user's data will be stored into each Ogma item "data" field with the following structure:

neo4jProperties data field for each item in Ogma,

neo4jLabels field for Neo4j node labels information,

neo4jType field for Neo4j edge types;

Arguments

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

Returns