lib/term_bootstrapper.rb
# NOTE: This must be updated if you intend to pick up new fields from EolTerms
This must be updated if you intend to pick up new fields from EolTerms
This must be updated if you intend to pick up new fields from EolTerms
def rels_by_direction(uri, direction = nil)
    relationship = direction == :incoming ? '<-[relationship]-' : '-[relationship]->'
    res = TraitBank.query(%Q{MATCH (term:Term { uri: "#{uri.gsub(/"/, '\"')}"})#{relationship}() RETURN TYPE(relationship)})['data'].first
    arr = Array(res).sort.uniq
    arr
  end
def rels_by_direction ( uri , direction = nil ) relationship = direction == :incoming ? '<-[relationship]-' : '-[relationship]->' res = TraitBank . query ( %Q{MATCH (term:Term { uri: "#{uri.gsub(/"/, '\"')}"})#{relationship}() RETURN TYPE(relationship)} ) [ 'data' ] . first arr = Array ( res ) . sort . uniq arr end
NOTE: This must be updated if you intend to pick up new fields from EolTerms
NOTE : This must be updated if you intend to pick up new fields from EolTerms
uri
<not_specific>
direction
<not_specific>