From 22ca36baa541609a00cb2f953529b9f63b992a6b Mon Sep 17 00:00:00 2001 From: "Niels Erik G. Nielsen" Date: Thu, 4 Apr 2013 15:57:31 -0400 Subject: [PATCH] Adds option to return Pazpar2/SP response XML --- .../pz2utils4jsf/pazpar2/data/Pazpar2ResponseData.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; } } -- 1.7.10.4