@Override public void purge() { litCache.clear(); classesByURI.clear(); objectPropertiesByURI.clear(); dataPropertiesByURI.clear(); datatypesByURI.clear(); individualsByURI.clear(); annotationPropertiesByURI.clear(); intCache.clear(); doubleCache.clear(); floatCache.clear(); stringCache.clear(); }
@Override public OWLLiteral getOWLLiteral(String lexicalValue, OWLDatatype datatype) { OWLLiteral literal = super.getOWLLiteral(lexicalValue, datatype); // no caches for booleans, they are singleton in owldatafactory if (datatype.isBoolean()) { return literal; } if (literal instanceof OWLLiteralImplFloat) { return floatCache.cache(((OWLLiteralImplFloat) literal).parseFloat(), literal); } if (literal instanceof OWLLiteralImplDouble) { return doubleCache.cache(((OWLLiteralImplDouble) literal).parseDouble(), literal); } if (literal instanceof OWLLiteralImplInteger) { return intCache.cache(((OWLLiteralImplInteger) literal).parseInteger(), literal); } if (datatype.isString()) { return stringCache.cache(literal.getLiteral(), literal); } return litCache.cache(literal); }