protected void extendCandidates(OWLAxiom entailment, Set<OWLAxiom> expansionCandidates, Set<OWLAxiom> directExpansionCandidates, OWLAxiom ax) { expansionCandidates.add(ax); entailment.signature() .filter(entailmentEnt->ax.containsEntityInSignature(entailmentEnt)) .forEach(entailmentEnt->directExpansionCandidates.add(ax)); }
@Override @SuppressWarnings("unchecked") public <A extends OWLAxiom> Stream<A> axioms(Class<A> type, Class<? extends OWLObject> explicitClass, OWLObject entity, Navigation forSubPosition) { Optional<MapPointer<OWLObject, A>> optional = ints.get((Class<OWLObject>) explicitClass, type, forSubPosition); if (optional.isPresent()) { return optional.get().values(entity, type); } if (!(entity instanceof OWLEntity)) { return empty(); } return axioms(AxiomType.getTypeForClass(type)) .filter(a -> a.containsEntityInSignature((OWLEntity) entity)); }
@Override @SuppressWarnings("unchecked") public <A extends OWLAxiom> Stream<A> axioms(Class<A> type, Class<? extends OWLObject> explicitClass, OWLObject entity, Navigation forSubPosition) { Optional<MapPointer<OWLObject, A>> optional = ints.get((Class<OWLObject>) explicitClass, type, forSubPosition); if (optional.isPresent()) { return optional.get().values(entity, type); } if (!(entity instanceof OWLEntity)) { return empty(); } return axioms(AxiomType.getTypeForClass(type)) .filter(a -> a.containsEntityInSignature((OWLEntity) entity)); }
@Override @SuppressWarnings("unchecked") public <A extends OWLAxiom> Stream<A> axioms(Class<A> type, Class<? extends OWLObject> explicitClass, OWLObject entity, Navigation forSubPosition) { Optional<MapPointer<OWLObject, A>> optional = ints.get((Class<OWLObject>) explicitClass, type, forSubPosition); if (optional.isPresent()) { return optional.get().values(entity, type); } if (!(entity instanceof OWLEntity)) { return empty(); } return axioms(AxiomType.getTypeForClass(type)) .filter(a -> a.containsEntityInSignature((OWLEntity) entity)); }
@Override @SuppressWarnings("unchecked") public <A extends OWLAxiom> Stream<A> axioms(Class<A> type, Class<? extends OWLObject> explicitClass, OWLObject entity, Navigation forSubPosition) { Optional<MapPointer<OWLObject, A>> optional = ints.get((Class<OWLObject>) explicitClass, type, forSubPosition); if (optional.isPresent()) { return optional.get().values(entity, type); } if (!(entity instanceof OWLEntity)) { return empty(); } return axioms(AxiomType.getTypeForClass(type)) .filter(a -> a.containsEntityInSignature((OWLEntity) entity)); }
if (a.containsEntityInSignature(dataFactory.getOWLThing())) { logger.debug("Ignoring trivial axioms with " + "OWLThing in signature: " + a); continue;