Hi,
I'm going to create an owl from 50,000 entities. This is a function which
responsible for create or return the concept:
private OntClass getOrCreateClass(String cid) throws Exception {
String rui = ns + getCUI(cid);
OntClass concept = model.getOntClass(rui);
if (concept != null)
return concept;
else {
OntClass new_concept = model.createClass(rui);
// add comments
String[] en_descs = getEnglishDescriptions(cid);
for (String en : en_descs)
new_concept.addComment(en, "en");
String[] fa_descs = getPersianDescriptions(cid);
for (String fa : fa_descs)
new_concept.addComment(fa, "fa");
// add synonyms
String[] syns = getSynonyms(cid).split("\\s*;\\s*");
for (String syn : syns) {
new_concept.addProperty(hasSynonym, syn);
}
// add English title
String en_title = getTitleEN(cid);
new_concept.addProperty(hasEnglishTitle, en_title);
// add Persian title
String fa_title = getTitleFA(cid);
new_concept.addProperty(hasPersianTitle, fa_title);
return new_concept;
}
}
Would you please give me some information about the performance of
"model.getOntClass(rui)"?
It seems that when the processed concepts become more, the performance of the
program effectively decline.
Kind regards