if(i > -1){
uri = uri.substring(0,i);
}
// get ontology
IOntology ont = getOntology(URI.create(uri));
// if ontology is all you want, fine Girish
if(i == -1 && ont != null)
return ont;
// if ontology is null try again w/ a different convention
if(ont == null){
i = uri.lastIndexOf("/");
if(i > -1){
uri = uri.substring(0,i);
// get ontology
ont = getOntology(URI.create(uri));
}
}
// now return resource
if(ont != null)
return ont.getResource(""+path);
return null;
}