protected static boolean isUnsupportedExtensionAxiom(OWLAxiom axiom) { return axiom instanceof OWLSubObjectPropertyOfAxiom || axiom instanceof OWLTransitiveObjectPropertyAxiom || axiom instanceof OWLSubPropertyChainOfAxiom || axiom instanceof OWLFunctionalObjectPropertyAxiom || axiom instanceof OWLInverseFunctionalObjectPropertyAxiom || axiom instanceof SWRLRule; }
@Override public T visit(OWLTransitiveObjectPropertyAxiom axiom) { throw new IllegalArgumentException( OWLTransitiveObjectPropertyAxiom.class.getSimpleName() + " cannot be converted to " + getTargetClass().getSimpleName()); }
/** * Transitive(R) ==> Transitive(R') * * @param ax */ private void tr(OWLObjectPropertyCharacteristicAxiom ax) { if (ax instanceof OWLTransitiveObjectPropertyAxiom) { OWLObjectPropertyExpression pt = trTypeLevel(ax.getProperty()); if (pt instanceof OWLObjectProperty) { add(getOWLDataFactory().getOWLTransitiveObjectPropertyAxiom(pt)); } } add(ax); // pass-through }
/** * true if c is transitive in the graph * * @param c * @return boolean */ public boolean getIsTransitive(OWLObjectProperty c) { for(OWLOntology ont : getAllOntologies()) { Set<OWLTransitiveObjectPropertyAxiom> ax = ont.getTransitiveObjectPropertyAxioms(c); if (ax.isEmpty() == false) { return true; } } return false; }
@Override public Set<ComplexIntegerAxiom> visit(OWLTransitiveObjectPropertyAxiom axiom) throws TranslationException { Objects.requireNonNull(axiom); OWLObjectProperty property = axiom.getProperty().asOWLObjectProperty(); IntegerObjectProperty propExpr = getDataTypeFactory().createObjectProperty(translateObjectProperty(property)); ComplexIntegerAxiom ret = getAxiomFactory().createTransitiveObjectPropertyAxiom(propExpr, translateAnnotations(axiom.getAnnotations())); return Collections.singleton(ret); }
@Override public void visit(OWLTransitiveObjectPropertyAxiom axiom) { ParameterizedSparqlString template = new ParameterizedSparqlString( subjectVar + " ?p ?o1 . ?o1 ?p ?o . " + subjectVar + " ?p " + objectVar); template.setIri("p", axiom.getProperty().asOWLObjectProperty().toStringID()); sparql += template.toString(); }
@Nonnull @Override public OWLTransitiveObjectPropertyAxiom getAxiomWithoutAnnotations() { if (!isAnnotated()) { return this; } return new OWLTransitiveObjectPropertyAxiomImpl(getProperty(), NO_ANNOTATIONS); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } return obj instanceof OWLTransitiveObjectPropertyAxiom; }
public void visit(OWLTransitiveObjectPropertyAxiom axiom) { notSupported(axiom); }
public void visit(OWLTransitiveObjectPropertyAxiom axiom) { makeTransitive(axiom.getProperty()); m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(axiom.getProperty().getNamedProperty()); }
public Boolean visit(OWLTransitiveObjectPropertyAxiom axiom) { return reasoner.isTransitive(axiom.getProperty()); }
public void visit(OWLTransitiveObjectPropertyAxiom axiom) { }
@Override public OWLTransitiveObjectPropertyAxiom visit( ElkTransitiveObjectPropertyAxiom axiom) { return owlFactory_.getOWLTransitiveObjectPropertyAxiom( convert(axiom.getProperty())); }
@SuppressWarnings("static-method") public ElkTransitiveObjectPropertyAxiom convert( OWLTransitiveObjectPropertyAxiom owlTransitiveObjectPropertyAxiom) { return new ElkTransitiveObjectPropertyAxiomWrap<OWLTransitiveObjectPropertyAxiom>( owlTransitiveObjectPropertyAxiom); }
@Override public ElkAxiom visit( OWLTransitiveObjectPropertyAxiom owlTransitiveObjectPropertyAxiom) { return CONVERTER.convert(owlTransitiveObjectPropertyAxiom); }
@Override public ElkObjectPropertyAxiom visit( OWLTransitiveObjectPropertyAxiom owlTransitiveObjectPropertyAxiom) { return CONVERTER.convert(owlTransitiveObjectPropertyAxiom); }
@Override public void visit(OWLTransitiveObjectPropertyAxiom axiom) { defaultVisit(axiom); }
@Override public OWLAxiom visit(OWLTransitiveObjectPropertyAxiom axiom) { return factory.getOWLTransitiveObjectPropertyAxiom(axiom.getProperty(), annotations); }
@Override public void visit(OWLTransitiveObjectPropertyAxiom axiom) { }
@Override public Boolean visit(OWLTransitiveObjectPropertyAxiom axiom) { return true; }
@Override public Boolean visit(OWLTransitiveObjectPropertyAxiom axiom) { return false; }
@Override public Boolean visit(OWLTransitiveObjectPropertyAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLTransitiveObjectPropertyAxiom(axiom.getProperty(), reg(axiom.getAnnotations()))); }
@Override public Boolean visit(OWLTransitiveObjectPropertyAxiom axiom) { Objects.requireNonNull(axiom); return add(this.df.getOWLTransitiveObjectPropertyAxiom(axiom.getProperty(), empty())); }
@Override public void visit(OWLTransitiveObjectPropertyAxiom axiom) { ignoreOwlAxiom("TransitiveObjectProperty", axiom); }
@Override public O visit(OWLTransitiveObjectPropertyAxiom axiom) { return doDefault(axiom); }
@Override public void visit(OWLTransitiveObjectPropertyAxiom axiom) { type = AXIOM_TYPE_INDEX_BASE + axiom.getAxiomType().getIndex(); }
@Override public OWLAxiom visit(OWLTransitiveObjectPropertyAxiom axiom) { return axiom; }
@Override public void visit(OWLTransitiveObjectPropertyAxiom axiom) { hashCode = primes[32]; hashCode = hashCode * MULT + axiom.getProperty().hashCode(); hashCode = hashCode * MULT + axiom.getAnnotations().hashCode(); }
@Override public void visit(OWLTransitiveObjectPropertyAxiom axiom) { handleDefault(axiom); }
@Override public void visit(@Nonnull OWLTransitiveObjectPropertyAxiom axiom) { axiom.getProperty().accept(this); processAxiomAnnotations(axiom); }
private Axiom transformOWLTransitiveObjectPropertyAxiom(OWLTransitiveObjectPropertyAxiom a) { OWLObjectPropertyExpression exp = a.getProperty(); Role r = new NamedRole(exp.asOWLObjectProperty().toStringID()); return new RoleInclusion(new Role[] { r, r }, r); }
public void visit(OWLTransitiveObjectPropertyAxiom arg0) { unusedAxiom(arg0); }
@Override protected OWLTransitiveObjectPropertyAxiom createAxiom(OWLObjectPropertyExpression propertyExpression, Set<OWLAnnotation> annotations, OWLDataFactory dataFactory) { return dataFactory.getOWLTransitiveObjectPropertyAxiom(propertyExpression, annotations); }
public void visit(OWLTransitiveObjectPropertyAxiom arg0) { }