summaryrefslogtreecommitdiff
path: root/STALService/src/main/java/at/gv/egiz
diff options
context:
space:
mode:
Diffstat (limited to 'STALService/src/main/java/at/gv/egiz')
-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;
* <complexType>
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
- * <attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * <attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" />
* </extension>
* </simpleContent>
* </complexType>
@@ -133,7 +130,8 @@ public class GetHashDataInputResponseType {
* <complexType>
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
- * <attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}ID" />
+ * <attribute name="ID" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" />
* </extension>
* </simpleContent>
* </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;
+ }
+
}
}