import.rb revision ad3d301b618bf0cac4778b967854c50f486b282b
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: name, parent: self}, without_protection: true)
else
end
ontology.language = Language.find_or_create_by_name_and_iri h['logic'], 'http://purl.net/dol/language/' + h['logic']
ontology.logic = Logic.find_or_create_by_name_and_iri h['logic'], 'http://purl.net/dol/logics/' + h['logic']
},
# remove outdated sentences and entities
},
},
}
save!
end
end
end
end
end