Some formatting changes to sparql query form to provide clarity
This commit is contained in:
parent
9a939cd57e
commit
08e3a6d8ae
2 changed files with 51 additions and 39 deletions
|
@ -9,7 +9,7 @@
|
||||||
<div id="content" class="sparqlform">
|
<div id="content" class="sparqlform">
|
||||||
<h2>SPARQL Query</h2>
|
<h2>SPARQL Query</h2>
|
||||||
<form action='sparqlquery'>
|
<form action='sparqlquery'>
|
||||||
query:
|
<h3>Query:</h3>
|
||||||
<div>
|
<div>
|
||||||
<textarea name='query' rows ='30' cols='100' class="span-23 maxWidth">
|
<textarea name='query' rows ='30' cols='100' class="span-23 maxWidth">
|
||||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||||
|
@ -47,47 +47,48 @@ LIMIT 20
|
||||||
</textarea>
|
</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<div>
|
||||||
<h3>Format for SELECT query results:</h3>
|
<h3>Format for SELECT query results:</h3>
|
||||||
<input id='RS_XML_BUTTON' type='radio' name='resultFormat' value='RS_XML'> <label for='RS_XML_BUTTON'>RS_XML</label>
|
<input id='RS_XML_BUTTON' type='radio' name='resultFormat' value='RS_XML'> <label for='RS_XML_BUTTON'>RS_XML</label>
|
||||||
<input id='RS_TEXT_BUTTON' type='radio' name='resultFormat' value='RS_TEXT' checked='checked'> <label for='RS_TEXT_BUTTON'>RS_TEXT</label>
|
<input id='RS_TEXT_BUTTON' type='radio' name='resultFormat' value='RS_TEXT' checked='checked'> <label for='RS_TEXT_BUTTON'>RS_TEXT</label>
|
||||||
<input id='RS_CSV_BUTTON' type='radio' name='resultFormat' value='vitro:csv'> <label for='RS_CSV_BUTTON'>CSV</label>
|
<input id='RS_CSV_BUTTON' type='radio' name='resultFormat' value='vitro:csv'> <label for='RS_CSV_BUTTON'>CSV</label>
|
||||||
<input id='RS_RDF_N3_BUTTON' type='radio' name='resultFormat' value='RS_RDF/N3'> <label for='RS_RDF_N3_BUTTON'>RS_RDF/N3</label>
|
<input id='RS_RDF_N3_BUTTON' type='radio' name='resultFormat' value='RS_RDF/N3'> <label for='RS_RDF_N3_BUTTON'>RS_RDF/N3</label>
|
||||||
<input id='RS_JSON_BUTTON' type='radio' name='resultFormat' value='RS_JSON'> <label for='RS_JSON_BUTTON'>RS_JSON</label>
|
<input id='RS_JSON_BUTTON' type='radio' name='resultFormat' value='RS_JSON'> <label for='RS_JSON_BUTTON'>RS_JSON</label>
|
||||||
<input id='RS_RDF_BUTTON' type='radio' name='resultFormat' value='RS_RDF'> <label for='RS_RDF_BUTTON'>RS_RDF</label>
|
<input id='RS_RDF_BUTTON' type='radio' name='resultFormat' value='RS_RDF'> <label for='RS_RDF_BUTTON'>RS_RDF</label>
|
||||||
</p>
|
</div>
|
||||||
|
|
||||||
<p>
|
|
||||||
<h3>Format for CONSTRUCT and DESCRIBE query results:</h3>
|
|
||||||
<input id='RR_RDFXML_BUTTON' type='radio' name='rdfResultFormat' value='RDF/XML'> <label for='RR_RDFXML_BUTTON'>RDF/XML</label>
|
|
||||||
<input id='RR_RDFXMLABBREV_BUTTON' type='radio' name='rdfResultFormat' value='RDF/XML-ABBREV' checked='checked'> <label for='RR_RDFXMLABBREV_BUTTON'>RDF/XML-ABBREV</label>
|
|
||||||
<input id='RR_N3_BUTTON' type='radio' name='rdfResultFormat' value='N3'> <label for='RR_N3_BUTTON'>N3</label>
|
|
||||||
<input id='RR_NTRIPLE_BUTTON' type='radio' name='rdfResultFormat' value='N-TRIPLE'> <label for='RR_NTRIPLE_BUTTON'>N-Triples</label>
|
|
||||||
<input id='RR_TURTLE_BUTTON' type='radio' name='rdfResultFormat' value='TTL'> <label for='RR_TURTLE_BUTTON'>Turtle</label>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
<h3>Format for CONSTRUCT and DESCRIBE query results:</h3>
|
||||||
<ul class="clean">
|
<input id='RR_RDFXML_BUTTON' type='radio' name='rdfResultFormat' value='RDF/XML'> <label for='RR_RDFXML_BUTTON'>RDF/XML</label>
|
||||||
<%
|
<input id='RR_RDFXMLABBREV_BUTTON' type='radio' name='rdfResultFormat' value='RDF/XML-ABBREV' checked='checked'> <label for='RR_RDFXMLABBREV_BUTTON'>RDF/XML-ABBREV</label>
|
||||||
try{
|
<input id='RR_N3_BUTTON' type='radio' name='rdfResultFormat' value='N3'> <label for='RR_N3_BUTTON'>N3</label>
|
||||||
if( request.getSession() != null && application.getAttribute("vitroJenaModelMaker") != null ){
|
<input id='RR_NTRIPLE_BUTTON' type='radio' name='rdfResultFormat' value='N-TRIPLE'> <label for='RR_NTRIPLE_BUTTON'>N-Triples</label>
|
||||||
ModelMaker maker = (ModelMaker) application.getAttribute("vitroJenaModelMaker");
|
<input id='RR_TURTLE_BUTTON' type='radio' name='rdfResultFormat' value='TTL'> <label for='RR_TURTLE_BUTTON'>Turtle</label>
|
||||||
for (Iterator it = maker.listModels(); it.hasNext(); ) {
|
|
||||||
String modelName = (String) it.next();
|
|
||||||
%> <li> <input type="checkbox" name="sourceModelName" value="<%=modelName%>"/><%=modelName%></li>
|
|
||||||
<%
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
%><li>could not find named models in session</li><%
|
|
||||||
}
|
|
||||||
}catch(Exception ex){
|
|
||||||
%><li>could not find named models in ModelMaker</li><%
|
|
||||||
}
|
|
||||||
%>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h3>Graphs to query: </h3>
|
||||||
|
<p class="parenthetical">(all graphs are queried by default)</p>
|
||||||
|
<ul class="clean">
|
||||||
|
<%
|
||||||
|
try{
|
||||||
|
if( request.getSession() != null && application.getAttribute("vitroJenaModelMaker") != null ){
|
||||||
|
ModelMaker maker = (ModelMaker) application.getAttribute("vitroJenaModelMaker");
|
||||||
|
for (Iterator it = maker.listModels(); it.hasNext(); ) {
|
||||||
|
String modelName = (String) it.next();
|
||||||
|
%> <li> <input type="checkbox" name="sourceModelName" value="<%=modelName%>"/><%=modelName%></li>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
%><li>could not find named models in session</li><%
|
||||||
|
}
|
||||||
|
}catch(Exception ex){
|
||||||
|
%><li>could not find named models in ModelMaker</li><%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<input id="submit" type="submit" value="Run Query" />
|
<input id="submit" type="submit" value="Run Query" />
|
||||||
</form>
|
</form>
|
||||||
<%--
|
<%--
|
||||||
|
|
|
@ -330,6 +330,17 @@ div.sparqlform label {
|
||||||
display: inline;
|
display: inline;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.sparqlform div {
|
||||||
|
margin-bottom: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sparqlform .parenthetical {
|
||||||
|
font-style: italic;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: .25em;
|
||||||
|
}
|
||||||
|
|
||||||
/* Temporary hack to remove stuff from forms in vivoweb only */
|
/* Temporary hack to remove stuff from forms in vivoweb only */
|
||||||
.hideFromVivoWeb {
|
.hideFromVivoWeb {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue