import.rb revision 9f820b8418985826ffbe714a8c509ff34db315a7
transaction do
ontologies_count = 0
root = h
},
ontologies_count += 1
if distributed?
# generate IRI for sub-ontology
# find or create sub-ontology by IRI
ontology ||= SingleOntology.create!({iri: child_iri, name: child_name, parent: self}, without_protection: true)
else
end
if h['language']
ontology.language = Language.find_or_create_by_name_and_iri! h['language'], 'http://purl.net/dol/language/' + h['language']
end
if h['logic']
ontology.logic = Logic.find_or_create_by_name_and_iri! h['logic'], 'http://purl.net/dol/logics/' + h['logic']
end
},
# remove outdated sentences and entities
},
},
},
}
save!
end
end
end
end
end