Comment #2 on issue 17 by
s...@webiken.net: need to Identify a BNode in
sadi.js
http://code.google.com/p/sadi/issues/detail?id=17
Here's the code that's building the graph:
var direction = "";
if (isUpData) {direction = "upregulated"}
else {direction = "downregulated"}
var count = 0;
var bnodes = []
angular.forEach(data, function(row){
angular.forEach(row, function(item){
count++;
item = item.replace(/^\s+|\s+$/g, '');
app.probeIds.push(goiapp.LOD_DATA+'feature/'+item);
var bnode = app.inputGraph.getResource("_:"+item, "bnode");
var probeId =
app.inputGraph.getResource(goiapp.LOD_DATA+'feature/'+item);
probeId[ns.rdf("type")] =
[app.inputGraph.getResource(ns.gtry(submittedFeature))];
bnode[ns.gtry("hasRank")] = [count];
bnode[ns.prov("specializationOf")] = [probeId];
bnodes.push(bnode);
});
});
sig[ns.gtry(direction)] = bnodes;
then I just call the sadi service with:
service(app.inputGraph,...);