@Override public void visit(OWLClass expr) { if (expr.isTopEntity() || expr.isBottomEntity()) { return; } vE(expr); }
@Override public void visit(OWLClass expr) { if (expr.isTopEntity() || expr.isBottomEntity()) { return; } vE(expr); }
@Override public void visit(OWLClass expr) { if (expr.isTopEntity() || expr.isBottomEntity()) { return; } vE(expr); }
@Override public void visit(OWLClass expr) { if (expr.isTopEntity() || expr.isBottomEntity()) { return; } vE(expr); }
/** * Synonym of getAllParents(), in IConcept; defaults to asserted parents if reasoner * is off. Will not return owl:Thing (which should never appear anyway) or * owl:Nothing, even if the concept is inconsistent. * * @param main */ public Set<IConcept> getParentClosure(IConcept main) { Set<IConcept> ret = new HashSet<>(); if (reasoner != null) { for (OWLClass cls : getSuperClasses(((Concept) main).getOWLClass(), false) .getFlattened()) { if (cls.isBottomEntity() || cls.isTopEntity()) { continue; } IConcept cc = overall.getManager().getConceptFor(cls, false); if (cc != null) { ret.add(cc); } } } else { ret.addAll(main.getAllParents()); } return ret; }
/** * Adds the inferred hierarchical relationships. * * @param service the service * @throws Exception the exception */ public void addInferredHierarchicalRelationships(HistoryService service) throws Exception { int objectCt = 0; for (OWLClass owlClass : ontology.getClassesInSignature()) { // get sub-classes for (OWLClass chdClass : reasoner.getSubClasses(owlClass, true) .getFlattened()) { // Break if bottom node encountered if (chdClass.isBottomEntity()) { break; } Concept chd = getConceptForOwlClass(chdClass, service); Concept par = getConceptForOwlClass(owlClass, service); ConceptRelationship rel = getSubClassOfRelationship(chd, par); Logger.getLogger(getClass()).debug(" add relationship - " + rel); service.addRelationship(rel); chd.getRelationships().add(rel); service.logAndCommit(++objectCt, RootService.logCt, RootService.commitCt); } } }
/** * Synonym of getSubclasses, in IConcepts; defaults to asserted children if reasoner * is off. Will not return owl:Thing (which should never appear anyway) or * owl:Nothing, which is a child of everything. * * @param main */ public Set<IConcept> getSemanticClosure(IConcept main) { if (reasoner != null) { Set<IConcept> ret = new HashSet<>(); for (OWLClass cls : getSubClasses(((Concept) main).getOWLClass(), false) .getFlattened()) { if (cls.isBottomEntity() || cls.isTopEntity()) { continue; } IConcept cc = overall.getManager().getConceptFor(cls, false); if (cc != null) { ret.add(cc); } } return ret; } return main.getSemanticClosure(); }
if (chdClass.isBottomEntity()) { continue;