Issue 17 in sadi: need to Identify a BNode in sadi.js

2 views
Skip to first unread message

sa...@googlecode.com

unread,
Mar 19, 2014, 7:23:39 PM3/19/14
to bu...@sadiframework.org
Status: New
Owner: elmccar...@gmail.com
Labels: Type-Defect Product-JavaAPI

New issue 17 by s...@webiken.net: need to Identify a BNode in sadi.js
http://code.google.com/p/sadi/issues/detail?id=17

What steps will reproduce the problem?
1. create a bnode via var bnode = graph.getResource("_:something");
2. call the sadi service giving it graph
3. the serializer creates an element with a key of undefined


"undefined":{"id":[{"value":"_","type":"literal"},{"value":":","type":"literal"},{"value":"2","type":"literal","datatype":"http://www.w3.org/2001/XMLSchema#integer"}


What is the expected output? What do you see instead?

a uri instead of undefined


What version of the product are you using? On what operating system?

Mac OS X Chrome


Please provide any additional information below.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

sa...@googlecode.com

unread,
Mar 19, 2014, 7:27:41 PM3/19/14
to bu...@sadiframework.org

Comment #1 on issue 17 by elmccar...@gmail.com: need to Identify a BNode in
sadi.js
http://code.google.com/p/sadi/issues/detail?id=17

What serializer? Are you trying to send a BNode to a service? Because that
seems to work for me.

It would be easier to track this down if you could show me actual code
that's misbehaving. I don't see any SADI calls in the pseudocode you've
reported, so I don't know where to start.

sa...@googlecode.com

unread,
Mar 19, 2014, 7:30:33 PM3/19/14
to bu...@sadiframework.org

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,...);

sa...@googlecode.com

unread,
Mar 19, 2014, 7:33:43 PM3/19/14
to bu...@sadiframework.org
Updates:
Labels: -Product-JavaAPI Product-PythonAPI

Comment #3 on issue 17 by elmccar...@gmail.com: need to Identify a BNode in
sadi.js
http://code.google.com/p/sadi/issues/detail?id=17

Ah, this is the Python API (despite being labeled as a Java API defect).

I've updated the label so the issue will get attention from people who can
help.

sa...@googlecode.com

unread,
Mar 19, 2014, 7:34:43 PM3/19/14
to bu...@sadiframework.org

Comment #4 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

Sorry about that!

sa...@googlecode.com

unread,
Mar 19, 2014, 7:40:36 PM3/19/14
to bu...@sadiframework.org

Comment #5 on issue 17 by mccus...@gmail.com: need to Identify a BNode in
sadi.js
http://code.google.com/p/sadi/issues/detail?id=17

Actually, this is for the JavaScript client.

sa...@googlecode.com

unread,
Mar 19, 2014, 7:48:29 PM3/19/14
to bu...@sadiframework.org
Updates:
Labels: -Product-PythonAPI Product-JavaScriptAPI

Comment #6 on issue 17 by elmccar...@gmail.com: need to Identify a BNode in
sadi.js
http://code.google.com/p/sadi/issues/detail?id=17

(No comment was entered for this change.)

sa...@googlecode.com

unread,
Mar 20, 2014, 11:33:44 PM3/20/14
to bu...@sadiframework.org
Updates:
Status: Fixed
Owner: mccus...@gmail.com

Comment #7 on issue 17 by mccus...@gmail.com: need to Identify a BNode in
sadi.js
http://code.google.com/p/sadi/issues/detail?id=17

Fixed, bnodes are now correctly handled in the Javascript client (yes, we
have a Javascript client, but it only handles reading and writing JSON/RDF).
Reply all
Reply to author
Forward
0 new messages