Lines Matching refs:ontology
4 attr_accessor :hashed_symbols, :subclasses, :ontology, :symbols
7 def initialize(ontology)
8 self.ontology = ontology
10 self.symbols = ontology.symbols
12 self.subclasses = inheritance_sentences(ontology)
18 child = ontology.symbols.where('name = ? OR iri = ?', c1, c1).first!
19 parent = ontology.symbols.where('name = ? OR iri = ?', c2, c2).first!
26 create_tree(ontology)
29 def self.for(ontology)
30 tarjan_tree = new(ontology)
31 ontology.symbol_groups.destroy_all
46 def inheritance_sentences(ontology)
47 ontology.sentences.original.where <<-SQL
53 def create_tree(ontology)
54 create_groups(ontology)
58 def create_groups(ontology)
63 SymbolGroup.create!(ontology: ontology,
70 SymbolGroup.create!(ontology: ontology, symbols: [symbol], name: name)