@Override public OWLObjectIntersectionOf buildObject() { return df.getOWLObjectIntersectionOf(items); } }
@Override public OWLObjectIntersectionOf buildObject() { return df.getOWLObjectIntersectionOf(items); } }
@Override protected OWLClassExpression translateEquivalentClass(IRI mainNode) { return df.getOWLObjectIntersectionOf( consumer.translatorAccessor.translateToClassExpressionSet(mainNode)); }
@Override protected OWLClassExpression translateEquivalentClass(IRI mainNode) { return df.getOWLObjectIntersectionOf( consumer.translatorAccessor.translateToClassExpressionSet(mainNode)); }
@Override public OWLClassExpression visit(OWLDifferentIndividualsAxiom axiom) { Set<OWLClassExpression> nominals = new HashSet<>(); axiom.individuals().forEach(ind -> nominals.add(oneOf(ind))); return factory.getOWLObjectIntersectionOf(nominals); }
private void createIntersectionEquivalentClass() { OWLClassExpression equivalentClass; if (intersectionOfOperands.size() == 1) { equivalentClass = intersectionOfOperands.iterator().next(); } else { equivalentClass = getDataFactory().getOWLObjectIntersectionOf(intersectionOfOperands); } createEquivalentClass(equivalentClass); }
@Override public OWLClassExpression visit(OWLDifferentIndividualsAxiom axiom) { Set<OWLClassExpression> nominals = new HashSet<>(); axiom.individuals().forEach(ind -> nominals.add(oneOf(ind))); return factory.getOWLObjectIntersectionOf(nominals); }
@Override public Optional<OWLClassExpression> visit(OWLSubClassOfAxiom axiom) { return Optional .of(df.getOWLObjectIntersectionOf(axiom.getSubClass(), df.getOWLObjectComplementOf(axiom .getSuperClass()))); } }
@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); }
@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(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); }
protected void amalgamate(OWLOntology ont, OWLClass cls) { List<OWLSubClassOfAxiom> axioms = asList(ont.subClassAxiomsForSubClass(cls)); if (axioms.size() < 2) { return; } axioms.forEach(ax -> addChange(new RemoveAxiom(ont, ax))); Stream<OWLClassExpression> superclasses = axioms.stream() .map(OWLSubClassOfAxiom::getSuperClass); OWLObjectIntersectionOf intersection = df.getOWLObjectIntersectionOf(superclasses); addChange(new AddAxiom(ont, df.getOWLSubClassOfAxiom(cls, intersection))); } }
final public OWLClassExpression ObjectIntersectionOf() throws ParseException {Set<OWLClassExpression> classExpressions; jj_consume_token(OBJECTINTERSECTIONOF); jj_consume_token(OPENPAR); classExpressions = ClassExpressionSet(); jj_consume_token(CLOSEPAR); return df.getOWLObjectIntersectionOf(classExpressions); }
@Override public void visit(OWLSubClassOfAxiom axiom) { // A and not (B) OWLClassExpression complement = dataFactory.getOWLObjectComplementOf(axiom.getSuperClass()); desc = dataFactory.getOWLObjectIntersectionOf( CollectionFactory.createSet(axiom.getSubClass(), complement)); }
final public OWLClassExpression And() throws ParseException {Set<OWLClassExpression> operands; jj_consume_token(OPENPAR); jj_consume_token(AND); operands = ConceptSet(); jj_consume_token(CLOSEPAR); return df.getOWLObjectIntersectionOf(operands); }
final public OWLClassExpression And() throws ParseException, KRSS2OWLParserException {Set<OWLClassExpression> operands; jj_consume_token(OPENPAR); jj_consume_token(AND); operands = ConceptSet(); jj_consume_token(CLOSEPAR); return df.getOWLObjectIntersectionOf(operands); }
final public OWLClassExpression And() throws ParseException, KRSS2OWLParserException {Set<OWLClassExpression> operands; jj_consume_token(OPENPAR); jj_consume_token(AND); operands = ConceptSet(); jj_consume_token(CLOSEPAR); return df.getOWLObjectIntersectionOf(operands); }
@Override public OWLObjectIntersectionOf translate(IRI mainNode) { IRI listNode = getConsumer().getResourceObject(mainNode, OWL_INTERSECTION_OF, true); Set<OWLClassExpression> classExpressions = accessor .translateToClassExpressionSet(verifyNotNull(listNode)); return getDataFactory().getOWLObjectIntersectionOf(classExpressions); } }
@Override public OWLObjectIntersectionOf translate(IRI mainNode) { IRI listNode = getConsumer().getResourceObject(mainNode, OWL_INTERSECTION_OF, true); Set<OWLClassExpression> classExpressions = accessor .translateToClassExpressionSet(verifyNotNull(listNode)); return getDataFactory().getOWLObjectIntersectionOf(classExpressions); } }