NIHVIVO-2907 fixed bug in Vitro-only class and property group creation

This commit is contained in:
brianjlowe 2011-07-14 19:27:56 +00:00
parent 63c4d2bbc8
commit 1f786920a0

View file

@ -217,19 +217,10 @@ public class IndividualDaoJena extends JenaBaseDao implements IndividualDao {
String entURI = null;
Resource cls = null;
OntModel tboxModel = getOntModelSelector().getTBoxModel();
tboxModel.enterCriticalSection(Lock.READ);
try {
try {
cls = tboxModel.getOntClass(ent.getVClassURI());
} catch (Exception e) {}
if (cls==null) {
cls = OWL.Thing; // This assumes we want OWL-DL compatibility. Individuals cannot be untyped.
}
} finally {
tboxModel.leaveCriticalSection();
}
Resource cls = (ent.getVClassURI() != null)
? ontModel.getResource(ent.getVClassURI())
: OWL.Thing; // This assumes we want OWL-DL compatibility.
// Individuals cannot be untyped.
ontModel.enterCriticalSection(Lock.WRITE);
try {