Cross Reference: ontology_bean_list_factory.rb
xref
: /
ontohub
/
lib
/
ontology_bean_list_factory.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
ontology_bean_list_factory.rb revision 9761530c96f0c65cf46998dafc145508802701c7
50
N/A
require
'json'
50
N/A
50
N/A
class
OntologyBeanListFactory
50
N/A
50
N/A
attr_reader
:
bean_list
50
N/A
50
N/A
def
initialize
50
N/A
@
bean_list
= []
50
N/A
end
50
N/A
50
N/A
def
add_small_bean
(
ontology
)
50
N/A
@
bean_list.push
(
make_small_bean
(
ontology
)
)
if
@
bean_list.size
<
50
50
N/A
end
50
N/A
50
N/A
def
make_small_bean
(
ontology
)
50
N/A
{
50
N/A
name
:
ontology.name
,
50
N/A
acronym
:
''
,
50
N/A
language
:
ontology.language.nil
? ?
''
:
ontology.language.name
,
50
N/A
logic
:
ontology.logic.nil
? ?
''
:
ontology.logic.name
,
50
N/A
iri
:
ontology.iri
,
50
N/A
url
:
"/ontologies/#{
ontology.id
}"
,
289
N/A
description
:
ontology.description
50
N/A
}
50
N/A
end
60
N/A
202
N/A
end
50
N/A