Fixing problem with FM dump directive. Working on SparqlQueryDataGetter.

This commit is contained in:
briancaruso 2012-02-29 19:51:33 +00:00
parent 558985d542
commit d9669acddb
8 changed files with 159 additions and 80 deletions

View file

@ -49,7 +49,9 @@ owl:ObjectProperty
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#DataGetter>
a owl:Class .
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>
a owl:Class .
########Data Properties#########
@ -101,14 +103,16 @@ 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 .
a owl:DatatypeProperty .
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#saveToVar>
a owl:DatatypeProperty.
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#queryModel>
a owl:DatatypeProperty.
######### Object Properties#########
###Basic
rdfs:range
@ -179,7 +183,4 @@ 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

@ -5,4 +5,6 @@
<p>Implement a <a href="${urls.base}/display?uri=${page.pageUri?url}&switchToDisplayModel=1">link</a> to configure this page if the user has permission.</p>
</div>

View file

@ -0,0 +1,32 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<div>
<#if pages?has_content >
<table>
<th>Title</th><th>URI</th>
<#list pages as pagex>
<tr>
<td>${(pagex.title)!'-untitled-'}</td>
<#if pagex.pageUri??>
<td><a href="${urls.base}/individual?uri=${pagex.pageUri?url}&switchToDisplayModel=1">${pagex.pageUri}</a></td>
<#else>
<td>URI for page not defined</td>
</#if>
</tr>
</#list>
</table>
<#else>
<p>There are no pages defined yet.</p>
</#if>
<form id="addIndividualClass" action="${urls.base}/editRequestDispatch" method="get">
<input type="hidden" name="typeOfNew" value="http://vitro.mannlib.cornell.edu/ontologies/display/1.1#Page">
<input type="hidden" name="switchToDisplayModel" value="1">
<input type="hidden" name="editForm" value="edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.NewIndividualFormGenerator" role="input">
<input type="submit" id="submit" value="Add Page" role="button">
</form>
</div>

View file

@ -7,21 +7,23 @@
<div class="dump">
<h3>${title}</h3>
<@doDump dump />
<#-- dump has been changed to dumpValue to avoid confusion
with the dump directive which is stored in the DataModel as 'dump' -->
<@doDump dumpValue />
</div>
<#macro doDump dump>
<#if dump?keys?has_content>
<#macro doDump dumpValue>
<#if dumpValue?keys?has_content>
<ul>
<#list dump?keys as key>
<#list dumpValue?keys as key>
<li class="variable">
<p><strong>Variable name:</strong> ${key}</p>
<#local type = dump[key].type!>
<#local type = dumpValue[key].type!>
<#if type == "Directive" || type == "Method">
<@doMethod dump[key] />
<@doMethod dumpValue[key] />
<#else>
<@doTypeAndValue dump[key] />
<@doTypeAndValue dumpValue[key] />
</#if>
</li>
</#list>