File tree Expand file tree Collapse file tree
app/assets/javascripts/resources Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,6 +83,11 @@ QueryBuilder = {
8383 if ( v . type == "data" ) {
8484 result += "\n&& (?d_filter" + k . toString ( ) + " " + v . value + ")" ;
8585 }
86+ else if ( v . type == "object" && v . filter_type == "not_equals" ) {
87+ for ( i = 0 ; i < v . value . length ; i ++ ) {
88+ result += "\n&& (?o_filter" + k . toString ( ) + " != <" + v . value [ i ] . uri + ">)" ;
89+ }
90+ }
8691 } ) ;
8792 result += ")}\n" ;
8893 return result ;
@@ -345,10 +350,15 @@ QueryBuilder = {
345350 $ . each ( selected_filter_values , function ( k , v ) {
346351 if ( v . type == "object" ) {
347352 // section for object type properties
348- for ( j = 0 ; j < v . value . length ; j ++ ) {
349- if ( j > 0 )
350- result += " UNION " ;
351- result += "{ ?concept <" + v . property_uri + "> <" + v . value [ j ] [ "uri" ] + "> }" ;
353+ if ( v . filter_type == "not_equals" ) {
354+ result += "?concept <" + v . property_uri + "> ?o_filter" + k . toString ( ) ;
355+ }
356+ else {
357+ for ( j = 0 ; j < v . value . length ; j ++ ) {
358+ if ( j > 0 )
359+ result += " UNION " ;
360+ result += "{ ?concept <" + v . property_uri + "> <" + v . value [ j ] [ "uri" ] + "> }" ;
361+ }
352362 }
353363 result += ".\n"
354364 }
You can’t perform that action at this time.
0 commit comments