NIHVIVO-143 Front end deletion of moniker through the "delete" link: fixed more bugs, so it finally works.
This commit is contained in:
parent
ea25ff4ffb
commit
6038b68c4a
3 changed files with 8 additions and 8 deletions
|
@ -85,6 +85,7 @@
|
|||
DataProperty dataproperty = wdf.getDataPropertyDao().getDataPropertyByURI( predicateUri );
|
||||
if( dataproperty == null) {
|
||||
// No dataproperty will be returned for a vitro ns prop, but we shouldn't throw an error.
|
||||
// RY This is not necessarily true...
|
||||
if (!isVitroNsProp) {
|
||||
log.error("Could not find data property '"+predicateUri+"' in model");
|
||||
throw new Error("editDatapropStmtRequest.jsp: Could not find DataProperty in model: " + predicateUri);
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
||||
|
||||
<%@ page import="com.hp.hpl.jena.rdf.model.Model" %>
|
||||
<%@ page import="com.hp.hpl.jena.rdf.model.Resource" %>
|
||||
<%@ page import="com.hp.hpl.jena.rdf.model.Literal" %>
|
||||
<%@ page import="com.hp.hpl.jena.rdf.model.Property" %>
|
||||
|
||||
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginFormBean" %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.beans.DataProperty" %>
|
||||
|
@ -93,7 +96,7 @@
|
|||
writeModel.remove(
|
||||
writeModel.getResource(subjectUri),
|
||||
writeModel.getProperty(predicateUri),
|
||||
writeModel.createLiteral(dps.getData()));
|
||||
writeModel.createTypedLiteral(dps.getData(), dps.getDatatypeURI()));
|
||||
}finally{
|
||||
writeModel.leaveCriticalSection();
|
||||
}
|
||||
|
|
|
@ -37,12 +37,12 @@
|
|||
|
||||
Individual subject = (Individual)vreq.getAttribute("subject");
|
||||
if( subject == null ) {
|
||||
throw new Error("In vitroNsEditLabelForm.jsp, could not find subject " + subjectUri);
|
||||
throw new Error("In defaultVitroNsPropForm.jsp, could not find subject " + subjectUri);
|
||||
}
|
||||
|
||||
Model model = (Model)application.getAttribute("jenaOntModel");
|
||||
|
||||
// RY ***** Get the rangeDatatypeUri - need to get it from the
|
||||
// RY ***** Get the rangeDatatypeUri - need to get the existing value datatype. Or just hardcode?
|
||||
//String rangeDatatypeUri = vreq.getWebappDaoFactory().getDataPropertyDao().getRequiredDatatypeURI(subject, prop);
|
||||
//String rangeDatatypeUri = prop.getRangeDatatypeURI();
|
||||
String rangeDatatypeUri = "http://www.w3.org/2001/XMLSchema#string";
|
||||
|
@ -57,11 +57,8 @@
|
|||
if (!rangeDatatypeUriJson.isEmpty()) {
|
||||
validatorList.add("datatype:" + rangeDatatypeUriJson);
|
||||
}
|
||||
String validators = StringUtils.quotedList(validatorList, ",");
|
||||
System.out.println("VALIDATORS: " + validators);
|
||||
vreq.setAttribute("validators", StringUtils.quotedList(validatorList, ","));
|
||||
|
||||
|
||||
%>
|
||||
|
||||
<c:set var="predicate" value="<%=predicateUri%>" />
|
||||
|
@ -132,7 +129,6 @@
|
|||
|
||||
|
||||
<%
|
||||
System.out.println(request.getAttribute("editjson"));
|
||||
if( log.isDebugEnabled()) log.debug(request.getAttribute("editjson"));
|
||||
|
||||
EditConfiguration editConfig = EditConfiguration.getConfigFromSession(session,request);
|
||||
|
|
Loading…
Add table
Reference in a new issue