/** Create the model, and call the model add axioms hook before returning */ protected OntModel getOntModel( OntModelSpec spec ) { OntModel m = ModelFactory.createOntologyModel( spec ); addAxioms( m ); return m; }
/** Test execution worker */ protected void runTest( OntModel m, boolean inModel ) throws Exception { boolean profileEx = false; try { ontTest( m ); } catch (ProfileException e) { profileEx = true; } assertEquals( "language element " + m_langElement + " was " + (inModel ? "" : "not") + " expected in model " + m.getProfile().getLabel(), inModel, !profileEx ); }
@Override public void runTest() throws Exception { // we don't want inferencing for these unit tests runTest( getOntModel( OntModelSpec.OWL_MEM ), m_inOWL ); m_owlLiteLang = true; runTest( getOntModel( OntModelSpec.OWL_LITE_MEM ), m_inOWLLite ); // now RDFS m_rdfsLang = true; runTest( getOntModel( OntModelSpec.RDFS_MEM ), m_inRDFS); }
/** Test execution worker */ protected void runTest( OntModel m, boolean inModel ) throws Exception { boolean profileEx = false; try { ontTest( m ); } catch (ProfileException e) { profileEx = true; } assertEquals( "language element " + m_langElement + " was " + (inModel ? "" : "not") + " expected in model " + m.getProfile().getLabel(), inModel, !profileEx ); }
/** Create the model, and call the model add axioms hook before returning */ protected OntModel getOntModel( OntModelSpec spec ) { OntModel m = ModelFactory.createOntologyModel( spec ); addAxioms( m ); return m; }
@Override public void runTest() throws Exception { // we don't want inferencing for these unit tests runTest( getOntModel( OntModelSpec.OWL_MEM ), m_inOWL ); m_owlLiteLang = true; runTest( getOntModel( OntModelSpec.OWL_LITE_MEM ), m_inOWLLite ); // now RDFS m_rdfsLang = true; runTest( getOntModel( OntModelSpec.RDFS_MEM ), m_inRDFS); }