Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sisällytetään metadata xml pedagogisten asiakirjojen arkistontikutsuissa #6404

Merged
merged 10 commits into from
Mar 5, 2025
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
!service/sficlient/*.kts
!service/sficlient/src

!service/sarmamodel/*.kts
!service/sarmamodel/src

!service/vtjclient/*.kts
!service/vtjclient/src

Expand Down
1 change: 1 addition & 0 deletions service/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
/sficlient/target/
/vtjclient/build/
/vtjclient/target/
/sarmamodel/build/

.idea/
*.iws
Expand Down
4 changes: 3 additions & 1 deletion service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ COPY ./service/gradlew ./service/build.gradle.kts ./service/gradle.properties ./
COPY ./service/vtjclient/build.gradle.kts ./service/vtjclient/build.gradle.kts
COPY ./service/service-lib/*.kts ./service/service-lib/
COPY ./service/evaka-bom/*.kts ./service/evaka-bom/
COPY ./service/sarmamodel/build.gradle.kts ./service/sarmamodel/

WORKDIR /evaka/service

RUN ./gradlew --no-daemon resolveDependencies

COPY ./service/vtjclient/ ./vtjclient/
RUN ./gradlew --no-daemon :vtjclient:wsdl2java
COPY ./service/sarmamodel/ ./sarmamodel/
RUN ./gradlew --no-daemon :vtjclient:wsdl2java :sarmamodel:build

COPY . /evaka

Expand Down
3 changes: 3 additions & 0 deletions service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ dependencies {
// Voltti
implementation(project(":service-lib"))

// Särmä model
implementation(project(":sarmamodel"))

// Flying Saucer <=>
implementation("org.thymeleaf:thymeleaf")
implementation("org.thymeleaf.extras:thymeleaf-extras-java8time")
Expand Down
28 changes: 28 additions & 0 deletions service/sarmamodel/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// SPDX-FileCopyrightText: 2024 City of Espoo
// SPDX-License-Identifier: LGPL-2.1-or-later

plugins {
java
id("org.unbroken-dome.xjc") version "2.0.0"
}

repositories {
mavenCentral()
}

dependencies {
implementation(platform(project(":evaka-bom")))
implementation("jakarta.xml.bind:jakarta.xml.bind-api")
xjcTool("com.sun.xml.bind:jaxb-xjc:3.0.2")
xjcTool("com.sun.xml.bind:jaxb-impl:3.0.2")
}

sourceSets {
main {
xjcTargetPackage.set("fi.espoo.evaka.sarma.model")
}
}

tasks.named("compileJava") {
dependsOn("xjcGenerate")
}
43 changes: 43 additions & 0 deletions service/sarmamodel/src/main/schema/common/include-extended.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xa="http://www.avaintec.com/2005/x-archive/record-metadata-instance/2.0"
elementFormDefault="qualified" attributeFormDefault="unqualified">

<!-- ExtendedMetadataType for custom metadata extensions -->
<xs:complexType name="ExtendedMetadataType">
<xs:sequence>
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

<!-- AcceptedMimeTypeType for allowed MIME types -->
<xs:simpleType name="AcceptedMimeTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="application/pdf"/>
<xs:enumeration value="text/plain"/>
<xs:enumeration value="text/xml"/>
<xs:enumeration value="application/msword"/>
<xs:enumeration value="application/vnd.openxmlformats-officedocument.wordprocessingml.document"/>
<xs:enumeration value="image/jpeg"/>
<xs:enumeration value="image/png"/>
<xs:enumeration value="image/tiff"/>
</xs:restriction>
</xs:simpleType>

<!-- AcceptedFileFormatType for specific file formats -->
<xs:simpleType name="AcceptedFileFormatType">
<xs:restriction base="xs:string">
<xs:enumeration value="pdf"/>
<xs:enumeration value="txt"/>
<xs:enumeration value="docx"/>
<xs:enumeration value="doc"/>
<xs:enumeration value="xml"/>
<xs:enumeration value="jpg"/>
<xs:enumeration value="png"/>
<xs:enumeration value="tiff"/>
<xs:enumeration value="cda/level2"/>
</xs:restriction>
</xs:simpleType>

</xs:schema>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 City of Espoo

SPDX-License-Identifier: LGPL-2.1-or-later
73 changes: 73 additions & 0 deletions service/sarmamodel/src/main/schema/common/include-policies.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.avaintec.com/2004/records-schedule-fi/1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:rs="http://www.avaintec.com/2004/records-schedule-fi/1.0"
elementFormDefault="qualified" attributeFormDefault="unqualified">

<!-- Information Security Level Type -->
<xs:simpleType name="InformationSecurityLevelType">
<xs:restriction base="xs:string">
<xs:enumeration value="ST I"/>
<xs:enumeration value="ST II"/>
<xs:enumeration value="ST III"/>
<xs:enumeration value="ST IV"/>
<xs:enumeration value="Unclassified"/>
</xs:restriction>
</xs:simpleType>

<!-- Disclosure Level Type -->
<xs:simpleType name="DisclosureLevelType">
<xs:restriction base="xs:string">
<xs:enumeration value="Public"/>
<xs:enumeration value="Internal"/>
<xs:enumeration value="Confidential"/>
<xs:enumeration value="Secret"/>
</xs:restriction>
</xs:simpleType>

<!-- Protection Level Type -->
<xs:simpleType name="ProtectionLevelType">
<xs:restriction base="xs:string">
<xs:enumeration value="Basic"/>
<xs:enumeration value="Enhanced"/>
<xs:enumeration value="High"/>
</xs:restriction>
</xs:simpleType>

<!-- Retention Policy Type -->
<xs:complexType name="RetentionPolicyType">
<xs:sequence>
<xs:element name="retentionPeriod" type="xs:string"/>
<xs:element name="retentionTrigger" type="xs:string" minOccurs="0"/>
<xs:element name="retentionReason" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<!-- Disclosure Policy Type -->
<xs:complexType name="DisclosurePolicyType">
<xs:sequence>
<xs:element name="disclosureLevel" type="rs:DisclosureLevelType"/>
<xs:element name="disclosureReason" type="xs:string" minOccurs="0"/>
<xs:element name="disclosurePeriod" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<!-- Information Security Policy Type -->
<xs:complexType name="InformationSecurityPolicyType">
<xs:sequence>
<xs:element name="securityLevel" type="rs:InformationSecurityLevelType"/>
<xs:element name="securityReason" type="xs:string" minOccurs="0"/>
<xs:element name="securityPeriod" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<!-- Protection Policy Type -->
<xs:complexType name="ProtectionPolicyType">
<xs:sequence>
<xs:element name="protectionLevel" type="rs:ProtectionLevelType"/>
<xs:element name="protectionReason" type="xs:string" minOccurs="0"/>
<xs:element name="protectionMeasures" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

</xs:schema>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 City of Espoo

SPDX-License-Identifier: LGPL-2.1-or-later
Loading