gpml2pvjson
Version:
convert GPML (XML) to pvjson (json)
59 lines (58 loc) • 1.41 kB
JavaScript
var cxml = require("@wikipathways/cxml");
var Primitive = require('../../../xml-primitives');
cxml.register('http://www.w3.org/1999/02/22-rdf-syntax-ns#', exports, [
[Primitive, ['string'], []]
], [
'item',
'members',
'propertyEltLiteral',
'propertyEltRef',
'propertyEltResource',
'propertyEltType',
'propertyEltValue',
'referencedItem',
'typedNodeType',
'value',
'valueObj',
'valueString'
], [
[0, 0, [[3, 0], [4, 0], [6, 0], [8, 0], [9, 0], [10, 0], [11, 0], [12, 0], [16, 0], [17, 0], [18, 0], [19, 0], [20, 0], [21, 0]], [[2, 0], [5, 0], [7, 0], [15, 0]]],
[0, 0, [], []],
[0, 0, [[22, 2]], [[7, 1]]],
[0, 0, [], [[7, 1]]],
[0, 0, [], [[7, 1], [13, 3]]],
[0, 0, [[11, 2]], []],
[0, 0, [], []],
[0, 0, [], [[7, 1]]],
[0, 0, [], [[14, 3]]],
[0, 0, [[11, 2]], [[1, 3], [7, 1]]],
[0, 0, [], []],
[0, 0, [[3, 0], [4, 0], [16, 0], [20, 0]], []],
[0, 0, [], []],
[0, 0, [], []],
[0, 0, [[3, 2], [4, 2], [16, 2], [20, 2]], []],
[0, 0, [], []]
], [
["about",[1],0],
["about",[1],0],
["Alt",[3],0],
["Bag",[3],0],
["datatype",[1],0],
["Description",[10],0],
["ID",[1],0],
["object",[5],0],
["predicate",[5],0],
["Property",[10],0],
["propertyElt",[7],1],
["RDF",[15],0],
["resource",[1],0],
["resource",[1],0],
["resource",[1],0],
["Seq",[3],0],
["Statement",[10],0],
["subject",[5],0],
["type",[5],0],
["typedNode",[10],1],
["value",[13],0],
["li",[2],0]
]);