@graphty/graph-io 0.3.24 → 0.3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -414
- package/dist/chunks/children-CL3Cy0ez.js.map +1 -1
- package/dist/chunks/choose-BbJI55dx.js +56 -0
- package/dist/chunks/choose-BbJI55dx.js.map +1 -0
- package/dist/chunks/constants-BCsFsMj4.js +231 -0
- package/dist/chunks/constants-BCsFsMj4.js.map +1 -0
- package/dist/chunks/{escape-B-tkk_Cl.js → escape-D0g6NNUy.js} +382 -92
- package/dist/chunks/escape-D0g6NNUy.js.map +1 -0
- package/dist/chunks/export-BTI4yQgy.js +4333 -0
- package/dist/chunks/export-BTI4yQgy.js.map +1 -0
- package/dist/chunks/exporter-BMqk5oxW.js +3465 -0
- package/dist/chunks/exporter-BMqk5oxW.js.map +1 -0
- package/dist/chunks/{importer-eUREhBGj.js → exporter-Cra2GYcN.js} +4969 -3201
- package/dist/chunks/exporter-Cra2GYcN.js.map +1 -0
- package/dist/chunks/{exporter-BGrsWamJ.js → exporter-Dxh231ZF.js} +38 -229
- package/dist/chunks/exporter-Dxh231ZF.js.map +1 -0
- package/dist/chunks/{exporter-DIeGJXAZ.js → exporter-tne475KK.js} +22 -20
- package/dist/chunks/exporter-tne475KK.js.map +1 -0
- package/dist/chunks/importer-90YWhJoF.js +2811 -0
- package/dist/chunks/importer-90YWhJoF.js.map +1 -0
- package/dist/chunks/{importer-D_e7e7LX.js → importer-Bcl1d4xH.js} +398 -145
- package/dist/chunks/importer-Bcl1d4xH.js.map +1 -0
- package/dist/chunks/{importer-BWY2FFc5.js → importer-BfIsp1f9.js} +255 -77
- package/dist/chunks/importer-BfIsp1f9.js.map +1 -0
- package/dist/chunks/{importer-zGLo8Dg_.js → importer-C_TEA1zJ.js} +484 -157
- package/dist/chunks/importer-C_TEA1zJ.js.map +1 -0
- package/dist/chunks/{importer-DET1tg6s.js → importer-DCjOvO7U.js} +1687 -310
- package/dist/chunks/importer-DCjOvO7U.js.map +1 -0
- package/dist/chunks/{importer-vi3bSdtw.js → importer-DfVu6j59.js} +509 -76
- package/dist/chunks/importer-DfVu6j59.js.map +1 -0
- package/dist/chunks/{importer-DIrbbnAf.js → importer-Dku_VAIY.js} +585 -226
- package/dist/chunks/importer-Dku_VAIY.js.map +1 -0
- package/dist/chunks/json-elements-3tnyt5uZ.js +1225 -0
- package/dist/chunks/json-elements-3tnyt5uZ.js.map +1 -0
- package/dist/chunks/ontology-export-B9Tcf37D.js +357 -0
- package/dist/chunks/ontology-export-B9Tcf37D.js.map +1 -0
- package/dist/chunks/{records-dbRkxwaq.js → records-CQXT__mY.js} +298 -114
- package/dist/chunks/records-CQXT__mY.js.map +1 -0
- package/dist/chunks/{text-Dr0Ifpag.js → text-DmcUs5_Q.js} +29 -11
- package/dist/chunks/text-DmcUs5_Q.js.map +1 -0
- package/dist/chunks/{writer-C7flM-Ih.js → writer-DxjgHwSe.js} +19 -1
- package/dist/chunks/writer-DxjgHwSe.js.map +1 -0
- package/dist/csv.js +951 -261
- package/dist/csv.js.map +1 -1
- package/dist/cx.js +6 -3
- package/dist/cx2.js +2 -2
- package/dist/cys.js +6 -3
- package/dist/dot.js +1 -1
- package/dist/gexf.js +554 -122
- package/dist/gexf.js.map +1 -1
- package/dist/gml.js +342 -85
- package/dist/gml.js.map +1 -1
- package/dist/graph-io.js +1105 -213
- package/dist/graph-io.js.map +1 -1
- package/dist/graphml.js +3 -2
- package/dist/graphml.js.map +1 -1
- package/dist/json.js +3 -2
- package/dist/neo4j.js +564 -157
- package/dist/neo4j.js.map +1 -1
- package/dist/obo.js +6 -3
- package/dist/pajek.js +1 -1
- package/dist/src/children.d.ts +18 -6
- package/dist/src/children.d.ts.map +1 -1
- package/dist/src/children.js +6 -3
- package/dist/src/children.js.map +1 -1
- package/dist/src/common/attributes.d.ts +29 -11
- package/dist/src/common/attributes.d.ts.map +1 -1
- package/dist/src/common/attributes.js +25 -7
- package/dist/src/common/attributes.js.map +1 -1
- package/dist/src/common/cell-budget.d.ts +9 -2
- package/dist/src/common/cell-budget.d.ts.map +1 -1
- package/dist/src/common/cell-budget.js +11 -3
- package/dist/src/common/cell-budget.js.map +1 -1
- package/dist/src/common/choose.d.ts +19 -0
- package/dist/src/common/choose.d.ts.map +1 -0
- package/dist/src/common/choose.js +72 -0
- package/dist/src/common/choose.js.map +1 -0
- package/dist/src/common/codes.d.ts +456 -66
- package/dist/src/common/codes.d.ts.map +1 -1
- package/dist/src/common/codes.js +458 -66
- package/dist/src/common/codes.js.map +1 -1
- package/dist/src/common/compare.d.ts +81 -0
- package/dist/src/common/compare.d.ts.map +1 -0
- package/dist/src/common/compare.js +394 -0
- package/dist/src/common/compare.js.map +1 -0
- package/dist/src/common/cx-export.d.ts +123 -0
- package/dist/src/common/cx-export.d.ts.map +1 -0
- package/dist/src/common/cx-export.js +334 -0
- package/dist/src/common/cx-export.js.map +1 -0
- package/dist/src/common/declared-types.d.ts +22 -2
- package/dist/src/common/declared-types.d.ts.map +1 -1
- package/dist/src/common/declared-types.js +19 -1
- package/dist/src/common/declared-types.js.map +1 -1
- package/dist/src/common/direction.d.ts +74 -50
- package/dist/src/common/direction.d.ts.map +1 -1
- package/dist/src/common/direction.js +47 -27
- package/dist/src/common/direction.js.map +1 -1
- package/dist/src/common/escape.d.ts +21 -9
- package/dist/src/common/escape.d.ts.map +1 -1
- package/dist/src/common/escape.js +33 -17
- package/dist/src/common/escape.js.map +1 -1
- package/dist/src/common/export.d.ts +144 -32
- package/dist/src/common/export.d.ts.map +1 -1
- package/dist/src/common/export.js +216 -42
- package/dist/src/common/export.js.map +1 -1
- package/dist/src/common/format.d.ts +23 -1
- package/dist/src/common/format.d.ts.map +1 -1
- package/dist/src/common/format.js +26 -1
- package/dist/src/common/format.js.map +1 -1
- package/dist/src/common/ids.d.ts +9 -2
- package/dist/src/common/ids.d.ts.map +1 -1
- package/dist/src/common/ids.js +6 -2
- package/dist/src/common/ids.js.map +1 -1
- package/dist/src/common/input.d.ts +122 -28
- package/dist/src/common/input.d.ts.map +1 -1
- package/dist/src/common/input.js +890 -124
- package/dist/src/common/input.js.map +1 -1
- package/dist/src/common/json-elements.d.ts +144 -20
- package/dist/src/common/json-elements.d.ts.map +1 -1
- package/dist/src/common/json-elements.js +868 -188
- package/dist/src/common/json-elements.js.map +1 -1
- package/dist/src/common/line-format.d.ts +90 -0
- package/dist/src/common/line-format.d.ts.map +1 -0
- package/dist/src/common/line-format.js +185 -0
- package/dist/src/common/line-format.js.map +1 -0
- package/dist/src/common/lists.d.ts +6 -1
- package/dist/src/common/lists.d.ts.map +1 -1
- package/dist/src/common/lists.js +2 -0
- package/dist/src/common/lists.js.map +1 -1
- package/dist/src/common/ontology-export.d.ts +167 -0
- package/dist/src/common/ontology-export.d.ts.map +1 -0
- package/dist/src/common/ontology-export.js +359 -0
- package/dist/src/common/ontology-export.js.map +1 -0
- package/dist/src/common/ontology.d.ts +25 -3
- package/dist/src/common/ontology.d.ts.map +1 -1
- package/dist/src/common/ontology.js +30 -9
- package/dist/src/common/ontology.js.map +1 -1
- package/dist/src/common/options.d.ts +62 -12
- package/dist/src/common/options.d.ts.map +1 -1
- package/dist/src/common/options.js +89 -11
- package/dist/src/common/options.js.map +1 -1
- package/dist/src/common/plural.d.ts +31 -0
- package/dist/src/common/plural.d.ts.map +1 -0
- package/dist/src/common/plural.js +46 -0
- package/dist/src/common/plural.js.map +1 -0
- package/dist/src/common/report.d.ts +72 -14
- package/dist/src/common/report.d.ts.map +1 -1
- package/dist/src/common/report.js +146 -22
- package/dist/src/common/report.js.map +1 -1
- package/dist/src/common/temporal.d.ts +22 -5
- package/dist/src/common/temporal.d.ts.map +1 -1
- package/dist/src/common/temporal.js +13 -2
- package/dist/src/common/temporal.js.map +1 -1
- package/dist/src/common/text.d.ts +39 -23
- package/dist/src/common/text.d.ts.map +1 -1
- package/dist/src/common/text.js +51 -21
- package/dist/src/common/text.js.map +1 -1
- package/dist/src/common/weights.d.ts +37 -4
- package/dist/src/common/weights.d.ts.map +1 -1
- package/dist/src/common/weights.js +61 -2
- package/dist/src/common/weights.js.map +1 -1
- package/dist/src/common/writer.d.ts +19 -3
- package/dist/src/common/writer.d.ts.map +1 -1
- package/dist/src/common/writer.js +30 -2
- package/dist/src/common/writer.js.map +1 -1
- package/dist/src/common/xml.d.ts +125 -9
- package/dist/src/common/xml.d.ts.map +1 -1
- package/dist/src/common/xml.js +400 -83
- package/dist/src/common/xml.js.map +1 -1
- package/dist/src/common/zip.d.ts +44 -4
- package/dist/src/common/zip.d.ts.map +1 -1
- package/dist/src/common/zip.js +134 -5
- package/dist/src/common/zip.js.map +1 -1
- package/dist/src/formats/csv/exporter.d.ts +80 -24
- package/dist/src/formats/csv/exporter.d.ts.map +1 -1
- package/dist/src/formats/csv/exporter.js +145 -32
- package/dist/src/formats/csv/exporter.js.map +1 -1
- package/dist/src/formats/csv/header.d.ts +38 -9
- package/dist/src/formats/csv/header.d.ts.map +1 -1
- package/dist/src/formats/csv/header.js +46 -10
- package/dist/src/formats/csv/header.js.map +1 -1
- package/dist/src/formats/csv/importer.d.ts +187 -37
- package/dist/src/formats/csv/importer.d.ts.map +1 -1
- package/dist/src/formats/csv/importer.js +835 -204
- package/dist/src/formats/csv/importer.js.map +1 -1
- package/dist/src/formats/csv/index.d.ts +100 -19
- package/dist/src/formats/csv/index.d.ts.map +1 -1
- package/dist/src/formats/csv/index.js +94 -21
- package/dist/src/formats/csv/index.js.map +1 -1
- package/dist/src/formats/csv/records.d.ts +95 -10
- package/dist/src/formats/csv/records.d.ts.map +1 -1
- package/dist/src/formats/csv/records.js +333 -122
- package/dist/src/formats/csv/records.js.map +1 -1
- package/dist/src/formats/csv/values.d.ts +1 -0
- package/dist/src/formats/csv/values.d.ts.map +1 -1
- package/dist/src/formats/csv/values.js +1 -0
- package/dist/src/formats/csv/values.js.map +1 -1
- package/dist/src/formats/cx/exporter.d.ts +102 -0
- package/dist/src/formats/cx/exporter.d.ts.map +1 -0
- package/dist/src/formats/cx/exporter.js +1217 -0
- package/dist/src/formats/cx/exporter.js.map +1 -0
- package/dist/src/formats/cx/importer.d.ts +79 -32
- package/dist/src/formats/cx/importer.d.ts.map +1 -1
- package/dist/src/formats/cx/importer.js +680 -285
- package/dist/src/formats/cx/importer.js.map +1 -1
- package/dist/src/formats/cx/index.d.ts +4 -3
- package/dist/src/formats/cx/index.d.ts.map +1 -1
- package/dist/src/formats/cx/index.js +4 -3
- package/dist/src/formats/cx/index.js.map +1 -1
- package/dist/src/formats/cx2/exporter.d.ts +29 -11
- package/dist/src/formats/cx2/exporter.d.ts.map +1 -1
- package/dist/src/formats/cx2/exporter.js +39 -268
- package/dist/src/formats/cx2/exporter.js.map +1 -1
- package/dist/src/formats/cx2/importer.d.ts +78 -28
- package/dist/src/formats/cx2/importer.d.ts.map +1 -1
- package/dist/src/formats/cx2/importer.js +226 -79
- package/dist/src/formats/cx2/importer.js.map +1 -1
- package/dist/src/formats/cx2/index.d.ts +2 -1
- package/dist/src/formats/cx2/index.d.ts.map +1 -1
- package/dist/src/formats/cx2/index.js +2 -1
- package/dist/src/formats/cx2/index.js.map +1 -1
- package/dist/src/formats/cys/constants.d.ts +66 -17
- package/dist/src/formats/cys/constants.d.ts.map +1 -1
- package/dist/src/formats/cys/constants.js +59 -18
- package/dist/src/formats/cys/constants.js.map +1 -1
- package/dist/src/formats/cys/exporter.d.ts +118 -0
- package/dist/src/formats/cys/exporter.d.ts.map +1 -0
- package/dist/src/formats/cys/exporter.js +1072 -0
- package/dist/src/formats/cys/exporter.js.map +1 -0
- package/dist/src/formats/cys/importer.d.ts +22 -8
- package/dist/src/formats/cys/importer.d.ts.map +1 -1
- package/dist/src/formats/cys/importer.js +510 -149
- package/dist/src/formats/cys/importer.js.map +1 -1
- package/dist/src/formats/cys/index.d.ts +4 -2
- package/dist/src/formats/cys/index.d.ts.map +1 -1
- package/dist/src/formats/cys/index.js +4 -2
- package/dist/src/formats/cys/index.js.map +1 -1
- package/dist/src/formats/cys/session.d.ts +46 -7
- package/dist/src/formats/cys/session.d.ts.map +1 -1
- package/dist/src/formats/cys/session.js +98 -24
- package/dist/src/formats/cys/session.js.map +1 -1
- package/dist/src/formats/cys/tables.d.ts +9 -2
- package/dist/src/formats/cys/tables.d.ts.map +1 -1
- package/dist/src/formats/cys/tables.js +29 -7
- package/dist/src/formats/cys/tables.js.map +1 -1
- package/dist/src/formats/dot/exporter.d.ts +42 -14
- package/dist/src/formats/dot/exporter.d.ts.map +1 -1
- package/dist/src/formats/dot/exporter.js +56 -29
- package/dist/src/formats/dot/exporter.js.map +1 -1
- package/dist/src/formats/dot/importer.d.ts +91 -29
- package/dist/src/formats/dot/importer.d.ts.map +1 -1
- package/dist/src/formats/dot/importer.js +190 -39
- package/dist/src/formats/dot/importer.js.map +1 -1
- package/dist/src/formats/dot/index.d.ts +2 -1
- package/dist/src/formats/dot/index.d.ts.map +1 -1
- package/dist/src/formats/dot/index.js +2 -1
- package/dist/src/formats/dot/index.js.map +1 -1
- package/dist/src/formats/dot/names.d.ts +44 -11
- package/dist/src/formats/dot/names.d.ts.map +1 -1
- package/dist/src/formats/dot/names.js +44 -11
- package/dist/src/formats/dot/names.js.map +1 -1
- package/dist/src/formats/dot/tokenizer.d.ts +9 -2
- package/dist/src/formats/dot/tokenizer.d.ts.map +1 -1
- package/dist/src/formats/dot/tokenizer.js +20 -5
- package/dist/src/formats/dot/tokenizer.js.map +1 -1
- package/dist/src/formats/gexf/exporter.d.ts +46 -15
- package/dist/src/formats/gexf/exporter.d.ts.map +1 -1
- package/dist/src/formats/gexf/exporter.js +45 -15
- package/dist/src/formats/gexf/exporter.js.map +1 -1
- package/dist/src/formats/gexf/importer.d.ts +87 -23
- package/dist/src/formats/gexf/importer.d.ts.map +1 -1
- package/dist/src/formats/gexf/importer.js +471 -90
- package/dist/src/formats/gexf/importer.js.map +1 -1
- package/dist/src/formats/gexf/index.d.ts +84 -21
- package/dist/src/formats/gexf/index.d.ts.map +1 -1
- package/dist/src/formats/gexf/index.js +80 -23
- package/dist/src/formats/gexf/index.js.map +1 -1
- package/dist/src/formats/gexf/schema.d.ts +67 -15
- package/dist/src/formats/gexf/schema.d.ts.map +1 -1
- package/dist/src/formats/gexf/schema.js +59 -13
- package/dist/src/formats/gexf/schema.js.map +1 -1
- package/dist/src/formats/gml/exporter.d.ts +69 -21
- package/dist/src/formats/gml/exporter.d.ts.map +1 -1
- package/dist/src/formats/gml/exporter.js +74 -29
- package/dist/src/formats/gml/exporter.js.map +1 -1
- package/dist/src/formats/gml/importer.d.ts +116 -25
- package/dist/src/formats/gml/importer.d.ts.map +1 -1
- package/dist/src/formats/gml/importer.js +290 -61
- package/dist/src/formats/gml/importer.js.map +1 -1
- package/dist/src/formats/gml/index.d.ts +87 -24
- package/dist/src/formats/gml/index.d.ts.map +1 -1
- package/dist/src/formats/gml/index.js +79 -26
- package/dist/src/formats/gml/index.js.map +1 -1
- package/dist/src/formats/gml/syntax.d.ts +67 -18
- package/dist/src/formats/gml/syntax.d.ts.map +1 -1
- package/dist/src/formats/gml/syntax.js +108 -26
- package/dist/src/formats/gml/syntax.js.map +1 -1
- package/dist/src/formats/graphml/constants.d.ts +174 -44
- package/dist/src/formats/graphml/constants.d.ts.map +1 -1
- package/dist/src/formats/graphml/constants.js +165 -44
- package/dist/src/formats/graphml/constants.js.map +1 -1
- package/dist/src/formats/graphml/exporter.d.ts +17 -9
- package/dist/src/formats/graphml/exporter.d.ts.map +1 -1
- package/dist/src/formats/graphml/exporter.js +33 -12
- package/dist/src/formats/graphml/exporter.js.map +1 -1
- package/dist/src/formats/graphml/importer.d.ts +19 -7
- package/dist/src/formats/graphml/importer.d.ts.map +1 -1
- package/dist/src/formats/graphml/importer.js +466 -39
- package/dist/src/formats/graphml/importer.js.map +1 -1
- package/dist/src/formats/graphml/index.d.ts +2 -1
- package/dist/src/formats/graphml/index.d.ts.map +1 -1
- package/dist/src/formats/graphml/index.js +2 -1
- package/dist/src/formats/graphml/index.js.map +1 -1
- package/dist/src/formats/graphml/tree.d.ts +6 -2
- package/dist/src/formats/graphml/tree.d.ts.map +1 -1
- package/dist/src/formats/graphml/tree.js +6 -2
- package/dist/src/formats/graphml/tree.js.map +1 -1
- package/dist/src/formats/graphml/yfiles.d.ts +8 -3
- package/dist/src/formats/graphml/yfiles.d.ts.map +1 -1
- package/dist/src/formats/graphml/yfiles.js +36 -15
- package/dist/src/formats/graphml/yfiles.js.map +1 -1
- package/dist/src/formats/json/dialect.d.ts +88 -24
- package/dist/src/formats/json/dialect.d.ts.map +1 -1
- package/dist/src/formats/json/dialect.js +109 -19
- package/dist/src/formats/json/dialect.js.map +1 -1
- package/dist/src/formats/json/exporter.d.ts +134 -22
- package/dist/src/formats/json/exporter.d.ts.map +1 -1
- package/dist/src/formats/json/exporter.js +135 -54
- package/dist/src/formats/json/exporter.js.map +1 -1
- package/dist/src/formats/json/importer.d.ts +173 -52
- package/dist/src/formats/json/importer.d.ts.map +1 -1
- package/dist/src/formats/json/importer.js +899 -220
- package/dist/src/formats/json/importer.js.map +1 -1
- package/dist/src/formats/json/index.d.ts +3 -2
- package/dist/src/formats/json/index.d.ts.map +1 -1
- package/dist/src/formats/json/index.js +3 -2
- package/dist/src/formats/json/index.js.map +1 -1
- package/dist/src/formats/json/obographs-export.d.ts +68 -0
- package/dist/src/formats/json/obographs-export.d.ts.map +1 -0
- package/dist/src/formats/json/obographs-export.js +941 -0
- package/dist/src/formats/json/obographs-export.js.map +1 -0
- package/dist/src/formats/json/obographs.d.ts +26 -0
- package/dist/src/formats/json/obographs.d.ts.map +1 -1
- package/dist/src/formats/json/obographs.js +297 -80
- package/dist/src/formats/json/obographs.js.map +1 -1
- package/dist/src/formats/neo4j/exporter.d.ts +109 -21
- package/dist/src/formats/neo4j/exporter.d.ts.map +1 -1
- package/dist/src/formats/neo4j/exporter.js +238 -85
- package/dist/src/formats/neo4j/exporter.js.map +1 -1
- package/dist/src/formats/neo4j/header.d.ts +17 -4
- package/dist/src/formats/neo4j/header.d.ts.map +1 -1
- package/dist/src/formats/neo4j/header.js +36 -4
- package/dist/src/formats/neo4j/header.js.map +1 -1
- package/dist/src/formats/neo4j/importer.d.ts +107 -27
- package/dist/src/formats/neo4j/importer.d.ts.map +1 -1
- package/dist/src/formats/neo4j/importer.js +415 -63
- package/dist/src/formats/neo4j/importer.js.map +1 -1
- package/dist/src/formats/neo4j/index.d.ts +73 -23
- package/dist/src/formats/neo4j/index.d.ts.map +1 -1
- package/dist/src/formats/neo4j/index.js +65 -25
- package/dist/src/formats/neo4j/index.js.map +1 -1
- package/dist/src/formats/obo/exporter.d.ts +150 -0
- package/dist/src/formats/obo/exporter.d.ts.map +1 -0
- package/dist/src/formats/obo/exporter.js +1736 -0
- package/dist/src/formats/obo/exporter.js.map +1 -0
- package/dist/src/formats/obo/importer.d.ts +95 -19
- package/dist/src/formats/obo/importer.d.ts.map +1 -1
- package/dist/src/formats/obo/importer.js +475 -104
- package/dist/src/formats/obo/importer.js.map +1 -1
- package/dist/src/formats/obo/index.d.ts +6 -3
- package/dist/src/formats/obo/index.d.ts.map +1 -1
- package/dist/src/formats/obo/index.js +6 -3
- package/dist/src/formats/obo/index.js.map +1 -1
- package/dist/src/formats/obo/syntax.d.ts +108 -4
- package/dist/src/formats/obo/syntax.d.ts.map +1 -1
- package/dist/src/formats/obo/syntax.js +211 -34
- package/dist/src/formats/obo/syntax.js.map +1 -1
- package/dist/src/formats/pajek/exporter.d.ts +54 -16
- package/dist/src/formats/pajek/exporter.d.ts.map +1 -1
- package/dist/src/formats/pajek/exporter.js +66 -34
- package/dist/src/formats/pajek/exporter.js.map +1 -1
- package/dist/src/formats/pajek/importer.d.ts +84 -22
- package/dist/src/formats/pajek/importer.d.ts.map +1 -1
- package/dist/src/formats/pajek/importer.js +303 -83
- package/dist/src/formats/pajek/importer.js.map +1 -1
- package/dist/src/formats/pajek/index.d.ts +2 -1
- package/dist/src/formats/pajek/index.d.ts.map +1 -1
- package/dist/src/formats/pajek/index.js +2 -1
- package/dist/src/formats/pajek/index.js.map +1 -1
- package/dist/src/formats/pajek/syntax.d.ts +77 -14
- package/dist/src/formats/pajek/syntax.d.ts.map +1 -1
- package/dist/src/formats/pajek/syntax.js +183 -51
- package/dist/src/formats/pajek/syntax.js.map +1 -1
- package/dist/src/formats/xgmml/columns.d.ts +1 -0
- package/dist/src/formats/xgmml/columns.d.ts.map +1 -1
- package/dist/src/formats/xgmml/columns.js +4 -0
- package/dist/src/formats/xgmml/columns.js.map +1 -1
- package/dist/src/formats/xgmml/constants.d.ts +186 -56
- package/dist/src/formats/xgmml/constants.d.ts.map +1 -1
- package/dist/src/formats/xgmml/constants.js +181 -57
- package/dist/src/formats/xgmml/constants.js.map +1 -1
- package/dist/src/formats/xgmml/document.d.ts +65 -11
- package/dist/src/formats/xgmml/document.d.ts.map +1 -1
- package/dist/src/formats/xgmml/document.js +157 -28
- package/dist/src/formats/xgmml/document.js.map +1 -1
- package/dist/src/formats/xgmml/emit.d.ts +61 -3
- package/dist/src/formats/xgmml/emit.d.ts.map +1 -1
- package/dist/src/formats/xgmml/emit.js +129 -26
- package/dist/src/formats/xgmml/emit.js.map +1 -1
- package/dist/src/formats/xgmml/exporter.d.ts +13 -6
- package/dist/src/formats/xgmml/exporter.d.ts.map +1 -1
- package/dist/src/formats/xgmml/exporter.js +20 -21
- package/dist/src/formats/xgmml/exporter.js.map +1 -1
- package/dist/src/formats/xgmml/importer.d.ts +33 -12
- package/dist/src/formats/xgmml/importer.d.ts.map +1 -1
- package/dist/src/formats/xgmml/importer.js +35 -72
- package/dist/src/formats/xgmml/importer.js.map +1 -1
- package/dist/src/formats/xgmml/index.d.ts +1 -0
- package/dist/src/formats/xgmml/index.d.ts.map +1 -1
- package/dist/src/formats/xgmml/index.js +1 -0
- package/dist/src/formats/xgmml/index.js.map +1 -1
- package/dist/src/formats/xgmml/values.d.ts +8 -1
- package/dist/src/formats/xgmml/values.d.ts.map +1 -1
- package/dist/src/formats/xgmml/values.js +7 -2
- package/dist/src/formats/xgmml/values.js.map +1 -1
- package/dist/src/index.d.ts +23 -18
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +28 -16
- package/dist/src/index.js.map +1 -1
- package/dist/src/registry.d.ts +478 -92
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/src/registry.js +807 -88
- package/dist/src/registry.js.map +1 -1
- package/dist/src/sniff.d.ts +61 -19
- package/dist/src/sniff.d.ts.map +1 -1
- package/dist/src/sniff.js +121 -29
- package/dist/src/sniff.js.map +1 -1
- package/dist/src/types.d.ts +362 -112
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +28 -7
- package/dist/src/types.js.map +1 -1
- package/dist/xgmml.js +2 -2
- package/docs/samples/README.md +25 -0
- package/docs/samples/got-edges.csv +353 -0
- package/docs/samples/got-network.graphml +1384 -0
- package/docs/samples/got-nodes.csv +108 -0
- package/docs/samples/got.cx +930 -0
- package/docs/samples/got.cx2 +465 -0
- package/docs/samples/got.gexf +471 -0
- package/docs/samples/got.gml +2650 -0
- package/docs/samples/got.json +2546 -0
- package/docs/samples/got.net +461 -0
- package/docs/samples/movies-nodes.csv +9 -0
- package/docs/samples/movies-rels.csv +8 -0
- package/docs/samples/networks.cys +0 -0
- package/docs/samples/proteins.xgmml +9 -0
- package/docs/samples/teams.gv +24 -0
- package/docs/samples/vehicles.obo +25 -0
- package/package.json +9 -4
- package/src/children.ts +18 -6
- package/src/common/attributes.ts +29 -11
- package/src/common/cell-budget.ts +11 -3
- package/src/common/choose.ts +89 -0
- package/src/common/codes.ts +490 -66
- package/src/common/compare.ts +472 -0
- package/src/common/cx-export.ts +432 -0
- package/src/common/declared-types.ts +38 -4
- package/src/common/direction.ts +78 -51
- package/src/common/escape.ts +33 -17
- package/src/common/export.ts +284 -47
- package/src/common/format.ts +30 -1
- package/src/common/ids.ts +14 -3
- package/src/common/input.ts +1057 -134
- package/src/common/json-elements.ts +1034 -198
- package/src/common/line-format.ts +249 -0
- package/src/common/lists.ts +6 -1
- package/src/common/ontology-export.ts +461 -0
- package/src/common/ontology.ts +31 -9
- package/src/common/options.ts +110 -15
- package/src/common/plural.ts +49 -0
- package/src/common/report.ts +168 -25
- package/src/common/temporal.ts +22 -5
- package/src/common/text.ts +62 -23
- package/src/common/weights.ts +74 -4
- package/src/common/writer.ts +37 -3
- package/src/common/xml.ts +477 -88
- package/src/common/zip.ts +169 -7
- package/src/formats/csv/exporter.ts +201 -46
- package/src/formats/csv/header.ts +50 -11
- package/src/formats/csv/importer.ts +1133 -245
- package/src/formats/csv/index.ts +106 -19
- package/src/formats/csv/records.ts +396 -122
- package/src/formats/csv/values.ts +1 -0
- package/src/formats/cx/exporter.ts +1483 -0
- package/src/formats/cx/importer.ts +888 -300
- package/src/formats/cx/index.ts +4 -3
- package/src/formats/cx2/exporter.ts +61 -338
- package/src/formats/cx2/importer.ts +317 -86
- package/src/formats/cx2/index.ts +2 -1
- package/src/formats/cys/constants.ts +62 -17
- package/src/formats/cys/exporter.ts +1368 -0
- package/src/formats/cys/importer.ts +659 -157
- package/src/formats/cys/index.ts +4 -2
- package/src/formats/cys/session.ts +139 -31
- package/src/formats/cys/tables.ts +47 -9
- package/src/formats/dot/exporter.ts +83 -37
- package/src/formats/dot/importer.ts +248 -54
- package/src/formats/dot/index.ts +2 -1
- package/src/formats/dot/names.ts +44 -11
- package/src/formats/dot/tokenizer.ts +25 -6
- package/src/formats/gexf/exporter.ts +57 -18
- package/src/formats/gexf/importer.ts +636 -105
- package/src/formats/gexf/index.ts +90 -21
- package/src/formats/gexf/schema.ts +67 -15
- package/src/formats/gml/exporter.ts +90 -36
- package/src/formats/gml/importer.ts +388 -67
- package/src/formats/gml/index.ts +85 -24
- package/src/formats/gml/syntax.ts +111 -26
- package/src/formats/graphml/constants.ts +178 -44
- package/src/formats/graphml/exporter.ts +52 -18
- package/src/formats/graphml/importer.ts +640 -60
- package/src/formats/graphml/index.ts +2 -1
- package/src/formats/graphml/tree.ts +6 -2
- package/src/formats/graphml/yfiles.ts +37 -15
- package/src/formats/json/dialect.ts +128 -29
- package/src/formats/json/exporter.ts +205 -68
- package/src/formats/json/importer.ts +1163 -253
- package/src/formats/json/index.ts +3 -1
- package/src/formats/json/obographs-export.ts +1197 -0
- package/src/formats/json/obographs.ts +353 -92
- package/src/formats/neo4j/exporter.ts +320 -101
- package/src/formats/neo4j/header.ts +44 -6
- package/src/formats/neo4j/importer.ts +512 -73
- package/src/formats/neo4j/index.ts +75 -23
- package/src/formats/obo/exporter.ts +2210 -0
- package/src/formats/obo/importer.ts +622 -109
- package/src/formats/obo/index.ts +6 -3
- package/src/formats/obo/syntax.ts +232 -37
- package/src/formats/pajek/exporter.ts +89 -41
- package/src/formats/pajek/importer.ts +407 -93
- package/src/formats/pajek/index.ts +2 -1
- package/src/formats/pajek/syntax.ts +213 -52
- package/src/formats/xgmml/columns.ts +10 -0
- package/src/formats/xgmml/constants.ts +183 -56
- package/src/formats/xgmml/document.ts +212 -34
- package/src/formats/xgmml/emit.ts +175 -34
- package/src/formats/xgmml/exporter.ts +35 -27
- package/src/formats/xgmml/importer.ts +64 -86
- package/src/formats/xgmml/index.ts +1 -0
- package/src/formats/xgmml/values.ts +11 -3
- package/src/index.ts +81 -11
- package/src/registry.ts +1121 -135
- package/src/sniff.ts +163 -32
- package/src/types.ts +385 -114
- package/dist/chunks/escape-B-tkk_Cl.js.map +0 -1
- package/dist/chunks/export-Bh60Dv-n.js +0 -582
- package/dist/chunks/export-Bh60Dv-n.js.map +0 -1
- package/dist/chunks/exporter-BGrsWamJ.js.map +0 -1
- package/dist/chunks/exporter-DIeGJXAZ.js.map +0 -1
- package/dist/chunks/importer-BWY2FFc5.js.map +0 -1
- package/dist/chunks/importer-DD-xv9_Y.js +0 -1471
- package/dist/chunks/importer-DD-xv9_Y.js.map +0 -1
- package/dist/chunks/importer-DET1tg6s.js.map +0 -1
- package/dist/chunks/importer-DEcKhsmQ.js +0 -1614
- package/dist/chunks/importer-DEcKhsmQ.js.map +0 -1
- package/dist/chunks/importer-DIrbbnAf.js.map +0 -1
- package/dist/chunks/importer-D_e7e7LX.js.map +0 -1
- package/dist/chunks/importer-eUREhBGj.js.map +0 -1
- package/dist/chunks/importer-vi3bSdtw.js.map +0 -1
- package/dist/chunks/importer-zGLo8Dg_.js.map +0 -1
- package/dist/chunks/json-elements-DDS8N2Dd.js +0 -779
- package/dist/chunks/json-elements-DDS8N2Dd.js.map +0 -1
- package/dist/chunks/ontology-BnrJ4I98.js +0 -113
- package/dist/chunks/ontology-BnrJ4I98.js.map +0 -1
- package/dist/chunks/records-dbRkxwaq.js.map +0 -1
- package/dist/chunks/report-B1z4WT9e.js +0 -2372
- package/dist/chunks/report-B1z4WT9e.js.map +0 -1
- package/dist/chunks/text-Dr0Ifpag.js.map +0 -1
- package/dist/chunks/weights-Dzba96G3.js +0 -176
- package/dist/chunks/weights-Dzba96G3.js.map +0 -1
- package/dist/chunks/writer-C7flM-Ih.js.map +0 -1
package/dist/obo.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { O, o } from "./chunks/
|
|
1
|
+
import { O, a, b, o, c } from "./chunks/exporter-BMqk5oxW.js";
|
|
2
2
|
export {
|
|
3
|
-
O as
|
|
4
|
-
|
|
3
|
+
O as OBO_CAPABILITIES,
|
|
4
|
+
a as OBO_ISSUE,
|
|
5
|
+
b as OBO_LOSS,
|
|
6
|
+
o as oboExporter,
|
|
7
|
+
c as oboImporter
|
|
5
8
|
};
|
|
6
9
|
//# sourceMappingURL=obo.js.map
|
package/dist/pajek.js
CHANGED
package/dist/src/children.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The children CSR over a containment column
|
|
2
|
+
* The children CSR over a containment column: containment
|
|
3
3
|
* (GEXF `pid` / `<parents>`, Cytoscape `parent`, DOT clusters, GraphML nested graphs) is a node
|
|
4
4
|
* column with the `parent` role (u32, refersTo node) or the `parents` role (list of u32) and never
|
|
5
5
|
* enters the CSR of the snapshot. Importers and exporters that need to walk containers top-down
|
|
@@ -14,9 +14,15 @@
|
|
|
14
14
|
* every node is written exactly once.
|
|
15
15
|
*/
|
|
16
16
|
import { type Column, type GraphSnapshot } from "@graphty/graph-format";
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The role of the column a children CSR is built over.
|
|
19
|
+
* @category Plugin helpers
|
|
20
|
+
*/
|
|
18
21
|
export type ContainmentRole = "parent" | "parents";
|
|
19
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* How the CSR is built: from a role column of the snapshot (default `parent`, then `parents`) or an explicit column.
|
|
24
|
+
* @category Plugin helpers
|
|
25
|
+
*/
|
|
20
26
|
export interface ChildrenOptions {
|
|
21
27
|
/**
|
|
22
28
|
* The column to read: a role name (`parent` for the u32 single-parent column, `parents` for
|
|
@@ -26,7 +32,10 @@ export interface ChildrenOptions {
|
|
|
26
32
|
*/
|
|
27
33
|
readonly column?: ContainmentRole | Column | "auto" | null | undefined;
|
|
28
34
|
}
|
|
29
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* One depth-first traversal of the containment forest.
|
|
37
|
+
* @category Plugin helpers
|
|
38
|
+
*/
|
|
30
39
|
export interface DepthFirstOrder {
|
|
31
40
|
/** Every node index exactly once: roots in index order, each followed by its descendants, cycle members last. */
|
|
32
41
|
readonly order: Uint32Array;
|
|
@@ -36,8 +45,9 @@ export interface DepthFirstOrder {
|
|
|
36
45
|
readonly reordered: boolean;
|
|
37
46
|
}
|
|
38
47
|
/**
|
|
39
|
-
* The children CSR of a snapshot's containment column
|
|
48
|
+
* The children CSR of a snapshot's containment column: the inverse
|
|
40
49
|
* of the parent relation as a compressed sparse row structure over node indices.
|
|
50
|
+
* @category Plugin helpers
|
|
41
51
|
*/
|
|
42
52
|
export declare class ChildrenCsr {
|
|
43
53
|
/** The number of nodes (the row count of the CSR). */
|
|
@@ -117,10 +127,11 @@ export declare class ChildrenCsr {
|
|
|
117
127
|
private reachableCount;
|
|
118
128
|
}
|
|
119
129
|
/**
|
|
120
|
-
* Build the children CSR of a snapshot
|
|
130
|
+
* Build the children CSR of a snapshot.
|
|
121
131
|
* @param snapshot - the snapshot
|
|
122
132
|
* @param options - which column to read; the `parent` role, then `parents`, by default
|
|
123
133
|
* @returns the CSR; empty (every node a root) when the snapshot has no containment column
|
|
134
|
+
* @category Plugin helpers
|
|
124
135
|
*/
|
|
125
136
|
export declare function childrenCsr(snapshot: GraphSnapshot, options?: ChildrenOptions): ChildrenCsr;
|
|
126
137
|
/**
|
|
@@ -129,6 +140,7 @@ export declare function childrenCsr(snapshot: GraphSnapshot, options?: ChildrenO
|
|
|
129
140
|
* @param nodeCount - the node count the references index into
|
|
130
141
|
* @param column - a u32 `parent`-shaped column, a list-of-u32 `parents`-shaped column, or null for none
|
|
131
142
|
* @returns the CSR
|
|
143
|
+
* @category Plugin helpers
|
|
132
144
|
*/
|
|
133
145
|
export declare function childrenFromColumn(nodeCount: number, column: Column | null): ChildrenCsr;
|
|
134
146
|
//# sourceMappingURL=children.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"children.d.ts","sourceRoot":"","sources":["../../src/children.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAAiB,MAAM,uBAAuB,CAAC;AAEvF
|
|
1
|
+
{"version":3,"file":"children.d.ts","sourceRoot":"","sources":["../../src/children.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,aAAa,EAAiB,MAAM,uBAAuB,CAAC;AAEvF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEnD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC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;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI7B;;;OAGG;IACH,OAAO,IAAI,OAAO;IAIlB;;;;;;OAMG;IACH,UAAU,IAAI,eAAe;IAmD7B;;;OAGG;IACH,OAAO,CAAC,cAAc;CAwBzB;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,GAAE,eAAoB,GAAG,WAAW,CAG/F;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,WAAW,CAoDxF"}
|
package/dist/src/children.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The children CSR over a containment column
|
|
2
|
+
* The children CSR over a containment column: containment
|
|
3
3
|
* (GEXF `pid` / `<parents>`, Cytoscape `parent`, DOT clusters, GraphML nested graphs) is a node
|
|
4
4
|
* column with the `parent` role (u32, refersTo node) or the `parents` role (list of u32) and never
|
|
5
5
|
* enters the CSR of the snapshot. Importers and exporters that need to walk containers top-down
|
|
@@ -15,8 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { INVALID_INDEX } from "@graphty/graph-format";
|
|
17
17
|
/**
|
|
18
|
-
* The children CSR of a snapshot's containment column
|
|
18
|
+
* The children CSR of a snapshot's containment column: the inverse
|
|
19
19
|
* of the parent relation as a compressed sparse row structure over node indices.
|
|
20
|
+
* @category Plugin helpers
|
|
20
21
|
*/
|
|
21
22
|
export class ChildrenCsr {
|
|
22
23
|
/**
|
|
@@ -186,10 +187,11 @@ export class ChildrenCsr {
|
|
|
186
187
|
}
|
|
187
188
|
}
|
|
188
189
|
/**
|
|
189
|
-
* Build the children CSR of a snapshot
|
|
190
|
+
* Build the children CSR of a snapshot.
|
|
190
191
|
* @param snapshot - the snapshot
|
|
191
192
|
* @param options - which column to read; the `parent` role, then `parents`, by default
|
|
192
193
|
* @returns the CSR; empty (every node a root) when the snapshot has no containment column
|
|
194
|
+
* @category Plugin helpers
|
|
193
195
|
*/
|
|
194
196
|
export function childrenCsr(snapshot, options = {}) {
|
|
195
197
|
const column = resolveColumn(snapshot, options.column === undefined ? "auto" : options.column);
|
|
@@ -201,6 +203,7 @@ export function childrenCsr(snapshot, options = {}) {
|
|
|
201
203
|
* @param nodeCount - the node count the references index into
|
|
202
204
|
* @param column - a u32 `parent`-shaped column, a list-of-u32 `parents`-shaped column, or null for none
|
|
203
205
|
* @returns the CSR
|
|
206
|
+
* @category Plugin helpers
|
|
204
207
|
*/
|
|
205
208
|
export function childrenFromColumn(nodeCount, column) {
|
|
206
209
|
const rowPtr = new Uint32Array(nodeCount + 1);
|
package/dist/src/children.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"children.js","sourceRoot":"","sources":["../../src/children.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAmC,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"children.js","sourceRoot":"","sources":["../../src/children.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAmC,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAmCvF;;;;GAIG;AACH,MAAM,OAAO,WAAW;IAoBpB;;;;;;;;OAQG;IACH,YACI,SAAiB,EACjB,MAAmB,EACnB,QAAqB,EACrB,WAAwB,EACxB,OAAe,EACf,MAAqB;QAErB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,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,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,IAAI,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AACtF,CAAC;AAED;;;;;GAKG;AACH,SAAS,aAAa,CAAC,QAAuB,EAAE,MAAgD;IAC5F,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,MAAM,CAAC;IAClB,CAAC;IACD,IAAI,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -18,8 +18,8 @@ import { type ImportReportBuilder, type IssueLocation } from "./report.js";
|
|
|
18
18
|
import { type TemporalValue } from "./temporal.js";
|
|
19
19
|
/**
|
|
20
20
|
* What an importer knows about a declared attribute.
|
|
21
|
-
* Consumed by the per-format importers and exporters under src/formats.
|
|
22
21
|
* @public
|
|
22
|
+
* @category Plugin helpers
|
|
23
23
|
*/
|
|
24
24
|
export interface AttributeDeclarationInput {
|
|
25
25
|
/** The declaring format. */
|
|
@@ -49,8 +49,8 @@ export interface AttributeDeclarationInput {
|
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* A non-fatal problem with a declaration, for the importer to record as a warning.
|
|
52
|
-
* Consumed by the per-format importers and exporters under src/formats.
|
|
53
52
|
* @public
|
|
53
|
+
* @category Plugin helpers
|
|
54
54
|
*/
|
|
55
55
|
export interface DeclarationIssue {
|
|
56
56
|
/** The issue category. */
|
|
@@ -62,8 +62,8 @@ export interface DeclarationIssue {
|
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* A declared attribute: the ColumnDecl to push, the spec to parse values with, and what to report.
|
|
65
|
-
* Consumed by the per-format importers and exporters under src/formats.
|
|
66
65
|
* @public
|
|
66
|
+
* @category Plugin helpers
|
|
67
67
|
*/
|
|
68
68
|
export interface DeclaredAttribute {
|
|
69
69
|
/** The declaration for declareNodeColumn / declareEdgeColumn. */
|
|
@@ -79,17 +79,27 @@ export interface DeclaredAttribute {
|
|
|
79
79
|
/** Problems the importer records as warnings (unknown type, unparsable default or options). */
|
|
80
80
|
readonly issues: readonly DeclarationIssue[];
|
|
81
81
|
}
|
|
82
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* The declared type is not one the format defines; the column is kept as string.
|
|
84
|
+
* @category Issue and loss codes
|
|
85
|
+
*/
|
|
83
86
|
export declare const UNKNOWN_TYPE_CODE = "W_UNKNOWN_ATTR_TYPE";
|
|
84
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* The column was renamed `<name>#<id>` because the name was taken.
|
|
89
|
+
* @category Issue and loss codes
|
|
90
|
+
*/
|
|
85
91
|
export declare const RENAMED_CODE = "W_COLUMN_RENAMED";
|
|
86
92
|
export { BAD_DEFAULT_CODE, BAD_OPTIONS_CODE, PRECISION_CODE, ROLE_TAKEN_CODE };
|
|
87
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Rows sampled before the dict heuristic decides (design section 5.4).
|
|
95
|
+
* @category Plugin helpers
|
|
96
|
+
*/
|
|
88
97
|
export declare const DICT_SAMPLE_ROWS = 1024;
|
|
89
98
|
/**
|
|
90
99
|
* Build the column declaration of a declared attribute.
|
|
91
100
|
* @param input - what the file declares
|
|
92
101
|
* @returns the declaration, the value spec and any warnings to record
|
|
102
|
+
* @category Plugin helpers
|
|
93
103
|
*/
|
|
94
104
|
export declare function declareAttribute(input: AttributeDeclarationInput): DeclaredAttribute;
|
|
95
105
|
/**
|
|
@@ -99,6 +109,7 @@ export declare function declareAttribute(input: AttributeDeclarationInput): Decl
|
|
|
99
109
|
* @param spec - the declared type
|
|
100
110
|
* @param listSyntax - the list syntax
|
|
101
111
|
* @returns the value to push (a boolean, a number, a string, a JSON value or an array)
|
|
112
|
+
* @category Plugin helpers
|
|
102
113
|
*/
|
|
103
114
|
export declare function parseDeclaredValue(text: string, spec: DeclaredTypeSpec, listSyntax: ListSyntax): unknown;
|
|
104
115
|
/**
|
|
@@ -107,6 +118,7 @@ export declare function parseDeclaredValue(text: string, spec: DeclaredTypeSpec,
|
|
|
107
118
|
* @param text - the value text
|
|
108
119
|
* @param spec - a scalar temporal spec
|
|
109
120
|
* @returns the value and the text to keep, or null text
|
|
121
|
+
* @category Plugin helpers
|
|
110
122
|
*/
|
|
111
123
|
export declare function parseDeclaredTemporal(text: string, spec: DeclaredTypeSpec): TemporalValue;
|
|
112
124
|
/**
|
|
@@ -116,6 +128,7 @@ export declare function parseDeclaredTemporal(text: string, spec: DeclaredTypeSp
|
|
|
116
128
|
* @param spec - the declared type
|
|
117
129
|
* @param text - the value text (trimmed or not)
|
|
118
130
|
* @returns true when the importer should record a `precision` issue
|
|
131
|
+
* @category Plugin helpers
|
|
119
132
|
*/
|
|
120
133
|
export declare function losesPrecision(spec: DeclaredTypeSpec, text: string): boolean;
|
|
121
134
|
/**
|
|
@@ -124,12 +137,13 @@ export declare function losesPrecision(spec: DeclaredTypeSpec, text: string): bo
|
|
|
124
137
|
* @param domain - node or edge
|
|
125
138
|
* @param decl - the declaration
|
|
126
139
|
* @returns the column handle
|
|
140
|
+
* @category Plugin helpers
|
|
127
141
|
*/
|
|
128
142
|
export declare function declareOn(sink: GraphSink, domain: "node" | "edge", decl: ColumnDecl): ColumnHandle;
|
|
129
143
|
/**
|
|
130
144
|
* The outcome of declareResolved(): the handle and the declaration as it was applied.
|
|
131
|
-
* Consumed by the per-format importers under src/formats.
|
|
132
145
|
* @public
|
|
146
|
+
* @category Plugin helpers
|
|
133
147
|
*/
|
|
134
148
|
export interface ResolvedDeclaration {
|
|
135
149
|
/** The column handle. */
|
|
@@ -142,11 +156,10 @@ export interface ResolvedDeclaration {
|
|
|
142
156
|
readonly roleDropped: boolean;
|
|
143
157
|
}
|
|
144
158
|
/**
|
|
145
|
-
* The
|
|
159
|
+
* The column naming rule in one place, so every importer agrees: declare a column on
|
|
146
160
|
* the sink and, when the sink already holds the name with another shape (an earlier import, a
|
|
147
161
|
* caller's column), rename it `<name>#<origin.id>` (a counter when the source has no id) and
|
|
148
|
-
* record W_COLUMN_RENAMED (coercion); when the table already holds the role
|
|
149
|
-
* at most one column per role), declare without the role and record W_ROLE_TAKEN (coercion). The
|
|
162
|
+
* record W_COLUMN_RENAMED (coercion); when the table already holds the role, declare without the role and record W_ROLE_TAKEN (coercion). The
|
|
150
163
|
* same shape under the same name returns the existing handle, as the sink does.
|
|
151
164
|
* @param sink - the sink
|
|
152
165
|
* @param domain - node or edge
|
|
@@ -154,10 +167,11 @@ export interface ResolvedDeclaration {
|
|
|
154
167
|
* @param report - the report the coercion issues are recorded in
|
|
155
168
|
* @param where - the line and element, when known
|
|
156
169
|
* @returns the handle and the declaration as applied
|
|
170
|
+
* @category Plugin helpers
|
|
157
171
|
*/
|
|
158
172
|
export declare function declareResolved(sink: GraphSink, domain: "node" | "edge", decl: ColumnDecl, report: ImportReportBuilder, where?: IssueLocation): ResolvedDeclaration;
|
|
159
173
|
/**
|
|
160
|
-
* Declare the companion text column of a temporal column
|
|
174
|
+
* Declare the companion text column of a temporal column. A table holds at
|
|
161
175
|
* most one column per role, so when another companion already carries `timeText` this one is
|
|
162
176
|
* declared without the role (reported once per table); exporters find every companion through
|
|
163
177
|
* `extra.for`.
|
|
@@ -166,6 +180,7 @@ export declare function declareResolved(sink: GraphSink, domain: "node" | "edge"
|
|
|
166
180
|
* @param companion - the declaration from declareAttribute()
|
|
167
181
|
* @param report - the report the role loss is recorded in; when omitted the loss is silent
|
|
168
182
|
* @returns the column handle
|
|
183
|
+
* @category Plugin helpers
|
|
169
184
|
*/
|
|
170
185
|
export declare function declareCompanion(sink: GraphSink, domain: "node" | "edge", companion: ColumnDecl, report?: ImportReportBuilder): ColumnHandle;
|
|
171
186
|
/**
|
|
@@ -173,6 +188,7 @@ export declare function declareCompanion(sink: GraphSink, domain: "node" | "edge
|
|
|
173
188
|
* @param sink - the sink
|
|
174
189
|
* @param domain - node or edge
|
|
175
190
|
* @returns a predicate over column names
|
|
191
|
+
* @category Plugin helpers
|
|
176
192
|
*/
|
|
177
193
|
export declare function takenIn(sink: GraphSink, domain: "node" | "edge"): (name: string) => boolean;
|
|
178
194
|
/**
|
|
@@ -182,12 +198,14 @@ export declare function takenIn(sink: GraphSink, domain: "node" | "edge"): (name
|
|
|
182
198
|
* @param id - the source id (the attribute id or key id); null falls back to a counter
|
|
183
199
|
* @param taken - whether a name is already used in the table
|
|
184
200
|
* @returns a free name
|
|
201
|
+
* @category Plugin helpers
|
|
185
202
|
*/
|
|
186
203
|
export declare function uniqueColumnName(name: string, id: string | null, taken: (name: string) => boolean): string;
|
|
187
204
|
/**
|
|
188
205
|
* The dict heuristic of design section 5.4 for an untyped string column: observe values until the
|
|
189
206
|
* sample is full; the column is a dict when the distinct count stays below half the rows, a string
|
|
190
207
|
* otherwise. The importer buffers the sampled values and declares the column on the decision.
|
|
208
|
+
* @category Plugin helpers
|
|
191
209
|
*/
|
|
192
210
|
export declare class DictHeuristic {
|
|
193
211
|
private readonly distinct;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/common/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACH,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,UAAU,EAEf,KAAK,SAAS,EAEjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAC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;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAE9C,OAAO,CAAC,QAAQ,CAAK;IAErB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IAEpC;;;OAGG;gBACS,UAAU,GAAE,MAAyB;IAIjD;;;OAGG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED;;;OAGG;IACH,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;;OAIG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAQ/B;;;;OAIG;IACH,MAAM,IAAI,MAAM,GAAG,QAAQ;CAG9B"}
|
|
@@ -14,17 +14,27 @@ import { BAD_DEFAULT_CODE, BAD_OPTIONS_CODE, COLUMN_RENAMED_CODE, PRECISION_CODE
|
|
|
14
14
|
import { mapDeclaredType, parseScalarText, stringSpec, } from "./declared-types.js";
|
|
15
15
|
import { splitListText } from "./lists.js";
|
|
16
16
|
import { parseTemporal, timeTextCompanion } from "./temporal.js";
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The declared type is not one the format defines; the column is kept as string.
|
|
19
|
+
* @category Issue and loss codes
|
|
20
|
+
*/
|
|
18
21
|
export const UNKNOWN_TYPE_CODE = UNKNOWN_ATTR_TYPE_CODE;
|
|
19
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* The column was renamed `<name>#<id>` because the name was taken.
|
|
24
|
+
* @category Issue and loss codes
|
|
25
|
+
*/
|
|
20
26
|
export const RENAMED_CODE = COLUMN_RENAMED_CODE;
|
|
21
27
|
export { BAD_DEFAULT_CODE, BAD_OPTIONS_CODE, PRECISION_CODE, ROLE_TAKEN_CODE };
|
|
22
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Rows sampled before the dict heuristic decides (design section 5.4).
|
|
30
|
+
* @category Plugin helpers
|
|
31
|
+
*/
|
|
23
32
|
export const DICT_SAMPLE_ROWS = 1024;
|
|
24
33
|
/**
|
|
25
34
|
* Build the column declaration of a declared attribute.
|
|
26
35
|
* @param input - what the file declares
|
|
27
36
|
* @returns the declaration, the value spec and any warnings to record
|
|
37
|
+
* @category Plugin helpers
|
|
28
38
|
*/
|
|
29
39
|
export function declareAttribute(input) {
|
|
30
40
|
const issues = [];
|
|
@@ -117,6 +127,7 @@ export function declareAttribute(input) {
|
|
|
117
127
|
* @param spec - the declared type
|
|
118
128
|
* @param listSyntax - the list syntax
|
|
119
129
|
* @returns the value to push (a boolean, a number, a string, a JSON value or an array)
|
|
130
|
+
* @category Plugin helpers
|
|
120
131
|
*/
|
|
121
132
|
export function parseDeclaredValue(text, spec, listSyntax) {
|
|
122
133
|
if (spec.list) {
|
|
@@ -130,6 +141,7 @@ export function parseDeclaredValue(text, spec, listSyntax) {
|
|
|
130
141
|
* @param text - the value text
|
|
131
142
|
* @param spec - a scalar temporal spec
|
|
132
143
|
* @returns the value and the text to keep, or null text
|
|
144
|
+
* @category Plugin helpers
|
|
133
145
|
*/
|
|
134
146
|
export function parseDeclaredTemporal(text, spec) {
|
|
135
147
|
if (spec.temporal === null || spec.list) {
|
|
@@ -147,6 +159,7 @@ const INTEGER_TEXT = /^[+-]?[0-9]+$/;
|
|
|
147
159
|
* @param spec - the declared type
|
|
148
160
|
* @param text - the value text (trimmed or not)
|
|
149
161
|
* @returns true when the importer should record a `precision` issue
|
|
162
|
+
* @category Plugin helpers
|
|
150
163
|
*/
|
|
151
164
|
export function losesPrecision(spec, text) {
|
|
152
165
|
if (!spec.precision) {
|
|
@@ -165,16 +178,16 @@ export function losesPrecision(spec, text) {
|
|
|
165
178
|
* @param domain - node or edge
|
|
166
179
|
* @param decl - the declaration
|
|
167
180
|
* @returns the column handle
|
|
181
|
+
* @category Plugin helpers
|
|
168
182
|
*/
|
|
169
183
|
export function declareOn(sink, domain, decl) {
|
|
170
184
|
return domain === "node" ? sink.declareNodeColumn(decl) : sink.declareEdgeColumn(decl);
|
|
171
185
|
}
|
|
172
186
|
/**
|
|
173
|
-
* The
|
|
187
|
+
* The column naming rule in one place, so every importer agrees: declare a column on
|
|
174
188
|
* the sink and, when the sink already holds the name with another shape (an earlier import, a
|
|
175
189
|
* caller's column), rename it `<name>#<origin.id>` (a counter when the source has no id) and
|
|
176
|
-
* record W_COLUMN_RENAMED (coercion); when the table already holds the role
|
|
177
|
-
* at most one column per role), declare without the role and record W_ROLE_TAKEN (coercion). The
|
|
190
|
+
* record W_COLUMN_RENAMED (coercion); when the table already holds the role, declare without the role and record W_ROLE_TAKEN (coercion). The
|
|
178
191
|
* same shape under the same name returns the existing handle, as the sink does.
|
|
179
192
|
* @param sink - the sink
|
|
180
193
|
* @param domain - node or edge
|
|
@@ -182,6 +195,7 @@ export function declareOn(sink, domain, decl) {
|
|
|
182
195
|
* @param report - the report the coercion issues are recorded in
|
|
183
196
|
* @param where - the line and element, when known
|
|
184
197
|
* @returns the handle and the declaration as applied
|
|
198
|
+
* @category Plugin helpers
|
|
185
199
|
*/
|
|
186
200
|
export function declareResolved(sink, domain, decl, report, where) {
|
|
187
201
|
let current = decl;
|
|
@@ -217,7 +231,7 @@ export function declareResolved(sink, domain, decl, report, where) {
|
|
|
217
231
|
}
|
|
218
232
|
}
|
|
219
233
|
/**
|
|
220
|
-
* Declare the companion text column of a temporal column
|
|
234
|
+
* Declare the companion text column of a temporal column. A table holds at
|
|
221
235
|
* most one column per role, so when another companion already carries `timeText` this one is
|
|
222
236
|
* declared without the role (reported once per table); exporters find every companion through
|
|
223
237
|
* `extra.for`.
|
|
@@ -226,6 +240,7 @@ export function declareResolved(sink, domain, decl, report, where) {
|
|
|
226
240
|
* @param companion - the declaration from declareAttribute()
|
|
227
241
|
* @param report - the report the role loss is recorded in; when omitted the loss is silent
|
|
228
242
|
* @returns the column handle
|
|
243
|
+
* @category Plugin helpers
|
|
229
244
|
*/
|
|
230
245
|
export function declareCompanion(sink, domain, companion, report) {
|
|
231
246
|
try {
|
|
@@ -245,6 +260,7 @@ export function declareCompanion(sink, domain, companion, report) {
|
|
|
245
260
|
* @param sink - the sink
|
|
246
261
|
* @param domain - node or edge
|
|
247
262
|
* @returns a predicate over column names
|
|
263
|
+
* @category Plugin helpers
|
|
248
264
|
*/
|
|
249
265
|
export function takenIn(sink, domain) {
|
|
250
266
|
return (name) => (domain === "node" ? sink.nodeColumn(name) : sink.edgeColumn(name)) !== INVALID_INDEX;
|
|
@@ -256,6 +272,7 @@ export function takenIn(sink, domain) {
|
|
|
256
272
|
* @param id - the source id (the attribute id or key id); null falls back to a counter
|
|
257
273
|
* @param taken - whether a name is already used in the table
|
|
258
274
|
* @returns a free name
|
|
275
|
+
* @category Plugin helpers
|
|
259
276
|
*/
|
|
260
277
|
export function uniqueColumnName(name, id, taken) {
|
|
261
278
|
if (!taken(name)) {
|
|
@@ -276,6 +293,7 @@ export function uniqueColumnName(name, id, taken) {
|
|
|
276
293
|
* The dict heuristic of design section 5.4 for an untyped string column: observe values until the
|
|
277
294
|
* sample is full; the column is a dict when the distinct count stays below half the rows, a string
|
|
278
295
|
* otherwise. The importer buffers the sampled values and declares the column on the decision.
|
|
296
|
+
* @category Plugin helpers
|
|
279
297
|
*/
|
|
280
298
|
export class DictHeuristic {
|
|
281
299
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.js","sourceRoot":"","sources":["../../../src/common/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAIH,gBAAgB,EAEhB,aAAa,GAChB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACH,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,sBAAsB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAGH,eAAe,EACf,eAAe,EACf,UAAU,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAmB,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAsB,iB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OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;AACjD,CAAC;AAED;;;;;GAKG;AACH,SAAS,SAAS,CAAC,IAAY,EAAE,IAAsB;IACnD,OAAO,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC3D,CAAC;AAED;;;;GAIG;AACH,SAAS,SAAS,CAAC,GAAY;IAC3B,OAAO,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -7,16 +7,23 @@
|
|
|
7
7
|
* however large it is.
|
|
8
8
|
*/
|
|
9
9
|
import { type ColumnDecl, type ColumnHandle, GraphBuilder, type GraphBuilderOptions, type NodeId } from "@graphty/graph-format";
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Import stopped for allocating too many empty attribute slots.
|
|
12
|
+
* @category Issue and loss codes
|
|
13
|
+
*/
|
|
11
14
|
export declare const TOO_MANY_EMPTY_CELLS_CODE = "E_TOO_MANY_EMPTY_CELLS";
|
|
12
15
|
/**
|
|
13
16
|
* Resolve the maxEmptyCells option.
|
|
14
17
|
* @param value - the caller's value
|
|
15
18
|
* @returns a non-negative integer or Infinity
|
|
16
19
|
* @throws GraphFormatError E_UNSUPPORTED for anything else
|
|
20
|
+
* @category Plugin helpers
|
|
17
21
|
*/
|
|
18
22
|
export declare function maxEmptyCellsOption(value: unknown): number;
|
|
19
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* A GraphBuilder that throws an ImportError once its attribute columns hold too many empty slots.
|
|
25
|
+
* @category Plugin helpers
|
|
26
|
+
*/
|
|
20
27
|
export declare class CellBudgetBuilder extends GraphBuilder {
|
|
21
28
|
private readonly format;
|
|
22
29
|
private readonly maxEmptyCells;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell-budget.d.ts","sourceRoot":"","sources":["../../../src/common/cell-budget.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACH,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,YAAY,EACZ,KAAK,mBAAmB,EAExB,KAAK,MAAM,EACd,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"cell-budget.d.ts","sourceRoot":"","sources":["../../../src/common/cell-budget.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACH,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,YAAY,EACZ,KAAK,mBAAmB,EAExB,KAAK,MAAM,EACd,MAAM,uBAAuB,CAAC;AAM/B;;;GAGG;AACH,eAAO,MAAM,yBAAyB,2BAA2B,CAAC;AAKlE;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAY1D;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IAa3C,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAblC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IACjD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IACjD,OAAO,CAAC,MAAM,CAAK;IAEnB;;;;;OAKG;gBAEC,OAAO,EAAE,mBAAmB,EACX,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM;IAK1C;;;;OAIG;IACM,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAMpC;;;;;;OAMG;IACM,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IAMzE;;;;OAIG;IACM,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY;IAO1D;;;;OAIG;IACM,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY;IAO1D;;;;;OAKG;IACM,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAMzF;;;;;OAKG;IACM,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAMxF;;;OAGG;IACH,OAAO,CAAC,KAAK;IAOb;;;OAGG;IACH,OAAO,CAAC,WAAW;CAetB"}
|
|
@@ -8,8 +8,12 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { GraphBuilder, GraphFormatError, } from "@graphty/graph-format";
|
|
10
10
|
import { describe } from "./options.js";
|
|
11
|
+
import { plural } from "./plural.js";
|
|
11
12
|
import { ImportReportBuilder } from "./report.js";
|
|
12
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Import stopped for allocating too many empty attribute slots.
|
|
15
|
+
* @category Issue and loss codes
|
|
16
|
+
*/
|
|
13
17
|
export const TOO_MANY_EMPTY_CELLS_CODE = "E_TOO_MANY_EMPTY_CELLS";
|
|
14
18
|
/** The default limit: 2^24 empty slots, about 130 MB of f64 columns. */
|
|
15
19
|
const DEFAULT_MAX_EMPTY_CELLS = 2 ** 24;
|
|
@@ -18,6 +22,7 @@ const DEFAULT_MAX_EMPTY_CELLS = 2 ** 24;
|
|
|
18
22
|
* @param value - the caller's value
|
|
19
23
|
* @returns a non-negative integer or Infinity
|
|
20
24
|
* @throws GraphFormatError E_UNSUPPORTED for anything else
|
|
25
|
+
* @category Plugin helpers
|
|
21
26
|
*/
|
|
22
27
|
export function maxEmptyCellsOption(value) {
|
|
23
28
|
if (value === undefined) {
|
|
@@ -28,7 +33,10 @@ export function maxEmptyCellsOption(value) {
|
|
|
28
33
|
}
|
|
29
34
|
throw new GraphFormatError("E_UNSUPPORTED", `option maxEmptyCells: ${describe(value)} is not a non-negative integer or Infinity`, { option: "maxEmptyCells", found: value });
|
|
30
35
|
}
|
|
31
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* A GraphBuilder that throws an ImportError once its attribute columns hold too many empty slots.
|
|
38
|
+
* @category Plugin helpers
|
|
39
|
+
*/
|
|
32
40
|
export class CellBudgetBuilder extends GraphBuilder {
|
|
33
41
|
/**
|
|
34
42
|
* Create a builder with a limit.
|
|
@@ -129,7 +137,7 @@ export class CellBudgetBuilder extends GraphBuilder {
|
|
|
129
137
|
const empty = slots - this.values;
|
|
130
138
|
if (empty > this.maxEmptyCells) {
|
|
131
139
|
new ImportReportBuilder(this.format, Infinity).fail(TOO_MANY_EMPTY_CELLS_CODE, `the attributes are too sparse: ${this.nodeColumns.size} node and ${this.edgeColumns.size} edge ` +
|
|
132
|
-
`attribute
|
|
140
|
+
`attribute columns over ${this.nodeBound} node${plural(this.nodeBound)} and ${this.edgeBound} edge${plural(this.edgeBound)} would ` +
|
|
133
141
|
`allocate more than ${this.maxEmptyCells} slots that hold no value; pass a larger ` +
|
|
134
142
|
`maxEmptyCells (or Infinity) to read the file anyway`, undefined, { emptyCells: empty, maxEmptyCells: this.maxEmptyCells });
|
|
135
143
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell-budget.js","sourceRoot":"","sources":["../../../src/common/cell-budget.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAGH,YAAY,EAEZ,gBAAgB,GAEnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"cell-budget.js","sourceRoot":"","sources":["../../../src/common/cell-budget.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAGH,YAAY,EAEZ,gBAAgB,GAEnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,MAAM,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