public void visit(OWLSubPropertyChainOfAxiom axiom) { for (OWLObjectPropertyExpression prop : axiom.getPropertyChain()) { prop.accept(this); } axiom.getSuperProperty().accept(this); processAxiomAnnotations(axiom); }
@Override public void visit(OWLSubPropertyChainOfAxiom axiom) { axiom.getSuperProperty().accept(this); OWLObjectPropertyExpression prop = (OWLObjectPropertyExpression) obj; List<OWLObjectPropertyExpression> chain = new ArrayList<OWLObjectPropertyExpression>(); for (OWLObjectPropertyExpression p : axiom.getPropertyChain()) { p.accept(this); chain.add((OWLObjectPropertyExpression) obj); } obj = dataFactory.getOWLSubPropertyChainOfAxiom(chain, prop, duplicateAxiomAnnotations(axiom)); }
@Override public void visit(OWLSubPropertyChainOfAxiom axiom) { for (Iterator<OWLObjectPropertyExpression> it = axiom.getPropertyChain().iterator(); it.hasNext(); ) { it.next().accept(this); if (it.hasNext()) { writeSpace(); write(CIRC); writeSpace(); } } writeSpace(); write(SUBCLASS); writeSpace(); axiom.getSuperProperty().accept(this); }
public Object visit(OWLSubPropertyChainOfAxiom axiom) { Set<OWLObjectPropertyRangeAxiom> rangeAxioms = getCurrentOntology().getAxioms(AxiomType.OBJECT_PROPERTY_RANGE, true); if (rangeAxioms.isEmpty()) { return false; } // Do we have a range restriction imposed on our super property? for (OWLObjectPropertyRangeAxiom rngAx : rangeAxioms) { if (getPropertyManager().isSubPropertyOf(axiom.getSuperProperty(), rngAx.getProperty())) { // Imposed range restriction! OWLClassExpression imposedRange = rngAx.getRange(); // There must be an axiom that imposes a range on the last prop in the chain List<OWLObjectPropertyExpression> chain = axiom.getPropertyChain(); if (!chain.isEmpty()) { OWLObjectPropertyExpression lastProperty = chain.get(chain.size() - 1); boolean rngPresent = false; for (OWLOntology ont : getCurrentOntology().getImportsClosure()) { for (OWLObjectPropertyRangeAxiom lastPropRngAx : ont.getObjectPropertyRangeAxioms(lastProperty)) { if (lastPropRngAx.getRange().equals(imposedRange)) { // We're o.k. rngPresent = true; break; } } } if (!rngPresent) { profileViolations.add( new LastPropertyInChainNotInImposedRange(getCurrentOntology(), axiom, rngAx)); } } } } return null; }