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; String entURI = null;
Resource cls = null; Resource cls = (ent.getVClassURI() != null)
OntModel tboxModel = getOntModelSelector().getTBoxModel(); ? ontModel.getResource(ent.getVClassURI())
tboxModel.enterCriticalSection(Lock.READ); : OWL.Thing; // This assumes we want OWL-DL compatibility.
try { // Individuals cannot be untyped.
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();
}
ontModel.enterCriticalSection(Lock.WRITE); ontModel.enterCriticalSection(Lock.WRITE);
try { try {