Source:
protected Map<String, Object> getOntologyEditorData(VitroRequest vreq) { Map<String, Object> map = new HashMap<String, Object>(); if (PolicyHelper.isAuthorizedForActions(vreq, SimplePermission.EDIT_ONTOLOGY.ACTION)) { String error = null; String explanation = null; try { TBoxReasonerStatus status = ApplicationUtils.instance().getTBoxReasonerModule().getStatus(); if (!status.isConsistent()) { error = "INCONSISTENT ONTOLOGY: reasoning halted."; explanation = status.getExplanation(); } else if ( status.isInErrorState() ) { error = "An error occurred during reasoning. Reasoning has been halted. See error log for details."; } } catch (IllegalStateException e) { error = "The inferencing engine is disabled."; log.debug("Status of reasoner could not be determined.", e); } if (error != null) { Map<String, String> tboxReasonerStatus = new HashMap<String, String>(); tboxReasonerStatus.put("error", error); if (explanation != null) { tboxReasonerStatus.put("explanation", explanation); } map.put("tboxReasonerStatus", tboxReasonerStatus); } Map<String, String> urls = new HashMap<String, String>(); urls.put("ontologies", UrlBuilder.getUrl("/listOntologies")); urls.put("classHierarchy", UrlBuilder.getUrl("/showClassHierarchy")); urls.put("classGroups", UrlBuilder.getUrl("/listGroups")); urls.put("dataPropertyHierarchy", UrlBuilder.getUrl("/showDataPropertyHierarchy")); urls.put("fauxPropertyList", UrlBuilder.getUrl("/listFauxProperties")); urls.put("propertyGroups", UrlBuilder.getUrl("/listPropertyGroups")); urls.put("objectPropertyHierarchy", UrlBuilder.getUrl("/showObjectPropertyHierarchy", new ParamMap("iffRoot", "true"))); map.put("urls", urls); } return map; }

Target:
protected Map<String, Object> getOntologyEditorData(VitroRequest vreq) { Map<String, Object> map = new HashMap<String, Object>(); if (PolicyHelper.isAuthorizedForActions(vreq, SimplePermission.EDIT_ONTOLOGY.ACTION)) { String error = null; String explanation = null; try { TBoxReasonerStatus status = ApplicationUtils.instance().getTBoxReasonerModule().getStatus(); if (!status.isConsistent()) { error = "INCONSISTENT ONTOLOGY: reasoning halted."; explanation = status.getExplanation(); } else if ( status.isInErrorState() ) { error = "An error occurred during reasoning. Reasoning has been halted. See error log for details."; } } catch (IllegalStateException e) { error = "The inferencing engine is disabled. Data entered manually may exhibit unexpected behavior prior to inferencing."; log.debug("Status of reasoner could not be determined. It is likely disabled.", e); } if (error != null) { Map<String, String> tboxReasonerStatus = new HashMap<String, String>(); tboxReasonerStatus.put("error", error); if (explanation != null) { tboxReasonerStatus.put("explanation", explanation); } map.put("tboxReasonerStatus", tboxReasonerStatus); } Map<String, String> urls = new HashMap<String, String>(); urls.put("ontologies", UrlBuilder.getUrl("/listOntologies")); urls.put("classHierarchy", UrlBuilder.getUrl("/showClassHierarchy")); urls.put("classGroups", UrlBuilder.getUrl("/listGroups")); urls.put("dataPropertyHierarchy", UrlBuilder.getUrl("/showDataPropertyHierarchy")); urls.put("fauxPropertyList", UrlBuilder.getUrl("/listFauxProperties")); urls.put("propertyGroups", UrlBuilder.getUrl("/listPropertyGroups")); urls.put("objectPropertyHierarchy", UrlBuilder.getUrl("/showObjectPropertyHierarchy", new ParamMap("iffRoot", "true"))); map.put("urls", urls); } return map; }