@Override public Set<String> listImportedOntologyURIs() { return inner.listImportedOntologyURIs(); }
@Override public Set<String> listImportedOntologyURIs(boolean closure) { return inner.listImportedOntologyURIs(closure); }
/** * <p>Add the ontologies imported by the given model to the end of the queue.</p> */ protected void queueImports( Model model, List<String> readQueue, Profile profile ) { if (model instanceof OntModel) { // add the imported ontologies to the queue readQueue.addAll( ((OntModel) model).listImportedOntologyURIs() ); } else { // we have to do the query manually StmtIterator i = model.listStatements( null, profile.IMPORTS(), (RDFNode) null ); while (i.hasNext()) { // read the next import statement and add to the queue readQueue.add( i.nextStatement().getResource().getURI() ); } } }
/** * <p>Add the ontologies imported by the given model to the end of the queue.</p> */ protected void queueImports( Model model, List<String> readQueue, Profile profile ) { if (model instanceof OntModel) { // add the imported ontologies to the queue readQueue.addAll( ((OntModel) model).listImportedOntologyURIs() ); } else { // we have to do the query manually StmtIterator i = model.listStatements( null, profile.IMPORTS(), (RDFNode) null ); while (i.hasNext()) { // read the next import statement and add to the queue readQueue.add( i.nextStatement().getResource().getURI() ); } } }
public void testListImportURIs() { OntModel m = ModelFactory.createOntologyModel(); m.read( "file:testing/ontology/testImport6/a.owl" ); Collection<String> c = m.listImportedOntologyURIs(); assertEquals( "Should be two non-closed import URI's", 2, c.size() ); assertTrue( "b should be imported ", c.contains( "file:testing/ontology/testImport6/b.owl" )); assertFalse( "c should not be imported ", c.contains( "file:testing/ontology/testImport6/c.owl" )); assertTrue( "d should be imported ", c.contains( "file:testing/ontology/testImport6/d.owl" )); c = m.listImportedOntologyURIs( true ); assertEquals( "Should be two non-closed import URI's", 3, c.size() ); assertTrue( "b should be imported ", c.contains( "file:testing/ontology/testImport6/b.owl" )); assertTrue( "c should be imported ", c.contains( "file:testing/ontology/testImport6/c.owl" )); assertTrue( "d should be imported ", c.contains( "file:testing/ontology/testImport6/d.owl" )); }
public void testListImportURIs() { OntModel m = ModelFactory.createOntologyModel(); m.read( "file:testing/ontology/testImport6/a.owl" ); Collection<String> c = m.listImportedOntologyURIs(); assertEquals( "Should be two non-closed import URI's", 2, c.size() ); assertTrue( "b should be imported ", c.contains( "file:testing/ontology/testImport6/b.owl" )); assertFalse( "c should not be imported ", c.contains( "file:testing/ontology/testImport6/c.owl" )); assertTrue( "d should be imported ", c.contains( "file:testing/ontology/testImport6/d.owl" )); c = m.listImportedOntologyURIs( true ); assertEquals( "Should be two non-closed import URI's", 3, c.size() ); assertTrue( "b should be imported ", c.contains( "file:testing/ontology/testImport6/b.owl" )); assertTrue( "c should be imported ", c.contains( "file:testing/ontology/testImport6/c.owl" )); assertTrue( "d should be imported ", c.contains( "file:testing/ontology/testImport6/d.owl" )); }