Appearance
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
-
Promise<RawGraph>
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
-
Promise<RawGraph>
ogma.parse.graphml(content[, xmlparser]) deprecated
Arguments
- content
stringGraphML string - xmlparser(optional)
DOMParserDOMParser instance to use for parsing the XML
Returns
-
Promise<RawGraph>
ogma.parse.graphmlFromUrl(content[, xmlparser]) deprecated
Arguments
- content
stringGraphML string - xmlparser(optional)
DOMParserDOMParser instance to use for parsing the XML
Returns
-
Promise<RawGraph>
ogma.parse.janus(content) deprecated
Parse the result of a JanusGraph query into an Ogma graph. Use Ogma.parse.janus instead.
Arguments
- content
objectResponse of the gremlin-client library ("gremlin-client")
Returns
-
Promise<RawGraph>
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[]): RawGraphFunction to transform custom JSON format into Ogma'sRawGraph
Returns
-
Promise<RawGraph>
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[]): RawGraphFunction to transform custom JSON format into Ogma'sRawGraph
Returns
-
Promise<RawGraph>
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
objectResponse of the Neo4j Bolt driver ("neo4j-javascript-driver")
Returns
-
Promise<RawGraph>