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 uri_has_relationships?(uri)
    out_rels = rels_by_direction(uri, :outgoing)
    in_rels = rels_by_direction(uri, :incoming)
    out_rels.delete('synonym_of')
    out_rels.delete('parent_term')
    out_rels.delete('units_term')
    out_rels.delete('object_for_predicate')
    in_rels.delete('object_for_predicate')
    if !out_rels.empty?
      if !in_rels.empty?
        puts "WARNING: #{uri} has incoming relationships: #{in_rels.join(',')} AND outgoing relationships: #{out_rels.join(',')}"
        true
      else
        puts "WARNING: #{uri} has outgoing relationships: #{out_rels.join(',')}"
        true
      end
    elsif !in_rels.empty?
      puts "WARNING: #{uri} has incoming relationships: #{in_rels.join(',')}"
      true
    else
      false
    end
  end
def uri_has_relationships? ( uri ) out_rels = rels_by_direction ( uri , :outgoing ) in_rels = rels_by_direction ( uri , :incoming ) out_rels . delete ( 'synonym_of' ) out_rels . delete ( 'parent_term' ) out_rels . delete ( 'units_term' ) out_rels . delete ( 'object_for_predicate' ) in_rels . delete ( 'object_for_predicate' ) if ! out_rels . empty? if ! in_rels . empty? puts "WARNING: #{uri} has incoming relationships: #{in_rels.join(',')} AND outgoing relationships: #{out_rels.join(',')}" true else puts "WARNING: #{uri} has outgoing relationships: #{out_rels.join(',')}" true end elsif ! in_rels . empty? puts "WARNING: #{uri} has incoming relationships: #{in_rels.join(',')}" true else false end 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
# We don't really care about these.
uri
<not_specific>