diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/AcceptedFileFormatType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/AcceptedFileFormatType.java
new file mode 100755
index 00000000000..31c0a38a1d0
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/AcceptedFileFormatType.java
@@ -0,0 +1,72 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlEnum;
+import jakarta.xml.bind.annotation.XmlEnumValue;
+import jakarta.xml.bind.annotation.XmlType;
+
+
+/**
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
action;
+
+ /**
+ * Gets the value of the action property.
+ *
+ *
+ * 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 set
method for the action property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getAction().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link ActionType }
+ *
+ *
+ */
+ public List getAction() {
+ if (action == null) {
+ action = new ArrayList();
+ }
+ return this.action;
+ }
+
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/CharacterSetType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/CharacterSetType.java
new file mode 100755
index 00000000000..d6b901fc7a1
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/CharacterSetType.java
@@ -0,0 +1,51 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlEnum;
+import jakarta.xml.bind.annotation.XmlEnumValue;
+import jakarta.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for CharacterSetType.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <simpleType name="CharacterSetType">
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ * <enumeration value="UTF-8"/>
+ * <enumeration value="ISO-8859-1"/>
+ * </restriction>
+ * </simpleType>
+ *
+ *
+ */
+@XmlType(name = "CharacterSetType")
+@XmlEnum
+public enum CharacterSetType {
+
+ @XmlEnumValue("UTF-8")
+ UTF_8("UTF-8"),
+ @XmlEnumValue("ISO-8859-1")
+ ISO_8859_1("ISO-8859-1");
+ private final String value;
+
+ CharacterSetType(String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static CharacterSetType fromValue(String v) {
+ for (CharacterSetType c: CharacterSetType.values()) {
+ if (c.value.equals(v)) {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/DisclosureLevelType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/DisclosureLevelType.java
new file mode 100755
index 00000000000..5a868d667c5
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/DisclosureLevelType.java
@@ -0,0 +1,57 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlEnum;
+import jakarta.xml.bind.annotation.XmlEnumValue;
+import jakarta.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for DisclosureLevelType.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <simpleType name="DisclosureLevelType">
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ * <enumeration value="Public"/>
+ * <enumeration value="Internal"/>
+ * <enumeration value="Confidential"/>
+ * <enumeration value="Secret"/>
+ * </restriction>
+ * </simpleType>
+ *
+ *
+ */
+@XmlType(name = "DisclosureLevelType", namespace = "http://www.avaintec.com/2004/records-schedule-fi/1.0")
+@XmlEnum
+public enum DisclosureLevelType {
+
+ @XmlEnumValue("Public")
+ PUBLIC("Public"),
+ @XmlEnumValue("Internal")
+ INTERNAL("Internal"),
+ @XmlEnumValue("Confidential")
+ CONFIDENTIAL("Confidential"),
+ @XmlEnumValue("Secret")
+ SECRET("Secret");
+ private final String value;
+
+ DisclosureLevelType(String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static DisclosureLevelType fromValue(String v) {
+ for (DisclosureLevelType c: DisclosureLevelType.values()) {
+ if (c.value.equals(v)) {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/DisclosurePolicyType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/DisclosurePolicyType.java
new file mode 100755
index 00000000000..7cee50e41ee
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/DisclosurePolicyType.java
@@ -0,0 +1,118 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlSchemaType;
+import jakarta.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for DisclosurePolicyType complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="DisclosurePolicyType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="disclosureLevel" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}DisclosureLevelType"/>
+ * <element name="disclosureReason" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="disclosurePeriod" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "DisclosurePolicyType", namespace = "http://www.avaintec.com/2004/records-schedule-fi/1.0", propOrder = {
+ "disclosureLevel",
+ "disclosureReason",
+ "disclosurePeriod"
+})
+public class DisclosurePolicyType {
+
+ @XmlElement(required = true)
+ @XmlSchemaType(name = "string")
+ protected DisclosureLevelType disclosureLevel;
+ protected String disclosureReason;
+ protected String disclosurePeriod;
+
+ /**
+ * Gets the value of the disclosureLevel property.
+ *
+ * @return
+ * possible object is
+ * {@link DisclosureLevelType }
+ *
+ */
+ public DisclosureLevelType getDisclosureLevel() {
+ return disclosureLevel;
+ }
+
+ /**
+ * Sets the value of the disclosureLevel property.
+ *
+ * @param value
+ * allowed object is
+ * {@link DisclosureLevelType }
+ *
+ */
+ public void setDisclosureLevel(DisclosureLevelType value) {
+ this.disclosureLevel = value;
+ }
+
+ /**
+ * Gets the value of the disclosureReason property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDisclosureReason() {
+ return disclosureReason;
+ }
+
+ /**
+ * Sets the value of the disclosureReason property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDisclosureReason(String value) {
+ this.disclosureReason = value;
+ }
+
+ /**
+ * Gets the value of the disclosurePeriod property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDisclosurePeriod() {
+ return disclosurePeriod;
+ }
+
+ /**
+ * Sets the value of the disclosurePeriod property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDisclosurePeriod(String value) {
+ this.disclosurePeriod = value;
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/ExtendedMetadataType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/ExtendedMetadataType.java
new file mode 100755
index 00000000000..1d1d21a1e4b
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/ExtendedMetadataType.java
@@ -0,0 +1,71 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import java.util.ArrayList;
+import java.util.List;
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlAnyElement;
+import jakarta.xml.bind.annotation.XmlType;
+import org.w3c.dom.Element;
+
+
+/**
+ * Java class for ExtendedMetadataType complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="ExtendedMetadataType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ExtendedMetadataType", propOrder = {
+ "any"
+})
+public class ExtendedMetadataType {
+
+ @XmlAnyElement(lax = true)
+ protected List any;
+
+ /**
+ * Gets the value of the any property.
+ *
+ *
+ * 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 set
method for the any property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getAny().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link Element }
+ * {@link Object }
+ *
+ *
+ */
+ public List getAny() {
+ if (any == null) {
+ any = new ArrayList();
+ }
+ return this.any;
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/HistoryEventType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/HistoryEventType.java
new file mode 100755
index 00000000000..09bcb998805
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/HistoryEventType.java
@@ -0,0 +1,336 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlAnyElement;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlSchemaType;
+import jakarta.xml.bind.annotation.XmlType;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+
+/**
+ * Java class for historyEventType complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="historyEventType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="eventDateTime" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
+ * <element name="eventType" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="eventTxId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="eventAgent">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * <element name="precedingState" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="eventDetails">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "historyEventType", propOrder = {
+ "eventDateTime",
+ "eventType",
+ "eventTxId",
+ "eventAgent",
+ "precedingState",
+ "eventDetails"
+})
+public class HistoryEventType {
+
+ @XmlElement(required = true)
+ @XmlSchemaType(name = "dateTime")
+ protected XMLGregorianCalendar eventDateTime;
+ @XmlElement(required = true)
+ protected String eventType;
+ @XmlElement(required = true)
+ protected String eventTxId;
+ @XmlElement(required = true)
+ protected HistoryEventType.EventAgent eventAgent;
+ @XmlElement(required = true)
+ protected String precedingState;
+ @XmlElement(required = true)
+ protected HistoryEventType.EventDetails eventDetails;
+
+ /**
+ * Gets the value of the eventDateTime property.
+ *
+ * @return
+ * possible object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public XMLGregorianCalendar getEventDateTime() {
+ return eventDateTime;
+ }
+
+ /**
+ * Sets the value of the eventDateTime property.
+ *
+ * @param value
+ * allowed object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public void setEventDateTime(XMLGregorianCalendar value) {
+ this.eventDateTime = value;
+ }
+
+ /**
+ * Gets the value of the eventType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEventType() {
+ return eventType;
+ }
+
+ /**
+ * Sets the value of the eventType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEventType(String value) {
+ this.eventType = value;
+ }
+
+ /**
+ * Gets the value of the eventTxId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEventTxId() {
+ return eventTxId;
+ }
+
+ /**
+ * Sets the value of the eventTxId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEventTxId(String value) {
+ this.eventTxId = value;
+ }
+
+ /**
+ * Gets the value of the eventAgent property.
+ *
+ * @return
+ * possible object is
+ * {@link HistoryEventType.EventAgent }
+ *
+ */
+ public HistoryEventType.EventAgent getEventAgent() {
+ return eventAgent;
+ }
+
+ /**
+ * Sets the value of the eventAgent property.
+ *
+ * @param value
+ * allowed object is
+ * {@link HistoryEventType.EventAgent }
+ *
+ */
+ public void setEventAgent(HistoryEventType.EventAgent value) {
+ this.eventAgent = value;
+ }
+
+ /**
+ * Gets the value of the precedingState property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPrecedingState() {
+ return precedingState;
+ }
+
+ /**
+ * Sets the value of the precedingState property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPrecedingState(String value) {
+ this.precedingState = value;
+ }
+
+ /**
+ * Gets the value of the eventDetails property.
+ *
+ * @return
+ * possible object is
+ * {@link HistoryEventType.EventDetails }
+ *
+ */
+ public HistoryEventType.EventDetails getEventDetails() {
+ return eventDetails;
+ }
+
+ /**
+ * Sets the value of the eventDetails property.
+ *
+ * @param value
+ * allowed object is
+ * {@link HistoryEventType.EventDetails }
+ *
+ */
+ public void setEventDetails(HistoryEventType.EventDetails value) {
+ this.eventDetails = value;
+ }
+
+
+ /**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "any"
+ })
+ public static class EventAgent {
+
+ @XmlAnyElement(lax = true)
+ protected Object any;
+
+ /**
+ * Gets the value of the any property.
+ *
+ * @return
+ * possible object is
+ * {@link Object }
+ *
+ */
+ public Object getAny() {
+ return any;
+ }
+
+ /**
+ * Sets the value of the any property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Object }
+ *
+ */
+ public void setAny(Object value) {
+ this.any = value;
+ }
+
+ }
+
+
+ /**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "any"
+ })
+ public static class EventDetails {
+
+ @XmlAnyElement(lax = true)
+ protected Object any;
+
+ /**
+ * Gets the value of the any property.
+ *
+ * @return
+ * possible object is
+ * {@link Object }
+ *
+ */
+ public Object getAny() {
+ return any;
+ }
+
+ /**
+ * Sets the value of the any property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Object }
+ *
+ */
+ public void setAny(Object value) {
+ this.any = value;
+ }
+
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/InformationSecurityLevelType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/InformationSecurityLevelType.java
new file mode 100755
index 00000000000..ffeb4532b04
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/InformationSecurityLevelType.java
@@ -0,0 +1,60 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlEnum;
+import jakarta.xml.bind.annotation.XmlEnumValue;
+import jakarta.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for InformationSecurityLevelType.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <simpleType name="InformationSecurityLevelType">
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ * <enumeration value="ST I"/>
+ * <enumeration value="ST II"/>
+ * <enumeration value="ST III"/>
+ * <enumeration value="ST IV"/>
+ * <enumeration value="Unclassified"/>
+ * </restriction>
+ * </simpleType>
+ *
+ *
+ */
+@XmlType(name = "InformationSecurityLevelType", namespace = "http://www.avaintec.com/2004/records-schedule-fi/1.0")
+@XmlEnum
+public enum InformationSecurityLevelType {
+
+ @XmlEnumValue("ST I")
+ ST_I("ST I"),
+ @XmlEnumValue("ST II")
+ ST_II("ST II"),
+ @XmlEnumValue("ST III")
+ ST_III("ST III"),
+ @XmlEnumValue("ST IV")
+ ST_IV("ST IV"),
+ @XmlEnumValue("Unclassified")
+ UNCLASSIFIED("Unclassified");
+ private final String value;
+
+ InformationSecurityLevelType(String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static InformationSecurityLevelType fromValue(String v) {
+ for (InformationSecurityLevelType c: InformationSecurityLevelType.values()) {
+ if (c.value.equals(v)) {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/InformationSecurityPolicyType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/InformationSecurityPolicyType.java
new file mode 100755
index 00000000000..7d8687800ba
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/InformationSecurityPolicyType.java
@@ -0,0 +1,118 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlSchemaType;
+import jakarta.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for InformationSecurityPolicyType complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="InformationSecurityPolicyType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="securityLevel" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}InformationSecurityLevelType"/>
+ * <element name="securityReason" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="securityPeriod" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "InformationSecurityPolicyType", namespace = "http://www.avaintec.com/2004/records-schedule-fi/1.0", propOrder = {
+ "securityLevel",
+ "securityReason",
+ "securityPeriod"
+})
+public class InformationSecurityPolicyType {
+
+ @XmlElement(required = true)
+ @XmlSchemaType(name = "string")
+ protected InformationSecurityLevelType securityLevel;
+ protected String securityReason;
+ protected String securityPeriod;
+
+ /**
+ * Gets the value of the securityLevel property.
+ *
+ * @return
+ * possible object is
+ * {@link InformationSecurityLevelType }
+ *
+ */
+ public InformationSecurityLevelType getSecurityLevel() {
+ return securityLevel;
+ }
+
+ /**
+ * Sets the value of the securityLevel property.
+ *
+ * @param value
+ * allowed object is
+ * {@link InformationSecurityLevelType }
+ *
+ */
+ public void setSecurityLevel(InformationSecurityLevelType value) {
+ this.securityLevel = value;
+ }
+
+ /**
+ * Gets the value of the securityReason property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSecurityReason() {
+ return securityReason;
+ }
+
+ /**
+ * Sets the value of the securityReason property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSecurityReason(String value) {
+ this.securityReason = value;
+ }
+
+ /**
+ * Gets the value of the securityPeriod property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSecurityPeriod() {
+ return securityPeriod;
+ }
+
+ /**
+ * Sets the value of the securityPeriod property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSecurityPeriod(String value) {
+ this.securityPeriod = value;
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/MetadataMasterVersionType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/MetadataMasterVersionType.java
new file mode 100755
index 00000000000..daa8da27069
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/MetadataMasterVersionType.java
@@ -0,0 +1,90 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for metadataMasterVersionType complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="metadataMasterVersionType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="masterName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="versionNumber" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "metadataMasterVersionType", propOrder = {
+ "masterName",
+ "versionNumber"
+})
+public class MetadataMasterVersionType {
+
+ @XmlElement(required = true)
+ protected String masterName;
+ @XmlElement(required = true)
+ protected String versionNumber;
+
+ /**
+ * Gets the value of the masterName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMasterName() {
+ return masterName;
+ }
+
+ /**
+ * Sets the value of the masterName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMasterName(String value) {
+ this.masterName = value;
+ }
+
+ /**
+ * Gets the value of the versionNumber property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVersionNumber() {
+ return versionNumber;
+ }
+
+ /**
+ * Sets the value of the versionNumber property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVersionNumber(String value) {
+ this.versionNumber = value;
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/ObjectFactory.java b/service/src/main/java/fi/espoo/evaka/sarma/model/ObjectFactory.java
new file mode 100755
index 00000000000..d74d48d999f
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/ObjectFactory.java
@@ -0,0 +1,256 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the fi.espoo.evaka.sarma.model package.
+ * 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 {
+
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: fi.espoo.evaka.sarma.model
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link CaseFileType }
+ *
+ */
+ public CaseFileType createCaseFileType() {
+ return new CaseFileType();
+ }
+
+ /**
+ * Create an instance of {@link HistoryEventType }
+ *
+ */
+ public HistoryEventType createHistoryEventType() {
+ return new HistoryEventType();
+ }
+
+ /**
+ * Create an instance of {@link StandardMetadataType }
+ *
+ */
+ public StandardMetadataType createStandardMetadataType() {
+ return new StandardMetadataType();
+ }
+
+ /**
+ * Create an instance of {@link StandardMetadataType.Relations }
+ *
+ */
+ public StandardMetadataType.Relations createStandardMetadataTypeRelations() {
+ return new StandardMetadataType.Relations();
+ }
+
+ /**
+ * Create an instance of {@link StandardMetadataType.DocumentDescription }
+ *
+ */
+ public StandardMetadataType.DocumentDescription createStandardMetadataTypeDocumentDescription() {
+ return new StandardMetadataType.DocumentDescription();
+ }
+
+ /**
+ * Create an instance of {@link RecordMetadataInstance }
+ *
+ */
+ public RecordMetadataInstance createRecordMetadataInstance() {
+ return new RecordMetadataInstance();
+ }
+
+ /**
+ * Create an instance of {@link ExtendedMetadataType }
+ *
+ */
+ public ExtendedMetadataType createExtendedMetadataType() {
+ return new ExtendedMetadataType();
+ }
+
+ /**
+ * Create an instance of {@link MetadataMasterVersionType }
+ *
+ */
+ public MetadataMasterVersionType createMetadataMasterVersionType() {
+ return new MetadataMasterVersionType();
+ }
+
+ /**
+ * Create an instance of {@link TimePeriodType }
+ *
+ */
+ public TimePeriodType createTimePeriodType() {
+ return new TimePeriodType();
+ }
+
+ /**
+ * Create an instance of {@link AgentType }
+ *
+ */
+ public AgentType createAgentType() {
+ return new AgentType();
+ }
+
+ /**
+ * Create an instance of {@link AccessRightType }
+ *
+ */
+ public AccessRightType createAccessRightType() {
+ return new AccessRightType();
+ }
+
+ /**
+ * Create an instance of {@link ActionType }
+ *
+ */
+ public ActionType createActionType() {
+ return new ActionType();
+ }
+
+ /**
+ * Create an instance of {@link RetentionPolicyType }
+ *
+ */
+ public RetentionPolicyType createRetentionPolicyType() {
+ return new RetentionPolicyType();
+ }
+
+ /**
+ * Create an instance of {@link DisclosurePolicyType }
+ *
+ */
+ public DisclosurePolicyType createDisclosurePolicyType() {
+ return new DisclosurePolicyType();
+ }
+
+ /**
+ * Create an instance of {@link InformationSecurityPolicyType }
+ *
+ */
+ public InformationSecurityPolicyType createInformationSecurityPolicyType() {
+ return new InformationSecurityPolicyType();
+ }
+
+ /**
+ * Create an instance of {@link ProtectionPolicyType }
+ *
+ */
+ public ProtectionPolicyType createProtectionPolicyType() {
+ return new ProtectionPolicyType();
+ }
+
+ /**
+ * Create an instance of {@link CaseFileType.CaseActions }
+ *
+ */
+ public CaseFileType.CaseActions createCaseFileTypeCaseActions() {
+ return new CaseFileType.CaseActions();
+ }
+
+ /**
+ * Create an instance of {@link HistoryEventType.EventAgent }
+ *
+ */
+ public HistoryEventType.EventAgent createHistoryEventTypeEventAgent() {
+ return new HistoryEventType.EventAgent();
+ }
+
+ /**
+ * Create an instance of {@link HistoryEventType.EventDetails }
+ *
+ */
+ public HistoryEventType.EventDetails createHistoryEventTypeEventDetails() {
+ return new HistoryEventType.EventDetails();
+ }
+
+ /**
+ * Create an instance of {@link StandardMetadataType.RecordIdentifiers }
+ *
+ */
+ public StandardMetadataType.RecordIdentifiers createStandardMetadataTypeRecordIdentifiers() {
+ return new StandardMetadataType.RecordIdentifiers();
+ }
+
+ /**
+ * Create an instance of {@link StandardMetadataType.Format }
+ *
+ */
+ public StandardMetadataType.Format createStandardMetadataTypeFormat() {
+ return new StandardMetadataType.Format();
+ }
+
+ /**
+ * Create an instance of {@link StandardMetadataType.Status }
+ *
+ */
+ public StandardMetadataType.Status createStandardMetadataTypeStatus() {
+ return new StandardMetadataType.Status();
+ }
+
+ /**
+ * Create an instance of {@link StandardMetadataType.Creation }
+ *
+ */
+ public StandardMetadataType.Creation createStandardMetadataTypeCreation() {
+ return new StandardMetadataType.Creation();
+ }
+
+ /**
+ * Create an instance of {@link StandardMetadataType.Disposition }
+ *
+ */
+ public StandardMetadataType.Disposition createStandardMetadataTypeDisposition() {
+ return new StandardMetadataType.Disposition();
+ }
+
+ /**
+ * Create an instance of {@link StandardMetadataType.Policies }
+ *
+ */
+ public StandardMetadataType.Policies createStandardMetadataTypePolicies() {
+ return new StandardMetadataType.Policies();
+ }
+
+ /**
+ * Create an instance of {@link StandardMetadataType.History }
+ *
+ */
+ public StandardMetadataType.History createStandardMetadataTypeHistory() {
+ return new StandardMetadataType.History();
+ }
+
+ /**
+ * Create an instance of {@link StandardMetadataType.Relations.Relation }
+ *
+ */
+ public StandardMetadataType.Relations.Relation createStandardMetadataTypeRelationsRelation() {
+ return new StandardMetadataType.Relations.Relation();
+ }
+
+ /**
+ * Create an instance of {@link StandardMetadataType.DocumentDescription.Agents }
+ *
+ */
+ public StandardMetadataType.DocumentDescription.Agents createStandardMetadataTypeDocumentDescriptionAgents() {
+ return new StandardMetadataType.DocumentDescription.Agents();
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/PersonalDataType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/PersonalDataType.java
new file mode 100755
index 00000000000..24528341538
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/PersonalDataType.java
@@ -0,0 +1,57 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlEnum;
+import jakarta.xml.bind.annotation.XmlEnumValue;
+import jakarta.xml.bind.annotation.XmlType;
+
+
+/**
+ *
Java class for personalDataType.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <simpleType name="personalDataType">
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ * <enumeration value="noPersonalInformation"/>
+ * <enumeration value="containsPersonalInformation"/>
+ * <enumeration value="containsSensitivePersonalInformation"/>
+ * <enumeration value="containsInformationOnCriminalConvictionsAndOffenses"/>
+ * </restriction>
+ * </simpleType>
+ *
+ *
+ */
+@XmlType(name = "personalDataType")
+@XmlEnum
+public enum PersonalDataType {
+
+ @XmlEnumValue("noPersonalInformation")
+ NO_PERSONAL_INFORMATION("noPersonalInformation"),
+ @XmlEnumValue("containsPersonalInformation")
+ CONTAINS_PERSONAL_INFORMATION("containsPersonalInformation"),
+ @XmlEnumValue("containsSensitivePersonalInformation")
+ CONTAINS_SENSITIVE_PERSONAL_INFORMATION("containsSensitivePersonalInformation"),
+ @XmlEnumValue("containsInformationOnCriminalConvictionsAndOffenses")
+ CONTAINS_INFORMATION_ON_CRIMINAL_CONVICTIONS_AND_OFFENSES("containsInformationOnCriminalConvictionsAndOffenses");
+ private final String value;
+
+ PersonalDataType(String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static PersonalDataType fromValue(String v) {
+ for (PersonalDataType c: PersonalDataType.values()) {
+ if (c.value.equals(v)) {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/ProtectionLevelType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/ProtectionLevelType.java
new file mode 100755
index 00000000000..adcebbf592b
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/ProtectionLevelType.java
@@ -0,0 +1,54 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlEnum;
+import jakarta.xml.bind.annotation.XmlEnumValue;
+import jakarta.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for ProtectionLevelType.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <simpleType name="ProtectionLevelType">
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ * <enumeration value="Basic"/>
+ * <enumeration value="Enhanced"/>
+ * <enumeration value="High"/>
+ * </restriction>
+ * </simpleType>
+ *
+ *
+ */
+@XmlType(name = "ProtectionLevelType", namespace = "http://www.avaintec.com/2004/records-schedule-fi/1.0")
+@XmlEnum
+public enum ProtectionLevelType {
+
+ @XmlEnumValue("Basic")
+ BASIC("Basic"),
+ @XmlEnumValue("Enhanced")
+ ENHANCED("Enhanced"),
+ @XmlEnumValue("High")
+ HIGH("High");
+ private final String value;
+
+ ProtectionLevelType(String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static ProtectionLevelType fromValue(String v) {
+ for (ProtectionLevelType c: ProtectionLevelType.values()) {
+ if (c.value.equals(v)) {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/ProtectionPolicyType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/ProtectionPolicyType.java
new file mode 100755
index 00000000000..477d055075e
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/ProtectionPolicyType.java
@@ -0,0 +1,118 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlSchemaType;
+import jakarta.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for ProtectionPolicyType complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="ProtectionPolicyType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="protectionLevel" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}ProtectionLevelType"/>
+ * <element name="protectionReason" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="protectionMeasures" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ProtectionPolicyType", namespace = "http://www.avaintec.com/2004/records-schedule-fi/1.0", propOrder = {
+ "protectionLevel",
+ "protectionReason",
+ "protectionMeasures"
+})
+public class ProtectionPolicyType {
+
+ @XmlElement(required = true)
+ @XmlSchemaType(name = "string")
+ protected ProtectionLevelType protectionLevel;
+ protected String protectionReason;
+ protected String protectionMeasures;
+
+ /**
+ * Gets the value of the protectionLevel property.
+ *
+ * @return
+ * possible object is
+ * {@link ProtectionLevelType }
+ *
+ */
+ public ProtectionLevelType getProtectionLevel() {
+ return protectionLevel;
+ }
+
+ /**
+ * Sets the value of the protectionLevel property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ProtectionLevelType }
+ *
+ */
+ public void setProtectionLevel(ProtectionLevelType value) {
+ this.protectionLevel = value;
+ }
+
+ /**
+ * Gets the value of the protectionReason property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getProtectionReason() {
+ return protectionReason;
+ }
+
+ /**
+ * Sets the value of the protectionReason property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setProtectionReason(String value) {
+ this.protectionReason = value;
+ }
+
+ /**
+ * Gets the value of the protectionMeasures property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getProtectionMeasures() {
+ return protectionMeasures;
+ }
+
+ /**
+ * Sets the value of the protectionMeasures property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setProtectionMeasures(String value) {
+ this.protectionMeasures = value;
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/RecordMetadataInstance.java b/service/src/main/java/fi/espoo/evaka/sarma/model/RecordMetadataInstance.java
new file mode 100755
index 00000000000..9fb1330eae8
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/RecordMetadataInstance.java
@@ -0,0 +1,92 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlRootElement;
+import jakarta.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="StandardMetadata" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}StandardMetadataType"/>
+ * <element name="ExtendedMetadata" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}ExtendedMetadataType" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "standardMetadata",
+ "extendedMetadata"
+})
+@XmlRootElement(name = "RecordMetadataInstance")
+public class RecordMetadataInstance {
+
+ @XmlElement(name = "StandardMetadata", required = true)
+ protected StandardMetadataType standardMetadata;
+ @XmlElement(name = "ExtendedMetadata")
+ protected ExtendedMetadataType extendedMetadata;
+
+ /**
+ * Gets the value of the standardMetadata property.
+ *
+ * @return
+ * possible object is
+ * {@link StandardMetadataType }
+ *
+ */
+ public StandardMetadataType getStandardMetadata() {
+ return standardMetadata;
+ }
+
+ /**
+ * Sets the value of the standardMetadata property.
+ *
+ * @param value
+ * allowed object is
+ * {@link StandardMetadataType }
+ *
+ */
+ public void setStandardMetadata(StandardMetadataType value) {
+ this.standardMetadata = value;
+ }
+
+ /**
+ * Gets the value of the extendedMetadata property.
+ *
+ * @return
+ * possible object is
+ * {@link ExtendedMetadataType }
+ *
+ */
+ public ExtendedMetadataType getExtendedMetadata() {
+ return extendedMetadata;
+ }
+
+ /**
+ * Sets the value of the extendedMetadata property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ExtendedMetadataType }
+ *
+ */
+ public void setExtendedMetadata(ExtendedMetadataType value) {
+ this.extendedMetadata = value;
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/RelationTypeType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/RelationTypeType.java
new file mode 100755
index 00000000000..a71925bf22e
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/RelationTypeType.java
@@ -0,0 +1,102 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlEnum;
+import jakarta.xml.bind.annotation.XmlEnumValue;
+import jakarta.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for relationTypeType.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <simpleType name="relationTypeType">
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ * <enumeration value="isFormatOf"/>
+ * <enumeration value="hasFormat"/>
+ * <enumeration value="isPartOf"/>
+ * <enumeration value="hasPart"/>
+ * <enumeration value="isRedactionOf"/>
+ * <enumeration value="hasRedaction"/>
+ * <enumeration value="isReferencedBy"/>
+ * <enumeration value="references"/>
+ * <enumeration value="isReplacedBy"/>
+ * <enumeration value="replaces"/>
+ * <enumeration value="isRequiredBy"/>
+ * <enumeration value="requires"/>
+ * <enumeration value="isVersionOf"/>
+ * <enumeration value="hasVersion"/>
+ * <enumeration value="conformsTo"/>
+ * <enumeration value="hasAttachment"/>
+ * <enumeration value="isAttachmentOf"/>
+ * <enumeration value="hasSignature"/>
+ * <enumeration value="isSignatureOf"/>
+ * </restriction>
+ * </simpleType>
+ *
+ *
+ */
+@XmlType(name = "relationTypeType")
+@XmlEnum
+public enum RelationTypeType {
+
+ @XmlEnumValue("isFormatOf")
+ IS_FORMAT_OF("isFormatOf"),
+ @XmlEnumValue("hasFormat")
+ HAS_FORMAT("hasFormat"),
+ @XmlEnumValue("isPartOf")
+ IS_PART_OF("isPartOf"),
+ @XmlEnumValue("hasPart")
+ HAS_PART("hasPart"),
+ @XmlEnumValue("isRedactionOf")
+ IS_REDACTION_OF("isRedactionOf"),
+ @XmlEnumValue("hasRedaction")
+ HAS_REDACTION("hasRedaction"),
+ @XmlEnumValue("isReferencedBy")
+ IS_REFERENCED_BY("isReferencedBy"),
+ @XmlEnumValue("references")
+ REFERENCES("references"),
+ @XmlEnumValue("isReplacedBy")
+ IS_REPLACED_BY("isReplacedBy"),
+ @XmlEnumValue("replaces")
+ REPLACES("replaces"),
+ @XmlEnumValue("isRequiredBy")
+ IS_REQUIRED_BY("isRequiredBy"),
+ @XmlEnumValue("requires")
+ REQUIRES("requires"),
+ @XmlEnumValue("isVersionOf")
+ IS_VERSION_OF("isVersionOf"),
+ @XmlEnumValue("hasVersion")
+ HAS_VERSION("hasVersion"),
+ @XmlEnumValue("conformsTo")
+ CONFORMS_TO("conformsTo"),
+ @XmlEnumValue("hasAttachment")
+ HAS_ATTACHMENT("hasAttachment"),
+ @XmlEnumValue("isAttachmentOf")
+ IS_ATTACHMENT_OF("isAttachmentOf"),
+ @XmlEnumValue("hasSignature")
+ HAS_SIGNATURE("hasSignature"),
+ @XmlEnumValue("isSignatureOf")
+ IS_SIGNATURE_OF("isSignatureOf");
+ private final String value;
+
+ RelationTypeType(String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static RelationTypeType fromValue(String v) {
+ for (RelationTypeType c: RelationTypeType.values()) {
+ if (c.value.equals(v)) {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/ResourceTypeType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/ResourceTypeType.java
new file mode 100755
index 00000000000..4a703149672
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/ResourceTypeType.java
@@ -0,0 +1,51 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlEnum;
+import jakarta.xml.bind.annotation.XmlEnumValue;
+import jakarta.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for resourceTypeType.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <simpleType name="resourceTypeType">
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ * <enumeration value="digital"/>
+ * <enumeration value="physical"/>
+ * </restriction>
+ * </simpleType>
+ *
+ *
+ */
+@XmlType(name = "resourceTypeType")
+@XmlEnum
+public enum ResourceTypeType {
+
+ @XmlEnumValue("digital")
+ DIGITAL("digital"),
+ @XmlEnumValue("physical")
+ PHYSICAL("physical");
+ private final String value;
+
+ ResourceTypeType(String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static ResourceTypeType fromValue(String v) {
+ for (ResourceTypeType c: ResourceTypeType.values()) {
+ if (c.value.equals(v)) {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/RetentionPolicyType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/RetentionPolicyType.java
new file mode 100755
index 00000000000..67eddafdae7
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/RetentionPolicyType.java
@@ -0,0 +1,116 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlType;
+
+
+/**
+ * Java class for RetentionPolicyType complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="RetentionPolicyType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="retentionPeriod" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="retentionTrigger" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="retentionReason" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "RetentionPolicyType", namespace = "http://www.avaintec.com/2004/records-schedule-fi/1.0", propOrder = {
+ "retentionPeriod",
+ "retentionTrigger",
+ "retentionReason"
+})
+public class RetentionPolicyType {
+
+ @XmlElement(required = true)
+ protected String retentionPeriod;
+ protected String retentionTrigger;
+ protected String retentionReason;
+
+ /**
+ * Gets the value of the retentionPeriod property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRetentionPeriod() {
+ return retentionPeriod;
+ }
+
+ /**
+ * Sets the value of the retentionPeriod property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRetentionPeriod(String value) {
+ this.retentionPeriod = value;
+ }
+
+ /**
+ * Gets the value of the retentionTrigger property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRetentionTrigger() {
+ return retentionTrigger;
+ }
+
+ /**
+ * Sets the value of the retentionTrigger property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRetentionTrigger(String value) {
+ this.retentionTrigger = value;
+ }
+
+ /**
+ * Gets the value of the retentionReason property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRetentionReason() {
+ return retentionReason;
+ }
+
+ /**
+ * Sets the value of the retentionReason property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRetentionReason(String value) {
+ this.retentionReason = value;
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/StandardMetadataType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/StandardMetadataType.java
new file mode 100755
index 00000000000..fa54bc26e01
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/StandardMetadataType.java
@@ -0,0 +1,2225 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlSchemaType;
+import jakarta.xml.bind.annotation.XmlType;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+
+/**
+ * Java class for StandardMetadataType complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="StandardMetadataType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="metadataMasterVersion" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}metadataMasterVersionType"/>
+ * <element name="virtualArchiveId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="recordIdentifiers">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="CaseIdentifier" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="RecordIdentifier" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * <element name="documentDescription">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="title" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="otherId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="documentType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="documentTypeSpecifier" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="registerName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="firstName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="lastName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="socialSecurityNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="keywords" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="personalData" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}personalDataType" minOccurs="0"/>
+ * <element name="personalDataCollectionReason" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="relatedMaterial" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="transferMethod" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="language" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="dataManagement" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="dataSource" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="owner" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="signed" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+ * <element name="signer" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="SignatureDescription" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="accessRight" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}accessRightType" minOccurs="0"/>
+ * <element name="Agents" minOccurs="0">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="Agent" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}AgentType" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * <element name="format">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="recordType" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}resourceTypeType"/>
+ * <element name="mimeType" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}AcceptedMimeTypeType" minOccurs="0"/>
+ * <element name="characterSet" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}CharacterSetType" minOccurs="0"/>
+ * <element name="fileFormat" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}AcceptedFileFormatType" minOccurs="0"/>
+ * <element name="formatVersion" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="payloadSize" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
+ * <element name="fileName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * <element name="status" minOccurs="0">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="informationSecurityStatus" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}InformationSecurityLevelType" minOccurs="0"/>
+ * <element name="accessStatus" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}DisclosureLevelType" minOccurs="0"/>
+ * <element name="protectionStatus" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}ProtectionLevelType" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * <element name="creation" minOccurs="0">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="originatingSystem" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="created" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+ * <element name="dateReceived" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+ * <element name="lastModified" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * <element name="disposition" minOccurs="0">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="retentionPeriodEnd" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+ * <element name="disposalListRef" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * <element name="policies" minOccurs="0">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="retentionPolicy" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}RetentionPolicyType" minOccurs="0"/>
+ * <element name="disclosurePolicy" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}DisclosurePolicyType" minOccurs="0"/>
+ * <element name="informationSecurityPolicy" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}InformationSecurityPolicyType" minOccurs="0"/>
+ * <element name="protectionPolicy" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}ProtectionPolicyType" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * <element name="relations" minOccurs="0">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="relation" maxOccurs="unbounded" minOccurs="0">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="relationType" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}relationTypeType"/>
+ * <element name="target" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * <element name="history" minOccurs="0">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="event" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}historyEventType" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * <element name="CaseFile" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}caseFileType" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "StandardMetadataType", propOrder = {
+ "metadataMasterVersion",
+ "virtualArchiveId",
+ "recordIdentifiers",
+ "documentDescription",
+ "format",
+ "status",
+ "creation",
+ "disposition",
+ "policies",
+ "relations",
+ "history",
+ "caseFile"
+})
+public class StandardMetadataType {
+
+ @XmlElement(required = true)
+ protected MetadataMasterVersionType metadataMasterVersion;
+ @XmlElement(required = true)
+ protected String virtualArchiveId;
+ @XmlElement(required = true)
+ protected StandardMetadataType.RecordIdentifiers recordIdentifiers;
+ @XmlElement(required = true)
+ protected StandardMetadataType.DocumentDescription documentDescription;
+ @XmlElement(required = true)
+ protected StandardMetadataType.Format format;
+ protected StandardMetadataType.Status status;
+ protected StandardMetadataType.Creation creation;
+ protected StandardMetadataType.Disposition disposition;
+ protected StandardMetadataType.Policies policies;
+ protected StandardMetadataType.Relations relations;
+ protected StandardMetadataType.History history;
+ @XmlElement(name = "CaseFile")
+ protected CaseFileType caseFile;
+
+ /**
+ * Gets the value of the metadataMasterVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link MetadataMasterVersionType }
+ *
+ */
+ public MetadataMasterVersionType getMetadataMasterVersion() {
+ return metadataMasterVersion;
+ }
+
+ /**
+ * Sets the value of the metadataMasterVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link MetadataMasterVersionType }
+ *
+ */
+ public void setMetadataMasterVersion(MetadataMasterVersionType value) {
+ this.metadataMasterVersion = value;
+ }
+
+ /**
+ * Gets the value of the virtualArchiveId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVirtualArchiveId() {
+ return virtualArchiveId;
+ }
+
+ /**
+ * Sets the value of the virtualArchiveId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVirtualArchiveId(String value) {
+ this.virtualArchiveId = value;
+ }
+
+ /**
+ * Gets the value of the recordIdentifiers property.
+ *
+ * @return
+ * possible object is
+ * {@link StandardMetadataType.RecordIdentifiers }
+ *
+ */
+ public StandardMetadataType.RecordIdentifiers getRecordIdentifiers() {
+ return recordIdentifiers;
+ }
+
+ /**
+ * Sets the value of the recordIdentifiers property.
+ *
+ * @param value
+ * allowed object is
+ * {@link StandardMetadataType.RecordIdentifiers }
+ *
+ */
+ public void setRecordIdentifiers(StandardMetadataType.RecordIdentifiers value) {
+ this.recordIdentifiers = value;
+ }
+
+ /**
+ * Gets the value of the documentDescription property.
+ *
+ * @return
+ * possible object is
+ * {@link StandardMetadataType.DocumentDescription }
+ *
+ */
+ public StandardMetadataType.DocumentDescription getDocumentDescription() {
+ return documentDescription;
+ }
+
+ /**
+ * Sets the value of the documentDescription property.
+ *
+ * @param value
+ * allowed object is
+ * {@link StandardMetadataType.DocumentDescription }
+ *
+ */
+ public void setDocumentDescription(StandardMetadataType.DocumentDescription value) {
+ this.documentDescription = value;
+ }
+
+ /**
+ * Gets the value of the format property.
+ *
+ * @return
+ * possible object is
+ * {@link StandardMetadataType.Format }
+ *
+ */
+ public StandardMetadataType.Format getFormat() {
+ return format;
+ }
+
+ /**
+ * Sets the value of the format property.
+ *
+ * @param value
+ * allowed object is
+ * {@link StandardMetadataType.Format }
+ *
+ */
+ public void setFormat(StandardMetadataType.Format value) {
+ this.format = value;
+ }
+
+ /**
+ * Gets the value of the status property.
+ *
+ * @return
+ * possible object is
+ * {@link StandardMetadataType.Status }
+ *
+ */
+ public StandardMetadataType.Status getStatus() {
+ return status;
+ }
+
+ /**
+ * Sets the value of the status property.
+ *
+ * @param value
+ * allowed object is
+ * {@link StandardMetadataType.Status }
+ *
+ */
+ public void setStatus(StandardMetadataType.Status value) {
+ this.status = value;
+ }
+
+ /**
+ * Gets the value of the creation property.
+ *
+ * @return
+ * possible object is
+ * {@link StandardMetadataType.Creation }
+ *
+ */
+ public StandardMetadataType.Creation getCreation() {
+ return creation;
+ }
+
+ /**
+ * Sets the value of the creation property.
+ *
+ * @param value
+ * allowed object is
+ * {@link StandardMetadataType.Creation }
+ *
+ */
+ public void setCreation(StandardMetadataType.Creation value) {
+ this.creation = value;
+ }
+
+ /**
+ * Gets the value of the disposition property.
+ *
+ * @return
+ * possible object is
+ * {@link StandardMetadataType.Disposition }
+ *
+ */
+ public StandardMetadataType.Disposition getDisposition() {
+ return disposition;
+ }
+
+ /**
+ * Sets the value of the disposition property.
+ *
+ * @param value
+ * allowed object is
+ * {@link StandardMetadataType.Disposition }
+ *
+ */
+ public void setDisposition(StandardMetadataType.Disposition value) {
+ this.disposition = value;
+ }
+
+ /**
+ * Gets the value of the policies property.
+ *
+ * @return
+ * possible object is
+ * {@link StandardMetadataType.Policies }
+ *
+ */
+ public StandardMetadataType.Policies getPolicies() {
+ return policies;
+ }
+
+ /**
+ * Sets the value of the policies property.
+ *
+ * @param value
+ * allowed object is
+ * {@link StandardMetadataType.Policies }
+ *
+ */
+ public void setPolicies(StandardMetadataType.Policies value) {
+ this.policies = value;
+ }
+
+ /**
+ * Gets the value of the relations property.
+ *
+ * @return
+ * possible object is
+ * {@link StandardMetadataType.Relations }
+ *
+ */
+ public StandardMetadataType.Relations getRelations() {
+ return relations;
+ }
+
+ /**
+ * Sets the value of the relations property.
+ *
+ * @param value
+ * allowed object is
+ * {@link StandardMetadataType.Relations }
+ *
+ */
+ public void setRelations(StandardMetadataType.Relations value) {
+ this.relations = value;
+ }
+
+ /**
+ * Gets the value of the history property.
+ *
+ * @return
+ * possible object is
+ * {@link StandardMetadataType.History }
+ *
+ */
+ public StandardMetadataType.History getHistory() {
+ return history;
+ }
+
+ /**
+ * Sets the value of the history property.
+ *
+ * @param value
+ * allowed object is
+ * {@link StandardMetadataType.History }
+ *
+ */
+ public void setHistory(StandardMetadataType.History value) {
+ this.history = value;
+ }
+
+ /**
+ * Gets the value of the caseFile property.
+ *
+ * @return
+ * possible object is
+ * {@link CaseFileType }
+ *
+ */
+ public CaseFileType getCaseFile() {
+ return caseFile;
+ }
+
+ /**
+ * Sets the value of the caseFile property.
+ *
+ * @param value
+ * allowed object is
+ * {@link CaseFileType }
+ *
+ */
+ public void setCaseFile(CaseFileType value) {
+ this.caseFile = value;
+ }
+
+
+ /**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="originatingSystem" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="created" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+ * <element name="dateReceived" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+ * <element name="lastModified" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "originatingSystem",
+ "created",
+ "dateReceived",
+ "lastModified"
+ })
+ public static class Creation {
+
+ protected String originatingSystem;
+ @XmlSchemaType(name = "date")
+ protected XMLGregorianCalendar created;
+ @XmlSchemaType(name = "date")
+ protected XMLGregorianCalendar dateReceived;
+ @XmlSchemaType(name = "dateTime")
+ protected XMLGregorianCalendar lastModified;
+
+ /**
+ * Gets the value of the originatingSystem property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOriginatingSystem() {
+ return originatingSystem;
+ }
+
+ /**
+ * Sets the value of the originatingSystem property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOriginatingSystem(String value) {
+ this.originatingSystem = value;
+ }
+
+ /**
+ * Gets the value of the created property.
+ *
+ * @return
+ * possible object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public XMLGregorianCalendar getCreated() {
+ return created;
+ }
+
+ /**
+ * Sets the value of the created property.
+ *
+ * @param value
+ * allowed object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public void setCreated(XMLGregorianCalendar value) {
+ this.created = value;
+ }
+
+ /**
+ * Gets the value of the dateReceived property.
+ *
+ * @return
+ * possible object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public XMLGregorianCalendar getDateReceived() {
+ return dateReceived;
+ }
+
+ /**
+ * Sets the value of the dateReceived property.
+ *
+ * @param value
+ * allowed object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public void setDateReceived(XMLGregorianCalendar value) {
+ this.dateReceived = value;
+ }
+
+ /**
+ * Gets the value of the lastModified property.
+ *
+ * @return
+ * possible object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public XMLGregorianCalendar getLastModified() {
+ return lastModified;
+ }
+
+ /**
+ * Sets the value of the lastModified property.
+ *
+ * @param value
+ * allowed object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public void setLastModified(XMLGregorianCalendar value) {
+ this.lastModified = value;
+ }
+
+ }
+
+
+ /**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="retentionPeriodEnd" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+ * <element name="disposalListRef" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "retentionPeriodEnd",
+ "disposalListRef"
+ })
+ public static class Disposition {
+
+ @XmlSchemaType(name = "date")
+ protected XMLGregorianCalendar retentionPeriodEnd;
+ protected BigInteger disposalListRef;
+
+ /**
+ * Gets the value of the retentionPeriodEnd property.
+ *
+ * @return
+ * possible object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public XMLGregorianCalendar getRetentionPeriodEnd() {
+ return retentionPeriodEnd;
+ }
+
+ /**
+ * Sets the value of the retentionPeriodEnd property.
+ *
+ * @param value
+ * allowed object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public void setRetentionPeriodEnd(XMLGregorianCalendar value) {
+ this.retentionPeriodEnd = value;
+ }
+
+ /**
+ * Gets the value of the disposalListRef property.
+ *
+ * @return
+ * possible object is
+ * {@link BigInteger }
+ *
+ */
+ public BigInteger getDisposalListRef() {
+ return disposalListRef;
+ }
+
+ /**
+ * Sets the value of the disposalListRef property.
+ *
+ * @param value
+ * allowed object is
+ * {@link BigInteger }
+ *
+ */
+ public void setDisposalListRef(BigInteger value) {
+ this.disposalListRef = value;
+ }
+
+ }
+
+
+ /**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="title" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="otherId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="documentType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="documentTypeSpecifier" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="registerName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="firstName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="lastName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="socialSecurityNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="keywords" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="personalData" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}personalDataType" minOccurs="0"/>
+ * <element name="personalDataCollectionReason" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="relatedMaterial" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="transferMethod" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="language" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="dataManagement" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="dataSource" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="owner" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="signed" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+ * <element name="signer" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="SignatureDescription" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="accessRight" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}accessRightType" minOccurs="0"/>
+ * <element name="Agents" minOccurs="0">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="Agent" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}AgentType" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "title",
+ "otherId",
+ "documentType",
+ "documentTypeSpecifier",
+ "registerName",
+ "description",
+ "firstName",
+ "lastName",
+ "socialSecurityNumber",
+ "keywords",
+ "personalData",
+ "personalDataCollectionReason",
+ "relatedMaterial",
+ "transferMethod",
+ "language",
+ "dataManagement",
+ "dataSource",
+ "owner",
+ "signed",
+ "signer",
+ "signatureDescription",
+ "accessRight",
+ "agents"
+ })
+ public static class DocumentDescription {
+
+ @XmlElement(required = true)
+ protected String title;
+ protected String otherId;
+ protected String documentType;
+ protected String documentTypeSpecifier;
+ protected String registerName;
+ protected String description;
+ protected String firstName;
+ protected String lastName;
+ protected String socialSecurityNumber;
+ protected String keywords;
+ @XmlSchemaType(name = "string")
+ protected PersonalDataType personalData;
+ protected String personalDataCollectionReason;
+ protected String relatedMaterial;
+ protected String transferMethod;
+ protected String language;
+ protected String dataManagement;
+ protected String dataSource;
+ protected String owner;
+ @XmlSchemaType(name = "date")
+ protected XMLGregorianCalendar signed;
+ protected String signer;
+ @XmlElement(name = "SignatureDescription")
+ protected String signatureDescription;
+ protected AccessRightType accessRight;
+ @XmlElement(name = "Agents")
+ protected StandardMetadataType.DocumentDescription.Agents agents;
+
+ /**
+ * Gets the value of the title property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * Sets the value of the title property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTitle(String value) {
+ this.title = value;
+ }
+
+ /**
+ * Gets the value of the otherId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOtherId() {
+ return otherId;
+ }
+
+ /**
+ * Sets the value of the otherId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOtherId(String value) {
+ this.otherId = value;
+ }
+
+ /**
+ * Gets the value of the documentType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDocumentType() {
+ return documentType;
+ }
+
+ /**
+ * Sets the value of the documentType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDocumentType(String value) {
+ this.documentType = value;
+ }
+
+ /**
+ * Gets the value of the documentTypeSpecifier property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDocumentTypeSpecifier() {
+ return documentTypeSpecifier;
+ }
+
+ /**
+ * Sets the value of the documentTypeSpecifier property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDocumentTypeSpecifier(String value) {
+ this.documentTypeSpecifier = value;
+ }
+
+ /**
+ * Gets the value of the registerName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRegisterName() {
+ return registerName;
+ }
+
+ /**
+ * Sets the value of the registerName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRegisterName(String value) {
+ this.registerName = value;
+ }
+
+ /**
+ * Gets the value of the description property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Sets the value of the description property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDescription(String value) {
+ this.description = value;
+ }
+
+ /**
+ * Gets the value of the firstName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFirstName() {
+ return firstName;
+ }
+
+ /**
+ * Sets the value of the firstName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFirstName(String value) {
+ this.firstName = value;
+ }
+
+ /**
+ * Gets the value of the lastName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLastName() {
+ return lastName;
+ }
+
+ /**
+ * Sets the value of the lastName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLastName(String value) {
+ this.lastName = value;
+ }
+
+ /**
+ * Gets the value of the socialSecurityNumber property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSocialSecurityNumber() {
+ return socialSecurityNumber;
+ }
+
+ /**
+ * Sets the value of the socialSecurityNumber property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSocialSecurityNumber(String value) {
+ this.socialSecurityNumber = value;
+ }
+
+ /**
+ * Gets the value of the keywords property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getKeywords() {
+ return keywords;
+ }
+
+ /**
+ * Sets the value of the keywords property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setKeywords(String value) {
+ this.keywords = value;
+ }
+
+ /**
+ * Gets the value of the personalData property.
+ *
+ * @return
+ * possible object is
+ * {@link PersonalDataType }
+ *
+ */
+ public PersonalDataType getPersonalData() {
+ return personalData;
+ }
+
+ /**
+ * Sets the value of the personalData property.
+ *
+ * @param value
+ * allowed object is
+ * {@link PersonalDataType }
+ *
+ */
+ public void setPersonalData(PersonalDataType value) {
+ this.personalData = value;
+ }
+
+ /**
+ * Gets the value of the personalDataCollectionReason property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPersonalDataCollectionReason() {
+ return personalDataCollectionReason;
+ }
+
+ /**
+ * Sets the value of the personalDataCollectionReason property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPersonalDataCollectionReason(String value) {
+ this.personalDataCollectionReason = value;
+ }
+
+ /**
+ * Gets the value of the relatedMaterial property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRelatedMaterial() {
+ return relatedMaterial;
+ }
+
+ /**
+ * Sets the value of the relatedMaterial property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRelatedMaterial(String value) {
+ this.relatedMaterial = value;
+ }
+
+ /**
+ * Gets the value of the transferMethod property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTransferMethod() {
+ return transferMethod;
+ }
+
+ /**
+ * Sets the value of the transferMethod property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTransferMethod(String value) {
+ this.transferMethod = value;
+ }
+
+ /**
+ * Gets the value of the language property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLanguage() {
+ return language;
+ }
+
+ /**
+ * Sets the value of the language property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLanguage(String value) {
+ this.language = value;
+ }
+
+ /**
+ * Gets the value of the dataManagement property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDataManagement() {
+ return dataManagement;
+ }
+
+ /**
+ * Sets the value of the dataManagement property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDataManagement(String value) {
+ this.dataManagement = value;
+ }
+
+ /**
+ * Gets the value of the dataSource property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDataSource() {
+ return dataSource;
+ }
+
+ /**
+ * Sets the value of the dataSource property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDataSource(String value) {
+ this.dataSource = value;
+ }
+
+ /**
+ * Gets the value of the owner property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOwner() {
+ return owner;
+ }
+
+ /**
+ * Sets the value of the owner property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOwner(String value) {
+ this.owner = value;
+ }
+
+ /**
+ * Gets the value of the signed property.
+ *
+ * @return
+ * possible object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public XMLGregorianCalendar getSigned() {
+ return signed;
+ }
+
+ /**
+ * Sets the value of the signed property.
+ *
+ * @param value
+ * allowed object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public void setSigned(XMLGregorianCalendar value) {
+ this.signed = value;
+ }
+
+ /**
+ * Gets the value of the signer property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSigner() {
+ return signer;
+ }
+
+ /**
+ * Sets the value of the signer property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSigner(String value) {
+ this.signer = value;
+ }
+
+ /**
+ * Gets the value of the signatureDescription property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSignatureDescription() {
+ return signatureDescription;
+ }
+
+ /**
+ * Sets the value of the signatureDescription property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSignatureDescription(String value) {
+ this.signatureDescription = value;
+ }
+
+ /**
+ * Gets the value of the accessRight property.
+ *
+ * @return
+ * possible object is
+ * {@link AccessRightType }
+ *
+ */
+ public AccessRightType getAccessRight() {
+ return accessRight;
+ }
+
+ /**
+ * Sets the value of the accessRight property.
+ *
+ * @param value
+ * allowed object is
+ * {@link AccessRightType }
+ *
+ */
+ public void setAccessRight(AccessRightType value) {
+ this.accessRight = value;
+ }
+
+ /**
+ * Gets the value of the agents property.
+ *
+ * @return
+ * possible object is
+ * {@link StandardMetadataType.DocumentDescription.Agents }
+ *
+ */
+ public StandardMetadataType.DocumentDescription.Agents getAgents() {
+ return agents;
+ }
+
+ /**
+ * Sets the value of the agents property.
+ *
+ * @param value
+ * allowed object is
+ * {@link StandardMetadataType.DocumentDescription.Agents }
+ *
+ */
+ public void setAgents(StandardMetadataType.DocumentDescription.Agents value) {
+ this.agents = value;
+ }
+
+
+ /**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="Agent" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}AgentType" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "agent"
+ })
+ public static class Agents {
+
+ @XmlElement(name = "Agent")
+ protected List agent;
+
+ /**
+ * Gets the value of the agent property.
+ *
+ *
+ * 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 set
method for the agent property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getAgent().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link AgentType }
+ *
+ *
+ */
+ public List getAgent() {
+ if (agent == null) {
+ agent = new ArrayList();
+ }
+ return this.agent;
+ }
+
+ }
+
+ }
+
+
+ /**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="recordType" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}resourceTypeType"/>
+ * <element name="mimeType" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}AcceptedMimeTypeType" minOccurs="0"/>
+ * <element name="characterSet" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}CharacterSetType" minOccurs="0"/>
+ * <element name="fileFormat" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}AcceptedFileFormatType" minOccurs="0"/>
+ * <element name="formatVersion" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="payloadSize" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
+ * <element name="fileName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "recordType",
+ "mimeType",
+ "characterSet",
+ "fileFormat",
+ "formatVersion",
+ "payloadSize",
+ "fileName"
+ })
+ public static class Format {
+
+ @XmlElement(required = true)
+ @XmlSchemaType(name = "string")
+ protected ResourceTypeType recordType;
+ @XmlSchemaType(name = "string")
+ protected AcceptedMimeTypeType mimeType;
+ @XmlSchemaType(name = "string")
+ protected CharacterSetType characterSet;
+ @XmlSchemaType(name = "string")
+ protected AcceptedFileFormatType fileFormat;
+ protected String formatVersion;
+ protected BigInteger payloadSize;
+ protected String fileName;
+
+ /**
+ * Gets the value of the recordType property.
+ *
+ * @return
+ * possible object is
+ * {@link ResourceTypeType }
+ *
+ */
+ public ResourceTypeType getRecordType() {
+ return recordType;
+ }
+
+ /**
+ * Sets the value of the recordType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ResourceTypeType }
+ *
+ */
+ public void setRecordType(ResourceTypeType value) {
+ this.recordType = value;
+ }
+
+ /**
+ * Gets the value of the mimeType property.
+ *
+ * @return
+ * possible object is
+ * {@link AcceptedMimeTypeType }
+ *
+ */
+ public AcceptedMimeTypeType getMimeType() {
+ return mimeType;
+ }
+
+ /**
+ * Sets the value of the mimeType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link AcceptedMimeTypeType }
+ *
+ */
+ public void setMimeType(AcceptedMimeTypeType value) {
+ this.mimeType = value;
+ }
+
+ /**
+ * Gets the value of the characterSet property.
+ *
+ * @return
+ * possible object is
+ * {@link CharacterSetType }
+ *
+ */
+ public CharacterSetType getCharacterSet() {
+ return characterSet;
+ }
+
+ /**
+ * Sets the value of the characterSet property.
+ *
+ * @param value
+ * allowed object is
+ * {@link CharacterSetType }
+ *
+ */
+ public void setCharacterSet(CharacterSetType value) {
+ this.characterSet = value;
+ }
+
+ /**
+ * Gets the value of the fileFormat property.
+ *
+ * @return
+ * possible object is
+ * {@link AcceptedFileFormatType }
+ *
+ */
+ public AcceptedFileFormatType getFileFormat() {
+ return fileFormat;
+ }
+
+ /**
+ * Sets the value of the fileFormat property.
+ *
+ * @param value
+ * allowed object is
+ * {@link AcceptedFileFormatType }
+ *
+ */
+ public void setFileFormat(AcceptedFileFormatType value) {
+ this.fileFormat = value;
+ }
+
+ /**
+ * Gets the value of the formatVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFormatVersion() {
+ return formatVersion;
+ }
+
+ /**
+ * Sets the value of the formatVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFormatVersion(String value) {
+ this.formatVersion = value;
+ }
+
+ /**
+ * Gets the value of the payloadSize property.
+ *
+ * @return
+ * possible object is
+ * {@link BigInteger }
+ *
+ */
+ public BigInteger getPayloadSize() {
+ return payloadSize;
+ }
+
+ /**
+ * Sets the value of the payloadSize property.
+ *
+ * @param value
+ * allowed object is
+ * {@link BigInteger }
+ *
+ */
+ public void setPayloadSize(BigInteger value) {
+ this.payloadSize = value;
+ }
+
+ /**
+ * Gets the value of the fileName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFileName() {
+ return fileName;
+ }
+
+ /**
+ * Sets the value of the fileName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFileName(String value) {
+ this.fileName = value;
+ }
+
+ }
+
+
+ /**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="event" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}historyEventType" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "event"
+ })
+ public static class History {
+
+ protected List event;
+
+ /**
+ * Gets the value of the event property.
+ *
+ *
+ * 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 set
method for the event property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getEvent().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link HistoryEventType }
+ *
+ *
+ */
+ public List getEvent() {
+ if (event == null) {
+ event = new ArrayList();
+ }
+ return this.event;
+ }
+
+ }
+
+
+ /**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="retentionPolicy" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}RetentionPolicyType" minOccurs="0"/>
+ * <element name="disclosurePolicy" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}DisclosurePolicyType" minOccurs="0"/>
+ * <element name="informationSecurityPolicy" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}InformationSecurityPolicyType" minOccurs="0"/>
+ * <element name="protectionPolicy" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}ProtectionPolicyType" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "retentionPolicy",
+ "disclosurePolicy",
+ "informationSecurityPolicy",
+ "protectionPolicy"
+ })
+ public static class Policies {
+
+ protected RetentionPolicyType retentionPolicy;
+ protected DisclosurePolicyType disclosurePolicy;
+ protected InformationSecurityPolicyType informationSecurityPolicy;
+ protected ProtectionPolicyType protectionPolicy;
+
+ /**
+ * Gets the value of the retentionPolicy property.
+ *
+ * @return
+ * possible object is
+ * {@link RetentionPolicyType }
+ *
+ */
+ public RetentionPolicyType getRetentionPolicy() {
+ return retentionPolicy;
+ }
+
+ /**
+ * Sets the value of the retentionPolicy property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RetentionPolicyType }
+ *
+ */
+ public void setRetentionPolicy(RetentionPolicyType value) {
+ this.retentionPolicy = value;
+ }
+
+ /**
+ * Gets the value of the disclosurePolicy property.
+ *
+ * @return
+ * possible object is
+ * {@link DisclosurePolicyType }
+ *
+ */
+ public DisclosurePolicyType getDisclosurePolicy() {
+ return disclosurePolicy;
+ }
+
+ /**
+ * Sets the value of the disclosurePolicy property.
+ *
+ * @param value
+ * allowed object is
+ * {@link DisclosurePolicyType }
+ *
+ */
+ public void setDisclosurePolicy(DisclosurePolicyType value) {
+ this.disclosurePolicy = value;
+ }
+
+ /**
+ * Gets the value of the informationSecurityPolicy property.
+ *
+ * @return
+ * possible object is
+ * {@link InformationSecurityPolicyType }
+ *
+ */
+ public InformationSecurityPolicyType getInformationSecurityPolicy() {
+ return informationSecurityPolicy;
+ }
+
+ /**
+ * Sets the value of the informationSecurityPolicy property.
+ *
+ * @param value
+ * allowed object is
+ * {@link InformationSecurityPolicyType }
+ *
+ */
+ public void setInformationSecurityPolicy(InformationSecurityPolicyType value) {
+ this.informationSecurityPolicy = value;
+ }
+
+ /**
+ * Gets the value of the protectionPolicy property.
+ *
+ * @return
+ * possible object is
+ * {@link ProtectionPolicyType }
+ *
+ */
+ public ProtectionPolicyType getProtectionPolicy() {
+ return protectionPolicy;
+ }
+
+ /**
+ * Sets the value of the protectionPolicy property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ProtectionPolicyType }
+ *
+ */
+ public void setProtectionPolicy(ProtectionPolicyType value) {
+ this.protectionPolicy = value;
+ }
+
+ }
+
+
+ /**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="CaseIdentifier" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="RecordIdentifier" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "caseIdentifier",
+ "recordIdentifier"
+ })
+ public static class RecordIdentifiers {
+
+ @XmlElement(name = "CaseIdentifier")
+ protected String caseIdentifier;
+ @XmlElement(name = "RecordIdentifier", required = true)
+ protected String recordIdentifier;
+
+ /**
+ * Gets the value of the caseIdentifier property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCaseIdentifier() {
+ return caseIdentifier;
+ }
+
+ /**
+ * Sets the value of the caseIdentifier property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCaseIdentifier(String value) {
+ this.caseIdentifier = value;
+ }
+
+ /**
+ * Gets the value of the recordIdentifier property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRecordIdentifier() {
+ return recordIdentifier;
+ }
+
+ /**
+ * Sets the value of the recordIdentifier property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRecordIdentifier(String value) {
+ this.recordIdentifier = value;
+ }
+
+ }
+
+
+ /**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="relation" maxOccurs="unbounded" minOccurs="0">
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="relationType" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}relationTypeType"/>
+ * <element name="target" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </element>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "relation"
+ })
+ public static class Relations {
+
+ protected List relation;
+
+ /**
+ * Gets the value of the relation property.
+ *
+ *
+ * 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 set
method for the relation property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getRelation().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link StandardMetadataType.Relations.Relation }
+ *
+ *
+ */
+ public List getRelation() {
+ if (relation == null) {
+ relation = new ArrayList();
+ }
+ return this.relation;
+ }
+
+
+ /**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="relationType" type="{http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0}relationTypeType"/>
+ * <element name="target" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "relationType",
+ "target"
+ })
+ public static class Relation {
+
+ @XmlElement(required = true)
+ @XmlSchemaType(name = "string")
+ protected RelationTypeType relationType;
+ @XmlElement(required = true)
+ @XmlSchemaType(name = "anyURI")
+ protected String target;
+
+ /**
+ * Gets the value of the relationType property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationTypeType }
+ *
+ */
+ public RelationTypeType getRelationType() {
+ return relationType;
+ }
+
+ /**
+ * Sets the value of the relationType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationTypeType }
+ *
+ */
+ public void setRelationType(RelationTypeType value) {
+ this.relationType = value;
+ }
+
+ /**
+ * Gets the value of the target property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTarget() {
+ return target;
+ }
+
+ /**
+ * Sets the value of the target property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTarget(String value) {
+ this.target = value;
+ }
+
+ }
+
+ }
+
+
+ /**
+ * Java class for anonymous complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="informationSecurityStatus" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}InformationSecurityLevelType" minOccurs="0"/>
+ * <element name="accessStatus" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}DisclosureLevelType" minOccurs="0"/>
+ * <element name="protectionStatus" type="{http://www.avaintec.com/2004/records-schedule-fi/1.0}ProtectionLevelType" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "informationSecurityStatus",
+ "accessStatus",
+ "protectionStatus"
+ })
+ public static class Status {
+
+ @XmlSchemaType(name = "string")
+ protected InformationSecurityLevelType informationSecurityStatus;
+ @XmlSchemaType(name = "string")
+ protected DisclosureLevelType accessStatus;
+ @XmlSchemaType(name = "string")
+ protected ProtectionLevelType protectionStatus;
+
+ /**
+ * Gets the value of the informationSecurityStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link InformationSecurityLevelType }
+ *
+ */
+ public InformationSecurityLevelType getInformationSecurityStatus() {
+ return informationSecurityStatus;
+ }
+
+ /**
+ * Sets the value of the informationSecurityStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link InformationSecurityLevelType }
+ *
+ */
+ public void setInformationSecurityStatus(InformationSecurityLevelType value) {
+ this.informationSecurityStatus = value;
+ }
+
+ /**
+ * Gets the value of the accessStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link DisclosureLevelType }
+ *
+ */
+ public DisclosureLevelType getAccessStatus() {
+ return accessStatus;
+ }
+
+ /**
+ * Sets the value of the accessStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link DisclosureLevelType }
+ *
+ */
+ public void setAccessStatus(DisclosureLevelType value) {
+ this.accessStatus = value;
+ }
+
+ /**
+ * Gets the value of the protectionStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link ProtectionLevelType }
+ *
+ */
+ public ProtectionLevelType getProtectionStatus() {
+ return protectionStatus;
+ }
+
+ /**
+ * Sets the value of the protectionStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ProtectionLevelType }
+ *
+ */
+ public void setProtectionStatus(ProtectionLevelType value) {
+ this.protectionStatus = value;
+ }
+
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/TimePeriodType.java b/service/src/main/java/fi/espoo/evaka/sarma/model/TimePeriodType.java
new file mode 100755
index 00000000000..eda32a13db1
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/TimePeriodType.java
@@ -0,0 +1,91 @@
+
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlSchemaType;
+import jakarta.xml.bind.annotation.XmlType;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+
+/**
+ * Java class for TimePeriodType complex type.
+ *
+ *
The following schema fragment specifies the expected content contained within this class.
+ *
+ *
+ * <complexType name="TimePeriodType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="start" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+ * <element name="end" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ *
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "TimePeriodType", propOrder = {
+ "start",
+ "end"
+})
+public class TimePeriodType {
+
+ @XmlSchemaType(name = "date")
+ protected XMLGregorianCalendar start;
+ @XmlSchemaType(name = "date")
+ protected XMLGregorianCalendar end;
+
+ /**
+ * Gets the value of the start property.
+ *
+ * @return
+ * possible object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public XMLGregorianCalendar getStart() {
+ return start;
+ }
+
+ /**
+ * Sets the value of the start property.
+ *
+ * @param value
+ * allowed object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public void setStart(XMLGregorianCalendar value) {
+ this.start = value;
+ }
+
+ /**
+ * Gets the value of the end property.
+ *
+ * @return
+ * possible object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public XMLGregorianCalendar getEnd() {
+ return end;
+ }
+
+ /**
+ * Sets the value of the end property.
+ *
+ * @param value
+ * allowed object is
+ * {@link XMLGregorianCalendar }
+ *
+ */
+ public void setEnd(XMLGregorianCalendar value) {
+ this.end = value;
+ }
+
+}
diff --git a/service/src/main/java/fi/espoo/evaka/sarma/model/package-info.java b/service/src/main/java/fi/espoo/evaka/sarma/model/package-info.java
new file mode 100755
index 00000000000..441b5bdc4fa
--- /dev/null
+++ b/service/src/main/java/fi/espoo/evaka/sarma/model/package-info.java
@@ -0,0 +1,13 @@
+@XmlSchema(
+ namespace = "http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0",
+ elementFormDefault = XmlNsForm.QUALIFIED,
+ xmlns = {
+ @XmlNs(prefix = "ns0", namespaceURI = "http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0"),
+ @XmlNs(prefix = "ns1", namespaceURI = "http://www.avaintec.com/2004/records-schedule-fi/1.0")
+ }
+)
+package fi.espoo.evaka.sarma.model;
+
+import jakarta.xml.bind.annotation.XmlNs;
+import jakarta.xml.bind.annotation.XmlNsForm;
+import jakarta.xml.bind.annotation.XmlSchema;
diff --git a/service/src/main/kotlin/fi/espoo/evaka/document/archival/ArchiveChildDocumentService.kt b/service/src/main/kotlin/fi/espoo/evaka/document/archival/ArchiveChildDocumentService.kt
index f465e28c0eb..4e3486878bc 100644
--- a/service/src/main/kotlin/fi/espoo/evaka/document/archival/ArchiveChildDocumentService.kt
+++ b/service/src/main/kotlin/fi/espoo/evaka/document/archival/ArchiveChildDocumentService.kt
@@ -4,10 +4,17 @@
package fi.espoo.evaka.document.archival
+import fi.espoo.evaka.document.childdocument.ChildDocumentDetails
+import fi.espoo.evaka.document.childdocument.getChildDocument
import fi.espoo.evaka.document.childdocument.getChildDocumentKey
import fi.espoo.evaka.document.childdocument.markDocumentAsArchived
+import fi.espoo.evaka.process.ArchivedProcess
+import fi.espoo.evaka.process.ProcessMetadataController
+import fi.espoo.evaka.process.getArchiveProcessByChildDocumentId
+import fi.espoo.evaka.process.getChildDocumentMetadata
import fi.espoo.evaka.s3.DocumentKey
import fi.espoo.evaka.s3.DocumentService
+import fi.espoo.evaka.sarma.model.*
import fi.espoo.evaka.shared.ChildDocumentId
import fi.espoo.evaka.shared.async.AsyncJob
import fi.espoo.evaka.shared.async.AsyncJobRunner
@@ -15,7 +22,14 @@ import fi.espoo.evaka.shared.db.Database
import fi.espoo.evaka.shared.domain.HelsinkiDateTime
import fi.espoo.evaka.shared.domain.NotFound
import io.github.oshai.kotlinlogging.KotlinLogging
+import jakarta.xml.bind.JAXBContext
+import jakarta.xml.bind.Marshaller
+import java.io.StringWriter
+import java.time.ZoneId
+import javax.xml.datatype.DatatypeFactory
+import javax.xml.datatype.XMLGregorianCalendar
import org.springframework.stereotype.Service
+import java.nio.file.Paths
private val logger = KotlinLogging.logger {}
@@ -32,15 +46,155 @@ class ArchiveChildDocumentService(
}
}
+ companion object {
+ internal fun marshalMetadata(metadata: RecordMetadataInstance): String {
+ val context = JAXBContext.newInstance(RecordMetadataInstance::class.java)
+ val marshaller =
+ context.createMarshaller().apply {
+ setProperty(Marshaller.JAXB_FRAGMENT, true) // Remove XML declaration
+ }
+ return StringWriter().use { writer ->
+ marshaller.marshal(metadata, writer)
+ writer.toString()
+ }
+ }
+
+ internal fun createDocumentMetadata(
+ document: ChildDocumentDetails,
+ documentMetadata: ProcessMetadataController.DocumentMetadata,
+ archivedProcess: ArchivedProcess?,
+ filename: String,
+ ): RecordMetadataInstance {
+ // TODO TOS numero + vuosi koodi täytyis laittaa johonkin
+ return RecordMetadataInstance().apply {
+ standardMetadata =
+ StandardMetadataType().apply {
+ metadataMasterVersion =
+ MetadataMasterVersionType().apply {
+ masterName = "yleinen"
+ versionNumber = "1.0"
+ }
+ virtualArchiveId = "YLEINEN"
+ recordIdentifiers =
+ StandardMetadataType.RecordIdentifiers().apply {
+ recordIdentifier = document.id.toString()
+ }
+ documentDescription =
+ StandardMetadataType.DocumentDescription().apply {
+ // Basic document info
+ title = documentMetadata.name
+ documentType =
+ "Suunnitelma" // From Evaka_Särmä_metatietomääritykset.xlsx
+ documentTypeSpecifier =
+ "Varhaiskasvatussuunnitelma" // From
+ // Evaka_Särmä_metatietomääritykset.xlsx
+ personalData = PersonalDataType.CONTAINS_PERSONAL_INFORMATION
+ language = document.template.language.isoLanguage.alpha2
+
+ // Data management fields
+ dataManagement = "Palvelujen tiedonhallinta"
+ dataSource = "Varhaiskasvatuksen tietovaranto"
+ registerName = "Varhaiskasvatuksen asiakastietorekisteri"
+ personalDataCollectionReason =
+ "Rekisterinpitäjän lakisääteisten velvoitteiden noudattaminen"
+
+ // Child's information
+ firstName = document.child.firstName
+ lastName = document.child.lastName
+ socialSecurityNumber =
+ "Kovakoodattu 010101-123A" // TODO read from document.child
+ // TODO add bd once schema field is known
+ // birthDate?.let { birthDate = it.toString() }
+ }
+ format =
+ StandardMetadataType.Format().apply {
+ recordType = ResourceTypeType.DIGITAL
+ mimeType = AcceptedMimeTypeType.APPLICATION_PDF
+ fileName = filename
+ fileFormat = AcceptedFileFormatType.PDF
+ }
+
+ // Creation and handling information
+ creation =
+ StandardMetadataType.Creation().apply {
+ created = documentMetadata.createdAt?.toLocalDateTime()
+ ?.atZone(ZoneId.of("Europe/Helsinki"))
+ ?.let { zdt ->
+ DatatypeFactory.newInstance().newXMLGregorianCalendar(
+ zdt.year,
+ zdt.monthValue,
+ zdt.dayOfMonth,
+ zdt.hour,
+ zdt.minute,
+ zdt.second,
+ zdt.nano / 1000000,
+ zdt.offset.totalSeconds / 60,
+ )
+ }
+ originatingSystem = "Varhaiskasvatuksen toiminnanohjausjärjestelmä"
+ }
+
+ // Document handlers/agents
+ // TODO map from archivedProcess?.history
+ // agents =
+ // StandardMetadataType.Agents().apply {
+ // agent.add(
+ //
+ // StandardMetadataType.Agents.Agent().apply {
+ // corporateName = "Suomenkielisen
+ // varhaiskasvatuksen tulosyksikkö"
+ // role =
+ // documentMetadata.handlerRole
+ // name =
+ // documentMetadata.handlerName
+ // }
+ // )
+ // }
+
+ // Security and retention policies
+ // disclosurePolicy =
+ // StandardMetadataType.DisclosurePolicy().apply
+ // {
+ // value = if
+ // (documentMetadata.isConfidential == true) "confidential" else "public"
+ // if (documentMetadata.isConfidential ==
+ // true) {
+ // retentionPeriod = "100"
+ // basis = "JulkL 24 § 1 mom. 32 k"
+ // retentionReason =
+ // "YearsFromRecordCreation"
+ // }
+ // }
+ //
+ // informationSecurityPolicy =
+ //
+ // StandardMetadataType.InformationSecurityPolicy().apply {
+ // value = "Ei turvallisuusluokiteltu"
+ // }
+ //
+ // retentionPolicy =
+ // StandardMetadataType.RetentionPolicy().apply {
+ // period = "0"
+ // basis = "KA/13089/07.01.01.03.01/2018"
+ // retentionReason = "InPerpetuity"
+ // }
+ //
+ // protectionPolicy =
+ // StandardMetadataType.ProtectionPolicy().apply
+ // {
+ // value = "3"
+ // }
+ }
+ }
+ }
+ }
+
fun uploadToArchive(db: Database.Connection, documentId: ChildDocumentId) {
logger.info { "Starting archival process for document $documentId" }
- // TODO luo document metadata ChildDocumentDetails perusteella
- // val document =
- // db.read { tx ->
- // tx.getChildDocument(documentId) ?: throw NotFound("document $documentId
- // not found")
- // }
+ val document = db.read { tx ->tx.getChildDocument(documentId) ?: throw NotFound("document $documentId not found") }
+ val archivedProcess = db.read { tx -> tx.getArchiveProcessByChildDocumentId(documentId) }
+ val documentMetadata = db.read { tx -> tx.getChildDocumentMetadata(documentId) }
val documentKey =
db.read { tx ->
@@ -52,15 +206,29 @@ class ArchiveChildDocumentService(
val originalLocation = documentClient.locate(DocumentKey.ChildDocument(documentKey))
val documentContent = documentClient.get(originalLocation)
- val masterId =
- "yleinen" // TODO ei vielä varmuudella tiedossa. Muissa Särmä integraatioissa käytetty
- // esim. "taloushallinto" tai "paatoksenteko"
- val classId =
- "12.01.SL1.RT34" // Arvo perustuu Evaka_Särmä_metatietomääritykset.xlsx -tiedostoon
- val virtualArchiveId =
- "YLEINEN" // Arvo perustuu Evaka_Särmä_metatietomääritykset.xlsx -tiedostoon
+ val masterId = "yleinen"
+ val classId = "12.01.SL1.RT34"
+ val yleinenVirtualArchiveId = "YLEINEN"
+
+ // Create metadata object and convert to XML
+ val metadata =
+ createDocumentMetadata(
+ document,
+ documentMetadata,
+ archivedProcess,
+ Paths.get(documentContent.name).fileName.toString(),
+ )
+ val metadataXml = marshalMetadata(metadata)
+ logger.info { "Generated metadata XML: $metadataXml" }
+
val (responseCode, responseBody) =
- client.putDocument(documentContent, masterId, classId, virtualArchiveId)
+ client.putDocument(
+ documentContent,
+ metadataXml,
+ masterId,
+ classId,
+ yleinenVirtualArchiveId,
+ )
logger.info { "Response code: $responseCode" }
if (responseCode == 200) {
diff --git "a/service/src/main/kotlin/fi/espoo/evaka/document/archival/S\303\244rm\303\244ClientInterface.kt" "b/service/src/main/kotlin/fi/espoo/evaka/document/archival/S\303\244rm\303\244ClientInterface.kt"
index 3b2d106494c..325c595d18d 100644
--- "a/service/src/main/kotlin/fi/espoo/evaka/document/archival/S\303\244rm\303\244ClientInterface.kt"
+++ "b/service/src/main/kotlin/fi/espoo/evaka/document/archival/S\303\244rm\303\244ClientInterface.kt"
@@ -9,6 +9,7 @@ import fi.espoo.evaka.s3.Document
interface SärmäClientInterface {
fun putDocument(
documentContent: Document,
+ metadataXml: String,
masterId: String,
classId: String,
virtualArchiveId: String,
diff --git "a/service/src/main/kotlin/fi/espoo/evaka/document/archival/S\303\244rm\303\244HttpClient.kt" "b/service/src/main/kotlin/fi/espoo/evaka/document/archival/S\303\244rm\303\244HttpClient.kt"
index ffcc45ef35c..0e1fea4880b 100644
--- "a/service/src/main/kotlin/fi/espoo/evaka/document/archival/S\303\244rm\303\244HttpClient.kt"
+++ "b/service/src/main/kotlin/fi/espoo/evaka/document/archival/S\303\244rm\303\244HttpClient.kt"
@@ -21,6 +21,7 @@ class SärmäHttpClient(private val archiveEnv: ArchiveEnv?) : SärmäClientInte
override fun putDocument(
documentContent: Document,
+ metadataXml: String,
masterId: String,
classId: String,
virtualArchiveId: String,
@@ -44,7 +45,11 @@ class SärmäHttpClient(private val archiveEnv: ArchiveEnv?) : SärmäClientInte
.addFormDataPart("instance_1_class_id", classId)
.addFormDataPart("instance_1_virtual_archive_id", virtualArchiveId)
.addFormDataPart("instance_1_record_payload_location", "SELF_CONTAINED")
- // .addFormDataPart("instance_1_md_instance", null, xmlBody)
+ .addFormDataPart(
+ "instance_1_md_instance",
+ null,
+ metadataXml.toRequestBody("application/xml".toMediaType()),
+ )
.addFormDataPart(
"instance_1_record_payload_content_size",
documentContent.bytes.size.toString(),
diff --git "a/service/src/main/kotlin/fi/espoo/evaka/document/archival/S\303\244rm\303\244MockClient.kt" "b/service/src/main/kotlin/fi/espoo/evaka/document/archival/S\303\244rm\303\244MockClient.kt"
index cdde3d7f2a2..8d5d8cc7454 100644
--- "a/service/src/main/kotlin/fi/espoo/evaka/document/archival/S\303\244rm\303\244MockClient.kt"
+++ "b/service/src/main/kotlin/fi/espoo/evaka/document/archival/S\303\244rm\303\244MockClient.kt"
@@ -9,6 +9,7 @@ import fi.espoo.evaka.s3.Document
class SärmäMockClient : SärmäClientInterface {
override fun putDocument(
documentContent: Document,
+ metadataXml: String,
masterId: String,
classId: String,
virtualArchiveId: String,
diff --git a/service/src/main/kotlin/fi/espoo/evaka/document/archival/yleinen/RecordMetadata.kt b/service/src/main/kotlin/fi/espoo/evaka/document/archival/yleinen/RecordMetadata.kt
new file mode 100644
index 00000000000..298bc605a8d
--- /dev/null
+++ b/service/src/main/kotlin/fi/espoo/evaka/document/archival/yleinen/RecordMetadata.kt
@@ -0,0 +1,99 @@
+// SPDX-FileCopyrightText: 2017-2024 City of Espoo
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
+package fi.espoo.evaka.document.archival.yleinen
+
+import jakarta.xml.bind.annotation.XmlAccessType
+import jakarta.xml.bind.annotation.XmlAccessorType
+import jakarta.xml.bind.annotation.XmlElement
+import jakarta.xml.bind.annotation.XmlRootElement
+import jakarta.xml.bind.annotation.XmlType
+
+@XmlRootElement(
+ name = "RecordMetadataInstance",
+ namespace = "http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0",
+)
+@XmlAccessorType(XmlAccessType.FIELD)
+data class RecordMetadataInstance(
+ @field:XmlElement(name = "StandardMetadata", required = true)
+ val standardMetadata: StandardMetadata,
+ @field:XmlElement(name = "ExtendedMetadata", required = false)
+ val extendedMetadata: ExtendedMetadata? = null,
+)
+
+@XmlAccessorType(XmlAccessType.FIELD)
+data class StandardMetadata(
+ @field:XmlElement(name = "virtualArchiveId", required = true) val virtualArchiveId: String,
+ @field:XmlElement(name = "recordIdentifiers", required = true)
+ val recordIdentifiers: RecordIdentifiers,
+ @field:XmlElement(name = "documentDescription", required = true)
+ val documentDescription: DocumentDescription,
+ @field:XmlElement(name = "format", required = true) val format: Format,
+)
+
+@XmlAccessorType(XmlAccessType.FIELD)
+data class RecordIdentifiers(
+ @field:XmlElement(name = "CaseIdentifier", required = false) val caseIdentifier: String? = null,
+ @field:XmlElement(name = "RecordIdentifier", required = true) val recordIdentifier: String,
+)
+
+@XmlAccessorType(XmlAccessType.FIELD)
+data class DocumentDescription(
+ @field:XmlElement(name = "title", required = true) val title: String,
+ @field:XmlElement(name = "otherId", required = false) val otherId: String? = null,
+ @field:XmlElement(name = "documentType", required = false) val documentType: String? = null,
+ @field:XmlElement(name = "documentTypeSpecifier", required = false)
+ val documentTypeSpecifier: String? = null,
+ @field:XmlElement(name = "description", required = false) val description: String? = null,
+ @field:XmlElement(name = "firstName", required = false) val firstName: String? = null,
+ @field:XmlElement(name = "lastName", required = false) val lastName: String? = null,
+ @field:XmlElement(name = "socialSecurityNumber", required = false)
+ val socialSecurityNumber: String? = null,
+ @field:XmlElement(name = "keywords", required = false) val keywords: String? = null,
+ @field:XmlElement(name = "personalData", required = false)
+ val personalData: PersonalDataType? = null,
+ @field:XmlElement(name = "personalDataCollectionReason", required = false)
+ val personalDataCollectionReason: String? = null,
+ @field:XmlElement(name = "language", required = false) val language: String? = null,
+)
+
+@XmlAccessorType(XmlAccessType.FIELD)
+data class Format(
+ @field:XmlElement(name = "recordType", required = true) val recordType: ResourceType,
+ @field:XmlElement(name = "mimeType", required = false) val mimeType: String? = null,
+ @field:XmlElement(name = "characterSet", required = false)
+ val characterSet: CharacterSet? = null,
+ @field:XmlElement(name = "fileFormat", required = false) val fileFormat: String? = null,
+ @field:XmlElement(name = "formatVersion", required = false) val formatVersion: String? = null,
+ @field:XmlElement(name = "payloadSize", required = false) val payloadSize: Int? = null,
+ @field:XmlElement(name = "fileName", required = false) val fileName: String? = null,
+)
+
+@XmlType(name = "resourceTypeType")
+enum class ResourceType {
+ @XmlElement(name = "digital") DIGITAL,
+ @XmlElement(name = "physical") PHYSICAL,
+}
+
+@XmlType(name = "personalDataType")
+enum class PersonalDataType {
+ @XmlElement(name = "noPersonalInformation") NO_PERSONAL_INFORMATION,
+ @XmlElement(name = "containsPersonalInformation") CONTAINS_PERSONAL_INFORMATION,
+ @XmlElement(name = "containsSensitivePersonalInformation")
+ CONTAINS_SENSITIVE_PERSONAL_INFORMATION,
+ @XmlElement(name = "containsInformationOnCriminalConvictionsAndOffenses")
+ CONTAINS_INFORMATION_ON_CRIMINAL_CONVICTIONS_AND_OFFENSES,
+}
+
+@XmlType(name = "CharacterSetType")
+enum class CharacterSet {
+ @XmlElement(name = "UTF-8") UTF_8,
+ @XmlElement(name = "ISO-8859-1") ISO_8859_1,
+}
+
+@XmlAccessorType(XmlAccessType.FIELD)
+data class ExtendedMetadata(
+ // This is a placeholder for any additional XML content
+ val content: Any? = null
+)
diff --git a/service/src/main/kotlin/fi/espoo/evaka/process/ProcessMetadataController.kt b/service/src/main/kotlin/fi/espoo/evaka/process/ProcessMetadataController.kt
index 8b16845cb8e..979f2bdbdef 100644
--- a/service/src/main/kotlin/fi/espoo/evaka/process/ProcessMetadataController.kt
+++ b/service/src/main/kotlin/fi/espoo/evaka/process/ProcessMetadataController.kt
@@ -8,6 +8,7 @@ import fi.espoo.evaka.Audit
import fi.espoo.evaka.AuditId
import fi.espoo.evaka.application.ApplicationType
import fi.espoo.evaka.decision.DecisionType
+import fi.espoo.evaka.process.ProcessMetadataController.DocumentMetadata
import fi.espoo.evaka.shared.ApplicationId
import fi.espoo.evaka.shared.AssistanceNeedDecisionId
import fi.espoo.evaka.shared.AssistanceNeedPreschoolDecisionId
@@ -334,46 +335,6 @@ class ProcessMetadataController(private val accessControl: AccessControl) {
}
}
- private fun Database.Read.getChildDocumentMetadata(
- documentId: ChildDocumentId
- ): DocumentMetadata =
- createQuery {
- sql(
- """
- SELECT
- dt.name,
- cd.created,
- e.id AS created_by_id,
- e.name AS created_by_name,
- e.type AS created_by_type,
- dt.confidential,
- cd.document_key
- FROM child_document cd
- JOIN document_template dt ON dt.id = cd.template_id
- LEFT JOIN evaka_user e ON e.employee_id = cd.created_by
- WHERE cd.id = ${bind(documentId)}
- """
- )
- }
- .map {
- DocumentMetadata(
- name = column("name"),
- createdAt = column("created"),
- createdBy =
- column("created_by_id")?.let {
- EvakaUser(
- id = it,
- name = column("created_by_name"),
- type = column("created_by_type"),
- )
- },
- confidential = column("confidential"),
- downloadPath =
- column("document_key")?.let { "/employee/child-documents/$it/pdf" },
- )
- }
- .exactlyOne()
-
private fun Database.Read.getAssistanceNeedDecisionDocumentMetadata(
decisionId: AssistanceNeedDecisionId
): DocumentMetadata =
@@ -644,3 +605,41 @@ class ProcessMetadataController(private val accessControl: AccessControl) {
}
.exactlyOne()
}
+
+fun Database.Read.getChildDocumentMetadata(documentId: ChildDocumentId): DocumentMetadata =
+ createQuery {
+ sql(
+ """
+ SELECT
+ dt.name,
+ cd.created,
+ e.id AS created_by_id,
+ e.name AS created_by_name,
+ e.type AS created_by_type,
+ dt.confidential,
+ cd.document_key
+ FROM child_document cd
+ JOIN document_template dt ON dt.id = cd.template_id
+ LEFT JOIN evaka_user e ON e.employee_id = cd.created_by
+ WHERE cd.id = ${bind(documentId)}
+ """
+ )
+ }
+ .map {
+ DocumentMetadata(
+ name = column("name"),
+ createdAt = column("created"),
+ createdBy =
+ column("created_by_id")?.let {
+ EvakaUser(
+ id = it,
+ name = column("created_by_name"),
+ type = column("created_by_type"),
+ )
+ },
+ confidential = column("confidential"),
+ downloadPath =
+ column("document_key")?.let { "/employee/child-documents/$it/pdf" },
+ )
+ }
+ .exactlyOne()
diff --git a/service/src/main/resources/application-local.yaml b/service/src/main/resources/application-local.yaml
index 92fb2548827..1068dd50acf 100755
--- a/service/src/main/resources/application-local.yaml
+++ b/service/src/main/resources/application-local.yaml
@@ -65,7 +65,7 @@ evaka:
type: JKS
särmä:
enabled: true
- use_mock_client: true
+ use_mock_client: false
url: https://eoy3xw8tftt5shn.m.pipedream.net/archive-core
not_for_prod:
force_unpublish_document_template_enabled: true
diff --git a/service/src/main/resources/sarma_schema/common/include-extended.xsd b/service/src/main/resources/sarma_schema/common/include-extended.xsd
new file mode 100644
index 00000000000..bbec8d2d482
--- /dev/null
+++ b/service/src/main/resources/sarma_schema/common/include-extended.xsd
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/service/src/main/resources/sarma_schema/common/include-policies.xsd b/service/src/main/resources/sarma_schema/common/include-policies.xsd
new file mode 100644
index 00000000000..619fe9f16bd
--- /dev/null
+++ b/service/src/main/resources/sarma_schema/common/include-policies.xsd
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/service/src/main/resources/sarma_schema/yleinen/yleinen-1.0.xsd b/service/src/main/resources/sarma_schema/yleinen/yleinen-1.0.xsd
new file mode 100644
index 00000000000..c4aa2772a1b
--- /dev/null
+++ b/service/src/main/resources/sarma_schema/yleinen/yleinen-1.0.xsd
@@ -0,0 +1,399 @@
+
+
+
+
+
+
+
+ caption=StandardMetadata;
+
+
+
+
+
+
+
+
+
+
+ internal=true;
+
+
+
+
+
+
+
+
+
+
+ internal=true;
+
+
+
+
+ internal=true;prefill=virtual_archive_id;readonly=yes;
+
+
+
+
+
+
+
+
+
+
+
+
+ Descriptive information about the record.
+
+
+
+
+
+
+
+
+
+
+ uiwidget=textarea;rows=6;cols=60;
+
+
+
+
+
+
+
+ uiwidget=textarea;rows=6;cols=60;
+
+
+
+
+ Does the record contain personal data?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Physical/digital
+ prefill=record_type;
+
+
+
+
+ prefill=mime_type;
+
+
+
+
+ prefill=character_set;
+ Defines the character set, if the document is in text/plain format.
+
+
+
+
+ prefill=file_format;
+ E.g. if it's a CDA L2 document, the MIME type is text/xml and the Format is cda/level2. Out-pipeline processing can be tied to format and formatVersion.
+
+
+
+
+ prefill=format_version;
+ Version of the format, e.g. 2.0 if it's CDA/level 2 version 2.0
+
+
+
+
+ readonly=yes;
+ Payload size is automatically calculated upon archival
+
+
+
+
+
+
+
+
+ hideRoles=archivist;
+ Information about the current policy status of the record. This information is usually written by the PolicyEngine.
+
+
+
+
+
+ readonly=yes;
+
+
+
+
+ readonly=yes;
+
+
+
+
+ readonly=yes;
+
+
+
+
+
+
+
+ Information about record creation: when it was compiled, when it was sent to X-Archive, and when it was filed by X-Archive.
+
+
+
+
+
+
+
+ readonly=yes;
+
+
+
+
+ readonly=yes;
+
+
+
+
+
+
+
+ Information about record disposition: the scheduled disposal date, and after the record has been destroyed, the when, who, and why.
+
+
+
+
+
+ readonly=yes;
+
+
+
+
+ readonly=yes;
+ Disposal list status. 0=not on active disposal list 1=included on active disposal list 2=excluded from active disposal list.
+
+
+
+
+
+
+
+ Record-level policies, if applicable. If not present, the ones set at the class level are used.
+
+
+
+
+
+
+
+
+
+
+
+
+ The relations the record has to other resources.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ hideRoles=archivist;readonly=yes;uiwidget=section;
+ Contains the accumulated history of the record -- reclassifications, changes in Categorization etc.
+
+
+
+
+
+
+
+
+
+ Case file and all actions.
+
+
+
+
+
+
+ DataType=xml;indexed=false;orderBy=at0:eventDateTime;orderDirection=descending;
+
+
+
+
+
+ selectui=hidden;
+
+
+
+
+ selectui=hidden;
+
+
+
+
+
+
+
+
+
+
+
+
+ uiwidget=textarea;rows=5;cols=120;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/service/src/test/kotlin/fi/espoo/evaka/document/archival/ArchiveChildDocumentServiceTest.kt b/service/src/test/kotlin/fi/espoo/evaka/document/archival/ArchiveChildDocumentServiceTest.kt
new file mode 100644
index 00000000000..161edc3bf93
--- /dev/null
+++ b/service/src/test/kotlin/fi/espoo/evaka/document/archival/ArchiveChildDocumentServiceTest.kt
@@ -0,0 +1,143 @@
+// SPDX-FileCopyrightText: 2017-2024 City of Espoo
+//
+// SPDX-License-Identifier: LGPL-2.1-or-later
+
+package fi.espoo.evaka.document.archival
+
+import fi.espoo.evaka.process.ArchivedProcess
+import fi.espoo.evaka.process.ArchivedProcessHistoryRow
+import fi.espoo.evaka.process.ArchivedProcessState
+import fi.espoo.evaka.process.ProcessMetadataController.DocumentMetadata
+import fi.espoo.evaka.sarma.model.AcceptedFileFormatType
+import fi.espoo.evaka.sarma.model.AcceptedMimeTypeType
+import fi.espoo.evaka.sarma.model.PersonalDataType
+import fi.espoo.evaka.sarma.model.ResourceTypeType
+import fi.espoo.evaka.shared.ArchivedProcessId
+import fi.espoo.evaka.shared.ChildDocumentId
+import fi.espoo.evaka.shared.dev.DevEmployee
+import fi.espoo.evaka.shared.domain.HelsinkiDateTime
+import java.time.LocalDateTime
+import java.util.*
+import kotlin.test.assertEquals
+import kotlin.test.assertTrue
+import org.junit.jupiter.api.Test
+
+class ArchiveChildDocumentServiceTest {
+
+ private val testDocumentId = ChildDocumentId(UUID.randomUUID())
+ private val testDocumentMetadata =
+ DocumentMetadata(
+ name = "Test Child Document",
+ confidential = false,
+ createdAt = HelsinkiDateTime.of(LocalDateTime.of(2024, 1, 1, 12, 0)),
+ createdBy = DevEmployee().evakaUser,
+ downloadPath = "test-document.pdf",
+ )
+ private val testArchivedProcess =
+ ArchivedProcess(
+ id = ArchivedProcessId(UUID.randomUUID()),
+ history =
+ listOf(
+ ArchivedProcessHistoryRow(
+ rowIndex = 0,
+ state = ArchivedProcessState.INITIAL,
+ enteredAt = HelsinkiDateTime.of(LocalDateTime.of(2024, 1, 1, 12, 0)),
+ enteredBy = DevEmployee().evakaUser,
+ ),
+ ArchivedProcessHistoryRow(
+ rowIndex = 0,
+ state = ArchivedProcessState.COMPLETED,
+ enteredAt = HelsinkiDateTime.of(LocalDateTime.of(2024, 1, 2, 12, 0)),
+ enteredBy = DevEmployee().evakaUser,
+ ),
+ ),
+ processDefinitionNumber = "123",
+ year = 2024,
+ number = 1,
+ organization = "Test Organization",
+ archiveDurationMonths = 1200,
+ )
+ private val testFilename = "test-document.pdf"
+
+ @Test
+ fun `createDocumentMetadata creates correct metadata structure`() {
+ val metadata =
+ ArchiveChildDocumentService.createDocumentMetadata(
+ testDocumentId,
+ testDocumentMetadata,
+ testArchivedProcess,
+ testFilename,
+ )
+
+ with(metadata) {
+ with(standardMetadata) {
+ assertEquals("yleinen", metadataMasterVersion.masterName)
+ assertEquals("1.0", metadataMasterVersion.versionNumber)
+ assertEquals("YLEINEN", virtualArchiveId)
+ assertEquals(testDocumentId.toString(), recordIdentifiers.recordIdentifier)
+
+ with(documentDescription) {
+ assertEquals("Test Child Document", title)
+ assertEquals("Suunnitelma", documentType)
+ assertEquals("Varhaiskasvatussuunnitelma", documentTypeSpecifier)
+ assertEquals(PersonalDataType.CONTAINS_PERSONAL_INFORMATION, personalData)
+ assertEquals("fi", language)
+ assertEquals("Palvelujen tiedonhallinta", dataManagement)
+ assertEquals("Varhaiskasvatuksen tietovaranto", dataSource)
+ assertEquals("Varhaiskasvatuksen asiakastietorekisteri", registerName)
+ assertEquals(
+ "Rekisterinpitäjän lakisääteisten velvoitteiden noudattaminen",
+ personalDataCollectionReason,
+ )
+
+ assertEquals("Kovakoodattu Erkki", firstName)
+ assertEquals("Kovakoodattu Esimerkki", lastName)
+ assertEquals("Kovakoodattu 010101-123A", socialSecurityNumber)
+ }
+
+ with(format) {
+ assertEquals(ResourceTypeType.DIGITAL, recordType)
+ assertEquals(AcceptedMimeTypeType.APPLICATION_PDF, mimeType)
+ assertEquals(testFilename, fileName)
+ assertEquals(AcceptedFileFormatType.PDF, fileFormat)
+ }
+
+ with(creation) {
+ assertEquals("Varhaiskasvatuksen toiminnanohjausjärjestelmä", originatingSystem)
+ }
+ }
+ }
+ }
+
+ @Test
+ fun `marshalMetadata generates correct XML without declaration`() {
+ val metadata =
+ ArchiveChildDocumentService.createDocumentMetadata(
+ testDocumentId,
+ testDocumentMetadata,
+ testArchivedProcess,
+ testFilename,
+ )
+ val xml = ArchiveChildDocumentService.marshalMetadata(metadata)
+
+ // Verify XML doesn't start with declaration
+ assertTrue(!xml.startsWith("${testDocumentId}"))
+ assertTrue(xml.contains("Test Child Document "))
+ assertTrue(xml.contains("Kovakoodattu Erkki "))
+ assertTrue(xml.contains("Kovakoodattu Esimerkki "))
+ }
+}