Lines Matching refs:ontology
11 def add_small_bean(ontology)
12 @bean_list.push(make_small_bean(ontology)) if @bean_list.size < 50
15 def make_small_bean(ontology)
17 name: ontology.name,
19 language: ontology.language.nil? ? '' : ontology.language.name,
20 logic: ontology.logic.nil? ? '' : ontology.logic.name,
21 iri: ontology.iri,
22 url: "/repositories/#{ontology.repository.to_param}/ontologies/#{ontology.to_param}",
23 description: ontology.description,
24 type: make_type_anchor_data(ontology),
25 topics: make_topic_anchors_data(ontology),
26 projects: make_project_anchors_data(ontology),
27 icon: make_icon_image_data(ontology)
31 def make_icon_image_data(ontology)
32 if !ontology.distributed?
37 elsif ontology.heterogeneous?
50 def make_topic_anchors_data(ontology)
51 ontology.categories.map { |category| {text: category.name, href: "/categories/#{category.id}"} }
54 def make_project_anchors_data(ontology)
55 ontology.projects.map { |project| {text: project.display_name, href: "/projects/#{project.id}"} }
58 def make_type_anchor_data(ontology)
59 {text: ontology.ontology_type.name, href: ''} if ontology.ontology_type