addQualifiers(c, ax.getAnnotations());
} else if (sup instanceof OWLObjectCardinalityRestriction) {
// OWLObjectExactCardinality
// OWLObjectMinCardinality
// OWLObjectMaxCardinality
OWLObjectCardinalityRestriction cardinality = (OWLObjectCardinalityRestriction) sup;
OWLClassExpression filler = cardinality.getFiller();
if (filler.isBottomEntity() || filler.isTopEntity()) {
error(TOP_BOTTOM_NONTRANSLATEABLE, ax, false);
return;
}
String fillerId = getIdentifier(filler);
if (fillerId == null) {
error(ax, true);
return;
}
f.addClause(createRelationshipClauseWithCardinality(
cardinality, fillerId, qvs, ax));
} else if (sup instanceof OWLQuantifiedObjectRestriction) {
// OWLObjectSomeValuesFrom
// OWLObjectAllValuesFrom
OWLQuantifiedObjectRestriction r = (OWLQuantifiedObjectRestriction) sup;
OWLClassExpression filler = r.getFiller();
if (filler.isBottomEntity() || filler.isTopEntity()) {
error(TOP_BOTTOM_NONTRANSLATEABLE, ax, false);
return;
}
String fillerId = getIdentifier(filler);
if (fillerId == null) {
error(ax, true);
return;
}
f.addClause(createRelationshipClauseWithRestrictions(r,
fillerId, qvs, ax));
} else if (sup instanceof OWLObjectIntersectionOf) {
OWLObjectIntersectionOf i = (OWLObjectIntersectionOf) sup;
List<Clause> clauses = new ArrayList<>();
for (OWLClassExpression operand : i.getOperands()) {
if (operand instanceof OWLObjectCardinalityRestriction) {
OWLObjectCardinalityRestriction restriction = (OWLObjectCardinalityRestriction) operand;
OWLClassExpression filler = restriction.getFiller();
if (filler.isBottomEntity() || filler.isTopEntity()) {
error(TOP_BOTTOM_NONTRANSLATEABLE, ax, false);
return;
}
String fillerId = getIdentifier(filler);
if (fillerId == null) {
error(ax, true);
return;
}
clauses.add(createRelationshipClauseWithCardinality(
restriction, fillerId, new HashSet<>(qvs), ax));
} else if (operand instanceof OWLQuantifiedObjectRestriction) {
OWLQuantifiedObjectRestriction restriction = (OWLQuantifiedObjectRestriction) operand;
OWLClassExpression filler = restriction.getFiller();
if (filler.isBottomEntity() || filler.isTopEntity()) {
error(TOP_BOTTOM_NONTRANSLATEABLE, ax, false);
return;
}
String fillerId = getIdentifier(filler);