NIHVIVO-3130 NIHVIVO-3089 ingest tools fixes and improvements
This commit is contained in:
parent
4d8206b018
commit
f5e1661f9a
22 changed files with 331 additions and 309 deletions
|
@ -17,7 +17,7 @@
|
|||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaSDBModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
|
@ -36,15 +36,27 @@
|
|||
<p>Or upload a file from your computer:</p>
|
||||
<p><input type="file" name="filePath" /></p>
|
||||
|
||||
<p/>
|
||||
<p>This tool will automatically generate a mini ontology to represent the
|
||||
data in the CSV file. A property will be produced for each column in the
|
||||
spreadsheet, based on the text in the header for that column.</p><p>In what
|
||||
namespace should these properties be created?</p>
|
||||
<input type="text" name="tboxNamespace"/>
|
||||
<p>Namespace in which to generate class and properties</p>
|
||||
<p>Namespace in which to generate properties</p>
|
||||
|
||||
<!--
|
||||
<input type="checkbox" name="discardTbox"/> do not add TBox or RBox to result model
|
||||
-->
|
||||
|
||||
<p>
|
||||
<p>Each row in the spreadsheet will produce an resource. Each of these
|
||||
resources will be a member of a class in the namespace selected above.</p>
|
||||
<p>What should the local name of this class be? This is normally a word or two
|
||||
in "camel case" starting with an uppercase letter. (For example, if the
|
||||
spreadsheet represents a list of faculty members, you might enter
|
||||
"FacultyMember" on the next line.)</p>
|
||||
<input type="text" name="typeName"/>
|
||||
<p>Class Name for Resources</p>
|
||||
<p>Class Local Name for Resources</p>
|
||||
|
||||
<select name="destinationModelName">
|
||||
<option value="vitro:baseOntModel">webapp assertions</option>
|
||||
|
@ -56,7 +68,7 @@
|
|||
}
|
||||
%> <option value="">(none)</option>
|
||||
</select>
|
||||
<p>Destination Model</p>
|
||||
<p>Model in which to save the converted spreadsheet data</p>
|
||||
|
||||
<select name="tboxDestinationModelName">
|
||||
<option value="vitro:baseOntModel">webapp assertions</option>
|
||||
|
@ -68,6 +80,11 @@
|
|||
}
|
||||
%> <option value="">(none)</option>
|
||||
</select>
|
||||
<p>Destination Model for TBox</p>
|
||||
<p>Model in which to save the automatically-generated ontology</p>
|
||||
|
||||
<p/>
|
||||
<p>The data in the CSV file will initially be represented using blank
|
||||
nodes (RDF resources without URIs). You will choose how to assign
|
||||
URIs to these resources in the next step.</p>
|
||||
|
||||
<input class="submit" type="submit" value="Next Step"/>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
||||
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
|
||||
<%@ taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
|
||||
|
||||
<%@ page import="com.hp.hpl.jena.ontology.Individual" %>
|
||||
<%@ page import="com.hp.hpl.jena.ontology.OntModel" %>
|
||||
<%@ page import="com.hp.hpl.jena.rdf.model.ModelMaker" %>
|
||||
|
@ -13,8 +16,7 @@
|
|||
<%@ page import="java.util.Set" %>
|
||||
<%@ page import="java.util.Map.Entry" %>
|
||||
|
||||
<%@taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
|
||||
<%@page import="edu.cornell.mannlib.vitro.webapp.auth.requestedAction.usepages.UseAdvancedDataToolsPages" %>
|
||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.auth.requestedAction.usepages.UseAdvancedDataToolsPages" %>
|
||||
<% request.setAttribute("requestedActions", new UseAdvancedDataToolsPages()); %>
|
||||
<vitro:confirmAuthorization />
|
||||
|
||||
|
@ -22,7 +24,7 @@
|
|||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaSDBModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
|
@ -46,16 +48,18 @@ function disableProperties(){
|
|||
|
||||
<h3>Select URI prefix</h3>
|
||||
|
||||
<p>URIs will be constructed from the following string:</p>
|
||||
<p>URIs will be constructed using the following base string:</p>
|
||||
<input id="namespace" type="text" style="width:65%;" name="namespaceEtcStr"/>
|
||||
|
||||
<p/>
|
||||
|
||||
<p>You can concatenate above string with random integer OR your own pattern based on <b>values</b> of one of the properties (Properties will be enabled in the dropdown) </p>
|
||||
<p>Each resource will be assigned a URI by taking the above string and
|
||||
adding either a random integer, or a string based on the value of one of the
|
||||
the properties of the resource</p>
|
||||
|
||||
<input type="radio" value="integer" name="concatenate" checked="checked" onclick="disableProperties()"><b>No</b>, concatenate with random integer</input>
|
||||
<input type="radio" value="integer" name="concatenate" checked="checked" onclick="disableProperties()">Use random integer</input>
|
||||
<br></br>
|
||||
<input type="radio" value="pattern" name="concatenate" onclick="selectProperties()"><b>Yes</b>, concatenate with my pattern</input>
|
||||
<input type="radio" value="pattern" name="concatenate" onclick="selectProperties()">Use pattern based on values of </input>
|
||||
|
||||
|
||||
<% Map<String,LinkedList<String>> propertyMap = (Map) request.getAttribute("propertyMap");
|
||||
|
@ -75,12 +79,16 @@ function disableProperties(){
|
|||
%>
|
||||
</select>
|
||||
<br></br>
|
||||
<p>Enter your pattern that will prefix property value with an underscore eg. depID_$$$ where depID is your pattern and $$$ is the property value.</p>
|
||||
<p>Enter a pattern using $$$ as the placeholder for the value of the property selected above.</p>
|
||||
<p>For example, entering dept_$$$ might generate URIs with endings such as dept_Art or dept_Classics.</p>
|
||||
<input id="pattern" disabled="disabled" type="text" style="width:35%;" name="pattern"/>
|
||||
|
||||
<%String modelName = (String) request.getAttribute("destinationModelName"); %>
|
||||
<input type="hidden" name="destinationModelName" value="${destinationModelName}"/>
|
||||
<input type="hidden" name="csv2rdf" value="${csv2rdf}"/>
|
||||
|
||||
<input type="hidden" name="destinationModelName" value="<%=modelName%>"/>
|
||||
<c:forEach var="sourceModelValue" items="${sourceModel}">
|
||||
<input type="hidden" name="sourceModelName" value="${sourceModelValue}"/>
|
||||
</c:forEach>
|
||||
|
||||
<input class="submit" type="submit" value="Convert CSV"/>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaSDBModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaSDBModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaSDBModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
|
@ -46,4 +46,4 @@
|
|||
<input type="checkbox" name="usePrimaryLabelOnly" value="Use Primary Label Only">Retain rdfs:labels only from Primary Resource</input>
|
||||
|
||||
<p><input class="submit"type="submit" name="submit" value="Merge resources" /></p>
|
||||
</form>
|
||||
</form>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaSDBModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
|
@ -63,4 +63,4 @@ Or <%String defaultNamespace = (String)request.getAttribute("defaultNamespace");
|
|||
</p>
|
||||
|
||||
<p><input class="submit" type="submit" name="submit" value="Generate URIs" /></p>
|
||||
</form>
|
||||
</form>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaSDBModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaSDBModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<%@ page import="java.util.HashMap" %>
|
||||
<%@ page import="java.util.Set" %>
|
||||
<%@ page import="java.util.Map.Entry" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
|
||||
|
||||
<%@taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
|
||||
<%@page import="edu.cornell.mannlib.vitro.webapp.auth.requestedAction.usepages.UseAdvancedDataToolsPages" %>
|
||||
|
@ -22,12 +23,11 @@
|
|||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaSDBModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script type="text/javascript" src="js/jenaIngest/renameNode.js"></script>
|
||||
<script type="text/javascript">
|
||||
function selectProperties(){
|
||||
document.getElementById("properties").disabled = false;
|
||||
|
@ -46,16 +46,24 @@ function disableProperties(){
|
|||
|
||||
<h3>Select URI prefix</h3>
|
||||
|
||||
<p>URIs will be constructed from the following string:</p>
|
||||
<c:if test="${!empty errorMsg}">
|
||||
<p class="notice">${errorMsg}</p>
|
||||
</c:if>
|
||||
|
||||
<p>URIs will be constructed using the following base string:</p>
|
||||
<input id="namespace" type="text" style="width:65%;" name="namespaceEtcStr"/>
|
||||
|
||||
<p/>
|
||||
<p/>
|
||||
|
||||
<c:choose>
|
||||
<c:when test="${enablePropertyPatternURIs}">
|
||||
<p>Each resource will be assigned a URI by taking the above string and
|
||||
adding either a random integer, or a string based on the value of one of the
|
||||
the properties of the resource</p>
|
||||
|
||||
<p>You can concatenate above string with random integer OR your own pattern based on <b>values</b> of one of the properties (Properties will be enabled in the dropdown) </p>
|
||||
|
||||
<input type="radio" value="integer" name="concatenate" checked="checked" onclick="disableProperties()"><b>No</b>, concatenate with random integer</input>
|
||||
<input type="radio" value="integer" name="concatenate" checked="checked" onclick="disableProperties()">Use random integer</input>
|
||||
<br></br>
|
||||
<input type="radio" value="pattern" name="concatenate" onclick="selectProperties()"><b>Yes</b>, concatenate with my pattern</input>
|
||||
<input type="radio" value="pattern" name="concatenate" onclick="selectProperties()">Use pattern based on values of </input>
|
||||
|
||||
|
||||
<% Map<String,LinkedList<String>> propertyMap = (Map) request.getAttribute("propertyMap");
|
||||
|
@ -75,9 +83,21 @@ function disableProperties(){
|
|||
%>
|
||||
</select>
|
||||
<br></br>
|
||||
<p>Enter your pattern that will prefix property value with an underscore eg. depID_$$$ where depID is your pattern and $$$ is the property value.</p>
|
||||
<p>Enter a pattern using $$$ as the placeholder for the value of the property selected above.</p>
|
||||
<p>For example, entering dept_$$$ might generate URIs with endings such as dept_Art or dept_Classics.</p>
|
||||
<input id="pattern" disabled="disabled" type="text" style="width:35%;" name="pattern"/>
|
||||
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<p>Each resource will be assigned a URI by taking the above string and
|
||||
adding a random integer.</p>
|
||||
<input type="hidden" value="integer" name="concatenate"/>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
<c:forEach var="sourceModelValue" items="${sourceModel}">
|
||||
<input type="hidden" name="sourceModelName" value="${sourceModelValue}"/>
|
||||
</c:forEach>
|
||||
|
||||
|
||||
<h3>Select Destination Model</h3>
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
<vitro:confirmAuthorization />
|
||||
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script type="text/javascript" src="js/jenaIngest/ingestUtils.js"></script>
|
||||
|
||||
<h2><a class="ingestMenu" href="ingest">Ingest Menu</a> > Change Namespace of Resources</h2>
|
||||
|
||||
|
@ -25,9 +24,13 @@ they will be updated to this format.</p>
|
|||
<p>This tool operates on the main web application model only, not on any
|
||||
of the additional Jena models.</p>
|
||||
|
||||
<c:if test="${!empty errorMsg}">
|
||||
<p class="notice">${errorMsg}</p>
|
||||
</c:if>
|
||||
|
||||
<form id="takeuri" action="ingest" method="get">
|
||||
<input type="hidden" name="action" value="renameResource"/>
|
||||
<p>Old namespace: <input id="uri1" type="text" size="52" name="uri1"/></p>
|
||||
<p>New namespace: <input id="uri2" type="text" size="52" name="uri2"/></p>
|
||||
<p>Old namespace: <input id="uri1" type="text" size="52" name="oldNamespace" value="${oldNamespace}" /></p>
|
||||
<p>New namespace: <input id="uri2" type="text" size="52" name="newNamespace" value="${newNamespace}" /></p>
|
||||
<p><input id="submit" type="submit" name="submit" value="Change namespace" /></p>
|
||||
</form>
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaSDBModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaSDBModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
|
@ -188,4 +188,4 @@ PREFIX <%=prefixText%>: <<%=urlText%>><%}}%>
|
|||
<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" />
|
||||
</c:choose> <input id="submit" type="submit" value="Execute CONSTRUCT" />
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaSDBModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaSDBModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
ModelMaker maker = (ModelMaker) request.getSession().getAttribute("vitroJenaModelMaker");
|
||||
if (maker == null) {
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaModelMaker");
|
||||
maker = (ModelMaker) getServletContext().getAttribute("vitroJenaSDBModelMaker");
|
||||
}
|
||||
|
||||
%>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue