/** * Creates a new (empty) ontology that does not have an ontology IRI (and therefore does not * have a version IRI). A document IRI will automatically be generated. * * @return The newly created ontology * @throws OWLOntologyCreationException if there was a problem creating the ontology */ default OWLOntology createOntology() throws OWLOntologyCreationException { // Brand new ontology without a URI return createOntology(new OWLOntologyID()); }
public static OWLOntology Ontology(Collection<? extends OWLAxiom> axioms, IRI iri) { OWLOntology ontology; try { ontology = manager.createOntology( iri ); OntologyUtils.addAxioms( ontology, axioms ); } catch( OWLOntologyCreationException e ) { throw new RuntimeException( e ); } catch( OWLOntologyChangeException e ) { throw new RuntimeException( e ); } return ontology; }
public static OWLOntology Ontology(Collection<? extends OWLAxiom> axioms, IRI iri) { OWLOntology ontology; try { ontology = manager.createOntology( iri ); OntologyUtils.addAxioms( ontology, axioms ); } catch( OWLOntologyCreationException e ) { throw new RuntimeException( e ); } catch( OWLOntologyChangeException e ) { throw new RuntimeException( e ); } return ontology; }
@Override public OWLOntology extractAsOntology(Set<OWLEntity> signature, IRI iri, int superClassLevel, int subClassLevel, @Nullable OWLReasoner reasoner) throws OWLOntologyCreationException { return manager.createOntology(extract(signature, superClassLevel, subClassLevel, reasoner), iri); }
@Override public OWLOntology createOntology() throws OWLOntologyCreationException { if (sealed) { throw new OntologyCreationNotAllowedException(); } return delegate.createOntology(); }
@Override public OWLOntology createOntology(Set<OWLAxiom> axioms) throws OWLOntologyCreationException { if (sealed) { throw new OntologyCreationNotAllowedException(); } return delegate.createOntology(axioms); }
@Override public OWLOntology createOntology(IRI ontologyIRI) throws OWLOntologyCreationException { if (sealed) { throw new OntologyCreationNotAllowedException(); } return delegate.createOntology(ontologyIRI); }
@Override public OWLOntology createOntology(OWLOntologyID ontologyID) throws OWLOntologyCreationException { if (sealed) { throw new OntologyCreationNotAllowedException(); } return delegate.createOntology(ontologyID); }
@Override public OWLOntology extractAsOntology(Set<OWLEntity> signature, IRI iri, int superClassLevel, int subClassLevel, @Nullable OWLReasoner reasoner) throws OWLOntologyCreationException { return manager.createOntology(extract(signature, superClassLevel, subClassLevel, reasoner), iri); }
@Override public OWLOntology createOntology(Set<OWLAxiom> axioms, IRI ontologyIRI) throws OWLOntologyCreationException { if (sealed) { throw new OntologyCreationNotAllowedException(); } return delegate.createOntology(axioms, ontologyIRI); }
@Override public OWLOntology createOntology(IRI ontologyIRI, Set<OWLOntology> ontologies, boolean copyLogicalAxiomsOnly) throws OWLOntologyCreationException { if (sealed) { throw new OntologyCreationNotAllowedException(); } return delegate.createOntology(ontologyIRI, ontologies, copyLogicalAxiomsOnly); }
public static OWLOntology Ontology(OWLOntologyManager man, OWLAxiom... axioms) { try { return man.createOntology(CollectionFactory.createSet(axioms)); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } } }
public static OWLOntology Ontology(OWLOntologyManager man, OWLAxiom... axioms) { try { return man.createOntology(CollectionFactory.createSet(axioms)); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } } }
/** * Convert. * * @param doc the obodoc * @return ontology * @throws OWLOntologyCreationException the oWL ontology creation exception */ public OWLOntology convert(OBODoc doc) throws OWLOntologyCreationException { obodoc = doc; init(manager); return tr(manager.createOntology()); }
private void createDebuggingOntology() throws OWLException { if (debuggingOntology != null) { man.removeOntology(verifyNotNull(debuggingOntology)); } debuggingOntology = man.createOntology(debuggingAxioms); }
public static OWLOntology Ontology(OWLOntologyManager man, OWLAxiom... axioms) { try { return man.createOntology(CollectionFactory.createSet(axioms)); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } } }
/** * Convert. * * @param doc the obodoc * @return ontology * @throws OWLOntologyCreationException the oWL ontology creation exception */ public OWLOntology convert(OBODoc doc) throws OWLOntologyCreationException { obodoc = doc; init(manager); return tr(manager.createOntology()); }
private void mergeImportsClosure() { OWLOntology o = ontology; try { ontology = man .createOntology(IRI.getNextDocumentIRI("http://debugger.semanticweb.org/ontolog"), o.importsClosure(), true); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } }
private void mergeImportsClosure() { OWLOntology o = ontology; try { ontology = man .createOntology(IRI.getNextDocumentIRI("http://debugger.semanticweb.org/ontolog"), o.importsClosure(), true); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } }
public DirectMappingBootstrapper(String baseuri, String url, String user, String password, String driver) throws Exception{ OBDADataFactory fact = OBDADataFactoryImpl.getInstance(); OBDADataSource source = fact.getJDBCDataSource(url, user, password, driver); //create empty ontology and model, add source to model OWLOntologyManager mng = OWLManager.createOWLOntologyManager(); OWLOntology onto = mng.createOntology(IRI.create(baseuri)); OBDAModel model = fact.getOBDAModel(); model.addSource(source); bootstrapOntologyAndDirectMappings(baseuri, onto, model, source); }