Skip to content

Commit

Permalink
API actually defines edges, not facts (oi)
Browse files Browse the repository at this point in the history
  • Loading branch information
kltm committed Apr 30, 2015
1 parent 5c86bb7 commit 69d32bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions lib/bbopx/minerva/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ bbopx.minerva.request_set = function(user_token, model_id){
//
// Args:
// op - "add" | "remove"
// thing - "model" | "individual" | "fact"
// thing - "model" | "individual" | "edge"
// thing_identifier - ind: id; fact: triple; model: implied
// key - string
// value - string
Expand All @@ -952,7 +952,7 @@ bbopx.minerva.request_set = function(user_token, model_id){
// Already done.
}else if( target == 'individual' ){
req.individual(target_identifier);
}else if( target == 'fact' ){
}else if( target == 'edge' ){
anchor._ensure_fact(target_identifier);
req.fact(target_identifier[0],
target_identifier[1],
Expand Down Expand Up @@ -1064,7 +1064,7 @@ bbopx.minerva.request_set = function(user_token, model_id){
*/
anchor.add_annotation_to_fact = function(key, value, triple, model_id){
anchor._ensure_fact(triple);
anchor._op_annotation_to_target('add', 'fact',
anchor._op_annotation_to_target('add', 'edge',
triple, key, value, model_id);
return anchor;
};
Expand All @@ -1085,7 +1085,7 @@ bbopx.minerva.request_set = function(user_token, model_id){
*/
anchor.remove_annotation_from_fact = function(key, value, triple, model_id){
anchor._ensure_fact(triple);
anchor._op_annotation_to_target('remove', 'fact', triple,
anchor._op_annotation_to_target('remove', 'edge', triple,
key, value, model_id);
return anchor;
};
Expand Down
8 changes: 4 additions & 4 deletions lib/bbopx/minerva/requests.js.tests
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ var diff = mr_t.is_different_thing;
'ind remove-annotation okay');
same(all_requests[4],
{
"entity": "fact",
"entity": "edge",
"operation": "add-annotation",
"arguments": {
"subject": "GO:123",
Expand All @@ -387,7 +387,7 @@ var diff = mr_t.is_different_thing;
'fact add-annotation okay');
same(all_requests[5],
{
"entity": "fact",
"entity": "edge",
"operation": "remove-annotation",
"arguments": {
"subject": "GO:123",
Expand All @@ -404,7 +404,7 @@ var diff = mr_t.is_different_thing;
},
'fact remove-annotation okay');

});
})();

// TODO: Practicing another assembly.
(function(){
Expand All @@ -427,7 +427,7 @@ var diff = mr_t.is_different_thing;
var ob = reqs.add_individual('GO:789');
var ed = reqs.add_fact([sb, ob, 'RO:123']);

});
})();

// TODO: Probe different ways of doing a "real" example.
(function(){
Expand Down

0 comments on commit 69d32bf

Please sign in to comment.