Refine search
@Override public OWLDataRange visit(OWLDataIntersectionOf node) { Set<OWLDataRange> ops = new HashSet<>(); for (OWLDataRange op : node.getOperands()) { ops.add(op.accept(this)); } if (negated) { return dataFactory.getOWLDataUnionOf(ops); } else { return dataFactory.getOWLDataIntersectionOf(ops); } }
@Override public OWLDataRange visit(OWLDataIntersectionOf node) { Stream<OWLDataRange> ops = node.operands().map(p -> p.accept(this)); if (negated) { return df.getOWLDataUnionOf(ops); } return df.getOWLDataIntersectionOf(ops); }
@Override public OWLDataRange visit(OWLDataIntersectionOf range) { List<OWLDataRange> newConjuncts=new ArrayList<>(); for (OWLDataRange dr : range.getOperandsAsList()) { if (dr.isTopDatatype()) continue; OWLDataRange drSimplified=getSimplified(dr); if (drSimplified.isTopDatatype()) continue; else if (drSimplified instanceof OWLDataIntersectionOf) newConjuncts.addAll(((OWLDataIntersectionOf)drSimplified).getOperandsAsList()); else newConjuncts.add(drSimplified); } return m_factory.getOWLDataIntersectionOf(newConjuncts); } @Override
.filter(e -> e.getValue().stream().anyMatch(targetSet::contains)) .map(Entry::getKey) .collect(Collectors.toCollection(TreeSet::new)); } else if (description instanceof OWLObjectAllValuesFrom) { OWLDataRange filler = ((OWLDataSomeValuesFrom) description).getFiller(); if (filler.isDatatype()) { return ((OWLDataIntersectionOf) filler).getOperands().stream() .map(dr -> getIndividuals(df.getOWLDataSomeValuesFrom(property, dr))) .reduce((s1, s2) -> { s1.retainAll(s2); } else if (filler instanceof OWLDataUnionOf) { return ((OWLDataUnionOf) filler).getOperands().stream() .map(dr -> getIndividuals(df.getOWLDataSomeValuesFrom(property, dr))) .reduce((s1, s2) -> { s1.addAll(s2); .collect(Collectors.toCollection(TreeSet::new)); } else if (filler.getDataRangeType() == DataRangeType.DATA_ONE_OF) { OWLDataOneOf dataOneOf = (OWLDataOneOf) filler; Set<OWLLiteral> values = dataOneOf.getValues();
@Override public OWLDataRange visit(OWLDataIntersectionOf range) { return m_factory.getOWLDataIntersectionOf(range.operands().map(ExpressionManager.this::getNNF)); } @Override
@Override public OWLDataRange visit(OWLDataIntersectionOf range) { return m_factory.getOWLDataUnionOf(range.operands().map(ExpressionManager.this::getComplementNNF)); } @Override
OWLClassExpression simplifiedDescription=m_expressionManager.getNNF(m_expressionManager.getSimplified(m_factory.getOWLObjectUnionOf(inclusions.remove(inclusions.size()-1)))); if (!simplifiedDescription.isOWLThing()) { if (simplifiedDescription instanceof OWLObjectUnionOf) { objectAnd.operands().forEach(c->inclusions.add(Arrays.asList(c))); OWLDataRange simplifiedDescription=m_expressionManager.getNNF(m_expressionManager.getSimplified(m_factory.getOWLDataUnionOf(dataRangeInclusions.remove(classExpressionNormalizer.m_newDataRangeInclusions.size()-1)))); if (!simplifiedDescription.isTopDatatype()) { if (simplifiedDescription instanceof OWLDataUnionOf) { OWLDataUnionOf dataOr=(OWLDataUnionOf)simplifiedDescription; if (!distributeUnionOverAnd(descriptions,dataRangeInclusions)) { for (int index=0;index<descriptions.size();index++) descriptions.set(index, descriptions.get(index).accept(dataRangeNormalizer)); m_axioms.m_dataRangeInclusions.add(descriptions); dataAnd.operands().forEach(d->dataRangeInclusions.add(Arrays.asList(d))); OWLDataRange normalized=simplifiedDescription.accept(dataRangeNormalizer); dataRangeInclusions.add(Arrays.asList(normalized));
@Override public void visit(OWLDataIntersectionOf node) { for (OWLDataRange dr : node.getOperands()) { dr.accept(this); } }
OWLClassExpression simplifiedDescription=m_expressionManager.getNNF(m_expressionManager.getSimplified(m_factory.getOWLObjectUnionOf(inclusions.remove(inclusions.size()-1)))); if (!simplifiedDescription.isOWLThing()) { if (simplifiedDescription instanceof OWLObjectUnionOf) { OWLDataRange simplifiedDescription=m_expressionManager.getNNF(m_expressionManager.getSimplified(m_factory.getOWLDataUnionOf(dataRangeInclusions.remove(classExpressionNormalizer.m_newDataRangeInclusions.size()-1)))); if (!simplifiedDescription.isTopDatatype()) { if (simplifiedDescription instanceof OWLDataUnionOf) { OWLDataUnionOf dataOr=(OWLDataUnionOf)simplifiedDescription; if (!distributeUnionOverAnd(descriptions,dataRangeInclusions)) { for (int index=0;index<descriptions.length;index++) descriptions[index]=descriptions[index].accept(dataRangeNormalizer); m_axioms.m_dataRangeInclusions.add(descriptions); for (OWLDataRange conjunct : dataAnd.getOperands()) dataRangeInclusions.add(new OWLDataRange[] { conjunct }); OWLDataRange normalized=simplifiedDescription.accept(dataRangeNormalizer); dataRangeInclusions.add(new OWLDataRange[] { normalized });
@Override public OWLDataIntersectionOf visit(OWLDataIntersectionOf node) { return df.getOWLDataIntersectionOf(list(node.operands())); }
public OWLDataRange visit(OWLDataIntersectionOf node) { Set<OWLDataRange> ops = new HashSet<OWLDataRange>(); for (OWLDataRange op : node.getOperands()) { ops.add(op.accept(this)); } return dataFactory.getOWLDataIntersectionOf(ops); }
@Override public void visit(OWLDataIntersectionOf node) { hashCode = primes[76]; hashCode = hashCode * MULT + node.getOperands().hashCode(); }
public OWLDataRange visit(OWLDataIntersectionOf range) { Set<OWLDataRange> newConjuncts=new HashSet<OWLDataRange>(); for (OWLDataRange dr : range.getOperands()) newConjuncts.add(getNNF(dr)); return m_factory.getOWLDataIntersectionOf(newConjuncts); } public OWLDataRange visit(OWLDataUnionOf range) {
public OWLDataRange visit(OWLDataIntersectionOf range) { Set<OWLDataRange> newConjuncts=new HashSet<OWLDataRange>(); for (OWLDataRange dr : range.getOperands()) { OWLDataRange drSimplified=getSimplified(dr); if (drSimplified.isTopDatatype()) continue; else if (drSimplified instanceof OWLDataIntersectionOf) newConjuncts.addAll(((OWLDataIntersectionOf)drSimplified).getOperands()); else newConjuncts.add(drSimplified); } return m_factory.getOWLDataIntersectionOf(newConjuncts); } public OWLDataRange visit(OWLDataUnionOf range) {
public OWLDataRange visit(OWLDataIntersectionOf range) { Set<OWLDataRange> newDisjuncts=new HashSet<OWLDataRange>(); for (OWLDataRange dr : range.getOperands()) newDisjuncts.add(getComplementNNF(dr)); return m_factory.getOWLDataUnionOf(newDisjuncts); } public OWLDataRange visit(OWLDataUnionOf range) {