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 terms_from_neo4j
    return @terms_from_neo4j unless @terms_from_neo4j.nil?
    @terms_from_neo4j = []
    raw_terms_from_neo4j.each do |term|
      term = TraitBank::Term.yamlize_keys(term)
      next unless term['uri'] =~ /^htt/ 
      @terms_from_neo4j << TraitBank::Term.add_yml_fields(term)
    end
    @terms_from_neo4j
  end
def terms_from_neo4j return @terms_from_neo4j unless @terms_from_neo4j . nil? @terms_from_neo4j = [ ] raw_terms_from_neo4j . each do | term | term = TraitBank :: Term . yamlize_keys ( term ) next unless term [ 'uri' ] =~ / ^htt / @terms_from_neo4j << TraitBank :: Term . add_yml_fields ( term ) end @terms_from_neo4j 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
# Most basic check for URI-ish-ness. Should be fine for our purposes. # NOTE: .add_yml_fields is VERY SLOW and accounts for about 90% of the time of the whole #create method. S'okay.