OWLOntologyLoaderConfiguration loaderConfig = new OWLOntologyLoaderConfiguration()
.setMissingImportHandlingStrategy(MissingImportHandlingStrategy.SILENT);
OWLOntology ontology = rootOntologyManager
.loadOntologyFromOntologyDocument(streamDocumentSource,
loaderConfig);
OWLAnnotationProperty date = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#date"));
OWLAnnotationProperty mpathSlim = AnnotationProperty(IRI("http://purl.obolibrary.org/obo/uo#mpath_slim"));
OWLAnnotationProperty subsetProperty = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#SubsetProperty"));
OWLAnnotationProperty attributeSlim = AnnotationProperty(IRI("http://purl.obolibrary.org/obo/uo#attribute_slim"));
OWLAnnotationProperty hasOBONamespace = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#hasOBONamespace"));
OWLAnnotationProperty autogeneratedby = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#auto-generated-by"));
OWLAnnotationProperty hasDbXref = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#hasDbXref"));
OWLAnnotationProperty defaultnamespace = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#default-namespace"));
OWLAnnotationProperty hasOBOFormatVersion = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#hasOBOFormatVersion"));
OWLAnnotationProperty iao0000115 = AnnotationProperty(IRI("http://purl.obolibrary.org/obo/IAO_0000115"));
OWLAnnotationProperty namespaceIdRule = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#NamespaceIdRule"));
OWLAnnotationProperty createdBy = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#created_by"));
OWLAnnotationProperty inSubset = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#inSubset"));
OWLAnnotationProperty savedby = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#saved-by"));
OWLClass pato0001708 = Class(IRI("http://purl.obolibrary.org/obo/PATO_0001708"));
OWLClass uo0 = Class(IRI("http://purl.obolibrary.org/obo/UO_0000000"));
OWLClass uo1 = Class(IRI("http://purl.obolibrary.org/obo/UO_0000001"));
OWLAnnotationProperty id = AnnotationProperty(IRI("http://www.geneontology.org/formats/oboInOwl#id"));
OWLAnnotationProperty abnormalSlim = AnnotationProperty(IRI("http://purl.obolibrary.org/obo/uo#abnormal_slim"));
OWLAnnotationProperty scalarSlim = AnnotationProperty(IRI("http://purl.obolibrary.org/obo/uo#scalar_slim"));
OWLLiteral literal = Literal("Wikipedia:Wikipedia", XSD_STRING);
OWLAnnotationProperty unitSlim = AnnotationProperty(IRI("http://purl.obolibrary.org/obo/uo#unit_slim"));
OWLAnnotationProperty absentSlim = AnnotationProperty(IRI("http://purl.obolibrary.org/obo/uo#absent_slim"));
OWLObjectProperty isUnitOf = ObjectProperty(IRI("http://purl.obolibrary.org/obo/uo#is_unit_of"));
OWLAnnotationProperty cellQuality = AnnotationProperty(IRI("http://purl.obolibrary.org/obo/uo#cell_quality"));
OWLAnnotationProperty unitGroupSlim = AnnotationProperty(IRI("http://purl.obolibrary.org/obo/uo#unit_group_slim"));
OWLAnnotationProperty valueSlim = AnnotationProperty(IRI("http://purl.obolibrary.org/obo/uo#value_slim"));
OWLAnnotationProperty prefixSlim = AnnotationProperty(IRI("http://purl.obolibrary.org/obo/uo#prefix_slim"));
OWLAnnotationProperty dispositionSlim = AnnotationProperty(IRI("http://purl.obolibrary.org/obo/uo#disposition_slim"));
OWLAnnotationProperty relationalSlim = AnnotationProperty(IRI("http://purl.obolibrary.org/obo/uo#relational_slim"));
Set<OWLAxiom> expected = new HashSet<>(
Arrays.asList(
Declaration(date),
Declaration(autogeneratedby),
Declaration(hasDbXref),
Declaration(defaultnamespace),
Declaration(subsetProperty),
Declaration(hasOBOFormatVersion),
Declaration(iao0000115),
Declaration(namespaceIdRule),
Declaration(createdBy),
Declaration(inSubset),
Declaration(savedby),
Declaration(pato0001708),
Declaration(uo0),
Declaration(RDFSComment()),
Declaration(RDFSLabel()),
Declaration(hasOBONamespace),
Declaration(uo1),
Declaration(id),
SubAnnotationPropertyOf(mpathSlim, subsetProperty),
AnnotationAssertion(hasOBONamespace, uo1.getIRI(),
Literal("unit.ontology", XSD_STRING)),
AnnotationAssertion(RDFSComment(),
attributeSlim.getIRI(),
Literal("Attribute slim", XSD_STRING)),
AnnotationAssertion(RDFSLabel(), iao0000115.getIRI(),
Literal("definition", XSD_STRING)),
AnnotationAssertion(hasOBONamespace, uo0.getIRI(),
Literal("unit.ontology", XSD_STRING)),
SubAnnotationPropertyOf(unitSlim, subsetProperty),
AnnotationAssertion(RDFSComment(), valueSlim.getIRI(),
Literal("Value slim", XSD_STRING)),
SubAnnotationPropertyOf(absentSlim, subsetProperty),
SubAnnotationPropertyOf(abnormalSlim, subsetProperty),
AnnotationAssertion(RDFSLabel(), uo1.getIRI(),
Literal("length unit", XSD_STRING)),
AnnotationAssertion(RDFSLabel(),
hasOBOFormatVersion.getIRI(),
Literal("has_obo_format_version", XSD_STRING)),
AnnotationAssertion(RDFSLabel(),
namespaceIdRule.getIRI(),
Literal("namespace-id-rule", XSD_STRING)),
SubClassOf(uo1,
ObjectSomeValuesFrom(isUnitOf, pato0001708)),
SubAnnotationPropertyOf(cellQuality, subsetProperty),
AnnotationAssertion(
RDFSComment(),
relationalSlim.getIRI(),
Literal("Relational slim: types of quality that require an additional entity in order to exist",
XSD_STRING)),
SubAnnotationPropertyOf(prefixSlim, subsetProperty),
SubAnnotationPropertyOf(scalarSlim, subsetProperty),
AnnotationAssertion(RDFSComment(), scalarSlim.getIRI(),