NIHVIVO-1481 Merged r8774 from maint-rel-vivo-1.3 branch.

This commit is contained in:
cappadona 2011-07-21 12:33:41 +00:00
parent fe4104023f
commit fd945e97ad
3 changed files with 37 additions and 38 deletions

View file

@ -101,7 +101,7 @@ public class JenaIngestController extends BaseEditController {
private static final String WORKFLOW_STEP_JSP = "/jenaIngest/workflowStep.jsp";
private static final String GENERATE_TBOX_JSP = "/jenaIngest/generateTBox.jsp";
private static final String PERMANENT_URI = "/jenaIngest/permanentURI.jsp";
private static final String MERGE_INDIVIDUALS = "/jenaIngest/mergeIndividuals.jsp";
private static final String MERGE_RESOURCES = "/jenaIngest/mergeResources.jsp";
private static final String MERGE_RESULT = "/jenaIngest/merge_result.jsp";
private static final String SPARQL_CONSTRUCT_CLASS = "http://vitro.mannlib.cornell.edu/ns/vitro/0.7/sparql#SPARQLCONSTRUCTQuery";
private static final String SPARQL_QUERYSTR_PROP = "http://vitro.mannlib.cornell.edu/ns/vitro/0.7/sparql#queryStr";
@ -174,8 +174,8 @@ public class JenaIngestController extends BaseEditController {
processGenerateTBoxRequest(vreq, maker, modelType);
} else if("permanentURI".equals(actionStr)){
processPermanentURIRequest(vreq, maker, modelType);
} else if("mergeIndividuals".equals(actionStr)){
processMergeIndividualRequest(vreq, maker, modelType);
} else if("mergeResources".equals(actionStr)){
processMergeResourceRequest(vreq, maker, modelType);
} else if("renameResource".equals(actionStr)){
processRenameResourceRequest(vreq, response, maker, modelType);
} else if("mergeResult".equals(actionStr)){
@ -674,7 +674,7 @@ public class JenaIngestController extends BaseEditController {
}
}
private void processMergeIndividualRequest(VitroRequest vreq, ModelMaker maker, String modelType) {
private void processMergeResourceRequest(VitroRequest vreq, ModelMaker maker, String modelType) {
String uri1 = vreq.getParameter("uri1"); // get primary uri
String uri2 = vreq.getParameter("uri2"); // get secondary uri
String usePrimaryLabelOnly = vreq.getParameter("usePrimaryLabelOnly");
@ -695,12 +695,12 @@ public class JenaIngestController extends BaseEditController {
String result = utils.doMerge(uri1,uri2,baseOntModel,ontModel,infOntModel,usePrimaryLabelOnly);
getServletContext().setAttribute("leftoverModel", utils.getLeftOverModel());
vreq.setAttribute("result",result);
vreq.setAttribute("title","Merge Individuals");
vreq.setAttribute("title","Merge Resources");
vreq.setAttribute("bodyJsp",MERGE_RESULT);
}
else{
vreq.setAttribute("title","Merge Individuals");
vreq.setAttribute("bodyJsp",MERGE_INDIVIDUALS);
vreq.setAttribute("title","Merge Resources");
vreq.setAttribute("bodyJsp",MERGE_RESOURCES);
}
}

View file

@ -8,27 +8,27 @@
<h2>Ingest Menu</h2>
<ul class="ingestMenu">
<li><a href="ingest?action=connectDB">Connect DB</a></li>
<li><a href="ingest?action=listModels">Manage Jena Models</a></li>
<li><a href="ingest?action=subtractModels">Subtract One Model from Another</a></li>
<li><a href="ingest?action=connectDB" title="Connect to a Jena database">Connect DB</a></li>
<li><a href="ingest?action=listModels"title="Manage all available Jena models">Manage Jena Models</a></li>
<li><a href="ingest?action=subtractModels" title="Subtract one model from another and save difference to new model">Subtract One Model from Another</a></li>
</ul>
<ul class="ingestMenu">
<li><a href="ingest?action=csv2rdf">Convert CSV to RDF</a></li>
<li><a href="jenaXmlFileUpload">Convert XML to RDF</a></li>
<li><a href="ingest?action=csv2rdf" title="Convert a CSV file to RDF in preparation for ingest">Convert CSV to RDF</a></li>
<li><a href="jenaXmlFileUpload" title="Convert an XML file to RDF in preparation for ingest">Convert XML to RDF</a></li>
</ul>
<ul class="ingestMenu">
<li><a href="ingest?action=executeSparql">Execute SPARQL CONSTRUCT</a></li>
<li><a href="ingest?action=generateTBox">Generate TBox</a></li>
<li><a href="ingest?action=renameBNodes">Name Blank Nodes</a></li>
<li><a href="ingest?action=smushSingleModel">Smush Resources</a></li>
<li><a href="ingest?action=mergeIndividuals">Merge Individuals</a></li>
<li><a href="ingest?action=renameResource">Change Namespace of Resources</a></li>
<li><a href="ingest?action=processStrings">Process Property Value Strings</a></li>
<li><a href="ingest?action=splitPropertyValues">Split Property Value Strings into Multiple Property Values</a></li>
<li><a href="ingest?action=executeSparql" title="Run a SPARQL CONSTRUCT query and apply results to an available model">Execute SPARQL CONSTRUCT</a></li>
<li><a href="ingest?action=generateTBox" title="Generate TBox from assertions data">Generate TBox</a></li>
<li><a href="ingest?action=renameBNodes" title="Convert blank nodes to named resources">Name Blank Nodes</a></li>
<li><a href="ingest?action=smushSingleModel" title="Convert all existing URIs for a resource to a single URI">Smush Resources</a></li>
<li><a href="ingest?action=mergeResources" title="Merge two resources into one">Merge Resources</a></li>
<li><a href="ingest?action=renameResource" title="Change the namespace of resources currently in a specified namespace">Change Namespace of Resources</a></li>
<li><a href="ingest?action=processStrings" title="Process property value strings">Process Property Value Strings</a></li>
<li><a href="ingest?action=splitPropertyValues" title="Split property value strings into multiple property values using a regular expression pattern">Split Property Value Strings into Multiple Property Values</a></li>
</ul>
<ul class="ingestMenu">
<li><a href="ingest?action=executeWorkflow">Execute Workflow</a></li>
<li><a href="ingest?action=executeWorkflow" title="Execute an RDF-encoded ingest workflow">Execute Workflow</a></li>
</ul>

View file

@ -23,28 +23,27 @@
<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> > Merge Individuals</h2>
<h2><a class="ingestMenu" href="ingest">Ingest Menu</a> > Merge Resources</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
<p>This tool allows two resources with different URIs to be collapsed into a
single URI. Any statements using the "duplicate resource URI" will be
rewritten using the "primary resource 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">
<input type="hidden" name="action" value="mergeIndividuals"/>
<table>
<tr>
<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="checkbox" name="usePrimaryLabelOnly" value="Use Primary Label Only">Retain rdfs:labels only from Primary Individual</input>
<br></br>
<input class="submit"type="submit" name="submit" value="Merge individuals" /></p>
</form>
<input type="hidden" name="action" value="mergeResources"/>
<table>
<tr>
<td>Primary resource URI</td><td><input id="uri1" type="text" size="52" name="uri1"/></td>
</tr>
<tr>
<td>Duplicate resource URI</td><td><input id="uri2" type="text" size="52" name="uri2"/></td>
</tr>
</table>
<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>