1 package com.indexdata.mkjsf.pazpar2.data;
\r
3 import java.util.ArrayList;
\r
4 import java.util.List;
\r
6 import com.indexdata.mkjsf.pazpar2.data.Location;
\r
7 import com.indexdata.mkjsf.pazpar2.data.ResponseDataObject;
\r
10 * Data from the <code>show</code> command, child object of ShowResponse, can be accessed by <code>pzresp.show.hits</code>
\r
12 * @author Niels Erik
\r
15 public class Hit extends ResponseDataObject {
\r
18 private static final long serialVersionUID = 9039281987691623220L;
\r
20 public List<Location> getLocations() {
\r
21 List<Location> locations = new ArrayList<Location>();
\r
22 for (ResponseDataObject element : getElements("location")) {
\r
23 locations.add((Location)element);
\r
28 public String getTitle () {
\r
29 return getOneValue("md-title");
\r
32 public String getTitleRemainder() {
\r
33 return getOneValue("md-title-remainder");
\r
36 public String getAuthor (String prefix) {
\r
37 return getOneElement("md-author") != null ? prefix + getOneElement("md-author").getValue() : "";
\r
40 public String getAuthor () {
\r
41 return getOneValue("md-author");
\r
44 public String getTitleResponsibility() {
\r
45 return getOneValue("md-title-responsibility");
\r
48 public String getDate() {
\r
49 return getOneValue("md-date");
\r
52 public String getTitleComplete() {
\r
53 return getOneValue("md-title-complete");
\r
56 public String getRecId() {
\r
57 return getOneValue("recid");
\r
60 public String getDescription() {
\r
61 return getOneValue("md-description");
\r