Skip to content

Commit

Permalink
fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
Aklakan committed Apr 13, 2016
1 parent d59a155 commit 8a47938
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -14,3 +14,5 @@ coverage/
dist
index.html
.buildpath

gulp/npm-debug.log
53 changes: 53 additions & 0 deletions lib/sparql/DatasetSpec.js
@@ -0,0 +1,53 @@
var Class = require('../ext/Class');
var ObjectUtils = require('../util/ObjectUtils');

//var reduce = require('lodash.reduce');
var uniq = require('lodash.uniq');


/**
* A specification of an RDF Dataset
*
* http://www.w3.org/TR/sparql11-query/#rdfDataset
*
*/
var DatasetSpec = {
initialize: function(defaultGraphIris, namedGraphIris) {
this.defaultGraphIris = defaultGraphIris || [];
this.namedGraphIris = namedGraphIris || [];
},

getDefaultGraphIris: function() {
return this.defaultGraphIris;
},

getNamedGraphIris: function() {
return this.namedGraphIris;
},

getIrisMentioned: function() {
var raw = this.defaultGraphIris.concat(this.namedGraphIris);
var result = uniq(raw);
return result;
},

hashCode: function() {
if(this.hash == null) {
this.hash = ObjectUtils.hashCode(this);
}

return this.hash;
},

equals: function(that) {
var result = ObjectUtils.isEqual(this, that);
return result;
},

toString: function() {
return 'DatasetSpec: ' + JSON.stringify(this);
}
};


module.exports = DatasetSpec;
2 changes: 1 addition & 1 deletion test/util/geo.js
Expand Up @@ -19,7 +19,7 @@ var ajax = function(param) {
};

// lib
var jassa = require('../lib')(Promise, ajax);
var jassa = require('../../lib')(Promise, ajax);
// namespaces
var rdf = jassa.rdf;
var vocab = jassa.vocab;
Expand Down

0 comments on commit 8a47938

Please sign in to comment.