public static OWLSubClassOfAxiom SubClassOf(OWLClassExpression subClass, OWLClassExpression superClass, Collection<OWLAnnotation> a) { return DF.getOWLSubClassOfAxiom(subClass, superClass, a); }
@Nonnull @Override public Set<OWLAxiom> visit(OWLClass subject) { return Collections.singleton(df.getOWLSubClassOfAxiom(subject, classExpression)); }
@Nonnull @Override public Optional<OWLAxiom> visit(@Nonnull OWLClass cls) { return strategy.getDeprecatedClassParentIri() .map(parent -> dataFactory.getOWLSubClassOfAxiom(cls, dataFactory.getOWLClass(parent))); }
/** * Domain(R) = C is tautology iff ER.Top [= C */ @Override public void visit(OWLObjectPropertyDomainAxiom axiom) { isLocal = true; for (OWLClassExpression e : exprMap.get(axiom)) { isLocal &= kernel.isEntailed(df.getOWLSubClassOfAxiom(e, axiom.getDomain())); } }
private void generateChanges() { Set<OWLClassExpression> supers = new HashSet<>(); for (OWLOntology o : ontologies) { o.equivalentClassesAxioms(cls).forEach(ax -> { addChange(new RemoveAxiom(o, ax)); ax.classExpressions().forEach(c -> collectClassExpressions(c, supers)); }); } supers.remove(cls); supers.forEach( sup -> addChange(new AddAxiom(targetOntology, df.getOWLSubClassOfAxiom(cls, sup)))); }
public static OWLAxiom getClosureAxiom(OWLClass cls, OWLObjectProperty prop, OWLDataFactory df, Set<OWLOntology> onts) { ClosureAxiomFactory fac = new ClosureAxiomFactory(prop, df, onts); cls.accept(fac); final OWLObjectAllValuesFrom closure = fac.getClosureRestriction(); return (closure != null) ? df.getOWLSubClassOfAxiom(cls, closure) : null; }
@Override public void visit(OWLClassAssertionAxiom axiom) { OWLClassExpression sub = dataFactory.getOWLObjectOneOf(axiom.getIndividual()); OWLAxiom ax = dataFactory.getOWLSubClassOfAxiom(sub, axiom.getClassExpression()); ax.accept(this); }
@Override public OWLAxiom visit(OWLSubClassOfAxiom axiom) { return df.getOWLSubClassOfAxiom(axiom.getSubClass().accept(classVisitor), axiom.getSuperClass().accept(classVisitor)); }
@Override public Collection<OWLAxiom> visit(OWLFunctionalDataPropertyAxiom axiom) { return doDefault(df.getOWLSubClassOfAxiom(df.getOWLThing(), df.getOWLDataMaxCardinality(1, axiom.getProperty()))); }
@Override public Collection<OWLAxiom> visit(OWLFunctionalObjectPropertyAxiom axiom) { return doDefault(df.getOWLSubClassOfAxiom(df.getOWLThing(), df.getOWLObjectMaxCardinality(1, axiom.getProperty()))); }
@Override public OWLSubClassOfAxiom buildObject() { return df .getOWLSubClassOfAxiom(verifyNotNull(getSub()), verifyNotNull(getSup()), annotations); } }
@Override public void visit(OWLDataPropertyDomainAxiom axiom) { OWLClassExpression sub = dataFactory .getOWLDataSomeValuesFrom(axiom.getProperty(), dataFactory .getTopDatatype()); OWLAxiom ax = dataFactory.getOWLSubClassOfAxiom(sub, axiom.getDomain()); ax.accept(this); }
private void translate(IRI s, IRI p, IRI o) { OWLClassExpression subClass = ce(s); OWLClassExpression supClass = ce(o); OWLAxiom ax = df.getOWLSubClassOfAxiom(subClass, supClass, anns()); add(ax); consume(s, p, o); } }
@Override public void visit(OWLObjectPropertyDomainAxiom axiom) { // prop some Thing subclassOf domain OWLClassExpression sub = dataFactory .getOWLObjectSomeValuesFrom(axiom.getProperty(), dataFactory.getOWLThing()); OWLSubClassOfAxiom ax = dataFactory.getOWLSubClassOfAxiom(sub, axiom.getDomain()); ax.accept(this); }
@Override public Collection<OWLAxiom> visit(OWLInverseFunctionalObjectPropertyAxiom axiom) { return doDefault(df.getOWLSubClassOfAxiom(df.getOWLThing(), df.getOWLObjectMaxCardinality(1, axiom.getProperty().getInverseProperty()))); }
final public void Implies() throws ParseException, KRSS2OWLParserException {OWLClassExpression subDescription, superDescription; jj_consume_token(OPENPAR); jj_consume_token(IMPLIES); subDescription = ConceptExpression(); superDescription = ConceptExpression(); jj_consume_token(CLOSEPAR); addAxiom( df.getOWLSubClassOfAxiom(subDescription, superDescription)); }
@Override public OWLClassExpression visit(OWLDataPropertyAssertionAxiom axiom) { OWLClassExpression sub = oneOf(axiom.getSubject()); OWLClassExpression sup = factory.getOWLDataHasValue(axiom.getProperty(), axiom.getObject()); OWLSubClassOfAxiom ax = factory.getOWLSubClassOfAxiom(sub, sup); return ax.accept(this); }
@Override public Object visit(OWLSubClassOfAxiom axiom) { return visitAxiom(axiom, () -> df.getOWLSubClassOfAxiom(t(axiom.getSubClass()), t(axiom.getSuperClass()), t( axiom.annotations()))); }
protected OWLClassAxiom createAxiom(OWLClassExpression editedObject) { if (getAxiom() instanceof OWLSubClassOfAxiom) { return getOWLDataFactory().getOWLSubClassOfAxiom(getRoot(), editedObject); } else { return getOWLDataFactory().getOWLEquivalentClassesAxiom(CollectionFactory.createSet(getRoot(), editedObject)); } }
public void actionPerformed(ActionEvent e) { OWLClass cls = getOWLWorkspace().getOWLSelectionModel().getLastSelectedClass(); // TODO: Push into OWLAPI Set<OWLClass> subClses = getOWLModelManager().getOWLHierarchyManager().getOWLClassHierarchyProvider().getChildren(cls); OWLClassExpression coveringDesc = getOWLDataFactory().getOWLObjectUnionOf(subClses); OWLSubClassOfAxiom ax = getOWLDataFactory().getOWLSubClassOfAxiom(cls, coveringDesc); getOWLModelManager().applyChange(new AddAxiom(getOWLModelManager().getActiveOntology(), ax)); }