Adds option to post sp init doc, see xml, change sp url
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / pz2utils4jsf / pazpar2 / data / Pazpar2ResponseData.java
index 8be2d24..6b1ae7a 100644 (file)
@@ -14,7 +14,8 @@ public class Pazpar2ResponseData implements Serializable {
   HashMap<String,String> attributes = new HashMap<String,String>();\r
   HashMap<String,List<Pazpar2ResponseData>> elements = new HashMap<String,List<Pazpar2ResponseData>>();\r
   String textContent = "";\r
-  ApplicationError error = null;\r
+  CommandError error = null;\r
+  String xml = null;\r
         \r
   public void setType (String type) {\r
     this.type = type;\r
@@ -98,11 +99,20 @@ public class Pazpar2ResponseData implements Serializable {
     return (getOneElement("applicationerror") != null);   \r
   }\r
   \r
-  public ApplicationError getApplicationError() {\r
-    return (ApplicationError) getOneElement("applicationerror");\r
+  public CommandError getApplicationError() {\r
+    return (CommandError) getOneElement("applicationerror");\r
   }\r
   \r
+  public boolean hasPazpar2Error() {\r
+    return hasApplicationError() && getApplicationError().hasPazpar2Error();\r
+  }\r
   \r
+  public void setXml(String xml) {\r
+    this.xml = xml; \r
+  }\r
   \r
-      \r
+  public String getXml() {\r
+    return xml;\r
+  }\r
+        \r
 }\r