public Node<OWLNamedIndividual> getSameIndividuals(OWLNamedIndividual ind) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { refreshCheck(); try { return toIndividualNode(kb.getAllSames(term(ind))); } catch (PelletRuntimeException e) { throw convert(e); } }
private NodeSet<OWLNamedIndividual> getIndividualNodeSetByName( Collection<ATermAppl> individuals) { Set<Node<OWLNamedIndividual>> instances = new HashSet<Node<OWLNamedIndividual>>(); for (ATermAppl ind : individuals) { for (ATermAppl equiv : kb.getAllSames(ind)) { instances.add(toIndividualNode(equiv)); } } return new OWLNamedIndividualNodeSet(instances); }
private NodeSet<OWLNamedIndividual> getIndividualNodeSetBySameAs( Collection<ATermAppl> individuals) { Set<Node<OWLNamedIndividual>> instances = new HashSet<Node<OWLNamedIndividual>>(); Set<ATermAppl> seen = new HashSet<ATermAppl>(); for (ATermAppl ind : individuals) { if (!seen.contains(ind)) { Set<ATermAppl> equiv = kb.getAllSames(ind); instances.add(toIndividualNode(equiv)); seen.addAll(equiv); } } return new OWLNamedIndividualNodeSet(instances); }