Merge pull request #5 from vivo-project/feature/search-download
Added a new field email to IndividualSearchResults and a modification of...
This commit is contained in:
commit
cb757d82da
4 changed files with 45 additions and 1 deletions
BIN
productMods/images/individual/download-icon.png
Normal file
BIN
productMods/images/individual/download-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 953 B |
|
@ -0,0 +1,9 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
<#assign today = .now >
|
||||
<#assign todayDate = today?date>
|
||||
Results from ${siteName} for ${querytext} on ${todayDate}
|
||||
|
||||
Name, Title, Email, URI, VIVO Profile URL
|
||||
<#list individuals as individual>
|
||||
"${individual.name}",<#if individual.preferredTitle?has_content>"${individual.preferredTitle}"</#if>,<#if individual.email?has_content>"${individual.email}"</#if>,"${individual.uri}","${individual.profileUrl}"
|
||||
</#list>
|
|
@ -0,0 +1,28 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<response>
|
||||
|
||||
<lst name="responseHeader">
|
||||
<str name="q">${querytext?xml}</str>
|
||||
<#if nextPage??>
|
||||
<str name="nextPage">${nextPage?xml}</str>
|
||||
</#if>
|
||||
</lst>
|
||||
|
||||
<result name="response" numFound="${hitCount}" start="${startIndex}" >
|
||||
<#list individuals as individual>
|
||||
<doc>
|
||||
<str name="uri">${individual.uri?xml}</str>
|
||||
<str name="name">${individual.name?xml}</str>
|
||||
<#if individual.preferredTitle?has_content>
|
||||
<str name="title">${individual.preferredTitle?xml}</str>
|
||||
</#if>
|
||||
<#if individual.email?has_content>
|
||||
<str name="email">"${individual.email}"</str>
|
||||
</#if>
|
||||
<str name="vivo-url">${individual.profileUrl?xml}"</str>
|
||||
</doc>
|
||||
</#list>
|
||||
</result>
|
||||
|
||||
</response>
|
|
@ -15,13 +15,20 @@ public class IndividualSearchResult extends BaseIndividualSearchResult {
|
|||
private static final String CORE = "http://vivoweb.org/ontology/core#";
|
||||
|
||||
public IndividualSearchResult(Individual individual, VitroRequest vreq) {
|
||||
super(individual, vreq);
|
||||
super(individual, vreq);
|
||||
log.info("Called Individual Search Result");
|
||||
}
|
||||
|
||||
/* Access methods for templates */
|
||||
|
||||
public String getPreferredTitle() {
|
||||
log.info("Called get Title");
|
||||
return individual.getDataValue(CORE + "preferredTitle");
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
log.info("Called get Email");
|
||||
return individual.getDataValue(CORE + "email");
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue