diff --git a/bin/rabel b/bin/rabel new file mode 100755 index 0000000..d6c4f7a --- /dev/null +++ b/bin/rabel @@ -0,0 +1,258 @@ +// #!/usr/bin/env node + +'use strict'; + +/** COMMAND LINE TOOL FOR LINKED DATA: rabel + */ + +let path = require('path') +let program = require('commander') +let args = [path.join(__dirname, '_mocha')] +let fs = require('fs') +let resolve = path.resolve +let exists = fs.existsSync || path.existsSync +let join = path.join +let cwd = process.cwd() +let rabel = require('../'); +var $rdf = require('rdflib') +var kb = $rdf.graph() +var fetcher = $rdf.fetcher(kb, {a:1}) +var reportDocument, targetDocument +var contentType = 'text/turtle' +// var ShapeChecker = require('./../shacl-check/src/shacl-check.js') + +var base = 'file://' + process.cwd() + '/' +var helpMessage = +'Utilty data converter for linked data\n' + +'\n' + +'Commands in unix option form are executed left to right, and include:\n' + +'\n' + +'-base=rrrr Set the current base URI (relative URI, default is ' + base + ')\n' + +'-clear Clear the current store\n' + +'-dump Serialize the current store in current content type\n' + +'-format=cccc Set the current content-type\n' + +'-help This message \n' + +'-in=uri Load a web resource or file\n' + +'-out=filename Output in eth current content type\n' + +'-report=file set the report file destination for future validation\n' + +'-size Give the current store\n' + +'-spray=base Write out linked data to lots of different linked files CAREFUL!\n' + +'-test=manifest Run tests as described in the test manifest\n' + +'-validate=shapeFile Run a SHACL validator on the data loaded by previous in=x\n' + +'-version Give the version of this program\n' + +'\n' + +'Formats are given as MIME types, such as text/turtle (default), application/rdf+xml, etc\n' + +'In input only, can parse application/xml, with smarts about IANA and GPX files.\n' + +'\n' + 'Default base URI: ' + base + '\n' + +// Load mocha.opts into process.argv +// Must be loaded here to handle node-specific options +getOptions() + +function getOptions () { + var optsPath = process.argv.indexOf('--opts') === -1 + ? 'test/mocha.opts' + : process.argv[process.argv.indexOf('--opts') + 1] + + try { + var opts = fs.readFileSync(optsPath, 'utf8') + .replace(/\\\s/g, '%20') + .split(/\s/) + .filter(Boolean) + .map(function (value) { + return value.replace(/%20/g, ' ') + }) + + process.argv = process.argv + .slice(0, 2) + .concat(opts.concat(process.argv.slice(2))) + } catch (err) { + // ignore + } + +} + +var exitMessage = function (message) { + throw Error(message) +} + +var doNext = function (remaining) { + + var loadDocument = function (right) { + + var doc = $rdf.sym($rdf.uri.join(right, base)) + targetDocument = targetDocument || doc // remember first doc + // console.log("Document is " + targetDocument) + if (contentType === 'application/xml') { + rabel.readXML(doc, {}, function (ok, body, xhr) { + rabel.check(ok, body, xhr ? xhr.status : undefined) + console.log('Loaded XML ' + targetDocument) + doNext(remaining) + }, kb) // target, kb, base, contentType, callback + } else { + fetcher.nowOrWhenFetched(doc, {}, function (ok, body, xhr) { + rabel.check(ok, body, xhr ? xhr.status : undefined) + console.log('Loaded ' + doc) + doNext(remaining) + }) // target, kb, base, contentType, callback + } + } + // Writes the data we have in the store under targetDocument out to file doc + var writeDocument = function (targetDocument, doc) { + console.log(' writing ... ' + doc) + try { + var outText = $rdf.serialize(targetDocument, kb, targetDocument.uri, contentType) + } catch (e) { + exitMessage('Error in serializer: ' + e) + } + if (doc.uri.slice(0, 8) !== 'file:///') { + exitMessage('Can only write files just now, sorry: ' + doc.uri) + } + var fileName = doc.uri.slice(7) // + fs.writeFile(fileName, outText, function (err) { + if (err) { + exitMessage('Error writing file ' + doc + ' :' + err) + } + console.log('Written ' + doc) + doNext(remaining) + }) + } + + while (remaining.length) { + let arg = remaining.shift() + let command = arg.split('=') + let left = command[0] + let right = command[1] + + if (left.slice(0, 1) !== '-') { + loadDocument(arg) + return + } + let doc + switch (left) { + case '-base': + base = $rdf.uri.join(right, base) + break + + case '-clear': + kb = $rdf.graph() + break + + case '-dump': + console.log('Serialize ' + targetDocument + ' as ' + contentType) + try { + var out = $rdf.serialize(targetDocument, kb, targetDocument.uri, contentType) + } catch (e) { + exitMessage('Error in serializer: ' + e) + } + console.log('Result: ' + out) + break + + case '-format': + contentType = right + break + + case '-report': + reportDocument = $rdf.sym($rdf.uri.join(right, base)) + break + + case '-validate': + if (!targetDocument) { + console.log('Load data to be validated before -validate=shapefile') + process.exit(1) + } + let shapeDoc = $rdf.sym($rdf.uri.join(right, base)) + console.log('shapeDoc ' + shapeDoc) + fetcher.nowOrWhenFetched(shapeDoc, {}, function (ok, body, xhr) { + const sh = $rdf.Namespace('http://www.w3.org/ns/shacl#') + if (!ok) { + exitMessage("Error loading " + doc + ": " + body) + } else { + console.log("Loaded shape file " + shapeDoc) + let checker = new ShapeChecker(kb, shapeDoc, targetDocument, reportDocument) + checker.execute() + console.log('Validation done.') + let count = kb.each(null, RDF('type'), sh('ValidationResult')).length + let levels = [ 'Info', 'Warning', 'Violation'] + .map( z => z + ': ' + kb.each(null, sh('resultSeverity'), sh(z)).length ) + .join(', ') + console.log('Validation done, ' + count + ' issues. ' + levels) + console.log('' + kb.each(null, null, null, reportDocument).length + ' triples in report.') + targetDocument = reportDocument + writeDocument(reportDocument, reportDocument) // and move on to next command + } + }) + return + + case '-help': + case '--help': + console.log(helpMessage) + break + + case '-in': + loadDocument(right) + return + + case '-out': + doc = $rdf.sym($rdf.uri.join(right, base)) + writeDocument(targetDocument, doc) + return + + case '-spray': + var root = $rdf.sym($rdf.uri.join(right, base)) // go back to folder + try { + rabel.spray(root.uri, targetDocument, exitMessage, kb, function () { + doNext(remaining) + }) + } catch (e) { + let throwMe = Error('Error in spray: ' + e) + throwMe.stack = e.stack + throw throwMe + } + return + + case '-size': + console.log(kb.statements.length + ' triples') + doNext(remaining) + break + + case '-test': + doc = $rdf.sym($rdf.uri.join(right, base)) + console.log("Loading " + doc) + fetcher.nowOrWhenFetched(doc, {}, function(ok, message){ + if (!ok) exitMessage("Error loading tests " + doc + ": " + message) + runTests(doc).then(function(issues){ + console.log("DONE ALL TESTS. Issue array length: " + issues.length) + issues.forEach(function(issue){ + console.log(' Test: ' + issue.test) + }) + doNext(remaining) + }) + }) + return + + case '-version': + console.log('rdflib built: ' + $rdf.buildTime) + break + + default: + console.log('Unknown command: ' + left) + console.log(helpMessage) + process.exit(1) + } + } +/* + (function wait () { + if (true) setTimeout(wait, 3000); + })(); +*/ + process.exit(0) // No!!! node must wait for stuff to finish + // process.on('exit', function() { process.exit(exitCode); }); +} + +try { + doNext(process.argv.slice(2)) +} catch (e) { + console.error('stack' in e ? e.stack : e) + process.exit(4) +} diff --git a/rabel.js b/index.js old mode 100755 new mode 100644 similarity index 63% rename from rabel.js rename to index.js index 319fb4e..f87a11e --- a/rabel.js +++ b/index.js @@ -5,48 +5,20 @@ // // -var base = 'file://' + process.cwd() + '/' -var helpMessage = -'Utilty data converter for linked data\n' + -'\n' + -'Commands in unix option form are executed left to right, and include:\n' + -'\n' + -'-base=rrrr Set the current base URI (relative URI, default is ' + base + ')\n' + -'-clear Clear the current store\n' + -'-dump Serialize the current store in current content type\n' + -'-format=cccc Set the current content-type\n' + -'-help This message \n' + -'-in=uri Load a web resource or file\n' + -'-out=filename Output in eth current content type\n' + -'-report=file set the report file destination for future validation\n' + -'-size Give the current store\n' + -'-spray=base Write out linked data to lots of different linked files CAREFUL!\n' + -'-test=manifest Run tests as described in the test manifest\n' + -'-validate=shapeFile Run a SHACL validator on the data loaded by previous in=x\n' + -'-version Give the version of this program\n' + -'\n' + -'Formats are given as MIME types, such as text/turtle (default), application/rdf+xml, etc\n' + -'In input only, can parse application/xml, with smarts about IANA and GPX files.\n' + -'\n' + 'Default base URI: ' + base + '\n' - var $rdf = require('rdflib') var fs = require('fs') -var ShapeChecker = require('./../shacl-check/src/shacl-check.js') - -var kb = $rdf.graph() -var fetcher = $rdf.fetcher(kb) +var ensurePath = require('fs-extra').ensureDirSync +var path = require('path') +const ShapeChecker = require('shacl-check') +// var ShapeChecker = require('./../shacl-check/src/shacl-check.js') const RDF = $rdf.Namespace('http://www.w3.org/1999/02/22-rdf-syntax-ns#') const a = RDF('type') const mf = $rdf.Namespace('http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#') const sht = $rdf.Namespace('http://www.w3.org/ns/shacl/test-suite#') - -var contentType = 'text/turtle' -var reportDocument, targetDocument - var testHandlers = [] -var registerTest = function(klass, handler){ +var registerTest = function (klass, handler) { testHandlers[klass.uri || klass] = handler } @@ -57,175 +29,6 @@ var check = function (ok, message, status) { } } -var exitMessage = function (message) { - console.log(message) - process.exit(4) -} - -var doNext = function (remaining) { - - var loadDocument = function (right) { - - var doc = $rdf.sym($rdf.uri.join(right, base)) - targetDocument = targetDocument || doc // remember first doc - // console.log("Document is " + targetDocument) - if (contentType === 'application/xml') { - readXML(doc, {}, function (ok, body, xhr) { - check(ok, body, xhr ? xhr.status : undefined) - console.log('Loaded XML ' + targetDocument) - doNext(remaining) - }) // target, kb, base, contentType, callback - } else { - fetcher.nowOrWhenFetched(doc, {}, function (ok, body, xhr) { - check(ok, body, xhr ? xhr.status : undefined) - console.log('Loaded ' + doc) - doNext(remaining) - }) // target, kb, base, contentType, callback - } - } - // Writes the data we have in the store under targetDocument out to file doc - var writeDocument = function (targetDocument, doc) { - console.log(' writing ... ' + doc) - try { - var outText = $rdf.serialize(targetDocument, kb, targetDocument.uri, contentType) - } catch (e) { - exitMessage('Error in serializer: ' + e) - } - if (doc.uri.slice(0, 8) !== 'file:///') { - exitMessage('Can only write files just now, sorry: ' + doc.uri) - } - var fileName = doc.uri.slice(7) // - fs.writeFile(fileName, outText, function (err) { - if (err) { - exitMessage('Error writing file ' + doc + ' :' + err) - } - console.log('Written ' + doc) - doNext(remaining) - }) - } - - while (remaining.length) { - let arg = remaining.shift() - let command = arg.split('=') - let left = command[0] - let right = command[1] - - if (left.slice(0, 1) !== '-') { - loadDocument(arg) - return - } - let doc - switch (left) { - case '-base': - base = $rdf.uri.join(right, base) - break - - case '-clear': - kb = $rdf.graph() - break - - case '-dump': - console.log('Serialize ' + targetDocument + ' as ' + contentType) - try { - var out = $rdf.serialize(targetDocument, kb, targetDocument.uri, contentType) - } catch (e) { - exitMessage('Error in serializer: ' + e) - } - console.log('Result: ' + out) - break - - case '-format': - contentType = right - break - - case '-report': - reportDocument = $rdf.sym($rdf.uri.join(right, base)) - break - - case '-validate': - if (!targetDocument) { - console.log('Load data to be validated before -validate=shapefile') - process.exit(1) - } - let shapeDoc = $rdf.sym($rdf.uri.join(right, base)) - console.log('shapeDoc ' + shapeDoc) - fetcher.nowOrWhenFetched(shapeDoc, {}, function (ok, body, xhr) { - if (!ok) { - exitMessage("Error loading " + doc + ": " + body) - } else { - console.log("Loaded shape file " + shapeDoc) - let checker = new ShapeChecker(kb, shapeDoc, targetDocument, reportDocument) - checker.execute() - console.log('Validation done.') - targetDocument = reportDocument - writeDocument(reportDocument, reportDocument) // and move on to next command - } - }) - return - - case '-help': - console.log(helpMessage) - break - - case '-in': - loadDocument(right) - return - - case '-out': - doc = $rdf.sym($rdf.uri.join(right, base)) - writeDocument(targetDocument, doc) - return - - case '-spray': - var root = $rdf.sym($rdf.uri.join(right, base)) // go back to folder - if (root.uri.slice(0, 8) !== 'file:///') { - exitMessage('Can only write files just now, sorry: ' + doc.uri) - } - try { - spray(root.uri, targetDocument) - } catch (e) { - exitMessage('Error in spray: ' + e) - } - return - - case '-size': - console.log(kb.statements.length + ' triples') - doNext(remaining) - break - - case '-test': - doc = $rdf.sym($rdf.uri.join(right, base)) - console.log("Loading " + doc) - fetcher.nowOrWhenFetched(doc, {}, function(ok, message){ - if (!ok) exitMessage("Error loading tests " + doc + ": " + message) - runTests(doc).then(function(issues){ - console.log("DONE ALL TESTS. Issue array length: " + issues.length) - issues.forEach(function(issue){ - console.log(' Test: ' + issue.test) - }) - doNext(remaining) - }) - }) - return - - case '-version': - console.log('rdflib built: ' + $rdf.buildTime) - break - - default: - console.log('Unknown command: ' + left) - console.log(helpMessage) - process.exit(1) - } - } -/* - (function wait () { - if (true) setTimeout(wait, 3000); - })(); -*/ - process.exit(0) // No!!! node must wait for stuff to finish -} - var statementsToTurtle = function (kb, statements, base) { var sz = new $rdf.Serializer(kb) sz.suggestNamespaces(kb.namespaces) @@ -235,7 +38,8 @@ var statementsToTurtle = function (kb, statements, base) { } // Returns a promise of an issues list -var validationTest = function(test){ +var validationTest = function (test, kb) { + var actualGraph, expected, shapesGraph, action, dataGraph const indent = ' ' var forwardTree = function (x) { var sts = [] @@ -253,17 +57,17 @@ var validationTest = function(test){ } console.log(indent + 'Validation test ' + test) action = kb.the(test, mf('action')) - if (!action) throw new Error("Need action") + if (!action) throw new Error('Need action') dataGraph = kb.the(action, sht('dataGraph')) shapesGraph = kb.the(action, sht('shapesGraph')) // A doc actualGraph = kb.sym(test.uri + '__results') - if (!dataGraph || !shapesGraph || !actualGraph) throw new Error("Need all params") + if (!dataGraph || !shapesGraph || !actualGraph) throw new Error('Need all params') let opts = { noResultMessage: true } // must be excludded from tests ;(new ShapeChecker(kb, shapesGraph, dataGraph, actualGraph, opts)).execute() expected = kb.the(test, mf('result')) // Node var expectedDoc = kb.statementsMatching(expected)[0].graph // whare is that data anyway? - var base = expected.doc? expected.doc().uri : dataGraph.uri + // var base = expected.doc ? expected.doc().uri : dataGraph.uri let expectedStatements = forwardTree(expected) console.log(indent + 'Expected statements: ' + expectedStatements.length) let expectedString = statementsToTurtle(kb, expectedStatements, expectedDoc.uri) @@ -277,19 +81,23 @@ var validationTest = function(test){ console.log(indent + ' -> FAILED, expected:') let ul = '\n__________________________________________________\n' console.log(ul + expectedString + ul + actualString + ul) - issues.push({ test, expectedString, actualString, // generic - dataGraph, shapesGraph, actualGraph}) // test type specific + issues.push({ test, + expectedString, + actualString, // generic + dataGraph, + shapesGraph, + actualGraph}) // test type specific } return Promise.resolve(issues) } registerTest(sht('Validate'), validationTest) // Returns promise of issues array -var doAppropriateTest = function (test){ - return new Promise(function(resolve, reject){ +var doAppropriateTest = function (test, kb) { + return new Promise(function (resolve, reject) { console.log(' -- Do approp test for ' + test) var testDoc - if (test.uri.includes('#')){ + if (test.uri.includes('#')) { testDoc = test.doc() } else { if (test.uri.endsWith('.ttl')) { @@ -298,14 +106,13 @@ var doAppropriateTest = function (test){ testDoc = kb.sym(test.uri + '.ttl') /// needed for shacl tests in file space } } - console.log( "loading... " + testDoc) - fetcher.load(testDoc).then(function (xhr) { + console.log('loading... ' + testDoc) + kb.fetcher.load(testDoc).then(function (xhr) { var klasses = kb.each(test, a) - var ppp = [] - for (let j=0; j doAppropriateTest(test, kb)) } let includes = kb.each(doc, mf('include')) - console.log(indent + ' includes: ' + includes.length + ' for ' + doc ) + console.log(indent + ' includes: ' + includes.length + ' for ' + doc) promises = promises.concat(includes.map(runTests)) - Promise.all(promises).then(function(issues){ - console.log('Done with ' + doc + ': ' + issues ? issues.length : "ISSUES ERROR @@@") + Promise.all(promises).then(function (issues) { + console.log('Done with ' + doc + ': ' + issues ? issues.length : 'ISSUES ERROR @@@') resolve(issues) // @@ mayeb have to concat subarrays }) .catch(function (e) { - const message = "ERROR in runTests loading " + doc + ': ' + e + const message = 'ERROR in runTests loading ' + doc + ': ' + e console.log(message) console.log('stack: ' + e.strack.toString()) reject(new Error(message)) @@ -362,9 +170,9 @@ var runTests = function (doc) { // Caution: use with care! This will build a complete linked data // database of linked files from master data -var spray = function (rootURI, original, doubleLinked) { +var spray = function (rootURI, original, exitMessage, kb, finished) { var docs = [] - console.log('Spray: Root is ' + rootURI) + console.log('Spray: Stripping ' + rootURI + ' from ' + original.value) var docURI var check = function (x) { // console.log('check x= ' + x) @@ -381,7 +189,9 @@ var spray = function (rootURI, original, doubleLinked) { } kb.statements.forEach(function (st) { check(st.subject); check(st.object) }) // Not predicates + var waitingFor = 0 for (docURI in docs) { + ++waitingFor var sts = [] console.log('Document: ' + docURI) for (var uri in docs[docURI]) { @@ -393,23 +203,26 @@ var spray = function (rootURI, original, doubleLinked) { sts = sts.concat(connected) } console.log('We have ' + sts.length + ' total statements in document ' + docURI) - var fileName = docURI.slice(7) + '.ttl' + var fileName = docURI.slice(7) + '.ttl' var out = statementsToTurtle(kb, sts, docURI) console.log('To be written to ' + fileName + ':\n' + out + '\n') - var foo = function (fileName, out){ + var foo = function (fileName, out) { var f = fileName + ensurePath(path.dirname(f)) fs.writeFile(f, out, function (err) { if (err) { - exitMessage("***** Error writing file <" + f + "> :" + err) + exitMessage('***** Error writing file <' + f + '> :' + err) + } + console.log('Written ok: ' + f) + if (--waitingFor === 0) { + finished() } - console.log("Written ok: " + f) }) } foo(fileName, out) - } } @@ -417,16 +230,17 @@ var spray = function (rootURI, original, doubleLinked) { // // Contains namespace-trigged specials for IANA registry data // -var readXML = function (targetDocument, options, callback) { - var uri = targetDocument.uri - var file = $rdf.Util.uri.refTo(base, uri) +var readXML = function (targetDocument, options, callbackFunction, kb) { + const uri = targetDocument.uri + const base = 'file:///' + const file = $rdf.Util.uri.refTo(base, uri) var ignore = { 7: true } fs.readFile(file, options.encoding || 'utf8', function (err, data) { var defaultNamespace = null if (err) { console.log('File read FAIL, error: ' + err) - return callback(false, err) + return callbackFunction(false, err) } console.log('File read ok, length: ' + data.length) var local = $rdf.uri.join(file, base) + '#' @@ -462,15 +276,15 @@ var readXML = function (targetDocument, options, callback) { return text } - var randomNamedNode = function(){ + var randomNamedNode = function () { return kb.sym(root.uri + '#n' + (nextId++)) } // ///////////////////////// GPX SPECIAL - var GPX_predicateMap = { + var predicateMapForGPX = { time: { uri: 'http://www.w3.org/2003/01/geo/wgs84_pos#time', - type: 'http://www.w3.org/2001/XMLSchema#dateTime' }, + type: 'http://www.w3.org/2001/XMLSchema#dateTime' }, lat: { uri: 'http://www.w3.org/2003/01/geo/wgs84_pos#lat' }, lon: { uri: 'http://www.w3.org/2003/01/geo/wgs84_pos#long' }, @@ -479,11 +293,11 @@ var readXML = function (targetDocument, options, callback) { // ///////////////////////// IANA SPECIAL - var IANA_predicateMap = { + var predicateMapForIANA = { created: { uri: 'http://purl.org/dc/terms/created', - type: 'http://www.w3.org/2001/XMLSchema#date' }, // @@CHECK + type: 'http://www.w3.org/2001/XMLSchema#date' }, // @@CHECK date: { uri: 'http://purl.org/dc/terms/date', - type: 'http://www.w3.org/2001/XMLSchema#date' }, // @@CHECK + type: 'http://www.w3.org/2001/XMLSchema#date' }, // @@CHECK description: { uri: 'http://purl.org/dc/terms/description' }, // @@CHECK title: { uri: 'http://purl.org/dc/terms/title' }, value: { uri: 'http://www.w3.org/2000/01/rdf-schema#label' }, @@ -560,7 +374,7 @@ var readXML = function (targetDocument, options, callback) { // console.log('@@ 3 magicIANAsubject tag: ' + ele.tagName + ' parent: ' + parent.tagName ) if (ele.tagName === 'record' && parent.tagName === 'registry') { for (let i = 0; i < ch.length; i++) { - var child = ch[i] + let child = ch[i] if (child.nodeName === 'name') { return kb.sym($rdf.uri.join(parent.getAttribute('id') + '/' + child.textContent, local) + '#Resource') } @@ -607,11 +421,11 @@ var readXML = function (targetDocument, options, callback) { if (defaultNamespace === 'http://www.iana.org/assignments') { options.iana = true ns = 'https://www.w3.org/ns/assignments/reg#' - options.predicateMap = IANA_predicateMap + options.predicateMap = predicateMapForIANA console.log('IANA MODE') } else if (defaultNamespace === 'http://www.topografix.com/GPX/1/1') { ns = 'http://hackdiary.com/ns/gps#' // @@@ u - options.predicateMap = GPX_predicateMap + options.predicateMap = predicateMapForGPX console.log('GPX Mode') } continue @@ -650,12 +464,12 @@ var readXML = function (targetDocument, options, callback) { if (child.attributes && child.getAttribute('id')) { if (options.iana && child.nodeName === 'person') { let who = child.getAttribute('id') - if (!who) throw new Error("Person has no ID") + if (!who) throw new Error('Person has no ID') obj = kb.sym($rdf.uri.join('../person/', local) + who + '#') console.log(indent + 'Person is ' + obj) } else { let who = child.getAttribute('id') - if (!who) throw new Error("Thing has no ID") + if (!who) throw new Error('Thing has no ID') obj = kb.sym(local + child.getAttribute('id')) console.log(indent + 'Local thing is ' + obj) } @@ -664,7 +478,7 @@ var readXML = function (targetDocument, options, callback) { console.log(indent + 'Magic IANA URI ' + obj) // kb.add(obj, RDF('type'), RDF('Property') , targetDocument) } else { - if (options.iana && child.nodeName === 'uri'){ + if (options.iana && child.nodeName === 'uri') { obj = kb.sym(justTextContent(child)) } else if (options.iana && child.nodeName === 'people') { obj = randomNamedNode() @@ -680,10 +494,14 @@ var readXML = function (targetDocument, options, callback) { } } convert(doc, root) - callback(true) + callbackFunction(true) }) } -doNext(process.argv.slice(2)) - // ends + +module.exports = { + check: check, + spray: spray, + readXML: readXML +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..cafc3d4 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1455 @@ +{ + "name": "rabel", + "version": "1.0.2", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/runtime": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.5.tgz", + "integrity": "sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMsDf2s7KvDL4/YHgKyvcS3g9CJQ==", + "requires": { + "regenerator-runtime": "^0.13.2" + } + }, + "@solid/cli": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@solid/cli/-/cli-0.1.0.tgz", + "integrity": "sha512-+VYDgDxsAKa48MGnoaX2CUwh0gLrTdqYY6lrxxWGwCHiFChGsg95RRbHOYz9c97+QcCltcHpMZ2AelGZrU673A==", + "requires": { + "@trust/oidc-rp": "0.6.0" + } + }, + "@solid/jose": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@solid/jose/-/jose-0.1.8.tgz", + "integrity": "sha512-JuP3z2Yuyolv7P0w7MPhjWltWbVzV0vHBFw+ZhxG2v2WOPdbGT+CvUMhCMdMG/csavceV+IpwMXMybMd8nC4sA==", + "requires": { + "@trust/json-document": "^0.1.4", + "@trust/webcrypto": "^0.9.2", + "base64url": "^3.0.0", + "text-encoding": "^0.6.4" + }, + "dependencies": { + "@trust/webcrypto": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@trust/webcrypto/-/webcrypto-0.9.2.tgz", + "integrity": "sha512-5iMAVcGYKhqLJGjefB1nzuQSqUJTru0nG4CytpBT/GGp1Piz/MVnj2jORdYf4JBYzggCIa8WZUr2rchP2Ngn/w==", + "requires": { + "@trust/keyto": "^0.3.4", + "base64url": "^3.0.0", + "elliptic": "^6.4.0", + "node-rsa": "^0.4.0", + "text-encoding": "^0.6.1" + } + }, + "base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" + } + } + }, + "@solid/oidc-rp": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@solid/oidc-rp/-/oidc-rp-0.8.0.tgz", + "integrity": "sha512-AAHd+J1IiASDmqDQkU8ou8Gxmc7+VfpcgGFW1rCul/obCsNzSemwvEslxjstK7Yy725HtucoAbZN2BGKujeQAg==", + "requires": { + "@solid/jose": "0.1.8", + "@trust/json-document": "^0.1.4", + "@trust/webcrypto": "0.9.2", + "base64url": "^3.0.0", + "node-fetch": "^2.1.2", + "standard-http-error": "^2.0.1", + "text-encoding": "^0.6.4", + "whatwg-url": "^6.4.1" + }, + "dependencies": { + "@trust/webcrypto": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@trust/webcrypto/-/webcrypto-0.9.2.tgz", + "integrity": "sha512-5iMAVcGYKhqLJGjefB1nzuQSqUJTru0nG4CytpBT/GGp1Piz/MVnj2jORdYf4JBYzggCIa8WZUr2rchP2Ngn/w==", + "requires": { + "@trust/keyto": "^0.3.4", + "base64url": "^3.0.0", + "elliptic": "^6.4.0", + "node-rsa": "^0.4.0", + "text-encoding": "^0.6.1" + } + }, + "base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" + } + } + }, + "@trust/jose": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/@trust/jose/-/jose-0.1.7.tgz", + "integrity": "sha512-JlWY97+Q1pU2CN08Ux5oN1/CXcvxLtQ5YkL4UhgVs4z9TR/+I4rKqhqoZQ0TDGPvCLP1QaT7F6bHbKswbDwgOQ==", + "requires": { + "@trust/json-document": "^0.1.4", + "@trust/webcrypto": "^0.0.2", + "base64url": "^2.0.0", + "text-encoding": "^0.6.1" + }, + "dependencies": { + "@trust/webcrypto": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@trust/webcrypto/-/webcrypto-0.0.2.tgz", + "integrity": "sha1-53xpouYSudOSJRxZZscxaFN+Jmc=", + "requires": { + "base64url": "^2.0.0", + "node-rsa": "^0.4.0", + "pem-jwk": "^1.5.1", + "text-encoding": "^0.6.1" + } + } + } + }, + "@trust/json-document": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@trust/json-document/-/json-document-0.1.4.tgz", + "integrity": "sha1-sgI7HhRbp2hb0fNux7aRKJQAc+k=" + }, + "@trust/keyto": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/@trust/keyto/-/keyto-0.3.7.tgz", + "integrity": "sha512-t5kWWCTkPgg24JWVuCTPMx7l13F7YHdxBeJkT1vmoHjROgiOIEAN8eeY+iRmP1Hwsx+S7U55HyuqSsECr08a8A==", + "requires": { + "asn1.js": "^5.0.1", + "base64url": "^3.0.1", + "elliptic": "^6.4.1" + }, + "dependencies": { + "asn1.js": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.0.1.tgz", + "integrity": "sha512-aO8EaEgbgqq77IEw+1jfx5c9zTbzvkfuRBuZsSsPnTHMkmd5AI4J6OtITLZFa381jReeaQL67J0GBTUu0+ZTVw==", + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + } + } + }, + "@trust/oidc-rp": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@trust/oidc-rp/-/oidc-rp-0.6.0.tgz", + "integrity": "sha512-6PgV0WI+gq6nGMjlg8oSxj7VgmS/m8Y61s6HPNBu3mX/NSVvnrXk+MqqR7KdxlBk84ti65O76HGSRNelJrRbeA==", + "requires": { + "@trust/jose": "^0.1.7", + "@trust/json-document": "^0.1.4", + "@trust/webcrypto": "0.4.0", + "base64url": "^2.0.0", + "node-fetch": "^1.7.3", + "text-encoding": "^0.6.4", + "whatwg-url": "^6.2.1" + }, + "dependencies": { + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + } + } + }, + "@trust/webcrypto": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@trust/webcrypto/-/webcrypto-0.4.0.tgz", + "integrity": "sha1-zIcSyomn5x01P877ZrJwemec9jU=", + "requires": { + "@trust/keyto": "^0.3.0", + "base64url": "^2.0.0", + "node-rsa": "^0.4.0", + "text-encoding": "^0.6.1" + } + }, + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-1.0.3.tgz", + "integrity": "sha1-KBuj7B8kSP52X5Kk7s+IP+E2S1Q=", + "requires": { + "bn.js": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "auth-header": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/auth-header/-/auth-header-1.0.0.tgz", + "integrity": "sha512-CPPazq09YVDUNNVWo4oSPTQmtwIzHusZhQmahCKvIsk0/xH6U3QsMAv3sM+7+Q0B1K2KJ/Q38OND317uXs4NHA==" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base64url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", + "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bn.js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-1.3.0.tgz", + "integrity": "sha1-DbTL+W+PI7dC9by50ap6mZSgXoM=", + "optional": true + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, + "connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "diff": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", + "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "elliptic": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + } + } + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "requires": { + "iconv-lite": "~0.4.13" + } + }, + "es6-promise": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-2.3.0.tgz", + "integrity": "sha1-lu258v2wGZWCKyY92KratnSBgbw=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, + "file-fetch": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/file-fetch/-/file-fetch-1.2.0.tgz", + "integrity": "sha512-DzwKhcH/afS7thk5hao1kVJXIqMNB2pz0DFpjpA5IlIAA0nSqi/fqFQpX++NP9IK+Te7Z1ZxA5KTWKmdzio+tA==", + "requires": { + "concat-stream": "^2.0.0", + "mime-types": "^2.1.17", + "node-fetch": "^2.3.0", + "readable-error": "^1.0.0" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" + }, + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" + }, + "growl": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", + "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "dev": true + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "requires": { + "node-fetch": "^1.0.1", + "whatwg-fetch": ">=0.10.0" + }, + "dependencies": { + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + } + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonld": { + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-0.4.12.tgz", + "integrity": "sha1-oC8gXVNBQU3xtthBTxuWenEgc+g=", + "requires": { + "es6-promise": "^2.0.0", + "pkginfo": "~0.4.0", + "request": "^2.61.0", + "xmldom": "0.1.19" + }, + "dependencies": { + "xmldom": { + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.19.tgz", + "integrity": "sha1-Yx/Ad3bv2EEYvyUXGzftTQdaCrw=" + } + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" + }, + "mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "requires": { + "mime-db": "1.40.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "mocha": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.1.0.tgz", + "integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.11.0", + "debug": "3.1.0", + "diff": "3.3.1", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.3", + "he": "1.1.1", + "mkdirp": "0.5.1", + "supports-color": "4.4.0" + } + }, + "mock-http-server": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/mock-http-server/-/mock-http-server-0.2.0.tgz", + "integrity": "sha1-7e/sDoC+i8oobx4MAN6Nv+vw7JA=", + "dev": true, + "requires": { + "body-parser": "^1.18.1", + "connect": "^3.4.0", + "multiparty": "^4.1.2", + "underscore": "^1.8.3" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multiparty": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/multiparty/-/multiparty-4.2.1.tgz", + "integrity": "sha512-AvESCnNoQlZiOfP9R4mxN8M9csy2L16EIbWIkt3l4FuGti9kXBS8QVzlfyg4HEnarJhrzZilgNFlZtqmoiAIIA==", + "dev": true, + "requires": { + "fd-slicer": "1.1.0", + "http-errors": "~1.7.0", + "safe-buffer": "5.1.2", + "uid-safe": "2.1.5" + } + }, + "n3": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/n3/-/n3-0.4.5.tgz", + "integrity": "sha1-W3DTq2ohyejUyb2io9TZCQm+tQg=" + }, + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" + }, + "node-forge": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.8.3.tgz", + "integrity": "sha512-5lv9UKmvTBog+m4AWL8XpZnr3WbNKxYL2M77i903ylY/huJIooSTDHyUWQ/OppFuKQpAGMk6qNtDymSJNRIEIg==" + }, + "node-rsa": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/node-rsa/-/node-rsa-0.4.2.tgz", + "integrity": "sha1-1jkXKewWqDDtWjgEKzFX0tXXJTA=", + "requires": { + "asn1": "0.2.3" + }, + "dependencies": { + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + } + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "pem-jwk": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pem-jwk/-/pem-jwk-1.5.1.tgz", + "integrity": "sha1-eoY3/S9nqCflfAxC4cI8P9Us+wE=", + "requires": { + "asn1.js": "1.0.3" + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pkginfo": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", + "integrity": "sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "psl": { + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "random-bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", + "integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs=", + "dev": true + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "rdf-canonize": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/rdf-canonize/-/rdf-canonize-1.0.3.tgz", + "integrity": "sha512-piLMOB5Q6LJSVx2XzmdpHktYVb8TmVTy8coXJBFtdkcMC96DknZOuzpAYqCWx2ERZX7xEW+mMi8/wDuMJS/95w==", + "requires": { + "node-forge": "^0.8.1", + "semver": "^5.6.0" + } + }, + "rdflib": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/rdflib/-/rdflib-0.20.1.tgz", + "integrity": "sha512-5G1t7rURqPdsYE+mjpDW2e9/H19XFMuChTIjPFPtH2tI0fma+xlJYwrSgmd1aOm45SOYKpqwJfTSIvFpmP2n+g==", + "requires": { + "async": "^0.9.x", + "jsonld": "^0.4.5", + "n3": "^0.4.1", + "solid-auth-cli": "^0.1.12", + "solid-auth-client": "^2.3.0", + "xmldom": "^0.1.22" + } + }, + "readable-error": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/readable-error/-/readable-error-1.0.0.tgz", + "integrity": "sha512-CLnInu5bUphmFiZ3pD/BC6+Cg4/BzK6ZMvWfd0b2QMzYo159Z/f/nVFQ9L5IeMrqUxy0EFsp3XJ+BRfLfY13IQ==", + "requires": { + "readable-stream": "^2.3.3" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "readable-stream": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", + "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "regenerator-runtime": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==" + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true + }, + "shacl-check": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/shacl-check/-/shacl-check-1.0.3.tgz", + "integrity": "sha512-ouvSHK2LpEF2JzGq2ic3tI3EUnQS3URwVri8E5f94aMVcrveIr9a4J0vgE3SGwUEHy3Ywl0IKbXQlLQjUdy0TQ==", + "requires": { + "rdflib": ">=0.15.0" + } + }, + "solid-auth-cli": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/solid-auth-cli/-/solid-auth-cli-0.1.13.tgz", + "integrity": "sha512-mRZ4eaWniGd9jLRzSWD3n9EwMfTcmwlfXK5MggIzSQOyXa1XJCWxHnJDL0DWTX5sMi1ovYa6RI4u6TNOzsEZiw==", + "requires": { + "@solid/cli": "^0.1.0", + "async": "^2.6.1", + "file-fetch": "^1.1.1", + "fs": "0.0.1-security", + "isomorphic-fetch": "^2.2.1", + "jsonld": "^1.4.0", + "n3": "^1.0.3" + }, + "dependencies": { + "async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", + "requires": { + "lodash": "^4.17.11" + } + }, + "jsonld": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-1.6.2.tgz", + "integrity": "sha512-eMzFHqhF2kPMrMUjw8+Lz9IF1QkrxTOIfVndkP/OpuoZs31VdDtfDs8mLa5EOC/ROdemFTQGLdYPZbRtmMe2Yw==", + "requires": { + "rdf-canonize": "^1.0.2", + "request": "^2.88.0", + "semver": "^5.6.0", + "xmldom": "0.1.19" + } + }, + "n3": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.1.1.tgz", + "integrity": "sha512-GEJXn+wc0f4l2noP1N/rMUH9Gei1DQ8IDN03eBsH+uQKkNQUOLgL7ZJVaDjY+pP3LmbLxL1LpUg/AvZ7Kc7KVw==" + }, + "xmldom": { + "version": "0.1.19", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.19.tgz", + "integrity": "sha1-Yx/Ad3bv2EEYvyUXGzftTQdaCrw=" + } + } + }, + "solid-auth-client": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/solid-auth-client/-/solid-auth-client-2.3.0.tgz", + "integrity": "sha512-+9RfqC64oWpH4afoWYhCtieuAziFyWiiW/isB9XEV6N+yb2jZ69UCJxpX7iBCpxK0j36bDeisdbp0zHRp/F46A==", + "requires": { + "@babel/runtime": "^7.0.0", + "@solid/oidc-rp": "^0.8.0", + "auth-header": "^1.0.0", + "commander": "^2.11.0", + "isomorphic-fetch": "^2.2.1" + } + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "standard-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/standard-error/-/standard-error-1.1.0.tgz", + "integrity": "sha1-I+UWj6HAggGJ5YEnAaeQWFENDTQ=" + }, + "standard-http-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/standard-http-error/-/standard-http-error-2.0.1.tgz", + "integrity": "sha1-+K6RcuPO+cs40ucIShkl9Xp8NL0=", + "requires": { + "standard-error": ">= 1.1.0 < 2" + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "string_decoder": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", + "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true, + "requires": { + "has-flag": "^2.0.0" + } + }, + "text-encoding": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=" + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } + } + }, + "tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "requires": { + "punycode": "^2.1.0" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "uid-safe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", + "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", + "dev": true, + "requires": { + "random-bytes": "~1.0.0" + } + }, + "underscore": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", + "dev": true + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==" + }, + "whatwg-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", + "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==" + }, + "whatwg-url": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", + "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xmldom": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", + "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=" + } + } +} diff --git a/package.json b/package.json index 185a05e..073d025 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "rabel", "description": "Linked Data command line utility", - "version": "1.0.0", + "version": "1.0.2", "author": { "name": "Tim Berners-Lee", "email": "timbl@w3.org" @@ -15,13 +15,21 @@ "homepage": "http://github.com/linkeddata/rabel", "bugs": "http://github.com/linkeddata/rabel/issues", "dependencies": { - "rdflib": "^0.15.0", - "shacl-check": "^0.0.1", + "fs-extra": "^4.0.2", + "node-fetch": "^2.6.0", + "rdflib": ">=0.20.1", + "shacl-check": "^1.0.3", "xmldom": "^0.1.22" }, "bin": { - "rabel": "rabel.js" + "rabel": "./bin/rabel" }, - "devDependencies": {}, - "main": "rabel.js" + "devDependencies": { + "mocha": "^4.0.1", + "mock-http-server": "^0.2.0" + }, + "main": "index.js", + "scripts": { + "test": "mocha" + } } diff --git a/test/from-file/hl7.org/fhir/Observation.ttl b/test/from-file/hl7.org/fhir/Observation.ttl new file mode 100644 index 0000000..6cf06f0 --- /dev/null +++ b/test/from-file/hl7.org/fhir/Observation.ttl @@ -0,0 +1,4 @@ +@prefix fhir: <./>. +@prefix Obs: . + + Obs:blood-pressure a fhir:Observation . diff --git a/test/from-file/hl7.org/fhir/Observation/blood-pressure.ttl b/test/from-file/hl7.org/fhir/Observation/blood-pressure.ttl new file mode 100644 index 0000000..32a3483 --- /dev/null +++ b/test/from-file/hl7.org/fhir/Observation/blood-pressure.ttl @@ -0,0 +1,192 @@ +@prefix fhir: <../>. +@prefix Obs: <./>. +@prefix id: . +@prefix owl: . +@prefix XML: . +@prefix Pr: <../Practitioner/>. +@prefix P: <../Patient/>. + +Obs:blood-pressure + fhir:DomainResource-text + [ fhir:Narrative-div + """

Generated Narrative with Details

id: blood-pressure

meta:

identifier: urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281

basedOn:

status: final

category: Vital Signs (Details : {http://hl7.org/fhir/observation-category code 'vital-signs' = 'Vital Signs', given as 'Vital Signs'})

code: Blood pressure systolic & diastolic (Details : {LOINC code '85354-9' = 'lood pressure panel with all children optional', given as 'Bood pressure panel with all children optional'})

subject: Patient/example

effective: 17/09/2012

performer: Practitioner/example

interpretation: Below low normal (Details : {http://hl7.org/fhir/v2/0078 code 'L' = 'Low', given as 'low'})

bodySite: Right arm (Details : {SNOMED CT code '368209003' = 'Right upper arm', given as 'Right arm'})

component

code: Systolic blood pressure (Details : {LOINC code '8480-6' = 'Systolic blood pressure', given as 'Systolic blood pressure'}; {SNOMED CT code '271649006' = 'Systolic blood pressure', given as 'Systolic blood pressure'}; {http://acme.org/devices/clinical-codes code 'bp-s' = 'bp-s', given as 'Systolic Blood pressure'})

value: 107 mmHg (Details: UCUM code mm[Hg] = 'mmHg')

interpretation: Normal (Details : {http://hl7.org/fhir/v2/0078 code 'N' = 'Normal', given as 'normal'})

component

code: Diastolic blood pressure (Details : {LOINC code '8462-4' = 'Diastolic blood pressure', given as 'Diastolic blood pressure'})

value: 60 mmHg (Details: UCUM code mm[Hg] = 'mmHg')

interpretation: Below low normal (Details : {http://hl7.org/fhir/v2/0078 code 'L' = 'Low', given as 'low'})

"""; + fhir:Narrative-status + [ fhir:value "generated" ] ]; + fhir:Observation-basedOn + [ fhir:Reference-identifier + [ fhir:Identifier-system + [ fhir:value "https://acme.org/identifiers" ]; + fhir:Identifier-value + [ fhir:value "1234" ] ]; + fhir:index + 0 ]; + fhir:Observation-bodySite + [ fhir:CodeableConcept-coding + [ fhir:Coding-code + [ fhir:value "368209003" ]; + fhir:Coding-display + [ fhir:value "Right arm" ]; + fhir:Coding-system + [ fhir:value "http://snomed.info/sct" ]; + fhir:index + 0; + a id:368209003 ] ]; + fhir:Observation-category + [ fhir:CodeableConcept-coding + [ fhir:Coding-code + [ fhir:value "vital-signs" ]; + fhir:Coding-display + [ fhir:value "Vital Signs" ]; + fhir:Coding-system + [ fhir:value "http://hl7.org/fhir/observation-category" ]; + fhir:index + 0 ]; + fhir:index + 0 ]; + fhir:Observation-code + [ fhir:CodeableConcept-coding + [ fhir:Coding-code + [ fhir:value "85354-9" ]; + fhir:Coding-display + [ fhir:value + "Bood pressure panel with all children optional" ]; + fhir:Coding-system + [ fhir:value "http://loinc.org" ]; + fhir:index + 0; + a owl:85354-9 ]; + fhir:CodeableConcept-text + [ fhir:value "Blood pressure systolic & diastolic" ] ]; + fhir:Observation-component + [ fhir:Observation-component-code + [ fhir:CodeableConcept-coding + [ fhir:Coding-code + [ fhir:value "8480-6" ]; + fhir:Coding-display + [ fhir:value "Systolic blood pressure" ]; + fhir:Coding-system + [ fhir:value "http://loinc.org" ]; + fhir:index + 0; + a owl:8480-6 ], + [ fhir:Coding-code + [ fhir:value "271649006" ]; + fhir:Coding-display + [ fhir:value "Systolic blood pressure" ]; + fhir:Coding-system + [ fhir:value "http://snomed.info/sct" ]; + fhir:index + 1; + a id:271649006 ], + [ fhir:Coding-code + [ fhir:value "bp-s" ]; + fhir:Coding-display + [ fhir:value "Systolic Blood pressure" ]; + fhir:Coding-system + [ fhir:value + "http://acme.org/devices/clinical-codes" ]; + fhir:index + 2 ] ]; + fhir:Observation-component-interpretation + [ fhir:CodeableConcept-coding + [ fhir:Coding-code + [ fhir:value "N" ]; + fhir:Coding-display + [ fhir:value "normal" ]; + fhir:Coding-system + [ fhir:value "http://hl7.org/fhir/v2/0078" ]; + fhir:index + 0 ]; + fhir:CodeableConcept-text + [ fhir:value "Normal" ] ]; + fhir:Observation-component-valueQuantity + [ fhir:Quantity-code + [ fhir:value "mm[Hg]" ]; + fhir:Quantity-system + [ fhir:value "http://unitsofmeasure.org" ]; + fhir:Quantity-unit + [ fhir:value "mmHg" ]; + fhir:Quantity-value + [ fhir:value "107"^^XML:decimal ] ]; + fhir:index + 0 ], + [ fhir:Observation-component-code + [ fhir:CodeableConcept-coding + [ fhir:Coding-code + [ fhir:value "8462-4" ]; + fhir:Coding-display + [ fhir:value "Diastolic blood pressure" ]; + fhir:Coding-system + [ fhir:value "http://loinc.org" ]; + fhir:index + 0; + a owl:8462-4 ] ]; + fhir:Observation-component-interpretation + [ fhir:CodeableConcept-coding + [ fhir:Coding-code + [ fhir:value "L" ]; + fhir:Coding-display + [ fhir:value "low" ]; + fhir:Coding-system + [ fhir:value "http://hl7.org/fhir/v2/0078" ]; + fhir:index + 0 ]; + fhir:CodeableConcept-text + [ fhir:value "Below low normal" ] ]; + fhir:Observation-component-valueQuantity + [ fhir:Quantity-code + [ fhir:value "mm[Hg]" ]; + fhir:Quantity-system + [ fhir:value "http://unitsofmeasure.org" ]; + fhir:Quantity-unit + [ fhir:value "mmHg" ]; + fhir:Quantity-value + [ fhir:value "60"^^XML:decimal ] ]; + fhir:index + 1 ]; + fhir:Observation-effectiveDateTime + [ fhir:value "2012-09-17"^^XML:date ]; + fhir:Observation-identifier + [ fhir:Identifier-system + [ fhir:value "urn:ietf:rfc:3986" ]; + fhir:Identifier-value + [ fhir:value "urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281" ]; + fhir:index + 0 ]; + fhir:Observation-interpretation + [ fhir:CodeableConcept-coding + [ fhir:Coding-code + [ fhir:value "L" ]; + fhir:Coding-display + [ fhir:value "low" ]; + fhir:Coding-system + [ fhir:value "http://hl7.org/fhir/v2/0078" ]; + fhir:index + 0 ]; + fhir:CodeableConcept-text + [ fhir:value "Below low normal" ] ]; + fhir:Observation-performer + [ fhir:Reference-reference + [ fhir:value "Practitioner/example" ]; + fhir:index + 0; + fhir:link + Pr:example ]; + fhir:Observation-status + [ fhir:value "final" ]; + fhir:Observation-subject + [ fhir:Reference-reference + [ fhir:value "Patient/example" ]; + fhir:link + P:example ]; + fhir:Resource-id + [ fhir:value "blood-pressure" ]; + fhir:Resource-meta + [ fhir:Meta-profile + [ fhir:index + 0; + fhir:value + "http://hl7.org/fhir/StructureDefinition/vitalsigns" ] ]; + fhir:nodeRole + fhir:treeRoot; + a fhir:Observation. diff --git a/test/from-file/hl7.org/fhir/Observation/blood-pressure.ttl.ttl b/test/from-file/hl7.org/fhir/Observation/blood-pressure.ttl.ttl new file mode 100644 index 0000000..baa852f --- /dev/null +++ b/test/from-file/hl7.org/fhir/Observation/blood-pressure.ttl.ttl @@ -0,0 +1,9 @@ +@prefix fhir: <../>. +@prefix owl: . + +<> + a owl:Ontology; + owl:imports + fhir:fhir-ttl; + owl:versionIRI + <../STU3/Observation/blood-pressure.ttl>. diff --git a/test/from-file/hl7.org/fhir/Patient.ttl b/test/from-file/hl7.org/fhir/Patient.ttl new file mode 100644 index 0000000..a4720c6 --- /dev/null +++ b/test/from-file/hl7.org/fhir/Patient.ttl @@ -0,0 +1,4 @@ +@prefix fhir: <./>. +@prefix P: . + + P:example a fhir:Patient . diff --git a/test/from-file/hl7.org/fhir/Patient/example.ttl b/test/from-file/hl7.org/fhir/Patient/example.ttl new file mode 100644 index 0000000..1331137 --- /dev/null +++ b/test/from-file/hl7.org/fhir/Patient/example.ttl @@ -0,0 +1,11 @@ +@prefix fhir: <../>. +@prefix P: <./>. +@prefix Obs: <../Observation/>. + + P:example a fhir:Patient . +Obs:blood-pressure + fhir:Observation-subject + [ fhir:Reference-reference + [ fhir:value "Patient/example" ]; + fhir:link + P:example ]. diff --git a/test/from-file/hl7.org/fhir/Practitioner.ttl b/test/from-file/hl7.org/fhir/Practitioner.ttl new file mode 100644 index 0000000..d2d4b25 --- /dev/null +++ b/test/from-file/hl7.org/fhir/Practitioner.ttl @@ -0,0 +1,4 @@ +@prefix fhir: <./>. +@prefix Pr: . + + Pr:example a fhir:Practitioner . diff --git a/test/from-file/hl7.org/fhir/Practitioner/example.ttl b/test/from-file/hl7.org/fhir/Practitioner/example.ttl new file mode 100644 index 0000000..c02dde5 --- /dev/null +++ b/test/from-file/hl7.org/fhir/Practitioner/example.ttl @@ -0,0 +1,13 @@ +@prefix fhir: <../>. +@prefix Pr: <./>. +@prefix Obs: <../Observation/>. + + Pr:example a fhir:Practitioner . +Obs:blood-pressure + fhir:Observation-performer + [ fhir:Reference-reference + [ fhir:value "Practitioner/example" ]; + fhir:index + 0; + fhir:link + Pr:example ]. diff --git a/test/from-file/hl7.org/fhir/STU3/Observation/blood-pressure.ttl.ttl b/test/from-file/hl7.org/fhir/STU3/Observation/blood-pressure.ttl.ttl new file mode 100644 index 0000000..e3ec06f --- /dev/null +++ b/test/from-file/hl7.org/fhir/STU3/Observation/blood-pressure.ttl.ttl @@ -0,0 +1,3 @@ +@prefix owl: . + + <../../Observation/blood-pressure.ttl> owl:versionIRI <> . diff --git a/test/from-file/hl7.org/fhir/fhir-ttl.ttl b/test/from-file/hl7.org/fhir/fhir-ttl.ttl new file mode 100644 index 0000000..a21891c --- /dev/null +++ b/test/from-file/hl7.org/fhir/fhir-ttl.ttl @@ -0,0 +1,4 @@ +@prefix fhir: <./>. +@prefix owl: . + + owl:imports fhir:fhir-ttl . diff --git a/test/from-file/hl7.org/fhir/treeRoot.ttl b/test/from-file/hl7.org/fhir/treeRoot.ttl new file mode 100644 index 0000000..2d891d5 --- /dev/null +++ b/test/from-file/hl7.org/fhir/treeRoot.ttl @@ -0,0 +1,4 @@ +@prefix fhir: <./>. +@prefix Obs: . + + Obs:blood-pressure fhir:nodeRole fhir:treeRoot . diff --git a/test/from-file/obs.ntriples b/test/from-file/obs.ntriples new file mode 100644 index 0000000..5cd2851 --- /dev/null +++ b/test/from-file/obs.ntriples @@ -0,0 +1,167 @@ + . + . +_:b0x2b99670 "blood-pressure" . + _:b0x2b99670 . +_:b0x2b9c4e0 "http://hl7.org/fhir/StructureDefinition/vitalsigns" . +_:b0x2b9c4e0 0 . +_:b0x2b9bd90 _:b0x2b9c4e0 . + _:b0x2b9bd90 . +_:b0x2b9d4a0 "generated" . +_:b0x2b9c5f0 _:b0x2b9d4a0 . +_:b0x2b9c5f0 "

Generated Narrative with Details

id: blood-pressure

meta:

identifier: urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281

basedOn:

status: final

category: Vital Signs (Details : {http://hl7.org/fhir/observation-category code 'vital-signs' = 'Vital Signs', given as 'Vital Signs'})

code: Blood pressure systolic & diastolic (Details : {LOINC code '85354-9' = 'lood pressure panel with all children optional', given as 'Bood pressure panel with all children optional'})

subject: Patient/example

effective: 17/09/2012

performer: Practitioner/example

interpretation: Below low normal (Details : {http://hl7.org/fhir/v2/0078 code 'L' = 'Low', given as 'low'})

bodySite: Right arm (Details : {SNOMED CT code '368209003' = 'Right upper arm', given as 'Right arm'})

component

code: Systolic blood pressure (Details : {LOINC code '8480-6' = 'Systolic blood pressure', given as 'Systolic blood pressure'}; {SNOMED CT code '271649006' = 'Systolic blood pressure', given as 'Systolic blood pressure'}; {http://acme.org/devices/clinical-codes code 'bp-s' = 'bp-s', given as 'Systolic Blood pressure'})

value: 107 mmHg (Details: UCUM code mm[Hg] = 'mmHg')

interpretation: Normal (Details : {http://hl7.org/fhir/v2/0078 code 'N' = 'Normal', given as 'normal'})

component

code: Diastolic blood pressure (Details : {LOINC code '8462-4' = 'Diastolic blood pressure', given as 'Diastolic blood pressure'})

value: 60 mmHg (Details: UCUM code mm[Hg] = 'mmHg')

interpretation: Below low normal (Details : {http://hl7.org/fhir/v2/0078 code 'L' = 'Low', given as 'low'})

" . + _:b0x2b9c5f0 . +_:b0x2ba4170 0 . +_:b0x2ba4370 "urn:ietf:rfc:3986" . +_:b0x2ba4170 _:b0x2ba4370 . +_:b0x2ba45b0 "urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281" . +_:b0x2ba4170 _:b0x2ba45b0 . + _:b0x2ba4170 . +_:b0x2b9e700 0 . +_:b0x2b9f0f0 "https://acme.org/identifiers" . +_:b0x2b9f060 _:b0x2b9f0f0 . +_:b0x2b9f180 "1234" . +_:b0x2b9f060 _:b0x2b9f180 . +_:b0x2b9e700 _:b0x2b9f060 . + _:b0x2b9e700 . +_:b0x2b9fac0 "final" . + _:b0x2b9fac0 . +_:b0x2ba0270 0 . +_:b0x2ba0b40 0 . +_:b0x2ba0cf0 "http://hl7.org/fhir/observation-category" . +_:b0x2ba0b40 _:b0x2ba0cf0 . +_:b0x2ba1030 "vital-signs" . +_:b0x2ba0b40 _:b0x2ba1030 . +_:b0x2ba12d0 "Vital Signs" . +_:b0x2ba0b40 _:b0x2ba12d0 . +_:b0x2ba0270 _:b0x2ba0b40 . + _:b0x2ba0270 . +_:b0x2ba26e0 0 . +_:b0x2ba26e0 . +_:b0x2ba29f0 "http://loinc.org" . +_:b0x2ba26e0 _:b0x2ba29f0 . +_:b0x2ba2c50 "85354-9" . +_:b0x2ba26e0 _:b0x2ba2c50 . +_:b0x2ba30b0 "Bood pressure panel with all children optional" . +_:b0x2ba26e0 _:b0x2ba30b0 . +_:b0x2ba1df0 _:b0x2ba26e0 . +_:b0x2ba5340 "Blood pressure systolic & diastolic" . +_:b0x2ba1df0 _:b0x2ba5340 . + _:b0x2ba1df0 . +_:b0x2ba5b50 . +_:b0x2ba6090 "Patient/example" . +_:b0x2ba5b50 _:b0x2ba6090 . + _:b0x2ba5b50 . +_:b0x2ba6930 "2012-09-17"^^ . + _:b0x2ba6930 . +_:b0x2ba71b0 0 . +_:b0x2ba71b0 . +_:b0x2ba7480 "Practitioner/example" . +_:b0x2ba71b0 _:b0x2ba7480 . + _:b0x2ba71b0 . +_:b0x2ba87c0 0 . +_:b0x2ba8730 "http://hl7.org/fhir/v2/0078" . +_:b0x2ba87c0 _:b0x2ba8730 . +_:b0x2ba8990 "L" . +_:b0x2ba87c0 _:b0x2ba8990 . +_:b0x2ba8b60 "low" . +_:b0x2ba87c0 _:b0x2ba8b60 . +_:b0x2ba8050 _:b0x2ba87c0 . +_:b0x2ba9630 "Below low normal" . +_:b0x2ba8050 _:b0x2ba9630 . + _:b0x2ba8050 . +_:b0x2baa480 0 . +_:b0x2baa480 . +_:b0x2baa510 "http://snomed.info/sct" . +_:b0x2baa480 _:b0x2baa510 . +_:b0x2baa7d0 "368209003" . +_:b0x2baa480 _:b0x2baa7d0 . +_:b0x2bab160 "Right arm" . +_:b0x2baa480 _:b0x2bab160 . +_:b0x2ba9f10 _:b0x2baa480 . + _:b0x2ba9f10 . +_:b0x2babca0 0 . +_:b0x2bac100 0 . +_:b0x2bac100 . +_:b0x2bac090 "http://loinc.org" . +_:b0x2bac100 _:b0x2bac090 . +_:b0x2bac8e0 "8480-6" . +_:b0x2bac100 _:b0x2bac8e0 . +_:b0x2bacbd0 "Systolic blood pressure" . +_:b0x2bac100 _:b0x2bacbd0 . +_:b0x2bac000 _:b0x2bac100 . +_:b0x2bad040 1 . +_:b0x2bad040 . +_:b0x2bad8e0 "http://snomed.info/sct" . +_:b0x2bad040 _:b0x2bad8e0 . +_:b0x2b9c8c0 "271649006" . +_:b0x2bad040 _:b0x2b9c8c0 . +_:b0x2b9c990 "Systolic blood pressure" . +_:b0x2bad040 _:b0x2b9c990 . +_:b0x2bac000 _:b0x2bad040 . +_:b0x2baf060 2 . +_:b0x2baf1e0 "http://acme.org/devices/clinical-codes" . +_:b0x2baf060 _:b0x2baf1e0 . +_:b0x2bafa70 "bp-s" . +_:b0x2baf060 _:b0x2bafa70 . +_:b0x2bafb50 "Systolic Blood pressure" . +_:b0x2baf060 _:b0x2bafb50 . +_:b0x2bac000 _:b0x2baf060 . +_:b0x2babca0 _:b0x2bac000 . +_:b0x2bb0a00 "107"^^ . +_:b0x2bb0900 _:b0x2bb0a00 . +_:b0x2bb0ca0 "mmHg" . +_:b0x2bb0900 _:b0x2bb0ca0 . +_:b0x2bb1450 "http://unitsofmeasure.org" . +_:b0x2bb0900 _:b0x2bb1450 . +_:b0x2bb1ae0 "mm[Hg]" . +_:b0x2bb0900 _:b0x2bb1ae0 . +_:b0x2babca0 _:b0x2bb0900 . +_:b0x2bb2bb0 0 . +_:b0x2bb2750 "http://hl7.org/fhir/v2/0078" . +_:b0x2bb2bb0 _:b0x2bb2750 . +_:b0x2bb2f60 "N" . +_:b0x2bb2bb0 _:b0x2bb2f60 . +_:b0x2bb3250 "normal" . +_:b0x2bb2bb0 _:b0x2bb3250 . +_:b0x2bb2480 _:b0x2bb2bb0 . +_:b0x2bb3920 "Normal" . +_:b0x2bb2480 _:b0x2bb3920 . +_:b0x2babca0 _:b0x2bb2480 . + _:b0x2babca0 . +_:b0x2bb40c0 1 . +_:b0x2bb4ce0 0 . +_:b0x2bb4ce0 . +_:b0x2bb4a20 "http://loinc.org" . +_:b0x2bb4ce0 _:b0x2bb4a20 . +_:b0x2bb54c0 "8462-4" . +_:b0x2bb4ce0 _:b0x2bb54c0 . +_:b0x2bb57b0 "Diastolic blood pressure" . +_:b0x2bb4ce0 _:b0x2bb57b0 . +_:b0x2ba94a0 _:b0x2bb4ce0 . +_:b0x2bb40c0 _:b0x2ba94a0 . +_:b0x2bb6110 "60"^^ . +_:b0x2bb6860 _:b0x2bb6110 . +_:b0x2bb68f0 "mmHg" . +_:b0x2bb6860 _:b0x2bb68f0 . +_:b0x2bb6da0 "http://unitsofmeasure.org" . +_:b0x2bb6860 _:b0x2bb6da0 . +_:b0x2bb7190 "mm[Hg]" . +_:b0x2bb6860 _:b0x2bb7190 . +_:b0x2bb40c0 _:b0x2bb6860 . +_:b0x2bb7960 0 . +_:b0x2bb7c00 "http://hl7.org/fhir/v2/0078" . +_:b0x2bb7960 _:b0x2bb7c00 . +_:b0x2bb79e0 "L" . +_:b0x2bb7960 _:b0x2bb79e0 . +_:b0x2bb8090 "low" . +_:b0x2bb7960 _:b0x2bb8090 . +_:b0x2bb7c90 _:b0x2bb7960 . +_:b0x2bb8830 "Below low normal" . +_:b0x2bb7c90 _:b0x2bb8830 . +_:b0x2bb40c0 _:b0x2bb7c90 . + _:b0x2bb40c0 . + . + . + . + . + . diff --git a/test/from-http/hl7.org/fhir/Observation.ttl b/test/from-http/hl7.org/fhir/Observation.ttl new file mode 100644 index 0000000..78f0ab4 --- /dev/null +++ b/test/from-http/hl7.org/fhir/Observation.ttl @@ -0,0 +1,6 @@ +@prefix : <#>. +@prefix fhir: <./>. +@prefix Obs: . + +Obs:example a fhir:Observation. + diff --git a/test/from-http/hl7.org/fhir/Observation/example.ttl b/test/from-http/hl7.org/fhir/Observation/example.ttl new file mode 100644 index 0000000..be45aa7 --- /dev/null +++ b/test/from-http/hl7.org/fhir/Observation/example.ttl @@ -0,0 +1,6 @@ +@prefix : <#>. +@prefix fhir: <../>. +@prefix Obs: <./>. + +Obs:example a fhir:Observation; fhir:nodeRole fhir:treeRoot. + diff --git a/test/from-http/hl7.org/fhir/treeRoot.ttl b/test/from-http/hl7.org/fhir/treeRoot.ttl new file mode 100644 index 0000000..2f0fd24 --- /dev/null +++ b/test/from-http/hl7.org/fhir/treeRoot.ttl @@ -0,0 +1,6 @@ +@prefix : <#>. +@prefix fhir: <./>. +@prefix Obs: . + +Obs:example fhir:nodeRole fhir:treeRoot. + diff --git a/test/named-resources/observation-example-bloodpressure.ttl b/test/named-resources/observation-example-bloodpressure.ttl new file mode 100644 index 0000000..ea3eac0 --- /dev/null +++ b/test/named-resources/observation-example-bloodpressure.ttl @@ -0,0 +1,159 @@ +@prefix fhir: . +@prefix loinc: . +@prefix owl: . +@prefix rdfs: . +@prefix sct: . +@prefix xsd: . + +# - resource ------------------------------------------------------------------- + + a fhir:Observation; + fhir:nodeRole fhir:treeRoot; + fhir:Resource-id [ fhir:value "blood-pressure"]; + fhir:Resource-meta [ + fhir:Meta-profile [ + fhir:value "http://hl7.org/fhir/StructureDefinition/vitalsigns"; + fhir:index 0 + ] + ]; + fhir:DomainResource-text [ + fhir:Narrative-status [ fhir:value "generated" ]; + fhir:Narrative-div "

Generated Narrative with Details

id: blood-pressure

meta:

identifier: urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281

basedOn:

status: final

category: Vital Signs (Details : {http://hl7.org/fhir/observation-category code 'vital-signs' = 'Vital Signs', given as 'Vital Signs'})

code: Blood pressure systolic & diastolic (Details : {LOINC code '85354-9' = 'lood pressure panel with all children optional', given as 'Bood pressure panel with all children optional'})

subject: Patient/example

effective: 17/09/2012

performer: Practitioner/example

interpretation: Below low normal (Details : {http://hl7.org/fhir/v2/0078 code 'L' = 'Low', given as 'low'})

bodySite: Right arm (Details : {SNOMED CT code '368209003' = 'Right upper arm', given as 'Right arm'})

component

code: Systolic blood pressure (Details : {LOINC code '8480-6' = 'Systolic blood pressure', given as 'Systolic blood pressure'}; {SNOMED CT code '271649006' = 'Systolic blood pressure', given as 'Systolic blood pressure'}; {http://acme.org/devices/clinical-codes code 'bp-s' = 'bp-s', given as 'Systolic Blood pressure'})

value: 107 mmHg (Details: UCUM code mm[Hg] = 'mmHg')

interpretation: Normal (Details : {http://hl7.org/fhir/v2/0078 code 'N' = 'Normal', given as 'normal'})

component

code: Diastolic blood pressure (Details : {LOINC code '8462-4' = 'Diastolic blood pressure', given as 'Diastolic blood pressure'})

value: 60 mmHg (Details: UCUM code mm[Hg] = 'mmHg')

interpretation: Below low normal (Details : {http://hl7.org/fhir/v2/0078 code 'L' = 'Low', given as 'low'})

" + ]; + fhir:Observation-identifier [ + fhir:index 0; + fhir:Identifier-system [ fhir:value "urn:ietf:rfc:3986" ]; + fhir:Identifier-value [ fhir:value "urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281" ] + ]; + fhir:Observation-basedOn [ + fhir:index 0; + fhir:Reference-identifier [ + fhir:Identifier-system [ fhir:value "https://acme.org/identifiers" ]; + fhir:Identifier-value [ fhir:value "1234" ] + ] + ]; + fhir:Observation-status [ fhir:value "final"]; + fhir:Observation-category [ + fhir:index 0; + fhir:CodeableConcept-coding [ + fhir:index 0; + fhir:Coding-system [ fhir:value "http://hl7.org/fhir/observation-category" ]; + fhir:Coding-code [ fhir:value "vital-signs" ]; + fhir:Coding-display [ fhir:value "Vital Signs" ] + ] + ]; + fhir:Observation-code [ + fhir:CodeableConcept-coding [ + fhir:index 0; + a loinc:85354-9; + fhir:Coding-system [ fhir:value "http://loinc.org" ]; + fhir:Coding-code [ fhir:value "85354-9" ]; + fhir:Coding-display [ fhir:value "Bood pressure panel with all children optional" ] + ]; + fhir:CodeableConcept-text [ fhir:value "Blood pressure systolic & diastolic" ] + ]; + fhir:Observation-subject [ + fhir:link ; + fhir:Reference-reference [ fhir:value "Patient/example" ] + ]; + fhir:Observation-effectiveDateTime [ fhir:value "2012-09-17"^^xsd:date]; + fhir:Observation-performer [ + fhir:index 0; + fhir:link ; + fhir:Reference-reference [ fhir:value "Practitioner/example" ] + ]; + fhir:Observation-interpretation [ + fhir:CodeableConcept-coding [ + fhir:index 0; + fhir:Coding-system [ fhir:value "http://hl7.org/fhir/v2/0078" ]; + fhir:Coding-code [ fhir:value "L" ]; + fhir:Coding-display [ fhir:value "low" ] + ]; + fhir:CodeableConcept-text [ fhir:value "Below low normal" ] + ]; + fhir:Observation-bodySite [ + fhir:CodeableConcept-coding [ + fhir:index 0; + a sct:368209003; + fhir:Coding-system [ fhir:value "http://snomed.info/sct" ]; + fhir:Coding-code [ fhir:value "368209003" ]; + fhir:Coding-display [ fhir:value "Right arm" ] + ] + ]; + fhir:Observation-component [ + fhir:index 0; + fhir:Observation-component-code [ + fhir:CodeableConcept-coding [ + fhir:index 0; + a loinc:8480-6; + fhir:Coding-system [ fhir:value "http://loinc.org" ]; + fhir:Coding-code [ fhir:value "8480-6" ]; + fhir:Coding-display [ fhir:value "Systolic blood pressure" ] + ], [ + fhir:index 1; + a sct:271649006; + fhir:Coding-system [ fhir:value "http://snomed.info/sct" ]; + fhir:Coding-code [ fhir:value "271649006" ]; + fhir:Coding-display [ fhir:value "Systolic blood pressure" ] + ], [ + fhir:index 2; + fhir:Coding-system [ fhir:value "http://acme.org/devices/clinical-codes" ]; + fhir:Coding-code [ fhir:value "bp-s" ]; + fhir:Coding-display [ fhir:value "Systolic Blood pressure" ] + ] + ]; + fhir:Observation-component-valueQuantity [ + fhir:Quantity-value [ fhir:value "107"^^xsd:decimal ]; + fhir:Quantity-unit [ fhir:value "mmHg" ]; + fhir:Quantity-system [ fhir:value "http://unitsofmeasure.org" ]; + fhir:Quantity-code [ fhir:value "mm[Hg]" ] + ]; + fhir:Observation-component-interpretation [ + fhir:CodeableConcept-coding [ + fhir:index 0; + fhir:Coding-system [ fhir:value "http://hl7.org/fhir/v2/0078" ]; + fhir:Coding-code [ fhir:value "N" ]; + fhir:Coding-display [ fhir:value "normal" ] + ]; + fhir:CodeableConcept-text [ fhir:value "Normal" ] + ] + ], [ + fhir:index 1; + fhir:Observation-component-code [ + fhir:CodeableConcept-coding [ + fhir:index 0; + a loinc:8462-4; + fhir:Coding-system [ fhir:value "http://loinc.org" ]; + fhir:Coding-code [ fhir:value "8462-4" ]; + fhir:Coding-display [ fhir:value "Diastolic blood pressure" ] + ] + ]; + fhir:Observation-component-valueQuantity [ + fhir:Quantity-value [ fhir:value "60"^^xsd:decimal ]; + fhir:Quantity-unit [ fhir:value "mmHg" ]; + fhir:Quantity-system [ fhir:value "http://unitsofmeasure.org" ]; + fhir:Quantity-code [ fhir:value "mm[Hg]" ] + ]; + fhir:Observation-component-interpretation [ + fhir:CodeableConcept-coding [ + fhir:index 0; + fhir:Coding-system [ fhir:value "http://hl7.org/fhir/v2/0078" ]; + fhir:Coding-code [ fhir:value "L" ]; + fhir:Coding-display [ fhir:value "low" ] + ]; + fhir:CodeableConcept-text [ fhir:value "Below low normal" ] + ] + ] . + + a fhir:Patient . + + a fhir:Practitioner . + +# - ontology header ------------------------------------------------------------ + + a owl:Ontology; + owl:imports fhir:fhir-ttl; + owl:versionIRI . + +# ------------------------------------------------------------------------------------- + diff --git a/test/pwn-FHIR.sh b/test/pwn-FHIR.sh new file mode 100755 index 0000000..fe1d860 --- /dev/null +++ b/test/pwn-FHIR.sh @@ -0,0 +1,8 @@ +echo from-file +mkdir -p from-file/ && (cd from-file/ && ../../rabel.js -in=../named-resources/observation-example-bloodpressure.ttl -spray=http://hl7.org/fhir/) + +echo from-http +mkdir -p from-http/ && (cd from-http/ && ../../rabel.js -in=http://build.fhir.org/observation-example.ttl -spray=http://hl7.org/fhir/) + +echo doing stats +find named-resources/observation-example-bloodpressure.ttl from-file from-http -type f | while read f; do (echo -n "$f - " && stat -c %s $f); done > pwn-FHIR.stats diff --git a/test/pwn-FHIR.stats b/test/pwn-FHIR.stats new file mode 100644 index 0000000..5ac921f --- /dev/null +++ b/test/pwn-FHIR.stats @@ -0,0 +1,15 @@ +named-resources/observation-example-bloodpressure.ttl - 8226 +from-file/hl7.org/fhir/Observation.ttl - 93 +from-file/hl7.org/fhir/Practitioner.ttl - 86 +from-file/hl7.org/fhir/treeRoot.ttl - 102 +from-file/hl7.org/fhir/Patient/example.ttl - 287 +from-file/hl7.org/fhir/fhir-ttl.ttl - 132 +from-file/hl7.org/fhir/Observation/blood-pressure.ttl.ttl - 201 +from-file/hl7.org/fhir/Observation/blood-pressure.ttl - 10256 +from-file/hl7.org/fhir/Practitioner/example.ttl - 343 +from-file/hl7.org/fhir/Patient.ttl - 74 +from-file/hl7.org/fhir/STU3/Observation/blood-pressure.ttl.ttl - 110 +from-file/obs.ntriples - 14020 +from-http/hl7.org/fhir/Observation.ttl - 98 +from-http/hl7.org/fhir/treeRoot.ttl - 107 +from-http/hl7.org/fhir/Observation/example.ttl - 118 diff --git a/test/resource1.ttl b/test/resource1.ttl new file mode 100644 index 0000000..b207217 --- /dev/null +++ b/test/resource1.ttl @@ -0,0 +1,4 @@ +@prefix foaf: . + a foaf:Person ; + foaf:name "Alice" ; + foaf:mbox . diff --git a/test/shapes/,log2.txt b/test/shapes/,log2.txt new file mode 100644 index 0000000..8a24911 --- /dev/null +++ b/test/shapes/,log2.txt @@ -0,0 +1,2346 @@ +Loading +runTests +Manifest loaded: +SHACL Test suite + includes: 1 for +runTests +Manifest loaded: + includes: 3 for +runTests +runTests +runTests +Manifest loaded: + includes: 5 for +runTests +runTests +runTests +runTests +runTests +Masked error - status 0 for file:///devel/github.com/w3c/data-shapes/data-shapes-test-suite/tests/dash/core/target/manifest.ttl +Manifest loaded: + includes: 2 for +runTests +runTests +Manifest loaded: + includes: 5 for +runTests +runTests +runTests +runTests +runTests +Masked error - status 0 for file:///devel/github.com/w3c/data-shapes/data-shapes-test-suite/tests/dash/sparql/target/manifest.ttl +Manifest loaded: + includes: 1 for +runTests +Manifest loaded: + includes: 3 for +runTests +runTests +runTests +Manifest loaded: + includes: 36 for +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +Manifest loaded: + includes: 16 for +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +runTests +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target class +Target class member + Applying shape _:n164 + to node + closed: false + Checking property _:n165: + -> Too few (0) on +Target class member + Applying shape _:n164 + to node + closed: false + Checking property _:n165: + Expected statements: 9 + Actual statements: 9 + Match -> passed +1 +Manifest loaded: + includes: 1 for +runTests +Manifest loaded: + includes: 1 for +runTests +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape _:n180 + to node + closed: false + Checking property _:n181: + -> Too few (0) on +Target node + Applying shape _:n180 + to node + closed: false + Checking property _:n181: + Expected statements: 9 + Actual statements: 9 + Match -> passed +1 +2 +Manifest loaded: + includes: 0 for +0 +Manifest loaded: + includes: 1 for +runTests +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target class +Target class member + Applying shape + to node + closed: true + Ignoreable: + Checking property _:n190: + -> Error 987-65-432A should match pattern ^\d{3}-\d{2}-\d{4}$ + Checking property _:n191: + Checking property _:n192: _:n193 +Target class member + Applying shape + to node + closed: true + Ignoreable: + Checking property _:n190: + -> Too many (2) on + Checking property _:n191: + Checking property _:n192: _:n193 +Target class member + Applying shape + to node + closed: true + Ignoreable: + Checking property _:n190: + Checking property _:n191: + -> Error should be in class + Checking property _:n192: _:n193 + -> Closed node has extra data: "1999-09-09"^^ . + Expected statements: 33 + Actual statements: 31 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix per: . +@prefix XML: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode per:Alice; + sh:resultPath per:ssn; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:PatternConstraintComponent; + sh:sourceShape []; + sh:value "987-65-432A" + ], + [ + a sh:ValidationResult; + sh:focusNode per:Bob; + sh:resultPath per:ssn; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent; + sh:sourceShape [] + ], + [ + a sh:ValidationResult; + sh:focusNode per:Calvin; + sh:resultPath per:birthDate; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:ClosedConstraintComponent; + sh:sourceShape per:PersonShape; + sh:value "1999-09-09"^^XML:date + ], + [ + a sh:ValidationResult; + sh:focusNode per:Calvin; + sh:resultPath per:worksFor; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:ClassConstraintComponent; + sh:sourceShape []; + sh:value per:UntypedCompany + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix per: . +@prefix XML: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode per:Alice; + sh:resultPath per:ssn; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:PatternConstraintComponent; + sh:sourceShape per:PersonShape; + sh:value "987-65-432A" + ], + [ + a sh:ValidationResult; + sh:focusNode per:Bob; + sh:resultPath per:ssn; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent; + sh:sourceShape per:PersonShape + ], + [ + a sh:ValidationResult; + sh:focusNode per:Calvin; + sh:resultPath per:worksFor; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:ClassConstraintComponent; + sh:sourceShape per:PersonShape + ], + [ + a sh:ValidationResult; + sh:focusNode per:Calvin; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:ClosedConstraintComponent; + sh:sourceShape per:PersonShape; + sh:value "1999-09-09"^^XML:date + ] +]. + +__________________________________________________ + +1 +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : ( ) + -> Too many (2) ( ) on + -> Error value should be of node kind: + -> Error value should be of node kind: + Expected statements: 10 + Actual statements: 25 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix p: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode p:A; + sh:resultPath ( p:p1 p:p2 ); + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent; + sh:sourceShape p:SP; + sh:value "value" + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix p: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode p:A; + sh:resultPath ( p:p1 p:p2 ); + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent; + sh:sourceShape p:S + ], + [ + a sh:ValidationResult; + sh:focusNode p:A; + sh:resultPath ( p:p1 p:p2 ); + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent; + sh:sourceShape p:S; + sh:value "value" + ], + [ + a sh:ValidationResult; + sh:focusNode p:A; + sh:resultPath ( p:p1 p:p2 ); + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent; + sh:sourceShape p:S; + sh:value "value" + ] +]. + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target class +Target class member + Applying shape + to node + closed: false + Checking property : _:n222 + -> Too few (1) _:n222 on +Target class member + Applying shape + to node + closed: false + Checking property : _:n222 + -> Too many (3) _:n222 on +Target class member + Applying shape + to node + closed: false + Checking property : _:n222 + Expected statements: 18 + Actual statements: 16 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix p: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode p:InvalidResource1; + sh:resultPath [ sh:inversePath p:child ]; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinCountConstraintComponent; + sh:sourceShape p:TestShape-P + ], + [ + a sh:ValidationResult; + sh:focusNode p:InvalidResource2; + sh:resultPath [ sh:inversePath p:child ]; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent; + sh:sourceShape p:TestShape-P + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix p: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode p:InvalidResource1; + sh:resultPath []; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinCountConstraintComponent; + sh:sourceShape p:TestShape + ], + [ + a sh:ValidationResult; + sh:focusNode p:InvalidResource2; + sh:resultPath []; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent; + sh:sourceShape p:TestShape + ] +]. + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : + Expected statements: 16 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix p: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode p:InvalidResource1; + sh:resultPath p:property; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:HasValueConstraintComponent; + sh:sourceShape p:TestShape-P + ], + [ + a sh:ValidationResult; + sh:focusNode p:InvalidResource2; + sh:resultPath p:property; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:HasValueConstraintComponent; + sh:sourceShape p:TestShape-P + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +3 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : + Applying shape _:n241 + to node _:n246 + closed: false + Checking property _:n242: + -> Too few (0) on _:n246 + Applying shape _:n243 + to node _:n246 + closed: false + Checking property _:n244: + -> Too few (0) on _:n246 + -> Error _:n246 does not match ALL shapes (_:n241 _:n243) +Target node + Applying shape + to node + closed: false + Checking property : + Applying shape _:n241 + to node _:n247 + closed: false + Checking property _:n242: + -> Too few (0) on _:n247 + Applying shape _:n243 + to node _:n247 + closed: false + Checking property _:n244: + -> Too few (0) on _:n247 + -> Error _:n247 does not match ALL shapes (_:n241 _:n243) +Target node + Applying shape + to node + closed: false + Checking property : + Applying shape _:n241 + to node _:n248 + closed: false + Checking property _:n242: + -> Too few (0) on _:n248 + Applying shape _:n243 + to node _:n248 + closed: false + Checking property _:n244: + -> Too few (0) on _:n248 + -> Error _:n248 does not match ALL shapes (_:n241 _:n243) +Target node + Applying shape + to node + closed: false + Checking property : + Applying shape _:n241 + to node _:n249 + closed: false + Checking property _:n242: + Applying shape _:n243 + to node _:n249 + closed: false + Checking property _:n244: + Expected statements: 26 + Actual statements: 68 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix n0: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode n0:InvalidResource1; + sh:resultPath n0:address; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:AndConstraintComponent; + sh:sourceShape n0:AddressShape-address; + sh:value [] + ], + [ + a sh:ValidationResult; + sh:focusNode n0:InvalidResource2; + sh:resultPath n0:address; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:AndConstraintComponent; + sh:sourceShape n0:AddressShape-address; + sh:value [] + ], + [ + a sh:ValidationResult; + sh:focusNode n0:InvalidResource3; + sh:resultPath n0:address; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:AndConstraintComponent; + sh:sourceShape n0:AddressShape-address; + sh:value [] + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix n0: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode n0:InvalidResource1; + sh:resultPath n0:address; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:AndConstraintComponent; + sh:sourceShape n0:AddressShape; + sh:value [] + ], + [ + a sh:ValidationResult; + sh:focusNode n0:InvalidResource2; + sh:resultPath n0:address; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:AndConstraintComponent; + sh:sourceShape n0:AddressShape; + sh:value [] + ], + [ + a sh:ValidationResult; + sh:focusNode n0:InvalidResource3; + sh:resultPath n0:address; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:AndConstraintComponent; + sh:sourceShape n0:AddressShape; + sh:value [] + ], + [ + a sh:ValidationResult; + sh:focusNode []; + sh:resultPath n0:postalCode; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinCountConstraintComponent; + sh:sourceShape [] + ], + [ + a sh:ValidationResult; + sh:focusNode []; + sh:resultPath n0:postalCode; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinCountConstraintComponent; + sh:sourceShape [] + ], + [ + a sh:ValidationResult; + sh:focusNode []; + sh:resultPath n0:postalCode; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinCountConstraintComponent; + sh:sourceShape [] + ], + [ + a sh:ValidationResult; + sh:focusNode []; + sh:resultPath n0:suburb; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinCountConstraintComponent; + sh:sourceShape [] + ], + [ + a sh:ValidationResult; + sh:focusNode []; + sh:resultPath n0:suburb; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinCountConstraintComponent; + sh:sourceShape [] + ], + [ + a sh:ValidationResult; + sh:focusNode []; + sh:resultPath n0:suburb; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinCountConstraintComponent; + sh:sourceShape [] + ] +]. + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : + -> Error should be in class + -> Error A string should be in class +Target node + Applying shape + to node + closed: false + Checking property : + -> Error should be in class +Target node + Applying shape + to node + closed: false + Checking property : + -> Error _:n267 should be in class + Expected statements: 18 + Actual statements: 30 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix cl: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode cl:InvalidResource1; + sh:resultPath cl:testProperty; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:ClassConstraintComponent; + sh:sourceShape cl:TestShape-testProperty; + sh:value cl:InvalidResource1 + ], + [ + a sh:ValidationResult; + sh:focusNode cl:InvalidResource1; + sh:resultPath cl:testProperty; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:ClassConstraintComponent; + sh:sourceShape cl:TestShape-testProperty; + sh:value "A string" + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix cl: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode cl:InvalidResource1; + sh:resultPath cl:testProperty; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:ClassConstraintComponent; + sh:sourceShape cl:TestShape + ], + [ + a sh:ValidationResult; + sh:focusNode cl:InvalidResource1; + sh:resultPath cl:testProperty; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:ClassConstraintComponent; + sh:sourceShape cl:TestShape + ], + [ + a sh:ValidationResult; + sh:focusNode cl:ValidResource1; + sh:resultPath cl:testProperty; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:ClassConstraintComponent; + sh:sourceShape cl:TestShape + ], + [ + a sh:ValidationResult; + sh:focusNode cl:ValidResource2; + sh:resultPath cl:testProperty; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:ClassConstraintComponent; + sh:sourceShape cl:TestShape + ] +]. + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test + Expected statements: 18 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix d: . +@prefix XML: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode d:InvalidResource1; + sh:resultPath d:dateProperty; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent; + sh:sourceShape d:TestShape-dateProperty; + sh:value "2011-01-01"^^XML:dateTime + ], + [ + a sh:ValidationResult; + sh:focusNode d:InvalidResource1; + sh:resultPath d:integerProperty; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent; + sh:sourceShape d:TestShape-integerProperty; + sh:value 11.1 + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : + Applying shape _:n287 + to node 42 + closed: false + Applying shape _:n288 + to node 42 + closed: false +Target node + Applying shape + to node + closed: false + Checking property : + Applying shape _:n287 + to node A + closed: false + Applying shape _:n288 + to node A + closed: false +Target node + Applying shape + to node + closed: false + Checking property : + Applying shape _:n287 + to node A + closed: false + Applying shape _:n288 + to node A + closed: false +Target node + Applying shape + to node + closed: false + Checking property : + Applying shape _:n287 + to node A + closed: false + Applying shape _:n288 + to node A + closed: false + Expected statements: 10 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix d: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode d:InvalidInstance1; + sh:resultPath d:value; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:OrConstraintComponent; + sh:sourceShape d:TestShape-value; + sh:value 42 + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : + -> Error A should be datatype +Target node + Applying shape + to node + closed: false + Checking property : + -> Error 42 should be datatype +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : + Expected statements: 18 + Actual statements: 18 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix d: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode d:InvalidInstance1; + sh:resultPath d:value; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent; + sh:sourceShape d:TestShape-value; + sh:value "A"@en + ], + [ + a sh:ValidationResult; + sh:focusNode d:InvalidInstance2; + sh:resultPath d:value; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent; + sh:sourceShape d:TestShape-value; + sh:value 42 + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix d: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode d:InvalidInstance1; + sh:resultPath d:value; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent; + sh:sourceShape d:TestShape; + sh:value "A"@en + ], + [ + a sh:ValidationResult; + sh:focusNode d:InvalidInstance2; + sh:resultPath d:value; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:DatatypeConstraintComponent; + sh:sourceShape d:TestShape; + sh:value 42 + ] +]. + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : + Expected statements: 18 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix dis: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode dis:InvalidResource1; + sh:resultPath dis:property1; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:DisjointConstraintComponent; + sh:sourceShape dis:TestShape-property1; + sh:value "A" + ], + [ + a sh:ValidationResult; + sh:focusNode dis:InvalidResource2; + sh:resultPath dis:property1; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:DisjointConstraintComponent; + sh:sourceShape dis:TestShape-property1; + sh:value "A" + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : + Expected statements: 42 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix equ: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode equ:InvalidResource1; + sh:resultPath equ:property1; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:EqualsConstraintComponent; + sh:sourceShape equ:TestShape-property1; + sh:value "A" + ], + [ + a sh:ValidationResult; + sh:focusNode equ:InvalidResource1; + sh:resultPath equ:property1; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:EqualsConstraintComponent; + sh:sourceShape equ:TestShape-property1; + sh:value "B" + ], + [ + a sh:ValidationResult; + sh:focusNode equ:InvalidResource2; + sh:resultPath equ:property1; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:EqualsConstraintComponent; + sh:sourceShape equ:TestShape-property1; + sh:value "A" + ], + [ + a sh:ValidationResult; + sh:focusNode equ:InvalidResource3; + sh:resultPath equ:property1; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:EqualsConstraintComponent; + sh:sourceShape equ:TestShape-property1; + sh:value "A" + ], + [ + a sh:ValidationResult; + sh:focusNode equ:InvalidResource4; + sh:resultPath equ:property1; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:EqualsConstraintComponent; + sh:sourceShape equ:TestShape-property1; + sh:value "B" + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test + Expected statements: 10 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix in: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode in:InvalidInstance1; + sh:resultPath in:property; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:InConstraintComponent; + sh:sourceShape in:ShapeClass-property; + sh:value "D" + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : + Expected statements: 26 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix les: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode les:InvalidResource1; + sh:resultPath les:property1; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:LessThanConstraintComponent; + sh:sourceShape les:TestShape-property1; + sh:value 4 + ], + [ + a sh:ValidationResult; + sh:focusNode les:InvalidResource2; + sh:resultPath les:property1; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:LessThanConstraintComponent; + sh:sourceShape les:TestShape-property1; + sh:value 6 + ], + [ + a sh:ValidationResult; + sh:focusNode les:InvalidResource3; + sh:resultPath les:property1; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:LessThanConstraintComponent; + sh:sourceShape les:TestShape-property1; + sh:value 5 + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : + Expected statements: 26 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix l: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode l:Berg; + sh:resultPath l:prefLabel; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:LanguageInConstraintComponent; + sh:sourceShape l:NewZealandLanguagesShape-prefLabel; + sh:value l:BergLabel + ], + [ + a sh:ValidationResult; + sh:focusNode l:Berg; + sh:resultPath l:prefLabel; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:LanguageInConstraintComponent; + sh:sourceShape l:NewZealandLanguagesShape-prefLabel; + sh:value "Berg" + ], + [ + a sh:ValidationResult; + sh:focusNode l:Berg; + sh:resultPath l:prefLabel; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:LanguageInConstraintComponent; + sh:sourceShape l:NewZealandLanguagesShape-prefLabel; + sh:value "Berg"@de + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target class +Target class member + Applying shape + to node + closed: false + Checking property : +Target class member + Applying shape + to node + closed: false + Checking property : +Target class member + Applying shape + to node + closed: false + Checking property : + Expected statements: 9 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix h: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode h:InvalidMalePerson; + sh:resultPath h:gender; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:HasValueConstraintComponent; + sh:sourceShape h:PersonShape-gender + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : + Expected statements: 34 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix les: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode les:InvalidInstance1; + sh:resultPath les:first; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:LessThanConstraintComponent; + sh:sourceShape les:TestShape-first; + sh:value 1 + ], + [ + a sh:ValidationResult; + sh:focusNode les:InvalidInstance1; + sh:resultPath les:first; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:LessThanConstraintComponent; + sh:sourceShape les:TestShape-first; + sh:value 1 + ], + [ + a sh:ValidationResult; + sh:focusNode les:InvalidInstance1; + sh:resultPath les:first; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:LessThanConstraintComponent; + sh:sourceShape les:TestShape-first; + sh:value 2 + ], + [ + a sh:ValidationResult; + sh:focusNode les:InvalidInstance1; + sh:resultPath les:first; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:LessThanConstraintComponent; + sh:sourceShape les:TestShape-first; + sh:value 2 + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : + Expected statements: 18 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix les: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode les:InvalidResource1; + sh:resultPath les:property1; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent + sh:LessThanOrEqualsConstraintComponent; + sh:sourceShape les:TestShape-property1; + sh:value 5 + ], + [ + a sh:ValidationResult; + sh:focusNode les:InvalidResource2; + sh:resultPath les:property1; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent + sh:LessThanOrEqualsConstraintComponent; + sh:sourceShape les:TestShape-property1; + sh:value 6 + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target class +Target class member + Applying shape + to node + closed: false + Checking property : + -> Too many (2) on +Target class member + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : + Expected statements: 9 + Actual statements: 9 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix m: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode m:InvalidPerson; + sh:resultPath m:firstName; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent; + sh:sourceShape m:PersonShape-firstName + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix m: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode m:InvalidPerson; + sh:resultPath m:firstName; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent; + sh:sourceShape m:PersonShape + ] +]. + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : + -> Too many (1) on +Target node + Applying shape + to node + closed: false + Checking property : + Expected statements: 9 + Actual statements: 9 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix m: . +@prefix owl: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode m:InvalidResource; + sh:resultPath owl:versionInfo; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent; + sh:sourceShape m:TestShape-versionInfo + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix m: . +@prefix owl: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode m:InvalidResource; + sh:resultPath owl:versionInfo; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxCountConstraintComponent; + sh:sourceShape m:TestShape + ] +]. + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : + -> Error 1 should less than or equal to 1 +Target node + Applying shape + to node + closed: false + Checking property : + -> Error 2 should less than or equal to 1 +Target node + Applying shape + to node + closed: false + Checking property : + -> Error a should less than or equal to 1 +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : + Expected statements: 26 + Actual statements: 26 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix m: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode m:InvalidResource1; + sh:resultPath m:property; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxExclusiveConstraintComponent; + sh:sourceShape m:TestShape-property; + sh:value 1 + ], + [ + a sh:ValidationResult; + sh:focusNode m:InvalidResource2; + sh:resultPath m:property; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxExclusiveConstraintComponent; + sh:sourceShape m:TestShape-property; + sh:value 2 + ], + [ + a sh:ValidationResult; + sh:focusNode m:InvalidResource3; + sh:resultPath m:property; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxExclusiveConstraintComponent; + sh:sourceShape m:TestShape-property; + sh:value "a" + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix m: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode m:InvalidResource1; + sh:resultPath m:property; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxExclusiveConstraintComponent; + sh:sourceShape m:TestShape; + sh:value 1 + ], + [ + a sh:ValidationResult; + sh:focusNode m:InvalidResource2; + sh:resultPath m:property; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxExclusiveConstraintComponent; + sh:sourceShape m:TestShape; + sh:value 2 + ], + [ + a sh:ValidationResult; + sh:focusNode m:InvalidResource3; + sh:resultPath m:property; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxExclusiveConstraintComponent; + sh:sourceShape m:TestShape; + sh:value "a" + ] +]. + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property : + -> Error 2 should less than or equal to 1 +Target node + Applying shape + to node + closed: false + Checking property : + -> Error a should less than or equal to 1 +Target node + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : + Expected statements: 18 + Actual statements: 18 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix m: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode m:InvalidResource1; + sh:resultPath m:property; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxInclusiveConstraintComponent; + sh:sourceShape m:TestShape-property; + sh:value 2 + ], + [ + a sh:ValidationResult; + sh:focusNode m:InvalidResource2; + sh:resultPath m:property; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxInclusiveConstraintComponent; + sh:sourceShape m:TestShape-property; + sh:value "a" + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix m: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode m:InvalidResource1; + sh:resultPath m:property; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxInclusiveConstraintComponent; + sh:sourceShape m:TestShape; + sh:value 2 + ], + [ + a sh:ValidationResult; + sh:focusNode m:InvalidResource2; + sh:resultPath m:property; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxInclusiveConstraintComponent; + sh:sourceShape m:TestShape; + sh:value "a" + ] +]. + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test + Expected statements: 10 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix m: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode m:InvalidInstance1; + sh:resultPath m:testProperty; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MaxLengthConstraintComponent; + sh:sourceShape m:TestShape-testProperty; + sh:value "ABC" + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target class +Target class member + Applying shape + to node + closed: false + Checking property : + -> Too few (0) on +Target class member + Applying shape + to node + closed: false + Checking property : +Target node + Applying shape + to node + closed: false + Checking property : + Expected statements: 9 + Actual statements: 9 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix min: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode min:InvalidPerson; + sh:resultPath min:firstName; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinCountConstraintComponent; + sh:sourceShape min:PersonShape-firstName + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix min: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode min:InvalidPerson; + sh:resultPath min:firstName; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinCountConstraintComponent; + sh:sourceShape min:PersonShape + ] +]. + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target node + Applying shape + to node + closed: false + Checking property _:n415: + Expected statements: 2 + Actual statements: 2 + Match -> passed +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test + Expected statements: 18 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix min: . +@prefix rd: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode min:InvalidInstance1; + sh:resultPath min:testProperty; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinExclusiveConstraintComponent; + sh:sourceShape min:TestShape-testProperty; + sh:value "A string" + ], + [ + a sh:ValidationResult; + sh:focusNode min:InvalidInstance2; + sh:resultPath min:testProperty; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinExclusiveConstraintComponent; + sh:sourceShape min:TestShape-testProperty; + sh:value rd:Resource + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test + Expected statements: 10 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix min: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode min:InvalidInstance1; + sh:resultPath min:testProperty; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinLengthConstraintComponent; + sh:sourceShape min:TestShape-testProperty; + sh:value "A" + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test + Expected statements: 10 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix nod: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode nod:Issue_1; + sh:resultPath nod:assignedTo; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:NodeConstraintComponent; + sh:sourceShape nod:Issue-assignedTo; + sh:value nod:Anon + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test + Expected statements: 18 + Actual statements: 2 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix min: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode min:InvalidInstance1; + sh:resultPath min:testProperty; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinExclusiveConstraintComponent; + sh:sourceShape min:TestShape-testProperty; + sh:value 40 + ], + [ + a sh:ValidationResult; + sh:focusNode min:InvalidInstance2; + sh:resultPath min:testProperty; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:MinExclusiveConstraintComponent; + sh:sourceShape min:TestShape-testProperty; + sh:value 39 + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . + +[ a sh:ValidationReport; sh:conforms true ]. + + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target class +Target class member + Applying shape + to node + closed: false + Checking property : + Applying shape + to node + closed: false + Checking property : + -> Error should match shape +Target class member + Applying shape + to node + closed: false + Checking property : + Applying shape + to node + closed: false + Checking property : + -> Error 5678 should be datatype + Expected statements: 10 + Actual statements: 10 + -> FAILED, expected: + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix nod: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode nod:Reto; + sh:resultPath nod:address; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:NodeConstraintComponent; + sh:sourceShape nod:PersonShape-address; + sh:value nod:RetosAddress + ] +]. + +__________________________________________________ +@prefix : <#>. +@prefix sh: . +@prefix nod: . + +[ + a sh:ValidationReport; + sh:conforms true; + sh:result + [ + a sh:ValidationResult; + sh:focusNode nod:Bob; + sh:resultPath nod:address; + sh:resultSeverity sh:Violation; + sh:sourceConstraintComponent sh:NodeConstraintComponent; + sh:sourceShape nod:PersonShape; + sh:value nod:BobsAddress + ] +]. + +__________________________________________________ + +1 +Manifest loaded: +Entries 1 + -- Do approp test for +loading... + includes: 0 for + Validation test +Target class +Target class member + Applying shape + to node + closed: false +@@ NO PATH! 0 +as subject: 0 +as object: 0 +property: _:n463 +shape: +about shape: ., _:n463 ., . +node: diff --git a/test/shapes/bnodetest.js b/test/shapes/bnodetest.js new file mode 100644 index 0000000..e1e6085 --- /dev/null +++ b/test/shapes/bnodetest.js @@ -0,0 +1,26 @@ + +const $rdf = require('rdflib') + +const kb = $rdf.graph() +const fetcher = $rdf.fetcher(kb) + +const sh = $rdf.Namespace('http://www.w3.org/ns/shacl#') + +const here = 'file:///devel/github.com/linkeddata/rabel/test/shapes/' + +const doc = $rdf.sym(here + 'nodeKind-001.ttl') + +const ex0 = $rdf.Namespace(doc.uri + '#') +const ex = $rdf.Namespace('http://datashapes.org/sh/tests/core/property/nodeKind-001.test#') +const log = console.log + +fetcher.load(doc).then(function (xhr) { + log('loaded') + let shape = ex('ShapeWithBlankNode') + log('shape: ' + shape) + let property = kb.the(shape, sh('property')) + log('property: ' + property) + let path = kb.the(property, sh('path')) + log('path: ' + path) + process.exit(0) +}) diff --git a/test/shapes/nodeKind-001.ttl b/test/shapes/nodeKind-001.ttl new file mode 100644 index 0000000..f31e5ea --- /dev/null +++ b/test/shapes/nodeKind-001.ttl @@ -0,0 +1,370 @@ +@prefix dash: . +@prefix ex: . +@prefix mf: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix sh: . +@prefix sht: . +@prefix xsd: . + +ex:InstanceWithBlankNode + rdf:type ex:MyClass ; + ex:myProperty _:b55454 ; +. +ex:InstanceWithBlankNodeAndIRI + rdf:type ex:MyClass ; + ex:myProperty rdfs:Class ; + ex:myProperty _:b67098 ; +. +ex:InstanceWithBlankNodeAndLiteral + rdf:type ex:MyClass ; + ex:myProperty "Literal" ; + ex:myProperty _:b99026 ; +. +ex:InstanceWithIRI + rdf:type ex:MyClass ; + ex:myProperty rdfs:Class ; +. +ex:InstanceWithIRIAndLiteral + rdf:type ex:MyClass ; + ex:myProperty rdfs:Class ; + ex:myProperty "Literal" ; +. +ex:InstanceWithLiteral + rdf:type ex:MyClass ; + ex:myProperty "Literal" ; +. +ex:MyClass + rdf:type rdfs:Class ; + rdfs:label "My class" ; +. +ex:ShapeWithBlankNode + rdf:type sh:NodeShape ; + sh:property _:b38619 ; + sh:targetClass ex:MyClass ; +. +ex:ShapeWithBlankNodeOrIRI + rdf:type sh:NodeShape ; + sh:property _:b3078 ; + sh:targetClass ex:MyClass ; +. +ex:ShapeWithBlankNodeOrLiteral + rdf:type sh:NodeShape ; + sh:property _:b14975 ; + sh:targetClass ex:MyClass ; +. +ex:ShapeWithIRI + rdf:type sh:NodeShape ; + sh:property _:b97614 ; + sh:targetClass ex:MyClass ; +. +ex:ShapeWithIRIOrLiteral + rdf:type sh:NodeShape ; + sh:property _:b97860 ; + sh:targetClass ex:MyClass ; +. +ex:ShapeWithLiteral + rdf:type sh:NodeShape ; + sh:property _:b79526 ; + sh:targetClass ex:MyClass ; +. +ex:myProperty + rdf:type rdf:Property ; + rdfs:domain ex:MyClass ; + rdfs:label "my property" ; +. +<> + rdf:type mf:Manifest ; + mf:entries ( + + ) ; +. + + rdf:type sht:Validate ; + mf:action [ + sht:dataGraph <> ; + sht:shapesGraph <> ; + ] ; + mf:result [ + rdf:type sh:ValidationReport ; + sh:conforms "false"^^xsd:boolean ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNode ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b79526 ; + sh:value _:b55454 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNode ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97614 ; + sh:value _:b55454 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNode ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97860 ; + sh:value _:b55454 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b14975 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b38619 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b79526 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b79526 ; + sh:value _:b67098 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97614 ; + sh:value _:b67098 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97860 ; + sh:value _:b67098 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b3078 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b38619 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b79526 ; + sh:value _:b99026 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97614 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97614 ; + sh:value _:b99026 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithBlankNodeAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97860 ; + sh:value _:b99026 ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b14975 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b38619 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRI ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b79526 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRIAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b3078 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRIAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b14975 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRIAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b38619 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRIAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b38619 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRIAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b79526 ; + sh:value rdfs:Class ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithIRIAndLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97614 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b3078 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b38619 ; + sh:value "Literal" ; + ] ; + sh:result [ + rdf:type sh:ValidationResult ; + sh:focusNode ex:InstanceWithLiteral ; + sh:resultPath ex:myProperty ; + sh:resultSeverity sh:Violation ; + sh:sourceConstraintComponent sh:NodeKindConstraintComponent ; + sh:sourceShape _:b97614 ; + sh:value "Literal" ; + ] ; + ] ; + mf:status sht:proposed ; +. +_:b3078 + sh:path ex:myProperty ; + sh:nodeKind sh:BlankNodeOrIRI ; +. +_:b14975 + sh:path ex:myProperty ; + sh:nodeKind sh:BlankNodeOrLiteral ; +. +_:b38619 + sh:path ex:myProperty ; + sh:nodeKind sh:BlankNode ; +. +_:b55454 + rdf:type rdfs:Resource ; +. +_:b67098 + rdf:type rdfs:Resource ; +. +_:b79526 + sh:path ex:myProperty ; + sh:nodeKind sh:Literal ; +. +_:b97614 + sh:path ex:myProperty ; + sh:nodeKind sh:IRI ; +. +_:b97860 + sh:path ex:myProperty ; + sh:nodeKind sh:IRIOrLiteral ; +. +_:b99026 + rdf:type rdfs:Resource ; +. diff --git a/test/test-rabel.js b/test/test-rabel.js new file mode 100644 index 0000000..2cc273e --- /dev/null +++ b/test/test-rabel.js @@ -0,0 +1,95 @@ +/* TEST the rabel utility +*/ +let fetch = require('node-fetch') +let assert = require('assert') +let path = require('path') +let fs = require('fs-extra') +let $rdf = require('rdflib') +let rabel = require('../') +const TARGET_DIR = 'target-dir' + +/* +package.json: + "dependencies": { + "node-fetch": "^1.7.3" + }, + "devDependencies": { + "mocha": "^4.0.1" + }, +*/ + +// rabel -test=../../w3c/data-shapes/data-shapes-test-suite/tests/dash/core/node/manifest.ttl" +xdescribe('fetch', () => { + [ + // These will pass. + { url: 'http://localhost/', status: 200 }, + { url: 'http://localhost/999', status: 404 }, + { url: 'http://localhost:999/', catchString: 'ECONNREFUSED' }, + { url: 'http //localhost/999', catchString: 'absolute urls' }, + { url: '', catchString: 'absolute urls' }, + { url: null, catchString: 'must be a string' }, + { url: undefined, catchString: 'must be a string' }, + + // These will fail without timeout. + { url: 'http://localhost:999', status: 404 }, + { url: 'http://localhost/999', catchString: 'ECONNREFUSED' }, + { url: 'http //localhost:999', status: 404 }, + { url: 'http //localhost/999', catchString: 'ECONNREFUSED' } + ].forEach(t => { + if ('status' in t) { + let msg = JSON.stringify(t.url) + ' should fetch a ' + t.status + it(msg, () => { + return fetch(t.url).then(res => { + assert.equal(res.status, t.status) + }) + }) + } else { + let msg = JSON.stringify(t.url) + ' should fail with ' + t.catchString + it(msg, done => { + fetch(t.url) + .then(res => { + done(Error('unexpected success with status ' + res.status)) + }).catch(e => { + assert.notEqual(e.message.indexOf(t.catchString), -1, + '"' + t.catchString + '" not found in "' + e.message + '"') + done() + }).catch(e => { + done(e) // report failed assertion from previous block. + // Without this catch, done isn't called and mocha times out. + }) + }) + } + }) +}) + +describe('rabel', () => { + [ + { file: 'resource1.ttl' } + ].forEach(t => { + if ('file' in t) { + let filePath = path.join(__dirname, t.file) + it('should load and spray ' + filePath, done => { + let kb = $rdf.graph() + let fetcher = $rdf.fetcher(kb, {a: 1}) + let doc = kb.sym('file://' + filePath) + try { + fs.removeSync(TARGET_DIR) + } catch (e) { + } + fs.mkdirSync(TARGET_DIR) + process.chdir(TARGET_DIR) + fetcher.nowOrWhenFetched(doc, {}, function (ok, body, xhr) { + // rabel.check(ok, body, xhr ? xhr.status : undefined) + console.log('Loaded ' + doc) + rabel.spray( + 'http://a.example/', + doc, + msg => done(msg), + kb, + () => done() + ) + }) + }) + } + }) +}) diff --git a/test/turtle/README.txt b/test/turtle/README.txt new file mode 100644 index 0000000..06e481d --- /dev/null +++ b/test/turtle/README.txt @@ -0,0 +1,10 @@ + +See https://www.w3.org/2013/TurtleTests/ +and +https://www.w3.org/2013/TurtleTests/manifest.ttl + +/devel/github.com/w3c/data-shapes/data-shapes-test-suite/tests/dash/core/manifest.ttl + + +http://w3c.github.io/data-shapes/data-shapes-test-suite/tests/dash/core/manifest.ttl + diff --git a/test/turtle/manifest.ttl b/test/turtle/manifest.ttl new file mode 100644 index 0000000..babcde4 --- /dev/null +++ b/test/turtle/manifest.ttl @@ -0,0 +1,9 @@ +@prefix rdf: . +@prefix rdfs: . +@prefix mf: . + +@prefix rdft: . + +<> a mf:Manifest; + rdfs:label "Turtle tests - (pointer to)"; + mf:include . diff --git a/test/turtle/rdf:type b/test/turtle/rdf:type new file mode 100644 index 0000000..e69de29