2010-01-29 22:13:57 +00:00
|
|
|
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
|
|
|
|
|
|
|
<%@ 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" %>
|
|
|
|
<%@ page import="com.hp.hpl.jena.shared.Lock" %>
|
|
|
|
<%@ page import="java.util.Iterator" %>
|
|
|
|
<%@ page import="java.util.List" %>
|
|
|
|
<%@ page import="java.net.URLEncoder" %>
|
2011-04-27 20:20:25 +00:00
|
|
|
|
|
|
|
<%@taglib prefix="vitro" uri="/WEB-INF/tlds/VitroUtils.tld" %>
|
2011-12-05 20:13:37 +00:00
|
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
|
|
|
|
2011-12-21 23:02:31 +00:00
|
|
|
<%@page import="edu.cornell.mannlib.vitro.webapp.auth.permissions.SimplePermission" %>
|
|
|
|
<% request.setAttribute("requestedActions", SimplePermission.USE_ADVANCED_DATA_TOOLS_PAGES.ACTION); %>
|
2011-04-27 20:20:25 +00:00
|
|
|
<vitro:confirmAuthorization />
|
2010-01-29 22:13:57 +00:00
|
|
|
|
2010-12-22 17:33:20 +00:00
|
|
|
<h2><a class="ingestMenu" href="ingest">Ingest Menu</a> > Convert CSV to RDF</h2>
|
2010-01-29 22:13:57 +00:00
|
|
|
|
2010-11-12 18:02:18 +00:00
|
|
|
<form action="csv2rdf" method="post" enctype="multipart/form-data">
|
2010-01-29 22:13:57 +00:00
|
|
|
<input type="hidden" name="action" value="csv2rdf"/>
|
|
|
|
|
|
|
|
<p><input type="radio" name="separatorChar" value="comma" checked="checked"/> comma separated
|
|
|
|
<input type="radio" name="separatorChar" value="tab"/> tab separated </p>
|
|
|
|
|
|
|
|
<input type="text" style="width:80%;" name="csvUrl"/>
|
|
|
|
<p>CSV file URL (e.g. "file:///")</p>
|
2010-11-12 18:02:18 +00:00
|
|
|
|
|
|
|
<p>Or upload a file from your computer:</p>
|
|
|
|
<p><input type="file" name="filePath" /></p>
|
2010-01-29 22:13:57 +00:00
|
|
|
|
2011-11-04 21:01:34 +00:00
|
|
|
<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>
|
2010-01-29 22:13:57 +00:00
|
|
|
<input type="text" name="tboxNamespace"/>
|
2011-11-04 21:01:34 +00:00
|
|
|
<p>Namespace in which to generate properties</p>
|
2010-01-29 22:13:57 +00:00
|
|
|
|
|
|
|
<!--
|
|
|
|
<input type="checkbox" name="discardTbox"/> do not add TBox or RBox to result model
|
|
|
|
-->
|
|
|
|
|
2011-11-04 21:01:34 +00:00
|
|
|
<p>
|
2011-12-05 20:13:37 +00:00
|
|
|
<p>Each row in the spreadsheet will produce a resource. Each of these
|
2011-11-04 21:01:34 +00:00
|
|
|
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>
|
2010-01-29 22:13:57 +00:00
|
|
|
<input type="text" name="typeName"/>
|
2011-11-04 21:01:34 +00:00
|
|
|
<p>Class Local Name for Resources</p>
|
2010-01-29 22:13:57 +00:00
|
|
|
|
|
|
|
<select name="destinationModelName">
|
2010-04-05 17:01:03 +00:00
|
|
|
<option value="vitro:baseOntModel">webapp assertions</option>
|
2011-12-05 20:13:37 +00:00
|
|
|
<c:forEach var="modelName" items="${modelNames}">
|
|
|
|
<option value="${modelName}">${modelName}</option>
|
|
|
|
</c:forEach>
|
|
|
|
<option value="">(none)</option>
|
2010-01-29 22:13:57 +00:00
|
|
|
</select>
|
2011-11-04 21:01:34 +00:00
|
|
|
<p>Model in which to save the converted spreadsheet data</p>
|
2010-01-29 22:13:57 +00:00
|
|
|
|
|
|
|
<select name="tboxDestinationModelName">
|
2010-04-05 17:01:03 +00:00
|
|
|
<option value="vitro:baseOntModel">webapp assertions</option>
|
2011-12-05 20:13:37 +00:00
|
|
|
<c:forEach var="modelName" items="${modelNames}">
|
|
|
|
<option value="${modelName}">${modelName}</option>
|
|
|
|
</c:forEach>
|
|
|
|
<option value="">(none)</option>
|
2010-01-29 22:13:57 +00:00
|
|
|
</select>
|
2011-11-04 21:01:34 +00:00
|
|
|
<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>
|
2010-01-29 22:13:57 +00:00
|
|
|
|
2011-02-02 17:15:05 +00:00
|
|
|
<input class="submit" type="submit" value="Next Step"/>
|