if (ONTOLOGY.matches(section)) {
ManchesterOWLSyntaxOntologyHeader header = parseOntologyHeader(false);
for (OWLImportsDeclaration decl : header
.getImportsDeclarations()) {
assert decl != null;
imports.add(new AddImport(ont, decl));
ont.getOWLOntologyManager().makeLoadImportRequest(decl,
getOntologyLoaderConfiguration());
OWLOntology imported = ont.getOWLOntologyManager()
.getOntology(decl.getIRI());
assert imported != null;
for (OWLDeclarationAxiom declaration : imported
.getAxioms(AxiomType.DECLARATION)) {
processDeclaredEntities(declaration);
}
}
for (OWLAnnotation anno : header.getAnnotations()) {
assert anno != null;
ontologyAnnotations
.add(new AddOntologyAnnotation(ont, anno));
}
ontologyID = header.getOntologyID();
} else if (DISJOINT_CLASSES.matches(section)) {
axioms.addAll(parseDisjointClasses());
} else if (EQUIVALENT_CLASSES.matches(section)) {
axioms.addAll(parseNaryEquivalentClasses());
} else if (EQUIVALENT_PROPERTIES.matches(section)) {
axioms.addAll(parseNaryEquivalentProperties());
} else if (DISJOINT_PROPERTIES.matches(section)) {
axioms.addAll(parseDisjointProperties());
} else if (DIFFERENT_INDIVIDUALS.matches(section)) {
axioms.addAll(parseDifferentIndividuals());
} else if (SAME_INDIVIDUAL.matches(section)) {
axioms.addAll(parseSameIndividual());
} else if (CLASS.matches(section)) {
axioms.addAll(parseClassFrame());
} else if (OBJECT_PROPERTY.matches(section)) {
axioms.addAll(parseObjectPropertyFrame());
} else if (DATA_PROPERTY.matches(section)) {
axioms.addAll(parseDataPropertyFrame());
} else if (INDIVIDUAL.matches(section)) {
axioms.addAll(parseIndividualFrame());
} else if (DATATYPE.matches(section)) {
axioms.addAll(parseDatatypeFrame());
} else if (ANNOTATION_PROPERTY.matches(section)) {
axioms.addAll(parseAnnotationPropertyFrame());
} else if (VALUE_PARTITION.matches(section)) {
axioms.addAll(parseValuePartitionFrame());
} else if (IMPORT.matches(section)) {
OWLImportsDeclaration decl = parseImportsDeclaration();
ont.getOWLOntologyManager().makeLoadImportRequest(decl,
getOntologyLoaderConfiguration());
imports.add(new AddImport(ont, decl));
OWLOntology imported = ont.getOWLOntologyManager().getOntology(
decl.getIRI());
assert imported != null;
for (OWLDeclarationAxiom declaration : imported
.getAxioms(AxiomType.DECLARATION)) {