Don't offer Pellet reasoning on ingest.

This commit is contained in:
Jim Blake 2014-12-21 09:12:23 -05:00
parent b6b8540546
commit 08efbe2735
2 changed files with 4 additions and 39 deletions

View file

@ -17,10 +17,8 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URI;
import java.net.URISyntaxException;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
@ -38,8 +36,7 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.mindswap.pellet.exceptions.InconsistentOntologyException;
import org.mindswap.pellet.jena.PelletReasonerFactory;
import org.semanticweb.owlapi.reasoner.InconsistentOntologyException;
import com.hp.hpl.jena.ontology.Individual;
import com.hp.hpl.jena.ontology.OntModel;
@ -837,12 +834,7 @@ public class JenaIngestController extends BaseEditController {
private long doExecuteSparql(VitroRequest vreq) {
OntModel jenaOntModel = ModelAccess.on(getServletContext()).getOntModel();
OntModel source = null;
if ("pellet".equals(vreq.getParameter("reasoning"))) {
source = ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC);
} else {
source = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
}
OntModel source = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
String[] sourceModel = vreq.getParameterValues("sourceModelName");
for (int i=0; i<sourceModel.length; i++) {
Model m = getModel(sourceModel[i],vreq);
@ -1184,21 +1176,6 @@ public class JenaIngestController extends BaseEditController {
vreq.getRequestDispatcher("/dumpRestore").forward(vreq, response);
}
private class CollationSort implements Comparator<String> {
Collator collator;
public CollationSort(VitroRequest vreq) {
this.collator = vreq.getCollator();
}
@Override
public int compare(String s1, String s2) {
return collator.compare(s1, s2);
}
}
public static Model getModel(String name, HttpServletRequest request) {
return getModelMaker(request).getModel(name);
}

View file

@ -174,17 +174,5 @@ PREFIX <%=prefixText%>: <<%=urlText%>><%}}%>
<%
}
%>
</select> <c:choose>
<c:when test="${paramValues['reasoning'] != null}">
<c:forEach var="paramValue" items="${paramValues['reasoning']}">
<c:if test="${paramValue eq 'pellet'}">
<p><input type="checkbox" name="reasoning" value="pellet"
checked="checked" /> include pellet reasoning</p>
</c:if>
</c:forEach>
</c:when>
<c:otherwise>
<p><input type="checkbox" name="reasoning" value="pellet" />
include Pellet OWL-DL reasoning</p>
</c:otherwise>
</c:choose> <input id="submit" type="submit" value="Execute CONSTRUCT" />
</select>
<input id="submit" type="submit" value="Execute CONSTRUCT" />