From d6edd5facf6fa5644ca5cd774ac2729b090e3a2c Mon Sep 17 00:00:00 2001 From: Kai Weber Date: Mon, 3 Feb 2020 08:34:12 +0100 Subject: [PATCH] Updated n3 library --- dist/getty.js | 2 +- dist/getty.js.map | 4 ++-- dist/gnd.js | 2 +- dist/gnd.js.map | 4 ++-- dist/iconclass.js | 2 +- dist/iconclass.js.map | 4 ++-- dist/reason.js | 6 +++--- dist/reason.js.map | 4 ++-- dist/stream.js | 4 ++-- dist/stream.js.map | 4 ++-- lib/getty.coffee | 2 +- lib/gnd.coffee | 2 +- lib/iconclass.coffee | 2 +- lib/reason.coffee | 6 +++--- lib/stream.coffee | 4 ++-- package-lock.json | 8 ++++---- package.json | 4 ++-- 17 files changed, 32 insertions(+), 32 deletions(-) diff --git a/dist/getty.js b/dist/getty.js index 7ccdeb2..6549104 100644 --- a/dist/getty.js +++ b/dist/getty.js @@ -73,7 +73,7 @@ subjects: aatFilter("1Subjects"), hierarchy: aatFilter("1Subjects", "2Terms", "HierarchicalRels"), parsed: function() { - return miss.pipeline.obj(N3.StreamParser(), nt2nq("http://vocab.getty.edu/aat")); + return miss.pipeline.obj(new N3.StreamParser(), nt2nq("http://vocab.getty.edu/aat")); } }; diff --git a/dist/getty.js.map b/dist/getty.js.map index 347ab78..501e583 100644 --- a/dist/getty.js.map +++ b/dist/getty.js.map @@ -6,8 +6,8 @@ "lib/getty.coffee" ], "names": [], - "mappings": ";AAAA;AAAA,MAAA,EAAA,EAAA,GAAA,EAAA,SAAA,EAAA,KAAA,EAAA,GAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA;;EAAA,EAAA,GAAK,OAAA,CAAQ,IAAR;;EACL,IAAA,GAAO,OAAA,CAAQ,aAAR;;EACP,OAAA,GAAU,OAAA,CAAQ,SAAR;;EACV,QAAA,GAAW,OAAA,CAAQ,UAAR;;EAEX,KAAA,GAAQ,OAAA,CAAQ,OAAR;;EACR,GAAA,GAAM,KAAA,CAAM,i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MAAA,EAAQ,QAAA,CAAA,CAAA;aACJ,IAAI,CAAC,QAAQ,CAAC,GAAd,CAAkB,IAAI,EAAE,CAAC,YAAP,CAAA,CAAlB,EAA0C,KAAA,CAAM,4BAAN,CAA1C;IADI;EANR;AArCJ", "sourcesContent": [ - "N3 = require \"n3\"\nmiss = require \"mississippi\"\nrequest = require \"request\"\nunzipper = require \"unzipper\"\n\ndebug = require \"debug\"\nlog = debug \"rdf-tools:getty\"\n\nnt2nq = require \"./nt2nq\"\n\nurl = \"http://vocab.getty.edu/dataset/aat/explicit.zip\"\n\naatFilter = (components...) ->\n matchAll = components.length is 0\n paths = (\"AATOut_#{c}.nt\" for c in components)\n paths = paths.reduce ((idx, p) -> { idx..., [p]: true }), {}\n ({ path }) -> matchAll or (paths[path] ? false)\n\naat = (to, filter=aatFilter(), cb) ->\n source = request { url }\n extract = unzipper.Parse()\n .on \"entry\" , (entry) ->\n if filter entry\n log \"+ %o\", entry\n entry.pipe to, { end: false }\n else\n log \"- %o\", entry\n entry.autodrain()\n .on \"finish\", () -> to.end()\n\n callback = (err) ->\n log (err ? to)\n cb err if cb\n\n miss.pipe source, extract, callback\n\nmodule.exports =\n aat: aat\n aatFilter: aatFilter\n\n subjects: aatFilter \"1Subjects\"\n hierarchy: aatFilter \"1Subjects\", \"2Terms\", \"HierarchicalRels\"\n\n parsed: () ->\n miss.pipeline.obj N3.StreamParser(), (nt2nq \"http://vocab.getty.edu/aat\")" + "N3 = require \"n3\"\nmiss = require \"mississippi\"\nrequest = require \"request\"\nunzipper = require \"unzipper\"\n\ndebug = require \"debug\"\nlog = debug \"rdf-tools:getty\"\n\nnt2nq = require \"./nt2nq\"\n\nurl = \"http://vocab.getty.edu/dataset/aat/explicit.zip\"\n\naatFilter = (components...) ->\n matchAll = components.length is 0\n paths = (\"AATOut_#{c}.nt\" for c in components)\n paths = paths.reduce ((idx, p) -> { idx..., [p]: true }), {}\n ({ path }) -> matchAll or (paths[path] ? false)\n\naat = (to, filter=aatFilter(), cb) ->\n source = request { url }\n extract = unzipper.Parse()\n .on \"entry\" , (entry) ->\n if filter entry\n log \"+ %o\", entry\n entry.pipe to, { end: false }\n else\n log \"- %o\", entry\n entry.autodrain()\n .on \"finish\", () -> to.end()\n\n callback = (err) ->\n log (err ? to)\n cb err if cb\n\n miss.pipe source, extract, callback\n\nmodule.exports =\n aat: aat\n aatFilter: aatFilter\n\n subjects: aatFilter \"1Subjects\"\n hierarchy: aatFilter \"1Subjects\", \"2Terms\", \"HierarchicalRels\"\n\n parsed: () ->\n miss.pipeline.obj new N3.StreamParser(), (nt2nq \"http://vocab.getty.edu/aat\")" ] } \ No newline at end of file diff --git a/dist/gnd.js b/dist/gnd.js index 7a3e93c..7ea257a 100644 --- a/dist/gnd.js +++ b/dist/gnd.js @@ -19,7 +19,7 @@ return miss.pipe(request({url}), zlib.createGunzip(), cb); }, parsed: function() { - return miss.pipeline.obj(N3.StreamParser(), nt2nq("http://d-nb.info/gnd/")); + return miss.pipeline.obj(new N3.StreamParser(), nt2nq("http://d-nb.info/gnd/")); } }; diff --git a/dist/gnd.js.map b/dist/gnd.js.map index 440296b..0a96b70 100644 --- a/dist/gnd.js.map +++ b/dist/gnd.js.map @@ -6,8 +6,8 @@ "lib/gnd.coffee" ], "names": [], - "mappings": ";AAAA;AAAA,MAAA,EAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,GAAA,EAAA;;EAAA,IAAA,GAAO,OAAA,CAAQ,MAAR;;EAEP,EAAA,GAAK,OAAA,CAAQ,IAAR;;EACL,IAAA,GAAO,OAAA,CAAQ,aAAR;;EACP,OAAA,GAAU,OAAA,CAAQ,SAAR;;EAEV,KAAA,GAAQ,OAAA,CAAQ,SAAR;;EAER,GAAA,GAAM;;EAEN,MAAM,CAAC,OAAP,GACI;IAAA,MAAA,EAAQ,QAAA,CAAC,EAAD,CAAA;aAAQ,IAAI,CAAC,IAAL,CAAU,OAAA,CAAQ,CAAE,GAAF,CAAR,CAAV,EAA4B,IAAI,CAAC,YAAL,CAAA,CAA5B,EAAiD,EAAjD;IAAR,CAAR;IAEA,MAAA,EAAQ,QAAA,CAAA,CAAA;aACJ,IAAI,CAAC,QAAQ,CAAC,GAAd,CAAkB,EAAE,CAAC,YAAH,CAAA,CAAlB,EAAsC,KAAA,CAAM,uBAAN,CAAtC;IADI;EAFR;AAXJ", + "mappings": ";AAAA;AAAA,MAAA,EAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,GAAA,EAAA;;EAAA,IAAA,GAAO,OAAA,CAAQ,MAAR;;EAEP,EAAA,GAAK,OAAA,CAAQ,IAAR;;EACL,IAAA,GAAO,OAAA,CAAQ,aAAR;;EACP,OAAA,GAAU,OAAA,CAAQ,SAAR;;EAEV,KAAA,GAAQ,OAAA,CAAQ,SAAR;;EAER,GAAA,GAAM;;EAEN,MAAM,CAAC,OAAP,GACI;IAAA,MAAA,EAAQ,QAAA,CAAC,EAAD,CAAA;aAAQ,IAAI,CAAC,IAAL,CAAU,OAAA,CAAQ,CAAE,GAAF,CAAR,CAAV,EAA4B,IAAI,CAAC,YAAL,CAAA,CAA5B,EAAiD,EAAjD;IAAR,CAAR;IAEA,MAAA,EAAQ,QAAA,CAAA,CAAA;aACJ,IAAI,CAAC,QAAQ,CAAC,GAAd,CAAkB,IAAI,EAAE,CAAC,YAAP,CAAA,CAAlB,EAA0C,KAAA,CAAM,uBAAN,CAA1C;IADI;EAFR;AAXJ", "sourcesContent": [ - "zlib = require \"zlib\"\n\nN3 = require \"n3\"\nmiss = require \"mississippi\"\nrequest = require \"request\"\n\nnt2nq = require \"./nt2nq\"\n\nurl = \"https://data.dnb.de/opendata/authorities-person_lds.ttl.gz\"\n\nmodule.exports =\n stream: (cb) -> miss.pipe request({ url }), zlib.createGunzip(), cb\n\n parsed: () ->\n miss.pipeline.obj N3.StreamParser(), (nt2nq \"http://d-nb.info/gnd/\")\n" + "zlib = require \"zlib\"\n\nN3 = require \"n3\"\nmiss = require \"mississippi\"\nrequest = require \"request\"\n\nnt2nq = require \"./nt2nq\"\n\nurl = \"https://data.dnb.de/opendata/authorities-person_lds.ttl.gz\"\n\nmodule.exports =\n stream: (cb) -> miss.pipe request({ url }), zlib.createGunzip(), cb\n\n parsed: () ->\n miss.pipeline.obj new N3.StreamParser(), (nt2nq \"http://d-nb.info/gnd/\")\n" ] } \ No newline at end of file diff --git a/dist/iconclass.js b/dist/iconclass.js index 81f19be..0c6c5bc 100644 --- a/dist/iconclass.js +++ b/dist/iconclass.js @@ -19,7 +19,7 @@ return miss.pipe(request({url}), zlib.createGunzip(), cb); }, parsed: function() { - return miss.pipeline.obj(N3.StreamParser(), nt2nq("http://iconclass.org/")); + return miss.pipeline.obj(new N3.StreamParser(), nt2nq("http://iconclass.org/")); } }; diff --git a/dist/iconclass.js.map b/dist/iconclass.js.map index 1fee534..ef31fa5 100644 --- a/dist/iconclass.js.map +++ b/dist/iconclass.js.map @@ -6,8 +6,8 @@ "lib/iconclass.coffee" ], "names": [], - "mappings": ";AAAA;AAAA,MAAA,EAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,GAAA,EAAA;;EAAA,IAAA,GAAO,OAAA,CAAQ,MAAR;;EAEP,EAAA,GAAK,OAAA,CAAQ,IAAR;;EACL,IAAA,GAAO,OAAA,CAAQ,aAAR;;EACP,OAAA,GAAU,OAAA,CAAQ,SAAR;;EAEV,KAAA,GAAQ,OAAA,CAAQ,SAAR;;EAER,GAAA,GAAM;;EAEN,MAAM,CAAC,OAAP,GACI;IAAA,MAAA,EAAQ,QAAA,CAAC,EAAD,CAAA;aACJ,IAAI,CAAC,IAAL,CAAW,OAAA,CAAQ,CAAE,GAAF,CAAR,CAAX,EAA6B,IAAI,CAAC,YAAL,CAAA,CAA7B,EAAkD,EAAlD;IADI,CAAR;IAGA,MAAA,EAAQ,QAAA,CAAA,CAAA;aACJ,IAAI,CAAC,QAAQ,CAAC,GAAd,CAAkB,EAAE,CAAC,YAAH,CAAA,CAAlB,EAAsC,KAAA,CAAM,uBAAN,CAAtC;IADI;EAHR;AAXJ", + "mappings": ";AAAA;AAAA,MAAA,EAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,GAAA,EAAA;;EAAA,IAAA,GAAO,OAAA,CAAQ,MAAR;;EAEP,EAAA,GAAK,OAAA,CAAQ,IAAR;;EACL,IAAA,GAAO,OAAA,CAAQ,aAAR;;EACP,OAAA,GAAU,OAAA,CAAQ,SAAR;;EAEV,KAAA,GAAQ,OAAA,CAAQ,SAAR;;EAER,GAAA,GAAM;;EAEN,MAAM,CAAC,OAAP,GACI;IAAA,MAAA,EAAQ,QAAA,CAAC,EAAD,CAAA;aACJ,IAAI,CAAC,IAAL,CAAW,OAAA,CAAQ,CAAE,GAAF,CAAR,CAAX,EAA6B,IAAI,CAAC,YAAL,CAAA,CAA7B,EAAkD,EAAlD;IADI,CAAR;IAGA,MAAA,EAAQ,QAAA,CAAA,CAAA;aACJ,IAAI,CAAC,QAAQ,CAAC,GAAd,CAAkB,IAAI,EAAE,CAAC,YAAP,CAAA,CAAlB,EAA0C,KAAA,CAAM,uBAAN,CAA1C;IADI;EAHR;AAXJ", "sourcesContent": [ - "zlib = require \"zlib\"\n\nN3 = require \"n3\"\nmiss = require \"mississippi\"\nrequest = require \"request\"\n\nnt2nq = require \"./nt2nq\"\n\nurl = \"http://iconclass.org/data/iconclass.nt.gz\"\n\nmodule.exports =\n stream: (cb) ->\n miss.pipe (request { url }), zlib.createGunzip(), cb\n\n parsed: () ->\n miss.pipeline.obj N3.StreamParser(), (nt2nq \"http://iconclass.org/\")\n" + "zlib = require \"zlib\"\n\nN3 = require \"n3\"\nmiss = require \"mississippi\"\nrequest = require \"request\"\n\nnt2nq = require \"./nt2nq\"\n\nurl = \"http://iconclass.org/data/iconclass.nt.gz\"\n\nmodule.exports =\n stream: (cb) ->\n miss.pipe (request { url }), zlib.createGunzip(), cb\n\n parsed: () ->\n miss.pipeline.obj new N3.StreamParser(), (nt2nq \"http://iconclass.org/\")\n" ] } \ No newline at end of file diff --git a/dist/reason.js b/dist/reason.js index 990319b..f12c810 100644 --- a/dist/reason.js +++ b/dist/reason.js @@ -28,7 +28,7 @@ crm = require("./cidoc-crm"); - to = miss.pipeline.obj(N3.StreamWriter({format}), process.stdout); + to = miss.pipeline.obj(new N3.StreamWriter({format}), process.stdout); cb = function(err) { if (err != null) { @@ -48,8 +48,8 @@ } }); })); - source = N3.StreamParser(); - target = N3.StreamWriter({format}); + source = new N3.StreamParser(); + target = new N3.StreamWriter({format}); reasoner = miss.duplex.obj(target, source); reasoner.on("data", function(stmt, _, next) { var graph, inverse, object, predicate, ref, results, subject; diff --git a/dist/reason.js.map b/dist/reason.js.map index 82b17e3..f5aea91 100644 --- a/dist/reason.js.map +++ b/dist/reason.js.map @@ -6,8 +6,8 @@ "lib/reason.coffee" ], "names": [], - "mappings": ";AAAA;AAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,GAAA,EAAA,WAAA,EAAA,GAAA,EAAA,MAAA,EAAA,IAAA,EAAA,SAAA,EAAA,QAAA,EAAA,GAAA,EAAA,IAAA,EAAA,IAAA,EAAA;;EAAA,IAAA,GAAO,OAAA,CAAQ,MAAR;;EAEP,IAAA,GAAO,OAAA,CAAQ,aAAR;;EACP,EAAA,GAAK,OAAA,CAAQ,IAAR;;EACL,CAAA,CAAE,SAAF,EAAa,IAAb,CAAA,GAAsB,EAAE,CAAC,WAAzB;;EAEA,WAAA,GAAc;IAAE,MAAA,EAAQ;EAAV;;EACd,IAAA,GAAO,CAAC,OAAA,CAAQ,UAAR,CAAD,CAAA,CAAqB,OAAO,CAAC,IAAK,SAAlC;;EAEP,CAAA,CAAE,MAAF,CAAA,GAAa,CAAE,GAAA,WAAF,EAAkB,GAAA,IAAlB,CAAb;;EAEA,CAAE,QAAF,CAAA,GAAe,IAAI,CAAC;;EACpB,IAAA,CAAsB,QAAtB;IAAA,OAAO,CAAC,IAAR,CAAa,C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IAAI,CAAC,MAAM,CAAC,GAAZ,CAAgB,MAAhB,EAAwB,MAAxB;IACX,QAAQ,CAAC,EAAT,CAAY,MAAZ,EAAoB,QAAA,CAAC,IAAD,EAAO,CAAP,EAAU,IAAV,CAAA;AAChB,UAAA,KAAA,EAAA,OAAA,EAAA,MAAA,EAAA,SAAA,EAAA,GAAA,EAAA,OAAA,EAAA;MAAA,CAAA,CAAE,OAAF,EAAW,SAAX,EAAsB,MAAtB,EAA8B,KAA9B,CAAA,GAAwC,IAAxC;AACA;MAAA,KAAA,wEAAA;QACI,OAAA,GAAU,SAAA,CAAU,OAAV;qBACV,QAAQ,CAAC,KAAT,CAAe,IAAA,CAAK,MAAL,EAAa,OAAb,EAAsB,OAAtB,EAA+B,KAA/B,CAAf;MAFJ,CAAA;;IAFgB,CAApB;IAMA,IAAI,CAAC,IAAL,CAAU,OAAO,CAAC,KAAlB,EAAyB,MAAzB,EAAiC,EAAjC;WACA,IAAI,CAAC,IAAL,CAAU,MAAV,EAAkB,OAAO,CAAC,MAA1B,EAAkC,EAAlC;EAnBO;;AAqBX;AACI,YAAO,QAAP;AAAA,WACS,WADT;QAC0B,QAAA,CAAA;AAAjB;AADT;QAES,EAAA,CAAG,CAAA,kBAAA,CAAA,CAAqB,QAArB,CAAA,CAAH;AAFT,KADJ;GAAA,aAAA;IAIM;IACF,EAAA,CAAG,GAAH,EALJ;;AA3CA", "sourcesContent": [ - "path = require \"path\"\n\nmiss = require \"mississippi\"\nN3 = require \"n3\"\n{ namedNode, quad } = N3.DataFactory\n\ndefaultArgs = { format: \"N-Quads\" }\nargs = (require \"minimist\") process.argv[2..]\n\n{ format } = { defaultArgs..., args... }\n\n[ ontology ] = args._\nprocess.exit 2 unless ontology\n\nowl = require \"./owl\"\ncrm = require \"./cidoc-crm\"\n\nto = miss.pipeline.obj N3.StreamWriter({ format }), process.stdout\ncb = (err) ->\n console.error err if err?\n process.exitCode = if err? then 1 else 0\n\ncidocCrm = () ->\n ontology = await new Promise (resolve, reject) ->\n miss.pipe crm.stream(),\n crm.parsed(),\n owl.model(resolve),\n miss.to.obj((triple, _, next) -> next())\n (err) -> reject err if err?\n\n source = N3.StreamParser()\n target = N3.StreamWriter({ format })\n\n reasoner = miss.duplex.obj target, source\n reasoner.on \"data\", (stmt, _, next) ->\n { subject, predicate, object, graph } = stmt\n for inverse of (ontology.inversed[predicate.value] ? {})\n inverse = namedNode inverse\n reasoner.write quad(object, inverse, subject, graph)\n\n miss.pipe process.stdin, source, cb\n miss.pipe target, process.stdout, cb\n\ntry\n switch ontology\n when \"cidoc-crm\" then cidocCrm()\n else cb \"Unknown ontology: #{ontology}\"\ncatch err\n cb err\n" + "path = require \"path\"\n\nmiss = require \"mississippi\"\nN3 = require \"n3\"\n{ namedNode, quad } = N3.DataFactory\n\ndefaultArgs = { format: \"N-Quads\" }\nargs = (require \"minimist\") process.argv[2..]\n\n{ format } = { defaultArgs..., args... }\n\n[ ontology ] = args._\nprocess.exit 2 unless ontology\n\nowl = require \"./owl\"\ncrm = require \"./cidoc-crm\"\n\nto = miss.pipeline.obj new N3.StreamWriter({ format }), process.stdout\ncb = (err) ->\n console.error err if err?\n process.exitCode = if err? then 1 else 0\n\ncidocCrm = () ->\n ontology = await new Promise (resolve, reject) ->\n miss.pipe crm.stream(),\n crm.parsed(),\n owl.model(resolve),\n miss.to.obj((triple, _, next) -> next())\n (err) -> reject err if err?\n\n source = new N3.StreamParser()\n target = new N3.StreamWriter({ format })\n\n reasoner = miss.duplex.obj target, source\n reasoner.on \"data\", (stmt, _, next) ->\n { subject, predicate, object, graph } = stmt\n for inverse of (ontology.inversed[predicate.value] ? {})\n inverse = namedNode inverse\n reasoner.write quad(object, inverse, subject, graph)\n\n miss.pipe process.stdin, source, cb\n miss.pipe target, process.stdout, cb\n\ntry\n switch ontology\n when \"cidoc-crm\" then cidocCrm()\n else cb \"Unknown ontology: #{ontology}\"\ncatch err\n cb err\n" ] } \ No newline at end of file diff --git a/dist/stream.js b/dist/stream.js index 3a2b52c..45d2cde 100644 --- a/dist/stream.js +++ b/dist/stream.js @@ -30,7 +30,7 @@ getty = require("./getty"); - to = miss.pipeline.obj(N3.StreamWriter({format}), process.stdout); + to = miss.pipeline.obj(new N3.StreamWriter({format}), process.stdout); cb = function(err) { if (err != null) { @@ -63,7 +63,7 @@ if (graph != null) { to = miss.pipeline.obj(nt2nq(graph), to); } - miss.pipe(process.stdin, N3.StreamParser(), to, cb); + miss.pipe(process.stdin, new N3.StreamParser(), to, cb); break; default: cb(`Unknown dataset: ${dataset}`); diff --git a/dist/stream.js.map b/dist/stream.js.map index cf8a0f7..10b9b47 100644 --- a/dist/stream.js.map +++ b/dist/stream.js.map @@ -6,8 +6,8 @@ "lib/stream.coffee" ], "names": [], - "mappings": ";AAAA;AAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,WAAA,EAAA,MAAA,EAAA,KAAA,EAAA,GAAA,EAAA,KAAA,EAAA,SAAA,EAAA,IAAA,EAAA,KAAA,EAAA,IAAA,EAAA,MAAA,EAAA;;EAAA,IAAA,GAAO,OAAA,CAAQ,MAAR;;EAEP,IAAA,GAAO,OAAA,CAAQ,aAAR;;EACP,EAAA,GAAK,OAAA,CAAQ,IAAR;;EAEL,WAAA,GAAc;IAAE,MAAA,EAAQ;EAAV;;EACd,IAAA,GAAO,CAAC,OAAA,CAAQ,UAAR,CAAD,CAAA,CAAqB,OAAO,CAAC,IAAK,SAAlC;;EAEP,CAAA,CAAE,MAAF,EAAU,MAAV,EAAkB,KAAlB,CAAA,GAA4B,CAAE,GAAA,WAAF,EAAkB,GAAA,IAAlB,CAA5B;;EAEA,CAAE,OAAF,CAAA,GAAc,IAAI,CAAC;;EACnB,IAAA,CAAsB,OAAtB;IAAA,OAAO,CAAC,IAAR,CAAa,CAAb,EAAA;;;EAEA,KAAA,GAAQ,OAAA,CAAQ,SAAR;;EACR,SAAA,GAAY,OAAA,CAAQ,aAAR;;EACZ,GAAA,GAAM,OAAA,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AAb,GAAoB;EAFtC;;AAIL,UAAO,OAAP;AAAA,SACS,WADT;MAEQ,IAAI,CAAC,IAAL,CAAU,SAAS,CAAC,MAAV,CAAA,CAAV,EAA8B,SAAS,CAAC,MAAV,CAAA,CAA9B,EAAkD,EAAlD,EAAsD,EAAtD;AADC;AADT,SAGS,KAHT;MAIQ,IAAI,CAAC,IAAL,CAAU,GAAG,CAAC,MAAJ,CAAA,CAAV,EAAwB,GAAG,CAAC,MAAJ,CAAA,CAAxB,EAAsC,EAAtC,EAA0C,EAA1C;AADC;AAHT,SAKS,OALT;MAMQ,EAAA,GAAK,IAAI,CAAC,QAAQ,CAAC,GAAd,CAAkB,KAAK,CAAC,MAAN,CAAA,CAAlB,EAAkC,EAAlC;MACL,MAAA;AAAS,gBAAO,MAAP;AAAA,eACA,UADA;mBACgB,KAAK,CAAC;AADtB,eAEA,WAFA;mBAEiB,KAAK,CAAC;AAFvB;;MAIT,KAAK,CAAC,GAAN,CAAU,EAAV,EAAc,MAAd;MACA,EAAE,CAAC,EAAH,CAAM,OAAN,EAAe,EAAf;AAPC;AALT,SAaS,GAbT;MAcQ,IAA2C,aAA3C;QAAA,EAAA,GAAK,IAAI,CAAC,QAAQ,CAAC,GAAd,CAAkB,KAAA,CAAM,KAAN,CAAlB,EAAgC,EAAhC,EAAL;;MACA,IAAI,CAAC,IAAL,CAAU,OAAO,CAAC,KAAlB,EAAyB,IAAI,EAAE,CAAC,YAAP,CAAA,CAAzB,EAAgD,EAAhD,EAAoD,EAApD;AAFC;AAbT;MAiBQ,EAAA,CAAG,CAAA,iBAAA,CAAA,CAAoB,OAApB,CAAA,CAAH;AAjBR;AAvBA", "sourcesContent": [ - "path = require \"path\"\n\nmiss = require \"mississippi\"\nN3 = require \"n3\"\n\ndefaultArgs = { format: \"N-Quads\" }\nargs = (require \"minimist\") process.argv[2..]\n\n{ format, subset, graph } = { defaultArgs..., args... }\n\n[ dataset ] = args._\nprocess.exit 2 unless dataset\n\nnt2nq = require \"./nt2nq\"\niconclass = require \"./iconclass\"\ngnd = require \"./gnd\"\ngetty = require \"./getty\"\n\nto = miss.pipeline.obj N3.StreamWriter({ format }), process.stdout\ncb = (err) ->\n console.error err if err?\n process.exitCode = if err? then 1 else 0\n\nswitch dataset\n when \"iconclass\"\n miss.pipe iconclass.stream(), iconclass.parsed(), to, cb\n when \"gnd\"\n miss.pipe gnd.stream(), gnd.parsed(), to, cb\n when \"getty\"\n to = miss.pipeline.obj getty.parsed(), to\n subset = switch subset\n when \"subjects\" then getty.subjects\n when \"hierarchy\" then getty.hierarchy\n\n getty.aat to, subset\n to.on \"error\", cb\n when \"-\"\n to = miss.pipeline.obj nt2nq(graph), to if graph?\n miss.pipe process.stdin, N3.StreamParser(), to, cb\n else\n cb \"Unknown dataset: #{dataset}\"" + "path = require \"path\"\n\nmiss = require \"mississippi\"\nN3 = require \"n3\"\n\ndefaultArgs = { format: \"N-Quads\" }\nargs = (require \"minimist\") process.argv[2..]\n\n{ format, subset, graph } = { defaultArgs..., args... }\n\n[ dataset ] = args._\nprocess.exit 2 unless dataset\n\nnt2nq = require \"./nt2nq\"\niconclass = require \"./iconclass\"\ngnd = require \"./gnd\"\ngetty = require \"./getty\"\n\nto = miss.pipeline.obj new N3.StreamWriter({ format }), process.stdout\ncb = (err) ->\n console.error err if err?\n process.exitCode = if err? then 1 else 0\n\nswitch dataset\n when \"iconclass\"\n miss.pipe iconclass.stream(), iconclass.parsed(), to, cb\n when \"gnd\"\n miss.pipe gnd.stream(), gnd.parsed(), to, cb\n when \"getty\"\n to = miss.pipeline.obj getty.parsed(), to\n subset = switch subset\n when \"subjects\" then getty.subjects\n when \"hierarchy\" then getty.hierarchy\n\n getty.aat to, subset\n to.on \"error\", cb\n when \"-\"\n to = miss.pipeline.obj nt2nq(graph), to if graph?\n miss.pipe process.stdin, new N3.StreamParser(), to, cb\n else\n cb \"Unknown dataset: #{dataset}\"" ] } \ No newline at end of file diff --git a/lib/getty.coffee b/lib/getty.coffee index 1538925..59aa7f3 100644 --- a/lib/getty.coffee +++ b/lib/getty.coffee @@ -42,4 +42,4 @@ module.exports = hierarchy: aatFilter "1Subjects", "2Terms", "HierarchicalRels" parsed: () -> - miss.pipeline.obj N3.StreamParser(), (nt2nq "http://vocab.getty.edu/aat") \ No newline at end of file + miss.pipeline.obj new N3.StreamParser(), (nt2nq "http://vocab.getty.edu/aat") \ No newline at end of file diff --git a/lib/gnd.coffee b/lib/gnd.coffee index 361fe57..3219437 100644 --- a/lib/gnd.coffee +++ b/lib/gnd.coffee @@ -12,4 +12,4 @@ module.exports = stream: (cb) -> miss.pipe request({ url }), zlib.createGunzip(), cb parsed: () -> - miss.pipeline.obj N3.StreamParser(), (nt2nq "http://d-nb.info/gnd/") + miss.pipeline.obj new N3.StreamParser(), (nt2nq "http://d-nb.info/gnd/") diff --git a/lib/iconclass.coffee b/lib/iconclass.coffee index 5b44b2d..0e20031 100644 --- a/lib/iconclass.coffee +++ b/lib/iconclass.coffee @@ -13,4 +13,4 @@ module.exports = miss.pipe (request { url }), zlib.createGunzip(), cb parsed: () -> - miss.pipeline.obj N3.StreamParser(), (nt2nq "http://iconclass.org/") + miss.pipeline.obj new N3.StreamParser(), (nt2nq "http://iconclass.org/") diff --git a/lib/reason.coffee b/lib/reason.coffee index aeb4f6f..3c920bc 100644 --- a/lib/reason.coffee +++ b/lib/reason.coffee @@ -15,7 +15,7 @@ process.exit 2 unless ontology owl = require "./owl" crm = require "./cidoc-crm" -to = miss.pipeline.obj N3.StreamWriter({ format }), process.stdout +to = miss.pipeline.obj new N3.StreamWriter({ format }), process.stdout cb = (err) -> console.error err if err? process.exitCode = if err? then 1 else 0 @@ -28,8 +28,8 @@ cidocCrm = () -> miss.to.obj((triple, _, next) -> next()) (err) -> reject err if err? - source = N3.StreamParser() - target = N3.StreamWriter({ format }) + source = new N3.StreamParser() + target = new N3.StreamWriter({ format }) reasoner = miss.duplex.obj target, source reasoner.on "data", (stmt, _, next) -> diff --git a/lib/stream.coffee b/lib/stream.coffee index 59ebd32..4ab340b 100644 --- a/lib/stream.coffee +++ b/lib/stream.coffee @@ -16,7 +16,7 @@ iconclass = require "./iconclass" gnd = require "./gnd" getty = require "./getty" -to = miss.pipeline.obj N3.StreamWriter({ format }), process.stdout +to = miss.pipeline.obj new N3.StreamWriter({ format }), process.stdout cb = (err) -> console.error err if err? process.exitCode = if err? then 1 else 0 @@ -36,6 +36,6 @@ switch dataset to.on "error", cb when "-" to = miss.pipeline.obj nt2nq(graph), to if graph? - miss.pipe process.stdin, N3.StreamParser(), to, cb + miss.pipe process.stdin, new N3.StreamParser(), to, cb else cb "Unknown dataset: #{dataset}" \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 24861bf..cb645ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "rdf-tools", - "version": "3.1.1", + "version": "3.1.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -651,9 +651,9 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "n3": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/n3/-/n3-1.0.0-beta.1.tgz", - "integrity": "sha512-A9SAvNIkqxNEsZBjxnEwL7pacqGR4zbE25MfXkdZiroqo/2wnsiqx1eQFDsbQXgyxcDtwATaaMf+VT2I474uWA==" + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.3.5.tgz", + "integrity": "sha512-McWb1tCWGGAmHeGEakqZj/UqxQR9cpEYZ/JivBj59YfiOAuaIWZxu0B+jnhbCwCZ2AsxdgQ5Dq8fehIJpYQaMQ==" }, "oauth-sign": { "version": "0.8.2", diff --git a/package.json b/package.json index 8a1f843..45cecd6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rdf-tools", - "version": "3.1.3", + "version": "3.1.4", "description": "Replication of RDF Databases", "license": "BSD", "private": true, @@ -23,7 +23,7 @@ "minimist": "^1.2.0", "mississippi": "^3.0.0", "mocha": "^5.2.0", - "n3": "^1.0.0-beta.1", + "n3": "1.3.5", "rdfxml-streaming-parser": "^1.0.0", "request": "^2.85.0", "unzipper": "^0.10.5"