From 1631586a97102ef81ab89c0fed028fdf0e82dfbe Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Tue, 10 May 2022 09:43:33 +0200 Subject: [PATCH 1/9] Updated --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e8c2c82..b79b238 100644 --- a/pom.xml +++ b/pom.xml @@ -111,7 +111,7 @@ com.helger.web ph-web-parent-pom - 9.6.3 + 9.6.4 pom import From a62e9b08708efaf2d11739f00f8952b0d409917e Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Tue, 10 May 2022 13:21:19 +0200 Subject: [PATCH 2/9] Added length checks --- .../java/eu/de4a/iem/core/DE4AResponseDocumentHelper.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4AResponseDocumentHelper.java b/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4AResponseDocumentHelper.java index 8e29293..8e0b9a6 100644 --- a/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4AResponseDocumentHelper.java +++ b/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4AResponseDocumentHelper.java @@ -48,8 +48,10 @@ public static ErrorType createError (@Nonnull @Nonempty final String sCode, @Non ValueEnforcer.notEmpty (sText, "Text"); final ErrorType ret = new ErrorType (); - ret.setCode (sCode); - ret.setText (sText); + // length checks + ret.setCode (sCode.length () <= 10 ? sCode : sCode.substring (0, 10)); + // length checks + ret.setText (sText.length () <= 4000 ? sText : sText.substring (0, 4000)); return ret; } From 7c5cda52f272c741668e54b42c4d994906bff94a Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Tue, 10 May 2022 20:50:26 +0200 Subject: [PATCH 3/9] Renamed marshaller names --- .../java/eu/de4a/iem/core/DE4ACoreMarshaller.java | 12 ++++++------ .../eu/de4a/iem/core/DE4ACoreMarshallerTest.java | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4ACoreMarshaller.java b/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4ACoreMarshaller.java index 74819c7..e4b6827 100644 --- a/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4ACoreMarshaller.java +++ b/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4ACoreMarshaller.java @@ -83,7 +83,7 @@ private static ICommonsList _getXSDs (@Nonnull final ClassPa // DE - Data Evaluator @Nonnull - public static DE4ACoreMarshaller deRequestForwardEvidenceMarshaller (@Nonnull final IDE4ACanonicalEvidenceType aCanonicalEvidenceType) + public static DE4ACoreMarshaller deResponseExtractMultiEvidenceMarshaller (@Nonnull final IDE4ACanonicalEvidenceType aCanonicalEvidenceType) { return new DE4ACoreMarshaller <> (ResponseExtractMultiEvidenceType.class, _getXSDs (CDE4ACoreJAXB.XSD_DE, aCanonicalEvidenceType.getAllXSDs ()), @@ -91,7 +91,7 @@ public static DE4ACoreMarshaller deRequestFor } @Nonnull - public static DE4ACoreMarshaller deUsiRedirectUserMarshaller () + public static DE4ACoreMarshaller deUSIRedirectUserMarshaller () { return new DE4ACoreMarshaller <> (RedirectUserType.class, _getXSDs (CDE4ACoreJAXB.XSD_DE, null), @@ -143,7 +143,7 @@ public static DE4ACoreMarshaller doRequestEventSu // DR - Data Requestor @Nonnull - public static DE4ACoreMarshaller drRequestTransferEvidenceIMMarshaller () + public static DE4ACoreMarshaller drRequestExtractMultiEvidenceIMMarshaller () { return new DE4ACoreMarshaller <> (RequestExtractMultiEvidenceIMType.class, _getXSDs (CDE4ACoreJAXB.XSD_DR, null), @@ -151,7 +151,7 @@ public static DE4ACoreMarshaller drRequestTr } @Nonnull - public static DE4ACoreMarshaller drRequestTransferEvidenceLUMarshaller () + public static DE4ACoreMarshaller drRequestExtractMultiEvidenceLUMarshaller () { return new DE4ACoreMarshaller <> (RequestExtractMultiEvidenceLUType.class, _getXSDs (CDE4ACoreJAXB.XSD_DR, null), @@ -159,7 +159,7 @@ public static DE4ACoreMarshaller drRequestTr } @Nonnull - public static DE4ACoreMarshaller drRequestTransferEvidenceUSIMarshaller () + public static DE4ACoreMarshaller drRequestExtractMultiEvidenceUSIMarshaller () { return new DE4ACoreMarshaller <> (RequestExtractMultiEvidenceUSIType.class, _getXSDs (CDE4ACoreJAXB.XSD_DR, null), @@ -185,7 +185,7 @@ public static DE4ACoreMarshaller dtUSIRedirectUserMarshaller } @Nonnull - public static DE4ACoreMarshaller dtResponseTransferEvidenceMarshaller (@Nonnull final IDE4ACanonicalEvidenceType aCanonicalEvidenceType) + public static DE4ACoreMarshaller dtResponseExtractMultiEvidenceMarshaller (@Nonnull final IDE4ACanonicalEvidenceType aCanonicalEvidenceType) { return new DE4ACoreMarshaller <> (ResponseExtractMultiEvidenceType.class, _getXSDs (CDE4ACoreJAXB.XSD_DT, aCanonicalEvidenceType.getAllXSDs ()), diff --git a/de4a-core-schemas/src/test/java/eu/de4a/iem/core/DE4ACoreMarshallerTest.java b/de4a-core-schemas/src/test/java/eu/de4a/iem/core/DE4ACoreMarshallerTest.java index 6eb100e..3de9db9 100644 --- a/de4a-core-schemas/src/test/java/eu/de4a/iem/core/DE4ACoreMarshallerTest.java +++ b/de4a-core-schemas/src/test/java/eu/de4a/iem/core/DE4ACoreMarshallerTest.java @@ -80,7 +80,7 @@ private static void _testReadWrite (@Nonnull final GenericJAXBMarshaller @Test public void testDE () { - _testReadWrite (DE4ACoreMarshaller.deRequestForwardEvidenceMarshaller (IDE4ACanonicalEvidenceType.NONE), + _testReadWrite (DE4ACoreMarshaller.deResponseExtractMultiEvidenceMarshaller (IDE4ACanonicalEvidenceType.NONE), new File (BASE_PATH + "core/DE-request-forward-evidence.xml")); } } From 4ecdf768850977e21c15a37ce12008fa594acb03 Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Tue, 10 May 2022 21:11:16 +0200 Subject: [PATCH 4/9] Renamed --- .../src/main/java/eu/de4a/iem/core/DE4ACoreMarshaller.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4ACoreMarshaller.java b/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4ACoreMarshaller.java index e4b6827..0107605 100644 --- a/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4ACoreMarshaller.java +++ b/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4ACoreMarshaller.java @@ -211,7 +211,7 @@ public static DE4ACoreMarshaller dtEventNotificationMars // Default response @Nonnull - public static DE4ACoreMarshaller defResponseMessage () + public static DE4ACoreMarshaller defResponseErrorMarshaller () { return new DE4ACoreMarshaller <> (ResponseErrorType.class, _getXSDs (CDE4ACoreJAXB.XSD_DEFAULT_RESPONSE, null), From ca985f0b99edad2406c9e31ff230b005e17a6bbf Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Wed, 11 May 2022 09:42:21 +0200 Subject: [PATCH 5/9] Improved quality --- .../java/eu/de4a/iem/core/DE4ACoreNamespaceContext.java | 4 ++-- .../java/eu/de4a/iem/core/DE4AResponseDocumentHelper.java | 8 ++++++-- .../java/eu/de4a/iem/core/IDE4ACanonicalEvidenceType.java | 4 +++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4ACoreNamespaceContext.java b/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4ACoreNamespaceContext.java index f9bcdda..d629695 100644 --- a/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4ACoreNamespaceContext.java +++ b/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4ACoreNamespaceContext.java @@ -29,7 +29,7 @@ public class DE4ACoreNamespaceContext extends MapBasedNamespaceContext { private static final class SingletonHolder { - static final DE4ACoreNamespaceContext s_aInstance = new DE4ACoreNamespaceContext (); + static final DE4ACoreNamespaceContext INSTANCE = new DE4ACoreNamespaceContext (); } protected DE4ACoreNamespaceContext () @@ -44,6 +44,6 @@ protected DE4ACoreNamespaceContext () @Nonnull public static DE4ACoreNamespaceContext getInstance () { - return SingletonHolder.s_aInstance; + return SingletonHolder.INSTANCE; } } diff --git a/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4AResponseDocumentHelper.java b/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4AResponseDocumentHelper.java index 8e0b9a6..214fa39 100644 --- a/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4AResponseDocumentHelper.java +++ b/de4a-core-schemas/src/main/java/eu/de4a/iem/core/DE4AResponseDocumentHelper.java @@ -29,6 +29,10 @@ */ public final class DE4AResponseDocumentHelper { + // See DE4A XSD + public static final int MAX_ERROR_CODE_LENGTH = 10; + public static final int MAX_ERROR_TEXT_LENGTH = 4000; + private DE4AResponseDocumentHelper () {} @@ -49,9 +53,9 @@ public static ErrorType createError (@Nonnull @Nonempty final String sCode, @Non final ErrorType ret = new ErrorType (); // length checks - ret.setCode (sCode.length () <= 10 ? sCode : sCode.substring (0, 10)); + ret.setCode (sCode.length () <= MAX_ERROR_CODE_LENGTH ? sCode : sCode.substring (0, MAX_ERROR_CODE_LENGTH)); // length checks - ret.setText (sText.length () <= 4000 ? sText : sText.substring (0, 4000)); + ret.setText (sText.length () <= MAX_ERROR_TEXT_LENGTH ? sText : sText.substring (0, MAX_ERROR_TEXT_LENGTH)); return ret; } diff --git a/de4a-core-schemas/src/main/java/eu/de4a/iem/core/IDE4ACanonicalEvidenceType.java b/de4a-core-schemas/src/main/java/eu/de4a/iem/core/IDE4ACanonicalEvidenceType.java index 9af4b95..b91ae5e 100644 --- a/de4a-core-schemas/src/main/java/eu/de4a/iem/core/IDE4ACanonicalEvidenceType.java +++ b/de4a-core-schemas/src/main/java/eu/de4a/iem/core/IDE4ACanonicalEvidenceType.java @@ -60,7 +60,9 @@ static IDE4ACanonicalEvidenceType multiple (@Nonnull final IDE4ACanonicalEvidenc @Nonempty public String getDisplayName () { - return "collectionOf(" + StringHelper.getImplodedMapped (',', aTypes, IDE4ACanonicalEvidenceType::getDisplayName) + ")"; + return "collectionOf(" + + StringHelper.imploder ().separator (',').source (aTypes, IDE4ACanonicalEvidenceType::getDisplayName).build () + + ")"; } @Nonnull From 0263c7d6ff9d4ca0d6dd653efd570151cfb523cb Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Wed, 11 May 2022 15:49:14 +0200 Subject: [PATCH 6/9] Removed the SA UC1 data model 2021-02-11 --- README.md | 2 + .../iem/cev/EDE4ACanonicalEvidenceType.java | 2 +- .../iem/cev/de4a/t41/v2021_02_11/CT41.java | 83 ---------------- .../t41/v2021_02_11/DE4AT41Marshaller.java | 49 --------- .../v2021_02_11/DE4AT41NamespaceContext.java | 48 --------- .../src/main/jaxb/bindings-t41.xjb | 5 - .../schemas/t4.1/uc1/SA-UC1-11-02-2021.xsd | 99 ------------------- .../cev/de4a/t41/v2021_02_11/CT41Test.java | 35 ------- .../v2021_02_11/DE4AT41MarshallerTest.java | 66 ------------- 9 files changed, 3 insertions(+), 386 deletions(-) delete mode 100644 de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/CT41.java delete mode 100644 de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/DE4AT41Marshaller.java delete mode 100644 de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/DE4AT41NamespaceContext.java delete mode 100644 de4a-canonical-evidences/src/main/resources/schemas/t4.1/uc1/SA-UC1-11-02-2021.xsd delete mode 100644 de4a-canonical-evidences/src/test/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/CT41Test.java delete mode 100644 de4a-canonical-evidences/src/test/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/DE4AT41MarshallerTest.java diff --git a/README.md b/README.md index da2327d..7d85578 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ The `development` branch is used for development of Iteration 2 stuff. ## History +* v0.2.5 - work in progress + * Removed the SA UC1 data model 2021-02-11 * v0.2.4 - 2022-04-13 * Fixed the date/time/dateTime JAXB binding for T41 and T42. * Changed the package names in the `de4a-canonical-evidences` submodule diff --git a/de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/EDE4ACanonicalEvidenceType.java b/de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/EDE4ACanonicalEvidenceType.java index 39828c8..e185edd 100644 --- a/de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/EDE4ACanonicalEvidenceType.java +++ b/de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/EDE4ACanonicalEvidenceType.java @@ -29,7 +29,7 @@ */ public enum EDE4ACanonicalEvidenceType implements IDE4ACanonicalEvidenceType { - T41_UC1_2021_02_11 ("t41-uc1-2021-02-11", "T4.1 UC1 v2021-02-11", eu.de4a.iem.cev.de4a.t41.v2021_02_11.CT41.getAllXSDs ()), + // Studying abroad T41_UC1_2021_04_13 ("t41-uc1-2021-04-13", "T4.1 UC1 v2021-04-13", eu.de4a.iem.cev.de4a.t41.v2021_04_13.CT41.getAllXSDs ()), T42_COMPANY_INFO_V06 ("t42-companyinfo-v06", "T4.2 Company Info v0.6", eu.de4a.iem.cev.de4a.t42.v0_6.CT42.getAllXSDs ()), T43_BIRTH_EVIDENCE_V16B ("t43-birth-v16b", "T4.3 Birth Evidence v1.6b", eu.de4a.iem.cev.de4a.t43.v1_6b.CT43.getAllBirthEvidenceXSDs ()), diff --git a/de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/CT41.java b/de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/CT41.java deleted file mode 100644 index 41b4771..0000000 --- a/de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/CT41.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package eu.de4a.iem.cev.de4a.t41.v2021_02_11; - -import javax.annotation.Nonnull; - -import com.helger.commons.annotation.ReturnsMutableCopy; -import com.helger.commons.collection.impl.CommonsArrayList; -import com.helger.commons.collection.impl.ICommonsList; -import com.helger.commons.io.resource.ClassPathResource; -import com.helger.ubl23.CUBL23; -import com.helger.xsds.ccts.cct.schemamodule.CCCTS; -import com.helger.xsds.xades132.CXAdES132; -import com.helger.xsds.xml.CXML_XSD; - -/** - * Constants for handling DE4A T4.1 v2021-02-11 pilot stuff - * - * @author Philip Helger - */ -public final class CT41 -{ - public static final String NAMESPACE_URI = "https://data.europe.eu/de4a/model/studying-abroad/"; - - private CT41 () - {} - - @Nonnull - private static ClassLoader _getCL () - { - return CT41.class.getClassLoader (); - } - - @Nonnull - @ReturnsMutableCopy - public static ICommonsList getAllXSDs () - { - final ICommonsList a = new CommonsArrayList <> (); - a.add (CXML_XSD.getXSDResource ()); - // XMLDsig + Xades - a.addAll (CXAdES132.getAllXSDResources ()); - a.add (CCCTS.getXSDResource ()); - a.add (CUBL23.XSD_UNQUALIFIED_DATA_TYPES); - a.add (CUBL23.XSD_QUALIFIED_DATA_TYPES); - a.add (CUBL23.XSD_COMMON_BASIC_COMPONENTS); - if (false) - { - // No includes - just imports - a.add (new ClassPathResource ("schemas/t4.1/uc1/w3c_verifiableCredentials.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/imported/edci_esco_individuals.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/imported/edci_esco_eqf.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/imported/edci_esco_iscedf2013.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/imported/edci_mdr_humansex.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/imported/edci_mdr_currency.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/imported/edci_esco_nuts2016.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/imported/edci_mdr_languages.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/imported/edci_mdr_countries.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/edci_individuals.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/edci_simpleContentTypes.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/edci_complexContentTypes.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/edci_associationobject.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/edci_contact.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/edci_learningOpportunity.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/edci_accreditation.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/edci_agent.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/edci_commonTypes.xsd", _getCL ())); - } - a.add (new ClassPathResource ("schemas/t4.1/uc1/edci_credentialTypes.xsd", _getCL ())); - a.add (new ClassPathResource ("schemas/t4.1/uc1/SA-UC1-11-02-2021.xsd", _getCL ())); - return a; - } -} diff --git a/de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/DE4AT41Marshaller.java b/de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/DE4AT41Marshaller.java deleted file mode 100644 index ad3a6c0..0000000 --- a/de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/DE4AT41Marshaller.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package eu.de4a.iem.cev.de4a.t41.v2021_02_11; - -import java.util.function.Function; - -import javax.annotation.Nonnull; -import javax.xml.bind.JAXBElement; - -import com.helger.jaxb.GenericJAXBMarshaller; - -import eu.de4a.iem.jaxb.t41.uc1.v2021_02_11.HigherEducationEvidenceType; - -/** - * Special marshaller for canonical evidences of the DE4A T4.1 v2021-02-11 - * pilot. This class can ONLY ready T4.1 stuff without the surrounding core - * document. - * - * @author Philip Helger - * @param - * JAXB type to be read - */ -public class DE4AT41Marshaller extends GenericJAXBMarshaller -{ - public DE4AT41Marshaller (@Nonnull final Class aType, - @Nonnull final Function > aJAXBElementWrapper) - { - super (aType, CT41.getAllXSDs (), aJAXBElementWrapper); - setNamespaceContext (DE4AT41NamespaceContext.getInstance ()); - } - - @Nonnull - public static DE4AT41Marshaller higherEducationEvidence () - { - return new DE4AT41Marshaller <> (HigherEducationEvidenceType.class, - new eu.de4a.iem.jaxb.t41.uc1.v2021_02_11.ObjectFactory ()::createHigherEducationEvidence); - } -} diff --git a/de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/DE4AT41NamespaceContext.java b/de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/DE4AT41NamespaceContext.java deleted file mode 100644 index d75d83b..0000000 --- a/de4a-canonical-evidences/src/main/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/DE4AT41NamespaceContext.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package eu.de4a.iem.cev.de4a.t41.v2021_02_11; - -import javax.annotation.Nonnull; - -import com.helger.commons.annotation.Singleton; -import com.helger.ubl23.UBL23NamespaceContext; -import com.helger.xml.namespace.MapBasedNamespaceContext; - -/** - * XML Namespace context for DE4A T4.1 v2021-02-11 - * - * @author Philip Helger - */ -@Singleton -public class DE4AT41NamespaceContext extends MapBasedNamespaceContext -{ - private static final class SingletonHolder - { - static final DE4AT41NamespaceContext INSTANCE = new DE4AT41NamespaceContext (); - } - - protected DE4AT41NamespaceContext () - { - addMappings (UBL23NamespaceContext.getInstance ()); - addMapping ("eup", "http://data.europa.eu/europass/model/credentials#"); - addMapping ("cred", "http://data.europa.eu/europass/model/credentials/w3c#"); - addMapping ("sa", CT41.NAMESPACE_URI); - } - - @Nonnull - public static DE4AT41NamespaceContext getInstance () - { - return SingletonHolder.INSTANCE; - } -} diff --git a/de4a-canonical-evidences/src/main/jaxb/bindings-t41.xjb b/de4a-canonical-evidences/src/main/jaxb/bindings-t41.xjb index 8e4a9e3..8bab5e7 100644 --- a/de4a-canonical-evidences/src/main/jaxb/bindings-t41.xjb +++ b/de4a-canonical-evidences/src/main/jaxb/bindings-t41.xjb @@ -49,11 +49,6 @@ - - - - - diff --git a/de4a-canonical-evidences/src/main/resources/schemas/t4.1/uc1/SA-UC1-11-02-2021.xsd b/de4a-canonical-evidences/src/main/resources/schemas/t4.1/uc1/SA-UC1-11-02-2021.xsd deleted file mode 100644 index 8fc713f..0000000 --- a/de4a-canonical-evidences/src/main/resources/schemas/t4.1/uc1/SA-UC1-11-02-2021.xsd +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - An academic title or degree obtained by the student and proven by this diploma or certificate (evidence) - - - - - Country where the study programme was completed by the student - - - - - The name of the higher education institution where the student obtained the degree - - - - - Name of a study programme that the student finished at the higher education institution in order to obtain the degree - - - - - Field of finished higher education - - - - - Mode of study, (full time, part time, distance learning) - - - - - Official duration of education in years - - - - - The official workload of the study programme in the ECTS (European Credit Transfer and Accumulation System) credit points - - - - - Date of issue of the certificate or diploma - - - - - Place of issue (location) of the certificate or diploma - - - - - - - - - - - - - - - - - diff --git a/de4a-canonical-evidences/src/test/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/CT41Test.java b/de4a-canonical-evidences/src/test/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/CT41Test.java deleted file mode 100644 index 94e94c8..0000000 --- a/de4a-canonical-evidences/src/test/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/CT41Test.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package eu.de4a.iem.cev.de4a.t41.v2021_02_11; - -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import com.helger.commons.io.resource.ClassPathResource; - -/** - * Test class for class {@link CT41}. - * - * @author Philip Helger - */ -public final class CT41Test -{ - @Test - public void testBasic () - { - for (final ClassPathResource aCP : CT41.getAllXSDs ()) - assertTrue (aCP.getPath (), aCP.exists ()); - } -} diff --git a/de4a-canonical-evidences/src/test/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/DE4AT41MarshallerTest.java b/de4a-canonical-evidences/src/test/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/DE4AT41MarshallerTest.java deleted file mode 100644 index 23f4527..0000000 --- a/de4a-canonical-evidences/src/test/java/eu/de4a/iem/cev/de4a/t41/v2021_02_11/DE4AT41MarshallerTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package eu.de4a.iem.cev.de4a.t41.v2021_02_11; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.File; - -import javax.annotation.Nonnull; - -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.helger.jaxb.GenericJAXBMarshaller; - -/** - * Test class for class {@link DE4AT41Marshaller}. - * - * @author Philip Helger - */ -public final class DE4AT41MarshallerTest -{ - private static final Logger LOGGER = LoggerFactory.getLogger (DE4AT41MarshallerTest.class); - private static final String BASE_PATH = "src/test/resources/de4a/t4.1/uc1/v2021-02-11/"; - - private static void _testReadWrite (@Nonnull final GenericJAXBMarshaller aMarshaller, - @Nonnull final File aFile) - { - assertTrue ("Test file does not exists " + aFile.getAbsolutePath (), aFile.exists ()); - - final T aRead = aMarshaller.read (aFile); - assertNotNull ("Failed to read " + aFile.getAbsolutePath (), aRead); - - final byte [] aBytes = aMarshaller.getAsBytes (aRead); - assertNotNull ("Failed to re-write " + aFile.getAbsolutePath (), aBytes); - - if (true) - { - aMarshaller.setFormattedOutput (true); - LOGGER.info (aMarshaller.getAsString (aRead)); - } - } - - @Test - public void testHigherEducationEvidence () - { - _testReadWrite (DE4AT41Marshaller.higherEducationEvidence (), - new File (BASE_PATH + "HigherEducationEvidenceTypev3.xml")); - _testReadWrite (DE4AT41Marshaller.higherEducationEvidence (), - new File (BASE_PATH + "SA-UC1-11-02-2021-example-PT.xml")); - _testReadWrite (DE4AT41Marshaller.higherEducationEvidence (), new File (BASE_PATH + "SA-UC1-15-02-2021-JSI.xml")); - } -} From 8d3647236219a551426be5ba253b3ce72fc3ad00 Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Wed, 11 May 2022 16:19:44 +0200 Subject: [PATCH 7/9] Removed trailing "2" --- ...de4a2.jks => de4a-truststore-smp-v3-pw-de4a.jks} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename certificates/smp/prod/{de4a-truststore-smp-v3-pw-de4a2.jks => de4a-truststore-smp-v3-pw-de4a.jks} (100%) diff --git a/certificates/smp/prod/de4a-truststore-smp-v3-pw-de4a2.jks b/certificates/smp/prod/de4a-truststore-smp-v3-pw-de4a.jks similarity index 100% rename from certificates/smp/prod/de4a-truststore-smp-v3-pw-de4a2.jks rename to certificates/smp/prod/de4a-truststore-smp-v3-pw-de4a.jks From 4d75d8f2b7656b46a371921f101eb2a1f7626331 Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Wed, 11 May 2022 20:32:40 +0200 Subject: [PATCH 8/9] Added constant --- de4a-core-schemas/src/main/java/eu/de4a/iem/core/CIEM.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/de4a-core-schemas/src/main/java/eu/de4a/iem/core/CIEM.java b/de4a-core-schemas/src/main/java/eu/de4a/iem/core/CIEM.java index ec43b52..a38115f 100644 --- a/de4a-core-schemas/src/main/java/eu/de4a/iem/core/CIEM.java +++ b/de4a-core-schemas/src/main/java/eu/de4a/iem/core/CIEM.java @@ -14,6 +14,9 @@ public final class CIEM // Iteration 2 identifier for the IEM "/SpecificationId" element public static final String SPECIFICATION_ID = "de4a-iem-v2"; + // Specific Document Type Identifier value for multi-item requests + public static final String MULTI_ITEM_TYPE = "MultiItem:1.0"; + private CIEM () {} } From 43463c76fa80ca8873a2294541c030164f1ea62c Mon Sep 17 00:00:00 2001 From: Philip Helger Date: Fri, 13 May 2022 10:21:05 +0200 Subject: [PATCH 9/9] Prepared for release --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7d85578..98d91a1 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Shared stuff for DE4A software components. Last release: -* Iteration 2: **0.2.4** +* Iteration 2: **0.2.5** * Iteration 1: **0.1.11** In the DE4A project we are differentiating between "Iteration 1" and "Iteration 2". As they are incompatible, care needs to be taken, that they are not mixed together. @@ -13,7 +13,7 @@ The `development` branch is used for development of Iteration 2 stuff. ## History -* v0.2.5 - work in progress +* v0.2.5 - 2022-05-13 * Removed the SA UC1 data model 2021-02-11 * v0.2.4 - 2022-04-13 * Fixed the date/time/dateTime JAXB binding for T41 and T42.