@Override public OWLEquivalentClassesAxiom buildObject() { return df.getOWLEquivalentClassesAxiom(items, annotations); } }
@Override public OWLAxiom visit(OWLEquivalentClassesAxiom axiom) { return df.getOWLEquivalentClassesAxiom( axiom.classExpressions().map(p -> p.accept(classVisitor))); }
@Override protected void addAxioms(OWLClass entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLEquivalentClassesAxiom> result) { Set<OWLClassExpression> equivalentClasses = asUnorderedSet( reasoner.getEquivalentClasses(entity).entities(), OWLClassExpression.class); equivalentClasses.add(entity); if (equivalentClasses.size() > 1) { result.add(dataFactory.getOWLEquivalentClassesAxiom(equivalentClasses)); } }
@Override public void visit(OWLEquivalentClassesAxiom axiom) { Set<OWLClassExpression> eqclasses = replaceBottom(axiom.classExpressions()); newAxiom = df.getOWLEquivalentClassesAxiom(eqclasses); }
@Override public void visit(OWLEquivalentClassesAxiom axiom) { isLocal = false; if (pairs(axiom.classExpressions()).map(v -> df.getOWLEquivalentClassesAxiom(v.i, v.j)) .anyMatch(ax -> !kernel.isEntailed(ax))) { return; } isLocal = true; }
@Override public void handleTriple(IRI s, IRI p, IRI o) { consume(s, p, o); add(df .getOWLEquivalentClassesAxiom(Sets.newHashSet(ce(s), translateEquivalentClass(o)))); }
@Override public void handleTriple(IRI s, IRI p, IRI o) { consume(s, p, o); add(df .getOWLEquivalentClassesAxiom(Sets.newHashSet(ce(s), translateEquivalentClass(o)))); }
@Override public Collection<OWLAxiom> visit(OWLDisjointUnionAxiom axiom) { Set<OWLAxiom> axioms = new HashSet<>(); axioms.addAll(df.getOWLEquivalentClassesAxiom(axiom.getOWLClass(), df.getOWLObjectUnionOf(axiom.classExpressions())).accept(this)); axioms.addAll(df.getOWLDisjointClassesAxiom(axiom.classExpressions()).accept(this)); return axioms; }
public OWLEntityCreationSet<OWLClass> createAnonymousClass(OWLOntology ont, OWLClassExpression descr){ OWLClass anonCls = mngr.getOWLDataFactory().getOWLClass(getNextID()); List<OWLOntologyChange> changes = new ArrayList<>(); changes.add(new AddAxiom(ont, mngr.getOWLDataFactory().getOWLEquivalentClassesAxiom(anonCls, descr))); return new OWLEntityCreationSet<>(anonCls, changes); }
@Override public Collection<OWLAxiom> visit(OWLDisjointUnionAxiom axiom) { Set<OWLAxiom> axioms = new HashSet<>(); axioms.addAll(df.getOWLEquivalentClassesAxiom(axiom.getOWLClass(), df.getOWLObjectUnionOf(axiom.classExpressions())).accept(this)); axioms.addAll(df.getOWLDisjointClassesAxiom(axiom.classExpressions()).accept(this)); return axioms; }
private void translateEquivalentClasses(IRI s, IRI p, IRI o) { add(df.getOWLEquivalentClassesAxiom(Sets.newHashSet(ce(s), ce(o)), anns())); consume(s, p, o); } }
private void translateEquivalentClasses(IRI s, IRI p, IRI o) { add(df.getOWLEquivalentClassesAxiom(Sets.newHashSet(ce(s), ce(o)), anns())); consume(s, p, o); } }
private static OWLEntityCreationSet<OWLClass> appendDefinitionToCreationSet(OWLEntityCreationSet<OWLClass> creationSet, OWLClassExpression desc, OWLEditorKit eKit) { final OWLClass owlEntity = creationSet.getOWLEntity(); final OWLAxiom ax = eKit.getOWLModelManager().getOWLDataFactory().getOWLEquivalentClassesAxiom(owlEntity, desc); final List<OWLOntologyChange> changes = new ArrayList<>(creationSet.getOntologyChanges()); changes.add(new AddAxiom(eKit.getOWLModelManager().getActiveOntology(), ax)); return new OWLEntityCreationSet<>(owlEntity, changes); } }
final public OWLClassAxiom EquivalentClasses() throws ParseException {Set<OWLClassExpression> classExpressions; Set<OWLAnnotation> axiomAnnos; jj_consume_token(EQUIVALENTCLASSES); jj_consume_token(OPENPAR); axiomAnnos = AxiomAnnotationSet(); classExpressions = ClassExpressionSet(); jj_consume_token(CLOSEPAR); return df.getOWLEquivalentClassesAxiom(classExpressions, axiomAnnos); }
final public OWLAxiom DefineConcept() throws ParseException {OWLClassExpression clsA; OWLClassExpression clsB; jj_consume_token(OPENPAR); jj_consume_token(DEFINECONCEPT); clsA = ConceptName(); clsB = ConceptExpression(); jj_consume_token(CLOSEPAR); return df.getOWLEquivalentClassesAxiom(clsA, clsB); }
final public OWLClassAxiom EquivalentClasses() throws ParseException {Set<OWLClassExpression> classExpressions; Set<OWLAnnotation> axiomAnnos; jj_consume_token(EQUIVALENTCLASSES); jj_consume_token(OPENPAR); axiomAnnos = AxiomAnnotationSet(); classExpressions = ClassExpressionSet(); jj_consume_token(CLOSEPAR); return df.getOWLEquivalentClassesAxiom(classExpressions, axiomAnnos); }
final public OWLAxiom DefineConcept() throws ParseException {OWLClassExpression clsA; OWLClassExpression clsB; jj_consume_token(OPENPAR); jj_consume_token(DEFINECONCEPT); clsA = ConceptName(); clsB = ConceptExpression(); jj_consume_token(CLOSEPAR); return df.getOWLEquivalentClassesAxiom(clsA, clsB); }
private void createEquivalentClass(OWLClassExpression classExpression) { OWLAxiom ax = getDataFactory() .getOWLEquivalentClassesAxiom(CollectionFactory.createSet(getCurrentClass(), classExpression)); getOWLOntologyManager().applyChange(new AddAxiom(ontology, ax)); }
final public void Equivalent() throws ParseException, KRSS2OWLParserException {OWLClassExpression desc1, desc2; jj_consume_token(OPENPAR); jj_consume_token(EQUIVALENT); desc1 = ConceptExpression(); desc2 = ConceptExpression(); jj_consume_token(CLOSEPAR); addAxiom(df.getOWLEquivalentClassesAxiom(desc1, desc2)); }
protected OWLClassAxiom createAxiom(OWLClassExpression editedObject) { if (getAxiom() instanceof OWLSubClassOfAxiom) { return getOWLDataFactory().getOWLSubClassOfAxiom(getRoot(), editedObject); } else { return getOWLDataFactory().getOWLEquivalentClassesAxiom(CollectionFactory.createSet(getRoot(), editedObject)); } }