if (ce instanceof OWLObjectSomeValuesFrom) {
OWLObjectSomeValuesFrom ristriction = (OWLObjectSomeValuesFrom) ce;
r = getIdentifier(ristriction.getProperty());
cls2 = getIdentifier(ristriction.getFiller());
} else if (ce instanceof OWLObjectExactCardinality) {
OWLObjectExactCardinality card = (OWLObjectExactCardinality) ce;
r = getIdentifier(card.getProperty());
cls2 = getIdentifier(card.getFiller());
exact = card.getCardinality();
} else if (ce instanceof OWLObjectMinCardinality) {
OWLObjectMinCardinality card = (OWLObjectMinCardinality) ce;
r = getIdentifier(card.getProperty());
cls2 = getIdentifier(card.getFiller());
min = card.getCardinality();
} else if (ce instanceof OWLObjectMaxCardinality) {
OWLObjectMaxCardinality card = (OWLObjectMaxCardinality) ce;
r = getIdentifier(card.getProperty());
cls2 = getIdentifier(card.getFiller());
max = card.getCardinality();
} else if (ce instanceof OWLObjectAllValuesFrom) {
OWLObjectAllValuesFrom all = (OWLObjectAllValuesFrom) ce;
OWLClassExpression filler = all.getFiller();
if (filler instanceof OWLClass) {
r = getIdentifier(all.getProperty());
cls2 = getIdentifier(filler);
allOnly = Boolean.TRUE;
} else if (filler instanceof OWLObjectComplementOf) {
OWLObjectComplementOf restriction = (OWLObjectComplementOf) filler;
r = getIdentifier(all.getProperty());
cls2 = getIdentifier(restriction.getOperand());
exact = 0;
}
} else if (ce instanceof OWLObjectIntersectionOf) {
// either a min-max or a some-all combination
Set<OWLClassExpression> operands = ((OWLObjectIntersectionOf) ce)
.getOperands();
if (operands.size() == 2) {
for (OWLClassExpression operand : operands) {
if (operand instanceof OWLObjectMinCardinality) {
OWLObjectMinCardinality card = (OWLObjectMinCardinality) operand;
r = getIdentifier(card.getProperty());
cls2 = getIdentifier(card.getFiller());
min = card.getCardinality();
} else if (operand instanceof OWLObjectMaxCardinality) {
OWLObjectMaxCardinality card = (OWLObjectMaxCardinality) operand;
r = getIdentifier(card.getProperty());
cls2 = getIdentifier(card.getFiller());
max = card.getCardinality();
} else if (operand instanceof OWLObjectAllValuesFrom) {
OWLObjectAllValuesFrom all = (OWLObjectAllValuesFrom) operand;
r = getIdentifier(all.getProperty());
cls2 = getIdentifier(all.getFiller());
allOnly = Boolean.TRUE;