SimpleOntology implements Ontology { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof SimpleOntology) { SimpleOntology simpleOntology = (SimpleOntology) obj; OntologyId ontologyId = simpleOntology.getOntologyId(); if (this.ontologyId.equals(ontologyId)) { org.eclipse.rdf4j.model.Model thisSesameModel = this.asSesameModel(); org.eclipse.rdf4j.model.Model otherSesameModel = simpleOntology.asSesameModel(); return Models.isomorphic(thisSesameModel, otherSesameModel); } } return false; } SimpleOntology(InputStream inputStream, OntologyManager ontologyManager, SesameTransformer transformer,
                          BNodeService bNodeService, RepositoryManager repoManager, boolean resolveImports,
                          ForkJoinPool threadPool);  SimpleOntology(Model model, OntologyManager ontologyManager, SesameTransformer transformer,
                          BNodeService bNodeService, RepositoryManager repoManager, ForkJoinPool threadPool); protected  SimpleOntology(OWLOntology ontology, OWLOntologyManager owlManager, Resource resource,
                             OntologyManager ontologyManager, SesameTransformer transformer,
                             BNodeService bNodeService, RepositoryManager repoManager, ForkJoinPool threadPool); @Override OntologyId getOntologyId(); @Override Set<IRI> getUnloadableImportIRIs(); @Override Set<Ontology> getImportsClosure(); @Override Set<IRI> getImportedOntologyIRIs(); @Override Set<Annotation> getOntologyAnnotations(); @Override Set<Annotation> getAllAnnotations(); @Override Set<AnnotationProperty> getAllAnnotationProperties(); @Override Set<OClass> getAllClasses(); @Override boolean containsClass(IRI iri); @Override Set<ObjectProperty> getAllClassObjectProperties(IRI iri); @Override Set<ObjectProperty> getAllNoDomainObjectProperties(); @Override Set<DataProperty> getAllClassDataProperties(IRI iri); @Override Set<DataProperty> getAllNoDomainDataProperties(); @Override Set<Datatype> getAllDatatypes(); @Override Set<ObjectProperty> getAllObjectProperties(); @Override Optional<ObjectProperty> getObjectProperty(IRI iri); @Override Set<Resource> getObjectPropertyRange(ObjectProperty objectProperty); @Override Set<DataProperty> getAllDataProperties(); @Override Optional<DataProperty> getDataProperty(IRI iri); @Override Set<Resource> getDataPropertyRange(DataProperty dataProperty); @Override Set<Individual> getAllIndividuals(); @Override Set<Individual> getIndividualsOfType(IRI classIRI); @Override Set<Individual> getIndividualsOfType(OClass clazz); @Override Hierarchy getSubClassesOf(ValueFactory vf, ModelFactory mf); @Override Set<IRI> getSubClassesFor(IRI iri); @Override Set<IRI> getSubPropertiesFor(IRI iri); @Override Hierarchy getSubDatatypePropertiesOf(ValueFactory vf, ModelFactory mf); @Override Hierarchy getSubAnnotationPropertiesOf(ValueFactory vf, ModelFactory mf); @Override Hierarchy getSubObjectPropertiesOf(ValueFactory vf, ModelFactory mf); @Override Hierarchy getClassesWithIndividuals(ValueFactory vf, ModelFactory mf); @Override TupleQueryResult getEntityUsages(Resource entity); @Override Model constructEntityUsages(Resource entity, ModelFactory modelFactory); @Override Hierarchy getConceptRelationships(ValueFactory vf, ModelFactory mf); @Override Hierarchy getConceptSchemeRelationships(ValueFactory vf, ModelFactory mf); @Override TupleQueryResult getSearchResults(String searchText, ValueFactory valueFactory); @Override TupleQueryResult getTupleQueryResults(String queryString, boolean includeImports); @Override Model getGraphQueryResults(String queryString, boolean includeImports, ModelFactory modelFactory); @Override Model asModel(ModelFactory factory); @Override OutputStream asTurtle(); @Override OutputStream asTurtle(OutputStream outputStream); @Override OutputStream asRdfXml(); @Override OutputStream asRdfXml(OutputStream outputStream); @Override OutputStream asOwlXml(); @Override OutputStream asOwlXml(OutputStream outputStream); @Override @Nonnull OutputStream asJsonLD(boolean skolemize); @Override @Nonnull OutputStream asJsonLD(boolean skolemize, OutputStream outputStream); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void testEquals() throws Exception { InputStream stream1 = new FileInputStream(testFile); InputStream stream2 = new FileInputStream(testFile); Ontology ontology1 = new SimpleOntology(stream1, ontologyManager, transformer, bNodeService, repositoryManager, true, threadPool); Ontology ontology2 = new SimpleOntology(stream2, ontologyManager, transformer, bNodeService, repositoryManager, true, threadPool); assertEquals(ontology1, ontology2); }