Class: BioportalConcept
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- BioportalConcept
- Includes:
- BioPortal::RestAPI
- Defined in:
- app/models/bioportal_concept.rb
Instance Method Summary collapse
-
#bioportal_base_rest_url ⇒ Object
the base url is defined by the associated class - this overrides the method in the RestAPI mixin.
- #get_concept(options = {}) ⇒ Object
Methods included from BioPortal::RestAPI
#fetch_json, #populate_ontology_details, #search
Instance Method Details
#bioportal_base_rest_url ⇒ Object
the base url is defined by the associated class - this overrides the method in the RestAPI mixin
25 26 27 |
# File 'app/models/bioportal_concept.rb', line 25 def bioportal_base_rest_url conceptable.bioportal_base_rest_url end |
#get_concept(options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/models/bioportal_concept.rb', line 8 def get_concept ={} [:refresh]||=false refresh=.delete(:refresh) concept=nil concept = YAML::load(cached_concept_yaml) unless (refresh || cached_concept_yaml.nil?) unless concept concept = super(self.ontology_id,self.concept_uri,) update_attribute(:cached_concept_yaml, concept.to_yaml) end concept end |