NIHVIVO-1451 mechanism to toggle between VitroJenaModelMaker and VitroSDBModelMaker
This commit is contained in:
parent
c67ed3921c
commit
297805e5bc
1 changed files with 47 additions and 15 deletions
|
@ -5,35 +5,66 @@
|
|||
<%@ page import="java.net.URLEncoder" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
function init(){
|
||||
var infoLine = document.information.info.value;
|
||||
if(infoLine == "RDB models"){
|
||||
document.rdbform.submit.disabled="true";
|
||||
}
|
||||
else{
|
||||
document.sdbform.submit.disabled="true";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<%
|
||||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
|
||||
<p><a href="ingest">Ingest Home</a></p>
|
||||
|
||||
<h2>Available Jena Models</h2>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form name="sdbform" action="ingest" method="get">
|
||||
<input type="hidden" name="action" value="sdbModels"/>
|
||||
<input type="submit" name="submit" value="SDB Models"/>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form name="rdbform" action="ingest" method="get">
|
||||
<input type="hidden" name="action" value="listModels"/>
|
||||
<input type="submit" name="submit" value="RDB Models"/>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<form action="ingest" method="get">
|
||||
<input type="hidden" name="action" value="createModel"/>
|
||||
<input type="hidden" name="modelType" value="${modelType}"/>
|
||||
<input type="submit" name="submit" value="Create Model"/>
|
||||
</form>
|
||||
|
||||
<form name="information">
|
||||
<input type="hidden" name="info" value="${infoLine}"/>
|
||||
</form>
|
||||
|
||||
Currently showing <font color="red">${infoLine}</font>
|
||||
<ul>
|
||||
|
||||
<%
|
||||
for (Iterator it = maker.listModels(); it.hasNext(); ) {
|
||||
String modelName = (String) it.next();
|
||||
%> <li style="padding-bottom:2em;padding-top:2em;"> <%=modelName%>
|
||||
%> <li style="padding-bottom:2em;padding-top:2em;"> <%=modelName%>
|
||||
<table style="margin-left:2em;"><tr>
|
||||
<td>
|
||||
<form action="ingest" method="get">
|
||||
<input type="hidden" name="action" value="loadRDFData"/>
|
||||
<input type="hidden" name="modelName" value="<%=modelName%>"/>
|
||||
<input type="hidden" name="modelType" value="${modelType}"/>
|
||||
<input type="submit" name="submit" value="load RDF data"/>
|
||||
</form>
|
||||
</td>
|
||||
|
@ -48,6 +79,7 @@
|
|||
<form action="ingest" method="post">
|
||||
<input type="hidden" name="action" value="clearModel"/>
|
||||
<input type="hidden" name="modelName" value="<%=modelName%>"/>
|
||||
<input type="hidden" name="modelType" value="${modelType}"/>
|
||||
<input type="submit" name="submit" value="clear statements"/>
|
||||
</form>
|
||||
</td>
|
||||
|
@ -55,21 +87,17 @@
|
|||
<form action="ingest" method="post">
|
||||
<input type="hidden" name="action" value="removeModel"/>
|
||||
<input type="hidden" name="modelName" value="<%=modelName%>"/>
|
||||
<input type="hidden" name="modelType" value="${modelType}"/>
|
||||
<input type="submit" name="submit" value="remove"/>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form action="ingest" method="post">
|
||||
<input type="hidden" name="action" value="setWriteLayer"/>
|
||||
<input type="hidden" name="modelName" value="<%=modelName%>"/>
|
||||
<input type="submit" name="submit" value="set as current write layer"/>
|
||||
</form>
|
||||
<td>
|
||||
<form action="ingest" method="post">
|
||||
<input type="hidden" name="action" value="attachModel"/>
|
||||
<input type="hidden" name="modelName" value="<%=modelName%>"/>
|
||||
<input type="hidden" name="modelType" value="${modelType}"/>
|
||||
<input type="submit" name="submit" value="attach to webapp"/>
|
||||
</form>
|
||||
</td>
|
||||
|
@ -77,14 +105,16 @@
|
|||
<form action="ingest" method="post">
|
||||
<input type="hidden" name="action" value="detachModel"/>
|
||||
<input type="hidden" name="modelName" value="<%=modelName%>"/>
|
||||
<input type="hidden" name="modelType" value="${modelType}"/>
|
||||
<input type="submit" name="submit" value="detach from webapp"/>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form action="ingest" method="get"><input type="hidden"
|
||||
name="action" value="permanentURI" /> <input type="hidden"
|
||||
name="modelName" value="<%=modelName%>" /> <input type="submit"
|
||||
name="submit" value="generate permanent URIs" /></form>
|
||||
<form action="ingest" method="get">
|
||||
<input type="hidden" name="action" value="permanentURI" />
|
||||
<input type="hidden" name="modelName" value="<%=modelName%>" />
|
||||
<input type="hidden" name="modelType" value="${modelType}"/>
|
||||
<input type="submit" name="submit" value="generate permanent URIs" /></form>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
@ -93,3 +123,5 @@
|
|||
}
|
||||
%>
|
||||
</ul>
|
||||
|
||||
<BODY onLoad="init()"></BODY>
|
||||
|
|
Loading…
Add table
Reference in a new issue