NIHVIVO-436 code for automatic prefixes to SPARQL construct added.
This commit is contained in:
parent
c2ceee460b
commit
cb8d4509d9
1 changed files with 26 additions and 0 deletions
|
@ -10,6 +10,7 @@ import java.io.OutputStream;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -70,6 +71,9 @@ import edu.cornell.mannlib.vitro.webapp.utils.jena.JenaIngestUtils;
|
||||||
import edu.cornell.mannlib.vitro.webapp.utils.jena.JenaIngestWorkflowProcessor;
|
import edu.cornell.mannlib.vitro.webapp.utils.jena.JenaIngestWorkflowProcessor;
|
||||||
import edu.cornell.mannlib.vitro.webapp.utils.jena.WorkflowOntology;
|
import edu.cornell.mannlib.vitro.webapp.utils.jena.WorkflowOntology;
|
||||||
|
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.beans.Ontology;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.dao.OntologyDao;
|
||||||
|
|
||||||
public class JenaIngestController extends BaseEditController {
|
public class JenaIngestController extends BaseEditController {
|
||||||
|
|
||||||
private static final Log log = LogFactory.getLog(JenaIngestController.class);
|
private static final Log log = LogFactory.getLog(JenaIngestController.class);
|
||||||
|
@ -324,6 +328,28 @@ public class JenaIngestController extends BaseEditController {
|
||||||
} finally {
|
} finally {
|
||||||
jenaOntModel.leaveCriticalSection();
|
jenaOntModel.leaveCriticalSection();
|
||||||
}
|
}
|
||||||
|
/*ass92*/
|
||||||
|
OntologyDao daoObj = getWebappDaoFactory().getOntologyDao();
|
||||||
|
List ontologiesObj = daoObj.getAllOntologies();
|
||||||
|
ArrayList prefixList = new ArrayList();
|
||||||
|
|
||||||
|
if(ontologiesObj !=null && ontologiesObj.size()>0){
|
||||||
|
|
||||||
|
Iterator ontItr = ontologiesObj.iterator();
|
||||||
|
while(ontItr.hasNext()){
|
||||||
|
Ontology ont = (Ontology) ontItr.next();
|
||||||
|
prefixList.add(ont.getPrefix() == null ? "(not yet specified)" : ont.getPrefix());
|
||||||
|
prefixList.add(ont.getURI() == null ? "" : ont.getURI());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
prefixList.add("<strong>" + "No Ontologies added" + "</strong>");
|
||||||
|
prefixList.add("<strong>" + "Load Ontologies" + "</strong>");
|
||||||
|
}
|
||||||
|
|
||||||
|
request.setAttribute("prefixList", prefixList);
|
||||||
|
/*complete*/
|
||||||
if (sparqlQueryStr != null) {
|
if (sparqlQueryStr != null) {
|
||||||
String validationMessage = "";
|
String validationMessage = "";
|
||||||
if (request.getParameterValues("sourceModelName") == null) {
|
if (request.getParameterValues("sourceModelName") == null) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue