parser.setDefaultOntology(oldOntology);
ShortFormProvider shortFormProvider = new SimpleShortFormProvider();
Set<OWLOntology> importsClosure = oldOntology.getImportsClosure();
BidirectionalShortFormProvider bidiShortFormProvider = new BidirectionalShortFormProviderAdapter(manager, importsClosure, shortFormProvider);
// Specify an entity checker that wil be used to check a class expression contains the correct names.
OWLEntityChecker entityChecker = new ShortFormEntityChecker(bidiShortFormProvider);
parser.setOWLEntityChecker(entityChecker);
OWLClassExpression classExp=null;
try {
classExp = parser.parseClassExpression();