updates for sparql data getter and updates to data getter utils

This commit is contained in:
hjkhjk54 2012-02-29 19:18:07 +00:00
parent eb1ff58879
commit 558985d542
5 changed files with 274 additions and 7 deletions

View file

@ -102,7 +102,13 @@ owl:versionInfo
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#usesDataGetterClass>
a owl:DatatypeProperty .
###Custom data getters that may or may not be associated with a page use the following relationships
###E.g. sparql data getters can specify the query to be used as well as what variable in the template
###should store the results
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#saveToVar>
a owl:DatatypeProperty .
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#query>
a owl:DatatypeProperty .
######### Object Properties#########
###Basic
rdfs:range
@ -173,4 +179,7 @@ owl:topObjectProperty
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#restrictResultsByClass>
a owl:ObjectProperty .
###Custom data getters that may or may not be associated with a page use the following relationships
###E.g. sparql data getters can specify what model to use for querying
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#queryModel>
a owl:ObjectProperty .

View file

@ -0,0 +1,13 @@
.resultRow {
float:none;
clear:both;
}
.resultCell {
float:left;
border:1px solid #000000;
}
.resultHeading {
font-weight:bold;
}

View file

@ -0,0 +1,32 @@
<#--Save to variable is sparqlResults -->
<#assign resultsExist = false/>
<#if sparqlResults?has_content>
<#assign resultsExist = true/>
</#if>
<h3>Sparql Query Results</h3>
<#if resultsExist>
<#assign numberRows = sparqlResults?size/>
<#assign firstRow = false/>
<#list sparqlResults as resultRow>
<#assign resultKeys = resultRow?keys />
<#if firstRow = false>
<div class="resultHeading resultRow">
<#list resultKeys as resultKey>
<div class="resultCell">${resultKey}</div>
</#list>
</div>
<#assign firstRow = true/>
</#if>
<div class="resultRow">
<#list resultKeys as resultKey>
<div class="resultCell">${resultRow[resultKey]}</div>
</#list>
</div>
</#list>
<#else>
No results were returned.
</#if>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/menupage/sparqlresults.css" />')}