--- /dev/null
+package com.indexdata.mkjsf.pazpar2.data;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import com.indexdata.mkjsf.pazpar2.data.Location;\r
+import com.indexdata.mkjsf.pazpar2.data.ResponseDataObject;\r
+\r
+/**\r
+ * Data from the <code>show</code> command, child object of ShowResponse, can be accessed by <code>pzresp.show.hits</code>\r
+ * \r
+ * @author Niels Erik\r
+ *\r
+ */\r
+public class Hit extends ResponseDataObject {\r
+\r
+ \r
+ private static final long serialVersionUID = 9039281987691623220L;\r
+\r
+ public List<Location> getLocations() {\r
+ List<Location> locations = new ArrayList<Location>();\r
+ for (ResponseDataObject element : getElements("location")) {\r
+ locations.add((Location)element);\r
+ }\r
+ return locations;\r
+ }\r
+ \r
+ public String getTitle () {\r
+ return getOneValue("md-title");\r
+ }\r
+ \r
+ public String getTitleRemainder() {\r
+ return getOneValue("md-title-remainder");\r
+ }\r
+ \r
+ public String getAuthor (String prefix) {\r
+ return getOneElement("md-author") != null ? prefix + getOneElement("md-author").getValue() : "";\r
+ }\r
+ \r
+ public String getAuthor () {\r
+ return getOneValue("md-author");\r
+ }\r
+ \r
+ public String getTitleResponsibility() {\r
+ return getOneValue("md-title-responsibility");\r
+ }\r
+ \r
+ public String getDate() {\r
+ return getOneValue("md-date");\r
+ }\r
+ \r
+ public String getTitleComplete() {\r
+ return getOneValue("md-title-complete");\r
+ }\r
+ \r
+ public String getRecId() {\r
+ return getOneValue("recid");\r
+ }\r
+ \r
+ public String getDescription() {\r
+ return getOneValue("md-description");\r
+ }\r
+ \r
+}\r