From: Niels Erik G. Nielsen Date: Thu, 4 Apr 2013 19:57:31 +0000 (-0400) Subject: Adds option to return Pazpar2/SP response XML X-Git-Tag: v0.0.7~190 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=22ca36baa541609a00cb2f953529b9f63b992a6b;p=mkjsf-moved-to-github.git Adds option to return Pazpar2/SP response XML --- diff --git a/src/main/java/com/indexdata/pz2utils4jsf/pazpar2/data/Pazpar2ResponseData.java b/src/main/java/com/indexdata/pz2utils4jsf/pazpar2/data/Pazpar2ResponseData.java index 6b1ae7a..a6e9265 100644 --- a/src/main/java/com/indexdata/pz2utils4jsf/pazpar2/data/Pazpar2ResponseData.java +++ b/src/main/java/com/indexdata/pz2utils4jsf/pazpar2/data/Pazpar2ResponseData.java @@ -5,10 +5,13 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import org.apache.log4j.Logger; + import com.indexdata.pz2utils4jsf.pazpar2.data.Pazpar2ResponseData; public class Pazpar2ResponseData implements Serializable { - + + Logger logger = Logger.getLogger(Pazpar2ResponseData.class); private static final long serialVersionUID = -3909755656714679959L; String type = null; HashMap attributes = new HashMap(); @@ -112,7 +115,10 @@ public class Pazpar2ResponseData implements Serializable { } public String getXml() { - return xml; + if (type != null && type.equals("record")) { + logger.debug("Getting XML for "+type + ": "+xml); + } + return xml == null ? "" : xml; } }