public Resource getOWLLanguageLevel(OntModel owlModel, List problems)
throws OntologyException {
// Code from OntModelImpl.getOWLLanguageLevel version 2.2 beta
Profile oProf = owlModel.getProfile();
if (!(oProf instanceof OWLProfile)) {
throw new OntologyException( "Cannnot perform OWL language level test on non OWL model" );
}
// this process is made complicated by the design of the syntax checker, which uses
// two different grammars for Lite and DL checking. in some circumstances, we have
// to run both kinds of check