/** * misleading method name, * examples are all instances from the a-Part of the atomicRole(a,b) * it has nothing to do with the actual Domain class * @param atomicRole */ public void makeNegativeExamplesFromDomain(OWLObjectProperty atomicRole){ fromDomain.clear(); logger.debug("making Negative Examples from Domain of : "+atomicRole); fromDomain.addAll(reasoningService.getPropertyMembers(atomicRole).keySet()); fromDomain.removeAll(fullPositiveSet); logger.debug("|-neg Example size from Domain: "+this.fromDomain.size()); }
/** * misleading method name, * examples are all instances from the b-Part of the atomicRole(a,b) * it has nothing to do with the actual Range class * @param atomicRole */ public void makeNegativeExamplesFromRange(OWLObjectProperty atomicRole){ fromRange.clear(); logger.debug("making Negative Examples from Range of : "+atomicRole); Collection<SortedSet<OWLIndividual>> tmp = reasoningService.getPropertyMembers(atomicRole).values(); for (SortedSet<OWLIndividual> set : tmp) { fromRange.addAll(set); } fromRange.removeAll(fullPositiveSet); logger.debug("|-neg Example size from Range: "+fromRange.size()); } }
@WebMethod public String[] getIndividualsForARole(int id, String role) throws ClientNotKnownException { ClientState state = getState(id); Map<OWLIndividual,SortedSet<OWLIndividual>> m = state.getReasonerComponent().getPropertyMembers( new OWLObjectPropertyImpl(IRI.create(role))); Set<OWLIndividual> individuals = m.keySet(); return Datastructures.sortedSet2StringListIndividuals(individuals); }
for (Entry<OWLIndividual, SortedSet<OWLIndividual>> entry : reasoner.getPropertyMembers(role).entrySet()) { OWLIndividual ind = entry.getKey(); if (!entry.getValue().isEmpty()) {
for (OWLObjectProperty op : objectPropertyHierarchy.getEntities()) { Map<OWLIndividual, SortedSet<OWLIndividual>> propertyMembers = reasoner.getPropertyMembers(op); } else { int maxFillers = Math.min(cardinalityLimit, reasoner.getPropertyMembers(op).entrySet().stream() .mapToInt(entry -> entry.getValue().size()) .max().orElse(0)); for (Entry<OWLIndividual, SortedSet<OWLIndividual>> entry : reasoner.getPropertyMembers(op).entrySet()) { OWLIndividual subject = entry.getKey(); SortedSet<OWLIndividual> objects = entry.getValue();