}
public static URI getOntologyURI(URI ClassURI) throws MatchingException {
String path = ClassURI.toString();
if (path.startsWith("#") || (!StringUtils.contains(path,"#")))
throw new MatchingException(ClassURI.toString() + " doesn't contain the OntologyURL");
try {
return new URI(path.substring(0,path.indexOf("#")));
}
catch(URISyntaxException e) { throw new MatchingException("URI error: Couldn't get ontologyURI of " + ClassURI.toString());}
}