int b = nf1.getB();
// Build the axiom
Object oa = factory.lookupConceptId(a);
Object ob = factory.lookupConceptId(b);
if(bi == IFactory.TOP_CONCEPT) {
res.add(new ConceptInclusion(transform(oa), transform(ob)));
} else {
Object obi = factory.lookupConceptId(bi);
res.add(new ConceptInclusion(
new au.csiro.ontology.model.Conjunction(
new Concept[] {transform(oa), transform(obi)}), transform(ob)
));
}
}
}
// These terms are of the form A [ r.B and are indexed by A.
for(IntIterator it = ontologyNF2.keyIterator(); it.hasNext(); ) {
int a = it.next();
MonotonicCollection<NF2> mc = ontologyNF2.get(a);
for(Iterator<NF2> it2 = mc.iterator(); it2.hasNext(); ) {
NF2 nf2 = it2.next();
Object oa = factory.lookupConceptId(nf2.lhsA);
String r = factory.lookupRoleId(nf2.rhsR).toString();
Object ob = factory.lookupConceptId(nf2.rhsB);
res.add(new ConceptInclusion(
transform(oa),
new au.csiro.ontology.model.Existential(new NamedRole(r), transform(ob))
));
}
}
// These terms are of the form r.A [ b and indexed by A.
for(IntIterator it = ontologyNF3.keyIterator(); it.hasNext(); ) {
int a = it.next();
ConcurrentMap<Integer, Collection<IConjunctionQueueEntry>> mc =
ontologyNF3.get(a);
Set<Integer> keys = mc.keySet();
for (int i : keys) {
Collection<IConjunctionQueueEntry> cc = mc.get(i);
for(Iterator<IConjunctionQueueEntry> it2 = cc.iterator();
it2.hasNext(); ) {
IConjunctionQueueEntry nf3 = it2.next();
Object oa = factory.lookupConceptId(a);
String r = factory.lookupRoleId(i).toString();
Object ob = factory.lookupConceptId(nf3.getB());
res.add(new ConceptInclusion(
new au.csiro.ontology.model.Existential(new NamedRole(r), transform(ob)),
transform(oa)
));
}
}
}
for(Iterator<NF4> it = ontologyNF4.iterator(); it.hasNext(); ) {
NF4 nf4 = it.next();
int r = nf4.getR();
int s = nf4.getS();
res.add(
new RoleInclusion(
new NamedRole(factory.lookupRoleId(r).toString()),
new NamedRole(factory.lookupRoleId(s).toString())
)
);
}
for(Iterator<NF5> it = ontologyNF5.iterator(); it.hasNext(); ) {
NF5 nf5 = it.next();
int r = nf5.getR();
int s = nf5.getS();
int t = nf5.getT();
res.add(
new RoleInclusion(
new Role[] {
new NamedRole(factory.lookupRoleId(r).toString()),
new NamedRole(factory.lookupRoleId(s).toString())
},
new NamedRole(factory.lookupRoleId(t).toString())
)
);
}
for(IntIterator it = reflexiveRoles.iterator(); it.hasNext(); ) {
int r = it.next();
res.add(
new RoleInclusion(
new Role[] {},
new NamedRole(factory.lookupRoleId(r).toString())
)
);
}
// These terms are of the form A [ f.(o, v) and are indexed by A.
for(IntIterator it = ontologyNF7.keyIterator(); it.hasNext(); ) {
int a = it.next();
MonotonicCollection<NF7> mc = ontologyNF7.get(a);
for(Iterator<NF7> it2 = mc.iterator(); it2.hasNext(); ) {
NF7 nf7 = it2.next();
res.add(new ConceptInclusion(
transform(factory.lookupConceptId(a)),
transform(nf7.rhsD)
));
}
}
// These terms are of the form f.(o, v) [ A. These are indexed by f.
FeatureSet keys = ontologyNF8.keySet();
for (int i = keys.nextSetBit(0); i >= 0; i = keys.nextSetBit(i+1)) {
MonotonicCollection<NF8> mc = ontologyNF8.get(i);
for(Iterator<NF8> it2 = mc.iterator(); it2.hasNext(); ) {
NF8 nf8 = it2.next();
res.add(new ConceptInclusion(
transform(nf8.lhsD),
transform(factory.lookupConceptId(nf8.rhsB))
));
}
}