Commit ed292354 authored by Administrator's avatar Administrator
Browse files

add search page

parent 912ca956
../jsonstream2/bin/jsonstream.js
\ No newline at end of file
../@rdfjs/data-model/bin/test.js
\ No newline at end of file
language: node_js
node_js:
- "6"
- "8"
- "10"
# License
The MIT License (MIT)
Copyright © 2016–2018 Thomas Bergwinkl
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# @rdfjs/data-model
[![Build Status](https://travis-ci.org/rdfjs/data-model.svg?branch=master)](https://travis-ci.org/rdfjs/data-model)
[![npm version](https://img.shields.io/npm/v/@rdfjs/data-model.svg)](https://www.npmjs.com/package/@rdfjs/data-model)
A basic implementation of the [RDFJS Data Model](http://rdf.js.org/).
See [the specification](http://rdf.js.org/) for further details.
#!/usr/bin/env node
const path = require('path')
const Mocha = require('mocha')
const mocha = new Mocha()
global.rdf = require(path.resolve(process.argv[2] || ''))
mocha.addFile(path.join(__dirname, '../test/index.js')).run(failures => {
process.on('exit', () => {
process.exit(failures)
})
})
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.rdf = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
var DataFactory = require('./lib/data-factory')
module.exports = DataFactory
},{"./lib/data-factory":3}],2:[function(require,module,exports){
function BlankNode (id) {
this.value = id || ('b' + (++BlankNode.nextId))
}
BlankNode.prototype.equals = function (other) {
return !!other && other.termType === this.termType && other.value === this.value
}
BlankNode.prototype.termType = 'BlankNode'
BlankNode.nextId = 0
module.exports = BlankNode
},{}],3:[function(require,module,exports){
var BlankNode = require('./blank-node')
var DefaultGraph = require('./default-graph')
var Literal = require('./literal')
var NamedNode = require('./named-node')
var Quad = require('./quad')
var Variable = require('./variable')
function DataFactory () {}
DataFactory.namedNode = function (value) {
return new NamedNode(value)
}
DataFactory.blankNode = function (value) {
return new BlankNode(value)
}
DataFactory.literal = function (value, languageOrDatatype) {
if (typeof languageOrDatatype === 'string') {
if (languageOrDatatype.indexOf(':') === -1) {
return new Literal(value, languageOrDatatype)
}
return new Literal(value, null, DataFactory.namedNode(languageOrDatatype))
}
return new Literal(value, null, languageOrDatatype)
}
DataFactory.defaultGraph = function () {
return DataFactory.defaultGraphInstance
}
DataFactory.variable = function (value) {
return new Variable(value)
}
DataFactory.triple = function (subject, predicate, object) {
return DataFactory.quad(subject, predicate, object)
}
DataFactory.quad = function (subject, predicate, object, graph) {
return new Quad(subject, predicate, object, graph || DataFactory.defaultGraphInstance)
}
DataFactory.defaultGraphInstance = new DefaultGraph()
module.exports = DataFactory
},{"./blank-node":2,"./default-graph":4,"./literal":5,"./named-node":6,"./quad":7,"./variable":8}],4:[function(require,module,exports){
function DefaultGraph () {
this.value = ''
}
DefaultGraph.prototype.equals = function (other) {
return !!other && other.termType === this.termType
}
DefaultGraph.prototype.termType = 'DefaultGraph'
module.exports = DefaultGraph
},{}],5:[function(require,module,exports){
var NamedNode = require('./named-node')
function Literal (value, language, datatype) {
this.value = value
this.datatype = Literal.stringDatatype
this.language = ''
if (language) {
this.language = language
this.datatype = Literal.langStringDatatype
} else if (datatype) {
this.datatype = datatype
}
}
Literal.prototype.equals = function (other) {
return !!other && other.termType === this.termType && other.value === this.value &&
other.language === this.language && other.datatype.equals(this.datatype)
}
Literal.prototype.termType = 'Literal'
Literal.langStringDatatype = new NamedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#langString')
Literal.stringDatatype = new NamedNode('http://www.w3.org/2001/XMLSchema#string')
module.exports = Literal
},{"./named-node":6}],6:[function(require,module,exports){
function NamedNode (iri) {
this.value = iri
}
NamedNode.prototype.equals = function (other) {
return !!other && other.termType === this.termType && other.value === this.value
}
NamedNode.prototype.termType = 'NamedNode'
module.exports = NamedNode
},{}],7:[function(require,module,exports){
var DefaultGraph = require('./default-graph')
function Quad (subject, predicate, object, graph) {
this.subject = subject
this.predicate = predicate
this.object = object
if (graph) {
this.graph = graph
} else {
this.graph = new DefaultGraph()
}
}
Quad.prototype.equals = function (other) {
// `|| !other.termType` is for backwards-compatibility with old factories without RDF* support.
return !!other && (other.termType === 'Quad' || !other.termType) &&
other.subject.equals(this.subject) && other.predicate.equals(this.predicate) &&
other.object.equals(this.object) && other.graph.equals(this.graph)
}
Quad.prototype.termType = 'Quad'
Quad.prototype.value = ''
module.exports = Quad
},{"./default-graph":4}],8:[function(require,module,exports){
function Variable (name) {
this.value = name
}
Variable.prototype.equals = function (other) {
return !!other && other.termType === this.termType && other.value === this.value
}
Variable.prototype.termType = 'Variable'
module.exports = Variable
},{}]},{},[1])(1)
});
import * as RDF from "rdf-js";
export const defaultGraphInstance: RDF.DefaultGraph;
export function namedNode<Iri extends string = string>(value: Iri): RDF.NamedNode<Iri>;
export function blankNode(value?: string): RDF.BlankNode;
export function literal(value: string, languageOrDatatype?: string | RDF.NamedNode): RDF.Literal;
export function variable(value: string): RDF.Variable;
export function defaultGraph(): RDF.DefaultGraph;
export function triple<Q extends RDF.BaseQuad = RDF.Quad>(
subject: Q['subject'], predicate: Q['predicate'], object: Q['object']): Q;
export function quad<Q extends RDF.BaseQuad = RDF.Quad>(
subject: Q['subject'], predicate: Q['predicate'], object: Q['object'], graph?: Q['graph']): Q;
var DataFactory = require('./lib/data-factory')
module.exports = DataFactory
function BlankNode (id) {
this.value = id || ('b' + (++BlankNode.nextId))
}
BlankNode.prototype.equals = function (other) {
return !!other && other.termType === this.termType && other.value === this.value
}
BlankNode.prototype.termType = 'BlankNode'
BlankNode.nextId = 0
module.exports = BlankNode
var BlankNode = require('./blank-node')
var DefaultGraph = require('./default-graph')
var Literal = require('./literal')
var NamedNode = require('./named-node')
var Quad = require('./quad')
var Variable = require('./variable')
function DataFactory () {}
DataFactory.namedNode = function (value) {
return new NamedNode(value)
}
DataFactory.blankNode = function (value) {
return new BlankNode(value)
}
DataFactory.literal = function (value, languageOrDatatype) {
if (typeof languageOrDatatype === 'string') {
if (languageOrDatatype.indexOf(':') === -1) {
return new Literal(value, languageOrDatatype)
}
return new Literal(value, null, DataFactory.namedNode(languageOrDatatype))
}
return new Literal(value, null, languageOrDatatype)
}
DataFactory.defaultGraph = function () {
return DataFactory.defaultGraphInstance
}
DataFactory.variable = function (value) {
return new Variable(value)
}
DataFactory.triple = function (subject, predicate, object) {
return DataFactory.quad(subject, predicate, object)
}
DataFactory.quad = function (subject, predicate, object, graph) {
return new Quad(subject, predicate, object, graph || DataFactory.defaultGraphInstance)
}
DataFactory.defaultGraphInstance = new DefaultGraph()
module.exports = DataFactory
function DefaultGraph () {
this.value = ''
}
DefaultGraph.prototype.equals = function (other) {
return !!other && other.termType === this.termType
}
DefaultGraph.prototype.termType = 'DefaultGraph'
module.exports = DefaultGraph
var NamedNode = require('./named-node')
function Literal (value, language, datatype) {
this.value = value
this.datatype = Literal.stringDatatype
this.language = ''
if (language) {
this.language = language
this.datatype = Literal.langStringDatatype
} else if (datatype) {
this.datatype = datatype
}
}
Literal.prototype.equals = function (other) {
return !!other && other.termType === this.termType && other.value === this.value &&
other.language === this.language && other.datatype.equals(this.datatype)
}
Literal.prototype.termType = 'Literal'
Literal.langStringDatatype = new NamedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#langString')
Literal.stringDatatype = new NamedNode('http://www.w3.org/2001/XMLSchema#string')
module.exports = Literal
function NamedNode (iri) {
this.value = iri
}
NamedNode.prototype.equals = function (other) {
return !!other && other.termType === this.termType && other.value === this.value
}
NamedNode.prototype.termType = 'NamedNode'
module.exports = NamedNode
var DefaultGraph = require('./default-graph')
function Quad (subject, predicate, object, graph) {
this.subject = subject
this.predicate = predicate
this.object = object
if (graph) {
this.graph = graph
} else {
this.graph = new DefaultGraph()
}
}
Quad.prototype.equals = function (other) {
// `|| !other.termType` is for backwards-compatibility with old factories without RDF* support.
return !!other && (other.termType === 'Quad' || !other.termType) &&
other.subject.equals(this.subject) && other.predicate.equals(this.predicate) &&
other.object.equals(this.object) && other.graph.equals(this.graph)
}
Quad.prototype.termType = 'Quad'
Quad.prototype.value = ''
module.exports = Quad
function Variable (name) {
this.value = name
}
Variable.prototype.equals = function (other) {
return !!other && other.termType === this.termType && other.value === this.value
}
Variable.prototype.termType = 'Variable'
module.exports = Variable
{
"_from": "@rdfjs/data-model@^1.1.2",
"_id": "@rdfjs/data-model@1.2.0",
"_inBundle": false,
"_integrity": "sha512-6ITWcu2sr9zJqXUPDm1XJ8DRpea7PotWBIkTzuO1MCSruLOWH2ICoQOAtlJy30cT+GqH9oAQKPR+CHXejsdizA==",
"_location": "/@rdfjs/data-model",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@rdfjs/data-model@^1.1.2",
"name": "@rdfjs/data-model",
"escapedName": "@rdfjs%2fdata-model",
"scope": "@rdfjs",
"rawSpec": "^1.1.2",
"saveSpec": null,
"fetchSpec": "^1.1.2"
},
"_requiredBy": [
"/@rdfjs/parser-n3",
"/rdf-transform-triple-to-quad",
"/sparql-http-client"
],
"_resolved": "https://registry.npmjs.org/@rdfjs/data-model/-/data-model-1.2.0.tgz",
"_shasum": "1daa39f26d48e0ec4d6a60fc4150db7d7ef1bab2",
"_spec": "@rdfjs/data-model@^1.1.2",
"_where": "/home/cazenave/IdeaProjects/ffds-register-front/node_modules/sparql-http-client",
"author": {
"name": "Thomas Bergwinkl",
"email": "bergi@axolotlfarm.org",
"url": "https://www.bergnet.org/people/bergi/card#me"
},
"bin": {
"rdfjs-data-model-test": "bin/test.js"
},
"bugs": {
"url": "https://github.com/rdfjs-base/data-model/issues"
},
"bundleDependencies": false,
"dependencies": {
"@types/rdf-js": "*"
},
"deprecated": false,
"description": "A basic implementation of the RDFJS Data Model",
"devDependencies": {
"browserify": "^16.2.2",
"mocha": "^5.2.0",
"standard": "^11.0.1"
},
"engines": {
"node": ">=6"
},
"homepage": "https://github.com/rdfjs-base/data-model",
"keywords": [
"rdf",
"rdfjs",
"data-model"
],
"license": "MIT",
"main": "index.js",
"name": "@rdfjs/data-model",
"repository": {
"type": "git",
"url": "git://github.com/rdfjs-base/data-model.git"
},
"scripts": {
"build-dist": "browserify index.js --standalone rdf --outfile dist/rdf-data-model.js",
"lint": "standard *.js bin/*.js lib/*.js test/*.js",
"prepublish": "npm run build-dist",
"test": "npm run lint && mocha"
},
"types": "./index.d.ts",
"version": "1.2.0"
}
'use strict'
/* global describe, it */
var assert = require('assert')
function runTests (DataFactory) {
describe('.blankNode', function () {
it('should be a static method', function () {
assert.equal(typeof DataFactory.blankNode, 'function')
})
it('should create an object with a termType property that contains the value "BlankNode"', function () {
var term = DataFactory.blankNode()
assert.equal(term.termType, 'BlankNode')
})
it('should create an object with a value property that contains a unique identifier', function () {
var term1 = DataFactory.blankNode()
var term2 = DataFactory.blankNode()
assert.notEqual(term1.value, term2.value)
})
it('should create an object with a value property that contains the given identifier', function () {
var id = 'b1'
var term = DataFactory.blankNode(id)
assert.equal(term.value, id)
})
describe('.equals', function () {
it('should be a method', function () {
var term = DataFactory.blankNode()
assert.equal(typeof term.equals, 'function')
})
it('should return true if termType and value are equal', function () {
var id = 'b1'
var term = DataFactory.blankNode(id)
var mock = {termType: 'BlankNode', value: id}
assert.equal(term.equals(mock), true)
})
it('should return false if termType is not equal', function () {
var id = 'b1'
var term = DataFactory.blankNode(id)
var mock = {termType: 'NamedNode', value: id}
assert.equal(term.equals(mock), false)
})
it('should return false if value is not equal', function () {
var id = 'b1'
var term = DataFactory.blankNode(id)
var mock = {termType: 'BlankNode', value: id + '1'}
assert.equal(term.equals(mock), false)
})
it('should return false if value is falsy', function () {
var id = 'b1'
var term = DataFactory.blankNode(id)
assert.equal(term.equals(null), false)
})
})
})
}
module.exports = runTests
'use strict'
/* global describe, it */
var assert = require('assert')
function runTests (DataFactory) {
describe('.defaultGraph', function () {
it('should be a static method', function () {
assert.equal(typeof DataFactory.defaultGraph, 'function')
})
it('should create an object with a termType property that contains the value "DefaultGraph"', function () {
var term = DataFactory.defaultGraph()
assert.equal(term.termType, 'DefaultGraph')
})
it('should create an object with a value property that contains an empty string', function () {
var term = DataFactory.defaultGraph()
assert.equal(term.value, '')
})
describe('.equals', function () {
it('should be a method', function () {
var term = DataFactory.defaultGraph()
assert.equal(typeof term.equals, 'function')
})
it('should return true if termType and value are equal', function () {
var term = DataFactory.defaultGraph()
var mock = {termType: 'DefaultGraph', value: ''}
assert.equal(term.equals(mock), true)
})