public boolean contains(OWLClass cls) { if (cls.equals(owlOntologyManager.getOWLDataFactory().getOWLThing())) { return true; } else if (cls.equals(owlOntologyManager.getOWLDataFactory().getOWLNothing())) { return true; } return owlClass2ClassPointerMap.containsKey(cls); }
public void visit(OWLClass owlClass) { try { lastClassPointer = owlClass2ClassPointerMap.get(owlClass); // Cache if not in map if (lastClassPointer == null) { if (owlClass.getURI().equals(OWLRDFVocabulary.OWL_THING.getURI())) { lastClassPointer = faCTPlusPlus.getThing(); } else if (owlClass.getURI().equals(OWLRDFVocabulary.OWL_NOTHING.getURI())) { lastClassPointer = faCTPlusPlus.getNothing(); } else { lastClassPointer = faCTPlusPlus.getNamedClass(owlClass.getURI().toString()); } classPointerMap.put(lastClassPointer, owlClass); owlClass2ClassPointerMap.put(owlClass, lastClassPointer); } } catch (Exception e) { throw new FaCTPlusPlusRuntimeException(e); } }