adding some explanatory text to new ingest tools
This commit is contained in:
parent
5d87f1b995
commit
7d41fde0b3
6 changed files with 48 additions and 14 deletions
|
@ -1003,12 +1003,12 @@ public class JenaIngestController extends BaseEditController {
|
||||||
}
|
}
|
||||||
private String getUnusedURI(String newNamespace){
|
private String getUnusedURI(String newNamespace){
|
||||||
String uri = null;
|
String uri = null;
|
||||||
Random random = new Random();
|
Random random = new Random(Integer.MAX_VALUE);
|
||||||
boolean resourcePresent=true;
|
boolean resourcePresent=true;
|
||||||
OntModel vitroJenaModel = (OntModel) getServletContext().getAttribute("baseOntModel");
|
OntModel vitroJenaModel = (OntModel) getServletContext().getAttribute("baseOntModel");
|
||||||
Resource res = null;
|
Resource res = null;
|
||||||
do{
|
do{
|
||||||
uri = newNamespace + "individual" + random.nextInt();
|
uri = newNamespace + "n" + random.nextInt();
|
||||||
res = vitroJenaModel.getResource(uri);
|
res = vitroJenaModel.getResource(uri);
|
||||||
StmtIterator stmtItr1 = vitroJenaModel.listStatements(res,(Property)null,(RDFNode)null);
|
StmtIterator stmtItr1 = vitroJenaModel.listStatements(res,(Property)null,(RDFNode)null);
|
||||||
if(!stmtItr1.hasNext()){
|
if(!stmtItr1.hasNext()){
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<li><a href="ingest?action=splitPropertyValues">Split Property Value Strings into Multiple Property Values</a></li>
|
<li><a href="ingest?action=splitPropertyValues">Split Property Value Strings into Multiple Property Values</a></li>
|
||||||
<li><a href="ingest?action=executeWorkflow">Execute Workflow</a></li>
|
<li><a href="ingest?action=executeWorkflow">Execute Workflow</a></li>
|
||||||
<li><a href="ingest?action=mergeIndividuals">Merge Individuals</a></li>
|
<li><a href="ingest?action=mergeIndividuals">Merge Individuals</a></li>
|
||||||
<li><a href="ingest?action=renameResource">Rename Resource</a></li>
|
<li><a href="ingest?action=renameResource">Change Namespace of Resources</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
<form action="ingest" method="get"><input type="hidden"
|
<form action="ingest" method="get"><input type="hidden"
|
||||||
name="action" value="permanentURI" /> <input type="hidden"
|
name="action" value="permanentURI" /> <input type="hidden"
|
||||||
name="modelName" value="<%=modelName%>" /> <input type="submit"
|
name="modelName" value="<%=modelName%>" /> <input type="submit"
|
||||||
name="submit" value="Permanent URI" /></form>
|
name="submit" value="generate permanent URIs" /></form>
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -20,10 +20,25 @@
|
||||||
<p><a href="ingest">Ingest Home</a></p>
|
<p><a href="ingest">Ingest Home</a></p>
|
||||||
|
|
||||||
<h2>Merge Individuals</h2>
|
<h2>Merge Individuals</h2>
|
||||||
|
|
||||||
|
<p>This tool allows two individuals with different URIs to be collapsed into a
|
||||||
|
single URI. Any statements using the "duplicate individual URI" will be
|
||||||
|
rewritten using the "primary individual URI." If there are multiple
|
||||||
|
statements for a property that can have only a single value, the extra
|
||||||
|
statements will be retracted from the model and offered for download.</p>
|
||||||
|
<p>This tool operates on the main web application model only, not on any
|
||||||
|
of the additional Jena models.</p>
|
||||||
|
|
||||||
<form id="takeuri" action="ingest" method="get">
|
<form id="takeuri" action="ingest" method="get">
|
||||||
<input type="hidden" name="action" value="mergeIndividuals"/>
|
<input type="hidden" name="action" value="mergeIndividuals"/>
|
||||||
<p>Individual URI1 <input id="uri1" type="text" size="52" name="uri1"/></p>
|
<table>
|
||||||
<p>Individual URI2 <input id="uri2" type="text" size="52" name="uri2"/></p>
|
<tr>
|
||||||
<p><input type="submit" name="submit" value="submit" /></p>
|
<td>Primary individual URI</td><td><input id="uri1" type="text" size="52" name="uri1"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Duplicate individual URI</td><td><input id="uri2" type="text" size="52" name="uri2"/></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<input type="submit" name="submit" value="Merge individuals" /></p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -17,12 +17,23 @@
|
||||||
|
|
||||||
<p><a href="ingest">Ingest Home</a></p>
|
<p><a href="ingest">Ingest Home</a></p>
|
||||||
|
|
||||||
<h2>Assign Permanent URI To Individuals</h2>
|
<h2>Assign Permanent URIs To Resources</h2>
|
||||||
|
|
||||||
|
<p>This tool will rename the resources in the selected model to with new
|
||||||
|
randomly-generated URIs following the pattern used in the main application.
|
||||||
|
The tool will generate URIs that are not already in use in the main web
|
||||||
|
application model. Statements using the newly-renamed resources will be
|
||||||
|
written to the "model to save."</p>
|
||||||
|
|
||||||
|
<p>The permanent URIs may be generated in an arbitrary "new namespace for
|
||||||
|
resources." Otherwise, the "use default namespace" option will generate
|
||||||
|
URIs exactly of the form created through the GUI interface.</p>
|
||||||
|
|
||||||
<form action="ingest" method="get" >
|
<form action="ingest" method="get" >
|
||||||
<%String modelName = (String)request.getAttribute("modelName"); %>
|
<%String modelName = (String)request.getAttribute("modelName"); %>
|
||||||
<input type="hidden" name="oldModel" value="<%=modelName%>"/>
|
<input type="hidden" name="oldModel" value="<%=modelName%>"/>
|
||||||
<input type="hidden" name="action" value="permanentURI" />
|
<input type="hidden" name="action" value="permanentURI" />
|
||||||
<p>Namespace of resources <select name=oldNamespace><%List namespaces = (List)request.getAttribute("namespaceList");
|
<p>Current namespace of resources <select name=oldNamespace><%List namespaces = (List)request.getAttribute("namespaceList");
|
||||||
if(namespaces != null){
|
if(namespaces != null){
|
||||||
Iterator namespaceItr = namespaces.iterator();
|
Iterator namespaceItr = namespaces.iterator();
|
||||||
Integer count = 0;
|
Integer count = 0;
|
||||||
|
@ -42,10 +53,10 @@ if(namespaces != null){
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
</select></p>
|
</select></p>
|
||||||
<p>New Namespace for resources <input type="text" name="newNamespace" /></p>
|
<p>New namespace for resources <input type="text" name="newNamespace" /></p>
|
||||||
Or <%String defaultNamespace = (String)request.getAttribute("defaultNamespace");%>
|
Or <%String defaultNamespace = (String)request.getAttribute("defaultNamespace");%>
|
||||||
<p>Choose Default Namespace <%=defaultNamespace%> <input type="checkbox" name="defaultNamespace" value ="<%=defaultNamespace%>"/>
|
<p>Use default namespace <%=defaultNamespace%> <input type="checkbox" name="defaultNamespace" value ="<%=defaultNamespace%>"/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p><input type="submit" name="submit" value="submit" /></p>
|
<p><input type="submit" name="submit" value="Generate URIs" /></p>
|
||||||
</form>
|
</form>
|
|
@ -12,10 +12,18 @@
|
||||||
|
|
||||||
<p><a href="ingest">Ingest Home</a></p>
|
<p><a href="ingest">Ingest Home</a></p>
|
||||||
|
|
||||||
<h2>Rename Resource</h2>
|
<h2>Change Namespace of Resources</h2>
|
||||||
|
|
||||||
|
<p>This tool will change all resources in the supplied "old namespace"
|
||||||
|
to be in the "new namespace." Additionally, the local names will be updated
|
||||||
|
to follow the established "n" + random integer naming convention.</p>
|
||||||
|
|
||||||
|
<p>This tool operates on the main web application model only, not on any
|
||||||
|
of the additional Jena models.</p>
|
||||||
|
|
||||||
<form id="takeuri" action="ingest" method="get">
|
<form id="takeuri" action="ingest" method="get">
|
||||||
<input type="hidden" name="action" value="renameResource"/>
|
<input type="hidden" name="action" value="renameResource"/>
|
||||||
<p>Old Namespace <input id="uri1" type="text" size="52" name="uri1"/></p>
|
<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>New Namespace <input id="uri2" type="text" size="52" name="uri2"/></p>
|
||||||
<p><input type="submit" name="submit" value="submit" /></p>
|
<p><input type="submit" name="submit" value="Change namespace" /></p>
|
||||||
</form>
|
</form>
|
Loading…
Add table
Reference in a new issue