@Override public OWLObjectUnionOf buildObject() { return df.getOWLObjectUnionOf(items); } }
public OWLClassExpression getCoveringAxiom() { if (operands.isEmpty()) { return null; } return owlDataFactory.getOWLObjectUnionOf(operands); }
@Override protected OWLClassExpression translateEquivalentClass(IRI mainNode) { return df.getOWLObjectUnionOf( consumer.translatorAccessor.translateToClassExpressionSet(mainNode)); } }
@Override protected OWLClassExpression createClassExpression(Set<OWLClassExpression> operands) { return getOWLDataFactory().getOWLObjectUnionOf(operands); } }
private void createUnionEquivalentClass() { OWLClassExpression equivalentClass; if (unionOfOperands.size() == 1) { equivalentClass = unionOfOperands.iterator().next(); } else { equivalentClass = getDataFactory().getOWLObjectUnionOf(unionOfOperands); } createEquivalentClass(equivalentClass); }
@Override public OWLClassExpression visit(OWLObjectUnionOf ce) { Set<OWLClassExpression> descs = new HashSet<>(); ce.operands().forEach(op -> visitOperand(descs, op)); return ldf.getOWLObjectUnionOf(descs); }
@Override public OWLClassExpression visit(OWLObjectUnionOf ce) { Set<OWLClassExpression> descs = new HashSet<>(); ce.operands().forEach(op -> visitOperand(descs, op)); return ldf.getOWLObjectUnionOf(descs); }
public OWLClassExpression visit(OWLObjectIntersectionOf desc) { Set<OWLClassExpression> ops = new HashSet<OWLClassExpression>(); for (OWLClassExpression op : desc.getOperands()) { ops.add(op.accept(this)); } if (negated) { return dataFactory.getOWLObjectUnionOf(ops); } else { return dataFactory.getOWLObjectIntersectionOf(ops); } }
@Override public OWLClassExpression visit(OWLObjectUnionOf ce) { Stream<OWLClassExpression> ops = ce.operands().map(p -> p.accept(this)); if (negated) { // Flip to an intersection return df.getOWLObjectIntersectionOf(ops); } return df.getOWLObjectUnionOf(ops); }
@Override public OWLClassExpression visit(OWLObjectIntersectionOf ce) { Stream<OWLClassExpression> ops = ce.operands().map(p -> p.accept(this)); if (negated) { return df.getOWLObjectUnionOf(ops); } return df.getOWLObjectIntersectionOf(ops); }
final public OWLClassExpression Or() throws ParseException { Set<OWLClassExpression> operands; jj_consume_token(OPENPAR); jj_consume_token(OR); operands = ConceptSet(); jj_consume_token(CLOSEPAR); {if (true) return dataFactory.getOWLObjectUnionOf(operands);} throw new Error("Missing return statement in function"); }
@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; }
@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; }
final public OWLClassExpression Or() throws ParseException, KRSS2OWLParserException {Set<OWLClassExpression> operands; jj_consume_token(OPENPAR); jj_consume_token(OR); operands = ConceptSet(); jj_consume_token(CLOSEPAR); return df.getOWLObjectUnionOf(operands); }
final public OWLClassExpression ObjectUnionOf() throws ParseException { Set<OWLClassExpression> classExpressions; jj_consume_token(OBJECTUNIONOF); jj_consume_token(OPENPAR); classExpressions = ClassExpressionSet(); jj_consume_token(CLOSEPAR); {if (true) return dataFactory.getOWLObjectUnionOf(classExpressions);} throw new Error("Missing return statement in function"); }
@Override public OWLObjectUnionOf translate(IRI mainNode) { IRI listNode = getConsumer().getResourceObject(mainNode, OWL_UNION_OF, true); Set<OWLClassExpression> classExpressions = accessor .translateToClassExpressionSet(verifyNotNull(listNode)); return getDataFactory().getOWLObjectUnionOf(classExpressions); } }
@Override public OWLObjectUnionOf translate(IRI mainNode) { IRI listNode = getConsumer().getResourceObject(mainNode, OWL_UNION_OF, true); Set<OWLClassExpression> classExpressions = accessor .translateToClassExpressionSet(verifyNotNull(listNode)); return getDataFactory().getOWLObjectUnionOf(classExpressions); } }
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)); }
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)); }
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)); }