// classExpressionIRIs.removeAll(dataRangeIRIs);
IRIMap.clear();
tripleProcessor.fine("Total number of triples: " + count);
RDFXMLOntologyFormat format = ontologyFormat;
consumeSWRLRules();
// We need to mop up all remaining triples. These triples will be in the
// triples by subject map. Other triples which reside in the triples by
// predicate (single valued) triple aren't "root" triples for axioms. First
// we translate all system triples and then go for triples whose predicates
// are not system/reserved vocabulary IRIs to translate these into ABox assertions
// or annotationIRIs
iterateResourceTriples(new ResourceTripleIterator<UnloadableImportException>() {
public void handleResourceTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException {
handle(subject, predicate, object);
}
});
iterateLiteralTriples(new LiteralTripleIterator<UnloadableImportException>() {
public void handleLiteralTriple(IRI subject, IRI predicate, OWLLiteral object) throws UnloadableImportException {
handle(subject, predicate, object);
}
});
// Inverse property axioms
inverseOfHandler.setAxiomParsingMode(true);
iterateResourceTriples(new ResourceTripleIterator<UnloadableImportException>() {
public void handleResourceTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException {
if (inverseOfHandler.canHandle(subject, predicate, object)) {
inverseOfHandler.handleTriple(subject, predicate, object);
}
}
});
// Now handle non-reserved predicate triples
consumeNonReservedPredicateTriples();
// Now axiom annotations
consumeAnnotatedAxioms();
final Set<RDFTriple> remainingTriples = getRemainingTriples();
if (format != null) {
RDFParserMetaData metaData = new RDFParserMetaData(RDFOntologyHeaderStatus.PARSED_ONE_HEADER, count, remainingTriples);
format.setOntologyLoaderMetaData(metaData);
}
// Do we need to change the ontology IRI?
IRI ontologyIRIToSet = chooseOntologyIRI();