Updates for adding a data getter that executes a solr query to retrieve individuals for a specific vclass and returns the results - the default template is a copy of the individual list controller template - some code refactoring also breaks out some of the individual controller methods into solr query utils for potential further reuse.
This commit is contained in:
parent
8c12deacec
commit
52314c4640
6 changed files with 419 additions and 89 deletions
|
@ -52,6 +52,11 @@ owl:ObjectProperty
|
|||
|
||||
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SparqlQueryDataGetter>
|
||||
a owl:Class .
|
||||
|
||||
##Adding a data getter type that is Solr Class search, i.e. get individuals for VClass
|
||||
<java:edu.cornell.mannlib.vitro.webapp.utils.dataGetter.SolrIndividualsDataGetter>
|
||||
a owl:Class .
|
||||
|
||||
|
||||
########Data Properties#########
|
||||
|
||||
|
@ -130,6 +135,11 @@ rdfs:domain
|
|||
a owl:ObjectProperty .
|
||||
owl:topObjectProperty
|
||||
a owl:ObjectProperty .
|
||||
|
||||
##Adding object property defining class for solr data getter
|
||||
<http://vitro.mannlib.cornell.edu/ontologies/display/1.1#hasVClassId>
|
||||
a owl:ObjectProperty.
|
||||
|
||||
|
||||
###Vitro properties without which individual templates throw errors as are required
|
||||
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- List individuals in the requested class. -->
|
||||
|
||||
<#import "lib-list.ftl" as l>
|
||||
|
||||
<#include "individualList-checkForData.ftl">
|
||||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/browseIndex.css" />')}
|
||||
|
||||
<section class="individualList">
|
||||
<h2>${title}
|
||||
</h2>
|
||||
<#if subtitle?has_content>
|
||||
<h4>${subtitle}</h4>
|
||||
</#if>
|
||||
|
||||
<#if (!noData)>
|
||||
<#if errorMessage?has_content>
|
||||
<p>${errorMessage}</p>
|
||||
<#else>
|
||||
<#assign pagination>
|
||||
<#if (pages?has_content && pages?size > 1)>
|
||||
pages:
|
||||
<ul class="pagination">
|
||||
<#list pages as page>
|
||||
<#if page.selected>
|
||||
<li class="selectedNavPage">${page.text}</li>
|
||||
<#else>
|
||||
<#-- RY Ideally the urls would be generated by the controller; see search-pagedResults.ftl -->
|
||||
<li><a href="${urls.base}/individuallist?${page.param}&vclassId=${vclassId?url}" title="page text">${page.text}</a></li>
|
||||
</#if>
|
||||
</#list>
|
||||
</ul>
|
||||
</#if>
|
||||
</#assign>
|
||||
|
||||
${pagination}
|
||||
|
||||
<ul>
|
||||
<#list individuals as individual>
|
||||
<li>
|
||||
<@shortView uri=individual.uri viewContext="index" />
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
||||
${pagination}
|
||||
</#if>
|
||||
<#else>
|
||||
${noDataNotification}
|
||||
</#if>
|
||||
</section> <!-- .individualList -->
|
Loading…
Add table
Add a link
Reference in a new issue