summaryrefslogtreecommitdiff
path: root/STALService/src/main/java/at
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-09-05 13:39:53 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-09-05 13:39:53 +0000
commit35b64892bad13c846f19260311c7625d88cef7a1 (patch)
tree74c75defa47102ea3abc434bedd9df3dc67ff59a /STALService/src/main/java/at
parent146f204a81af9ea52de889c7f4c07d4a0ec22333 (diff)
downloadmocca-35b64892bad13c846f19260311c7625d88cef7a1.tar.gz
mocca-35b64892bad13c846f19260311c7625d88cef7a1.tar.bz2
mocca-35b64892bad13c846f19260311c7625d88cef7a1.zip
HashDataInput
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@23 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'STALService/src/main/java/at')
-rw-r--r--STALService/src/main/java/at/gv/egiz/stal/impl/ByteArrayHashDataInput.java47
-rw-r--r--STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputResponseType.java39
2 files changed, 77 insertions, 9 deletions
diff --git a/STALService/src/main/java/at/gv/egiz/stal/impl/ByteArrayHashDataInput.java b/STALService/src/main/java/at/gv/egiz/stal/impl/ByteArrayHashDataInput.java
new file mode 100644
index 00000000..1f6e7935
--- /dev/null
+++ b/STALService/src/main/java/at/gv/egiz/stal/impl/ByteArrayHashDataInput.java
@@ -0,0 +1,47 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package at.gv.egiz.stal.impl;
+
+import at.gv.egiz.stal.HashDataInput;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+/**
+ *
+ * @author clemens
+ */
+public class ByteArrayHashDataInput implements HashDataInput {
+
+ protected byte[] hashData;
+ protected String id;
+ protected String mimeType;
+
+ public ByteArrayHashDataInput(byte[] hashData, String id, String mimeType) {
+ if (hashData == null) {
+ throw new NullPointerException("HashDataInput not provided.");
+ }
+ this.hashData = hashData;
+ this.id = id;
+ this.mimeType = mimeType;
+ }
+
+ @Override
+ public String getReferenceId() {
+ return id;
+ }
+
+ @Override
+ public String getMimeType() {
+ return mimeType;
+ }
+
+ @Override
+ public InputStream getHashDataInput() {
+ return new ByteArrayInputStream(hashData);
+ }
+
+
+}
diff --git a/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputResponseType.java b/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputResponseType.java
index b5f24030..cf8545e9 100644
--- a/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputResponseType.java
+++ b/STALService/src/main/java/at/gv/egiz/stal/service/GetHashDataInputResponseType.java
@@ -23,12 +23,8 @@ import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlID;
-import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
@@ -45,7 +41,8 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
* &lt;complexType>
* &lt;simpleContent>
* &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>base64Binary">
- * &lt;attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * &lt;attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * &lt;attribute name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;/extension>
* &lt;/simpleContent>
* &lt;/complexType>
@@ -133,7 +130,8 @@ public class GetHashDataInputResponseType {
* &lt;complexType>
* &lt;simpleContent>
* &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>base64Binary">
- * &lt;attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * &lt;attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * &lt;attribute name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;/extension>
* &lt;/simpleContent>
* &lt;/complexType>
@@ -150,10 +148,9 @@ public class GetHashDataInputResponseType {
@XmlValue
protected byte[] value;
@XmlAttribute(name = "ID")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- @XmlID
- @XmlSchemaType(name = "ID")
protected String id;
+ @XmlAttribute(name = "MimeType")
+ protected String mimeType;
/**
* Gets the value of the value property.
@@ -201,6 +198,30 @@ public class GetHashDataInputResponseType {
this.id = value;
}
+ /**
+ * Gets the value of the mimeType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMimeType() {
+ return mimeType;
+ }
+
+ /**
+ * Sets the value of the mimeType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMimeType(String value) {
+ this.mimeType = value;
+ }
+
}
}