pmap.put("hierarchySources",hsrc);
terminology.loadRRF(f,pmap);
name = (name == null)?f.getName():name;
}else if(owl != null){
log("Loading OWL terminology from "+owl+"...");
IOntology ont = OOntology.loadOntology(owl);
if(ont != null){
terminology.loadOntology(ont,name,false,abbreviateURI);
}
name = (name == null)?ont.getName():name;
}else if(obo != null){
log("Loading OBO terminology from "+obo+"...");
if(name == null){
name = (new File(obo)).getName();
if(name.endsWith(".obo"))
name = name.substring(0,name.length()-4);
}
terminology.load(name);
ConceptImporter.getInstance().addPropertyChangeListener(this);
ConceptImporter.getInstance().loadOBO(terminology,new File(obo));
ConceptImporter.getInstance().removePropertyChangeListener(this);
terminology.save();
}else if(bioportal != null){
log("Loading BioPortal terminology from "+bioportal+"...");
BioPortalRepository r = new BioPortalRepository();
IOntology ont = r.getOntology(URI.create(bioportal));
if(ont != null){
ont.addPropertyChangeListener(this);
terminology.loadOntology(ont,name);
}
name = (name == null)?ont.getName():name;
}else if(txt != null){
log("Loading Text terminology from "+txt+"...");
File f = new File(txt);
terminology.loadText(f,name);
name = (name == null)?f.getName():name;