/** * A reflexive role assertion<i>Ref(r)</i> is translated into the constraint:</br></br> * * <code> * :- not r(X,X), thing(X). * </code> * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLReflexiveObjectPropertyAxiom) */ public void visit(OWLReflexiveObjectPropertyAxiom refPropertyAxiom) { OWLObjectPropertyExpression property = refPropertyAxiom.getProperty(); String propertyName = mapper.getPredicateName(property.getNamedProperty()); String cVar = var.currentVar(); writer.write("icons " + ASP2CoreSymbols.IMPLICATION); writer.write(String.format(" activated(%d), ", nConstraints++)); writer.write(ASP2CoreSymbols.NAF); writer.write("_"); writer.write(propertyName); writer.write(ASP2CoreSymbols.BRACKET_OPEN); writer.write(cVar); writer.write(ASP2CoreSymbols.ARG_SEPERATOR); writer.write(cVar); writer.write(ASP2CoreSymbols.BRACKET_CLOSE); writer.write(ASP2CoreSymbols.CONJUNCTION); writer.write("thing("); writer.write(cVar); writer.write(")"+ASP2CoreSymbols.EOR); }
/** * A reflexive role assertion<i>Ref(r)</i> is translated into the constraint:</br></br> * * <code> * :- not r(X,X), thing(X). * </code> * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLReflexiveObjectPropertyAxiom) */ public void visit(OWLReflexiveObjectPropertyAxiom refPropertyAxiom) { OWLObjectPropertyExpression property = refPropertyAxiom.getProperty(); String propertyName = mapper.getPredicateName(property.getNamedProperty()); String cVar = var.currentVar(); writer.write(ASP2CoreSymbols.IMPLICATION); writer.write(ASP2CoreSymbols.NAF); writer.write(" "); writer.write(propertyName); writer.write(ASP2CoreSymbols.BRACKET_OPEN); writer.write(cVar); writer.write(ASP2CoreSymbols.ARG_SEPERATOR); writer.write(cVar); writer.write(ASP2CoreSymbols.BRACKET_CLOSE); writer.write(ASP2CoreSymbols.CONJUNCTION); writer.write("thing("); writer.write(cVar); writer.write(")"+ASP2CoreSymbols.EOR); }
@Override public T visit(OWLReflexiveObjectPropertyAxiom axiom) { throw new IllegalArgumentException( OWLReflexiveObjectPropertyAxiom.class.getSimpleName() + " cannot be converted to " + getTargetClass().getSimpleName()); }
/** * true if c is reflexive in the graph * * @param c * @return boolean */ public boolean getIsReflexive(OWLObjectProperty c) { for(OWLOntology ont : getAllOntologies()) { Set<OWLReflexiveObjectPropertyAxiom> ax = ont.getReflexiveObjectPropertyAxioms(c); if (ax.isEmpty() == false) { return true; } } return false; }
@Override public Set<ComplexIntegerAxiom> visit(OWLReflexiveObjectPropertyAxiom axiom) { Objects.requireNonNull(axiom); OWLObjectProperty property = asOWLObjectProperty(axiom.getProperty()); IntegerObjectProperty propertyExpr = getDataTypeFactory() .createObjectProperty(translateObjectProperty(property)); ComplexIntegerAxiom ret = getAxiomFactory().createReflexiveObjectPropertyAxiom(propertyExpr, translateAnnotations(axiom.getAnnotations())); return Collections.singleton(ret); }
@Nonnull @Override public OWLReflexiveObjectPropertyAxiom getAxiomWithoutAnnotations() { if (!isAnnotated()) { return this; } return new OWLReflexiveObjectPropertyAxiomImpl(getProperty(), NO_ANNOTATIONS); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } return obj instanceof OWLReflexiveObjectPropertyAxiom; }
public void visit(OWLReflexiveObjectPropertyAxiom axiom) { notSupported(axiom); }
public void visit(OWLReflexiveObjectPropertyAxiom axiom) { makeReflexive(axiom.getProperty()); m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(axiom.getProperty().getNamedProperty()); }
public Boolean visit(OWLReflexiveObjectPropertyAxiom axiom) { return reasoner.isReflexive(axiom.getProperty()); }
public void visit(OWLReflexiveObjectPropertyAxiom axiom) { }
@Override public OWLReflexiveObjectPropertyAxiom visit( ElkReflexiveObjectPropertyAxiom axiom) { return owlFactory_.getOWLReflexiveObjectPropertyAxiom( convert(axiom.getProperty())); }
@SuppressWarnings("static-method") public ElkReflexiveObjectPropertyAxiom convert( OWLReflexiveObjectPropertyAxiom owlReflexiveObjectPropertyAxiom) { return new ElkReflexiveObjectPropertyAxiomWrap<OWLReflexiveObjectPropertyAxiom>( owlReflexiveObjectPropertyAxiom); }
@Override public ElkAxiom visit( OWLReflexiveObjectPropertyAxiom owlReflexiveObjectPropertyAxiom) { return CONVERTER.convert(owlReflexiveObjectPropertyAxiom); }
@Override public ElkObjectPropertyAxiom visit( OWLReflexiveObjectPropertyAxiom owlReflexiveObjectPropertyAxiom) { return CONVERTER.convert(owlReflexiveObjectPropertyAxiom); }
@Override public void visit(OWLReflexiveObjectPropertyAxiom axiom) { defaultVisit(axiom); }
@Override public OWLAxiom visit(OWLReflexiveObjectPropertyAxiom axiom) { return factory.getOWLReflexiveObjectPropertyAxiom(axiom.getProperty(), annotations); }
@Override public void visit(OWLReflexiveObjectPropertyAxiom axiom) { }
@Override public Boolean visit(OWLReflexiveObjectPropertyAxiom axiom) { return true; }
@Override public Boolean visit(OWLReflexiveObjectPropertyAxiom axiom) { return false; }
@Override public Boolean visit(OWLReflexiveObjectPropertyAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLReflexiveObjectPropertyAxiom(axiom.getProperty(), reg(axiom.getAnnotations()))); }
@Override public Boolean visit(OWLReflexiveObjectPropertyAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLReflexiveObjectPropertyAxiom(axiom.getProperty(), empty())); }
@Override public void visit(OWLReflexiveObjectPropertyAxiom axiom) { ignoreOwlAxiom("ReflextiveObjectProperty", axiom); }
@Override public void visit(OWLReflexiveObjectPropertyAxiom axiom) { axiom.asOWLSubClassOfAxiom().accept(this); }
@Override public O visit(OWLReflexiveObjectPropertyAxiom axiom) { return doDefault(axiom); }
@Override public void visit(OWLReflexiveObjectPropertyAxiom axiom) { type = AXIOM_TYPE_INDEX_BASE + axiom.getAxiomType().getIndex(); }
@Override public OWLAxiom visit(OWLReflexiveObjectPropertyAxiom axiom) { return axiom; }
@Override public void visit(OWLReflexiveObjectPropertyAxiom axiom) { hashCode = primes[28]; hashCode = hashCode * MULT + axiom.getProperty().hashCode(); hashCode = hashCode * MULT + axiom.getAnnotations().hashCode(); }
@Override public void visit(OWLReflexiveObjectPropertyAxiom axiom) { handleDefault(axiom); }
@Override public void visit(@Nonnull OWLReflexiveObjectPropertyAxiom axiom) { axiom.getProperty().accept(this); processAxiomAnnotations(axiom); }
@Override public OWLReflexiveObjectPropertyAxiom getAnnotatedAxiom( Set<OWLAnnotation> annotations) { return new OWLReflexiveObjectPropertyAxiomImpl(getProperty(), mergeAnnos(annotations)); }
private Axiom transformOWLReflexiveObjectPropertyAxiom(OWLReflexiveObjectPropertyAxiom a) { OWLObjectPropertyExpression exp = a.getProperty(); return new RoleInclusion(new Role[] {}, new NamedRole(exp.asOWLObjectProperty().toStringID())); }
public void visit(OWLReflexiveObjectPropertyAxiom arg0) { unusedAxiom(arg0); }
@Override protected OWLReflexiveObjectPropertyAxiom createAxiom(OWLObjectPropertyExpression propertyExpression, Set<OWLAnnotation> annotations, OWLDataFactory dataFactory) { return dataFactory.getOWLReflexiveObjectPropertyAxiom(propertyExpression, annotations); }
public void visit(OWLReflexiveObjectPropertyAxiom arg0) { }