NIHVIVO-3507 fix to prevent ConversionExceptions when attempting to retrieve equivalent classes for classes not typed as owl:Class
This commit is contained in:
parent
951dfe9d2c
commit
7e6ea50d63
1 changed files with 8 additions and 0 deletions
|
@ -286,6 +286,14 @@ public class VClassDaoJena extends JenaBaseDao implements VClassDao {
|
|||
} catch (ProfileException pe) {
|
||||
// Current language profile does not support equivalent classes.
|
||||
// We'd prefer to return an empty list instead of throwing an exception
|
||||
} catch (Exception e) {
|
||||
// we'll try this again using a different method that
|
||||
// doesn't try to convert to OntClass
|
||||
List<Resource> supList = this.listDirectObjectPropertyValues(
|
||||
getOntModel().getResource(classURI), OWL.equivalentClass);
|
||||
for (Resource res : supList) {
|
||||
equivalentClassURIs.add(getClassURIStr(res));
|
||||
}
|
||||
} finally {
|
||||
getOntModel().leaveCriticalSection();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue