gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-libeufin] 19/25: Importing JAXB scaffolding to refle


From: gnunet
Subject: [GNUnet-SVN] [taler-libeufin] 19/25: Importing JAXB scaffolding to reflect ebics "hev" types.
Date: Fri, 20 Sep 2019 19:32:57 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository libeufin.

commit b272f22f22e31b7c3677b8477c703bddeba78c06
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Sep 18 13:44:20 2019 +0200

    Importing JAXB scaffolding to reflect ebics "hev" types.
    
    In other words, new JAXB classes have been generated from
    the XSD that defines the ebicsHEV{request, response}.  And plus,
    a wrapper class that abstracts the instantiation of such objects
    has been introduced.
---
 .../tech/libeufin/messages/HEVRequestDataType.java | 107 ++++++++++
 .../java/tech/libeufin/messages/HEVResponse.java   |  21 ++
 .../libeufin/messages/HEVResponseDataType.java     | 223 +++++++++++++++++++++
 .../java/tech/libeufin/messages/ObjectFactory.java |  87 ++++++++
 .../libeufin/messages/SystemReturnCodeType.java    | 100 +++++++++
 5 files changed, 538 insertions(+)

diff --git a/src/main/java/tech/libeufin/messages/HEVRequestDataType.java 
b/src/main/java/tech/libeufin/messages/HEVRequestDataType.java
new file mode 100644
index 0000000..9d1e96f
--- /dev/null
+++ b/src/main/java/tech/libeufin/messages/HEVRequestDataType.java
@@ -0,0 +1,107 @@
+
+package tech.libeufin.messages;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.w3c.dom.Element;
+
+
+/**
+ * Data type for Request data
+ * 
+ * <p>Java class for HEVRequestDataType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained 
within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="HEVRequestDataType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType";>
+ *       &lt;sequence>
+ *         &lt;element name="HostID" 
type="{http://www.ebics.org/H000}HostIDType"/>
+ *         &lt;any processContents='lax' namespace='##other' 
maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "HEVRequestDataType", namespace = "http://www.ebics.org/H000";, 
propOrder = {
+    "hostID",
+    "any"
+})
+public class HEVRequestDataType {
+
+    @XmlElement(name = "HostID", namespace = "http://www.ebics.org/H000";, 
required = true)
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlSchemaType(name = "token")
+    protected String hostID;
+    @XmlAnyElement(lax = true)
+    protected List<Object> any;
+
+    /**
+     * Gets the value of the hostID property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getHostID() {
+        return hostID;
+    }
+
+    /**
+     * Sets the value of the hostID property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setHostID(String value) {
+        this.hostID = value;
+    }
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the any property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Object }
+     * {@link Element }
+     * 
+     * 
+     */
+    public List<Object> getAny() {
+        if (any == null) {
+            any = new ArrayList<Object>();
+        }
+        return this.any;
+    }
+
+}
diff --git a/src/main/java/tech/libeufin/messages/HEVResponse.java 
b/src/main/java/tech/libeufin/messages/HEVResponse.java
new file mode 100644
index 0000000..d37ab98
--- /dev/null
+++ b/src/main/java/tech/libeufin/messages/HEVResponse.java
@@ -0,0 +1,21 @@
+package tech.libeufin.messages;
+
+import javax.xml.bind.JAXBElement;
+
+
+public class HEVResponse {
+    HEVResponseDataType value;
+
+    public HEVResponse(String returnCode, String reportText){
+        SystemReturnCodeType srt = new SystemReturnCodeType();
+        srt.setReturnCode(returnCode);
+        srt.setReportText(reportText);
+        this.value = new HEVResponseDataType();
+        this.value.setSystemReturnCode(srt);
+    }
+
+    public JAXBElement<HEVResponseDataType> makeHEVResponse(){
+        ObjectFactory of = new ObjectFactory();
+        return of.createEbicsHEVResponse(this.value);
+    }
+}
diff --git a/src/main/java/tech/libeufin/messages/HEVResponseDataType.java 
b/src/main/java/tech/libeufin/messages/HEVResponseDataType.java
new file mode 100644
index 0000000..19e3b07
--- /dev/null
+++ b/src/main/java/tech/libeufin/messages/HEVResponseDataType.java
@@ -0,0 +1,223 @@
+
+package tech.libeufin.messages;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.*;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import org.w3c.dom.Element;
+
+
+/**
+ * Data type for Request data
+ * 
+ * <p>Java class for HEVResponseDataType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained 
within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="HEVResponseDataType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType";>
+ *       &lt;sequence>
+ *         &lt;element name="SystemReturnCode" 
type="{http://www.ebics.org/H000}SystemReturnCodeType"/>
+ *         &lt;element name="VersionNumber" maxOccurs="unbounded" 
minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;simpleContent>
+ *               &lt;extension 
base="&lt;http://www.ebics.org/H000>VersionNumberType">
+ *                 &lt;attribute name="ProtocolVersion" use="required" 
type="{http://www.ebics.org/H000}ProtocolVersionType"; />
+ *               &lt;/extension>
+ *             &lt;/simpleContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;any processContents='lax' namespace='##other' 
maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "HEVResponseDataType", namespace = 
"http://www.ebics.org/H000";, propOrder = {
+    "systemReturnCode",
+    "versionNumber",
+    "any"
+})
+@XmlRootElement(name = "ebicsHEVResponse")
+public class HEVResponseDataType {
+
+    @XmlElement(name = "SystemReturnCode", namespace = 
"http://www.ebics.org/H000";, required = true)
+    protected SystemReturnCodeType systemReturnCode;
+    @XmlElement(name = "VersionNumber", namespace = 
"http://www.ebics.org/H000";)
+    protected List<HEVResponseDataType.VersionNumber> versionNumber;
+    @XmlAnyElement(lax = true)
+    protected List<Object> any;
+
+    /**
+     * Gets the value of the systemReturnCode property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link SystemReturnCodeType }
+     *     
+     */
+    public SystemReturnCodeType getSystemReturnCode() {
+        return systemReturnCode;
+    }
+
+    /**
+     * Sets the value of the systemReturnCode property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link SystemReturnCodeType }
+     *     
+     */
+    public void setSystemReturnCode(SystemReturnCodeType value) {
+        this.systemReturnCode = value;
+    }
+
+    /**
+     * Gets the value of the versionNumber property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the 
versionNumber property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getVersionNumber().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link HEVResponseDataType.VersionNumber }
+     * 
+     * 
+     */
+    public List<HEVResponseDataType.VersionNumber> getVersionNumber() {
+        if (versionNumber == null) {
+            versionNumber = new ArrayList<HEVResponseDataType.VersionNumber>();
+        }
+        return this.versionNumber;
+    }
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the any property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Object }
+     * {@link Element }
+     * 
+     * 
+     */
+    public List<Object> getAny() {
+        if (any == null) {
+            any = new ArrayList<Object>();
+        }
+        return this.any;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content 
contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;simpleContent>
+     *     &lt;extension 
base="&lt;http://www.ebics.org/H000>VersionNumberType">
+     *       &lt;attribute name="ProtocolVersion" use="required" 
type="{http://www.ebics.org/H000}ProtocolVersionType"; />
+     *     &lt;/extension>
+     *   &lt;/simpleContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "value"
+    })
+    public static class VersionNumber {
+
+        @XmlValue
+        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+        protected String value;
+        @XmlAttribute(name = "ProtocolVersion", required = true)
+        @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+        protected String protocolVersion;
+
+        /**
+         * Datatype for a release number 
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getValue() {
+            return value;
+        }
+
+        /**
+         * Sets the value of the value property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setValue(String value) {
+            this.value = value;
+        }
+
+        /**
+         * Gets the value of the protocolVersion property.
+         * 
+         * @return
+         *     possible object is
+         *     {@link String }
+         *     
+         */
+        public String getProtocolVersion() {
+            return protocolVersion;
+        }
+
+        /**
+         * Sets the value of the protocolVersion property.
+         * 
+         * @param value
+         *     allowed object is
+         *     {@link String }
+         *     
+         */
+        public void setProtocolVersion(String value) {
+            this.protocolVersion = value;
+        }
+
+    }
+
+}
diff --git a/src/main/java/tech/libeufin/messages/ObjectFactory.java 
b/src/main/java/tech/libeufin/messages/ObjectFactory.java
new file mode 100644
index 0000000..fcc010c
--- /dev/null
+++ b/src/main/java/tech/libeufin/messages/ObjectFactory.java
@@ -0,0 +1,87 @@
+
+package tech.libeufin.messages;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the tech.libeufin package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _EbicsHEVResponse_QNAME = new 
QName("http://www.ebics.org/H000";, "ebicsHEVResponse");
+    private final static QName _EbicsHEVRequest_QNAME = new 
QName("http://www.ebics.org/H000";, "ebicsHEVRequest");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of 
schema derived classes for package: tech.libeufin
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link HEVResponseDataType }
+     * 
+     */
+    public HEVResponseDataType createHEVResponseDataType() {
+        return new HEVResponseDataType();
+    }
+
+    /**
+     * Create an instance of {@link HEVRequestDataType }
+     * 
+     */
+    public HEVRequestDataType createHEVRequestDataType() {
+        return new HEVRequestDataType();
+    }
+
+    /**
+     * Create an instance of {@link SystemReturnCodeType }
+     * 
+     */
+    public SystemReturnCodeType createSystemReturnCodeType() {
+        return new SystemReturnCodeType();
+    }
+
+    /**
+     * Create an instance of {@link HEVResponseDataType.VersionNumber }
+     * 
+     */
+    public HEVResponseDataType.VersionNumber 
createHEVResponseDataTypeVersionNumber() {
+        return new HEVResponseDataType.VersionNumber();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link 
HEVResponseDataType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.ebics.org/H000";, name = 
"ebicsHEVResponse")
+    public JAXBElement<HEVResponseDataType> 
createEbicsHEVResponse(HEVResponseDataType value) {
+        return new JAXBElement<HEVResponseDataType>(_EbicsHEVResponse_QNAME, 
HEVResponseDataType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link 
HEVRequestDataType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://www.ebics.org/H000";, name = 
"ebicsHEVRequest")
+    public JAXBElement<HEVRequestDataType> 
createEbicsHEVRequest(HEVRequestDataType value) {
+        return new JAXBElement<HEVRequestDataType>(_EbicsHEVRequest_QNAME, 
HEVRequestDataType.class, null, value);
+    }
+
+}
diff --git a/src/main/java/tech/libeufin/messages/SystemReturnCodeType.java 
b/src/main/java/tech/libeufin/messages/SystemReturnCodeType.java
new file mode 100644
index 0000000..09ec917
--- /dev/null
+++ b/src/main/java/tech/libeufin/messages/SystemReturnCodeType.java
@@ -0,0 +1,100 @@
+
+package tech.libeufin.messages;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+
+/**
+ * Datatype for technical error
+ * 
+ * <p>Java class for SystemReturnCodeType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained 
within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="SystemReturnCodeType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType";>
+ *       &lt;sequence>
+ *         &lt;element name="ReturnCode" 
type="{http://www.ebics.org/H000}ReturnCodeType"/>
+ *         &lt;element name="ReportText" 
type="{http://www.ebics.org/H000}ReportTextType"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SystemReturnCodeType", namespace = 
"http://www.ebics.org/H000";, propOrder = {
+    "returnCode",
+    "reportText"
+})
+public class SystemReturnCodeType {
+
+    @XmlElement(name = "ReturnCode", namespace = "http://www.ebics.org/H000";, 
required = true)
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    @XmlSchemaType(name = "token")
+    protected String returnCode;
+    @XmlElement(name = "ReportText", namespace = "http://www.ebics.org/H000";, 
required = true)
+    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
+    @XmlSchemaType(name = "normalizedString")
+    protected String reportText;
+
+    /**
+     * Gets the value of the returnCode property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getReturnCode() {
+        return returnCode;
+    }
+
+    /**
+     * Sets the value of the returnCode property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setReturnCode(String value) {
+        this.returnCode = value;
+    }
+
+    /**
+     * Gets the value of the reportText property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getReportText() {
+        return reportText;
+    }
+
+    /**
+     * Sets the value of the reportText property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setReportText(String value) {
+        this.reportText = value;
+    }
+
+}

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]