NIHVIVO-2426b and NIHVIVO-2771 knowledge base migration work
This commit is contained in:
parent
c31e82f382
commit
2cadb8be71
2 changed files with 21 additions and 11 deletions
|
@ -24,7 +24,6 @@ import com.hp.hpl.jena.shared.Lock;
|
|||
import com.hp.hpl.jena.vocabulary.OWL;
|
||||
import com.hp.hpl.jena.vocabulary.RDF;
|
||||
|
||||
import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary;
|
||||
import edu.cornell.mannlib.vitro.webapp.ontology.update.AtomicOntologyChange.AtomicChangeType;
|
||||
|
||||
/**
|
||||
|
@ -425,14 +424,18 @@ public class ABoxUpdater {
|
|||
while(propItr.hasNext()){
|
||||
AtomicOntologyChange propChangeObj = propItr.next();
|
||||
switch (propChangeObj.getAtomicChangeType()){
|
||||
case ADD: addProperty(propChangeObj);
|
||||
break;
|
||||
case DELETE: deleteProperty(propChangeObj);
|
||||
break;
|
||||
case RENAME: renameProperty(propChangeObj);
|
||||
break;
|
||||
default: logger.logError("unexpected change type indicator: " + propChangeObj.getAtomicChangeType());
|
||||
break;
|
||||
case ADD:
|
||||
addProperty(propChangeObj);
|
||||
break;
|
||||
case DELETE:
|
||||
deleteProperty(propChangeObj);
|
||||
break;
|
||||
case RENAME:
|
||||
renameProperty(propChangeObj);
|
||||
break;
|
||||
default:
|
||||
logger.logError("unexpected change type indicator: " + propChangeObj.getAtomicChangeType());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -419,8 +419,10 @@ public class SimpleReasoner extends StatementListener {
|
|||
|
||||
if (cls != null) {
|
||||
|
||||
List<OntClass> parents = (cls.listSuperClasses(false)).toList();
|
||||
List<OntClass> parents = null;
|
||||
parents = (cls.listSuperClasses(false)).toList();
|
||||
parents.addAll((cls.listEquivalentClasses()).toList());
|
||||
|
||||
Iterator<OntClass> parentIt = parents.iterator();
|
||||
|
||||
while (parentIt.hasNext()) {
|
||||
|
@ -453,7 +455,9 @@ public class SimpleReasoner extends StatementListener {
|
|||
}
|
||||
} else {
|
||||
log.warn("The object of this rdf:type assertion has a null URI: " + stmtString(stmt));
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("exception while removing abox type assertions: " + e.getMessage());
|
||||
} finally {
|
||||
tboxModel.leaveCriticalSection();
|
||||
}
|
||||
|
@ -530,6 +534,9 @@ public class SimpleReasoner extends StatementListener {
|
|||
if (aboxModel.contains(stmt)) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
} catch (Exception e) {
|
||||
log.debug("exception in method entailedType: " + e.getMessage());
|
||||
return false;
|
||||
} finally {
|
||||
aboxModel.leaveCriticalSection();
|
||||
|
|
Loading…
Add table
Reference in a new issue