From 524ab5c3a6d4787f755c5050765646a7d62e0c7a Mon Sep 17 00:00:00 2001 From: NIDHAL GDOURA Date: Thu, 23 Oct 2025 09:36:02 +0200 Subject: [PATCH] UPDATE sedalib: Saphir team adaptations to Sedalib to address missing elements --- .../tools/sedalib/core/DataObjectPackage.java | 2 +- .../vitam/tools/sedalib/inout/SIPBuilder.java | 64 +++++++++---- .../metadata/content/ContentSaphir.java | 91 +++++++++++++++++++ .../sedalib/metadata/content/EventSaphir.java | 68 ++++++++++++++ .../metadata/content/SignerSaphir.java | 59 ++++++++++++ .../metadata/content/ValidatorSaphir.java | 60 ++++++++++++ .../sedalib/metadata/data/FileInfoSaphir.java | 60 ++++++++++++ .../management/ClassificationRule.java | 1 + 8 files changed, 385 insertions(+), 20 deletions(-) create mode 100644 sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/ContentSaphir.java create mode 100644 sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/EventSaphir.java create mode 100644 sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/SignerSaphir.java create mode 100644 sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/ValidatorSaphir.java create mode 100644 sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/data/FileInfoSaphir.java diff --git a/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/core/DataObjectPackage.java b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/core/DataObjectPackage.java index 122eb25e..8b0858df 100644 --- a/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/core/DataObjectPackage.java +++ b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/core/DataObjectPackage.java @@ -305,7 +305,7 @@ public void incTouchedInDataObjectPackageId(String inDataObjectPackageId) { * not touched */ public Integer getTouchedInDataObjectPackageId(String inDataObjectPackageId) { - return touchedInDataObjectPackageIdMap.get(inDataObjectPackageId); + return touchedInDataObjectPackageIdMap.getOrDefault(inDataObjectPackageId,0); } /** diff --git a/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/inout/SIPBuilder.java b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/inout/SIPBuilder.java index 6e5eeca3..b47f9e23 100644 --- a/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/inout/SIPBuilder.java +++ b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/inout/SIPBuilder.java @@ -182,7 +182,7 @@ public void setArchivalAgreement(String archivalAgreement) { * * @param archiveUnitID the archive unit ID * @return the archive unit - * @throws SEDALibException when the ArchiveUnit has a defined UniqId which is already in the DataObjectPackage + * @throws SEDALibException when the ArchiveUnit has a defined UniqId which is already in the DataObjectPackage */ public ArchiveUnit createRootArchiveUnit(String archiveUnitID) throws SEDALibException { ArchiveUnit au; @@ -203,7 +203,7 @@ public ArchiveUnit createRootArchiveUnit(String archiveUnitID) throws SEDALibExc * @param title the title * @param description the description * @return the archive unit - * @throws SEDALibException when the ArchiveUnit has a defined UniqId which is already in the SIP + * @throws SEDALibException when the ArchiveUnit has a defined UniqId which is already in the SIP */ public ArchiveUnit createRootArchiveUnit(String archiveUnitID, String descriptionLevel, String title, String description) throws SEDALibException { @@ -222,6 +222,32 @@ public ArchiveUnit createRootArchiveUnit(String archiveUnitID, String descriptio return au; } + /** + * Creates a root archive unit in the SIP. + * Nouvelle signature de la méthode pour descriptionLevel et title uniquement + * et éviter la géneration de la balise vide. + * + * @param archiveUnitID the archive unit ID + * @param descriptionLevel the description level + * @param title the title + * @return the archive unit + * @throws SEDALibException when the ArchiveUnit has a defined UniqId which is already in the SIP + */ + public ArchiveUnit createRootArchiveUnit(String archiveUnitID, String descriptionLevel, String title) throws SEDALibException { + ArchiveUnit au = createRootArchiveUnit(archiveUnitID); + + Content c = new Content(); + try { + c.addNewMetadata("DescriptionLevel", descriptionLevel); + c.addNewMetadata("Title", title); + } catch (SEDALibException ignored) { + // ignored + } + au.setContent(c); + + return au; + } + /** * Creates a root archive unit in the SIP which is in fact an existing archive unit in the archiving system. * This archive unit is defined by its uniq systemId. @@ -229,7 +255,7 @@ public ArchiveUnit createRootArchiveUnit(String archiveUnitID, String descriptio * @param archiveUnitID the archive unit ID * @param systemId the system id * @return the archive unit - * @throws SEDALibException when the ArchiveUnit has a defined UniqId which is already in the SIP + * @throws SEDALibException when the ArchiveUnit has a defined UniqId which is already in the SIP */ public ArchiveUnit createSystemExistingRootArchiveUnit(String archiveUnitID, String systemId) throws SEDALibException { @@ -255,7 +281,7 @@ public ArchiveUnit createSystemExistingRootArchiveUnit(String archiveUnitID, Str * @param descriptionLevel the description level * @param title the title * @return the archive unit - * @throws SEDALibException when the ArchiveUnit has a defined UniqId which is already in the SIP + * @throws SEDALibException when the ArchiveUnit has a defined UniqId which is already in the SIP */ public ArchiveUnit createSystemExistingRootArchiveUnit(String archiveUnitID, String metadataName, String metadataValue, String descriptionLevel, String title) throws SEDALibException { @@ -302,7 +328,7 @@ public ArchiveUnit addSubArchiveUnit(String archiveUnitID, String childArchiveUn * @param title the title * @param description the description * @return the archive unit - * @throws SEDALibException if no identified ArchiveUnit, or when there is already an ArchiveUnit with the same UniqID + * @throws SEDALibException if no identified ArchiveUnit, or when there is already an ArchiveUnit with the same UniqID */ public ArchiveUnit addNewSubArchiveUnit(String archiveUnitID, String childArchiveUnitID, String descriptionLevel, String title, String description) throws SEDALibException { @@ -321,7 +347,7 @@ public ArchiveUnit addNewSubArchiveUnit(String archiveUnitID, String childArchiv au.setContent(c); parentAU.addChildArchiveUnit(au); doProgressLogWithoutInterruption(sedaLibProgressLogger, SEDALibProgressLogger.OBJECTS, - "sedalib: création d'une sous ArchiveUnit [" + childArchiveUnitID + "] de [" + archiveUnitID + "]",null); + "sedalib: création d'une sous ArchiveUnit [" + childArchiveUnitID + "] de [" + archiveUnitID + "]", null); return au; } @@ -330,7 +356,7 @@ public ArchiveUnit addNewSubArchiveUnit(String archiveUnitID, String childArchiv * * @param archiveUnitID the archive unit ID * @param fromArchiveUnitID the from archive unit ID - * @throws SEDALibException if no identified ArchiveUnit + * @throws SEDALibException if no identified ArchiveUnit */ public void addArchiveUnitSubTree(String archiveUnitID, String fromArchiveUnitID) throws SEDALibException { ArchiveUnit parentAU = archiveTransfer.getDataObjectPackage().getArchiveUnitById(archiveUnitID); @@ -355,7 +381,7 @@ public void addArchiveUnitSubTree(String archiveUnitID, String fromArchiveUnitID * @param title the title * @param description the description * @return the archive unit - * @throws SEDALibException if no identified ArchiveUnit, file access problem , or when there is already an ArchiveUnit with the same UniqID + * @throws SEDALibException if no identified ArchiveUnit, file access problem , or when there is already an ArchiveUnit with the same UniqID */ public ArchiveUnit addFileSubArchiveUnit(String archiveUnitID, String onDiskPath, String childArchiveUnitID, String descriptionLevel, String title, String description) throws SEDALibException { @@ -390,11 +416,11 @@ public ArchiveUnit addFileSubArchiveUnit(String archiveUnitID, String onDiskPath * @param archiveUnitID the archive unit ID * @param onDiskPathString the on disk path string * @param ignorePatterString the ignore patter string - * @throws SEDALibException if no identified ArchiveUnit + * @throws SEDALibException if no identified ArchiveUnit */ public void addDiskSubTree(String archiveUnitID, String onDiskPathString, String... ignorePatterString) throws SEDALibException { - addDiskSubTree(archiveUnitID,onDiskPathString,false,null,ignorePatterString); + addDiskSubTree(archiveUnitID, onDiskPathString, false, null, ignorePatterString); } /** @@ -411,10 +437,10 @@ public void addDiskSubTree(String archiveUnitID, String onDiskPathString, String * @param noLinkFlag the no link flag * @param extractTitleFromFileNameFunction the extract title from file name function * @param ignorePatterString the ignore patter string - * @throws SEDALibException if no identified ArchiveUnit + * @throws SEDALibException if no identified ArchiveUnit */ public void addDiskSubTree(String archiveUnitID, String onDiskPathString, boolean noLinkFlag, - Function extractTitleFromFileNameFunction, + Function extractTitleFromFileNameFunction, String... ignorePatterString) throws SEDALibException { @@ -422,7 +448,7 @@ public void addDiskSubTree(String archiveUnitID, String onDiskPathString, boolea if (parentAU == null) throw new SEDALibException("Pas d'ArchiveUnit avec l'identifiant [" + archiveUnitID + "]"); DiskToDataObjectPackageImporter di = new DiskToDataObjectPackageImporter(onDiskPathString, noLinkFlag, - extractTitleFromFileNameFunction,sedaLibProgressLogger); + extractTitleFromFileNameFunction, sedaLibProgressLogger); for (String ip : ignorePatterString) di.addIgnorePattern(ip); @@ -443,7 +469,7 @@ public void addDiskSubTree(String archiveUnitID, String onDiskPathString, boolea * @param encoding the encoding * @param separator the separator * @param onDiskPathString the on disk path string - * @throws SEDALibException if no identified ArchiveUnit + * @throws SEDALibException if no identified ArchiveUnit */ public void addCSVMetadataSubTree(String archiveUnitID, String encoding, char separator, String onDiskPathString) throws SEDALibException { @@ -468,7 +494,7 @@ public void addCSVMetadataSubTree(String archiveUnitID, String encoding, char se * @param archiveUnitID the ArchiveUnit id * @param onDiskPathString the file path string * @param usageVersion the usageVersion metadata in "usage_version" format - * @throws SEDALibException if no identified ArchiveUnit or file acces problem + * @throws SEDALibException if no identified ArchiveUnit or file acces problem */ public void addFileToArchiveUnit(String archiveUnitID, String onDiskPathString, String usageVersion) throws SEDALibException { ArchiveUnit au = archiveTransfer.getDataObjectPackage().getArchiveUnitById(archiveUnitID); @@ -682,7 +708,7 @@ public void sedaSchemaValidate() throws SEDALibException { */ public void sedaProfileValidate(String profileFileName) throws SEDALibException { try { - archiveTransfer.sedaProfileValidate(profileFileName,sedaLibProgressLogger); + archiveTransfer.sedaProfileValidate(profileFileName, sedaLibProgressLogger); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } @@ -709,7 +735,7 @@ private void verifyContext() throws SEDALibException { /** * Generate SIP. * - * @throws SEDALibException the SEDA lib exception + * @throws SEDALibException the SEDA lib exception */ public void generateSIP() throws SEDALibException { generateSIP(false, false); @@ -720,7 +746,7 @@ public void generateSIP() throws SEDALibException { * * @param hierarchicalArchiveUnitsFlag the hierarchical archive units flag * @param indentedFlag the indented flag - * @throws SEDALibException the SEDA lib exception + * @throws SEDALibException the SEDA lib exception */ public void generateSIP(boolean hierarchicalArchiveUnitsFlag, boolean indentedFlag) throws SEDALibException { doProgressLogWithoutInterruption(sedaLibProgressLogger, SEDALibProgressLogger.GLOBAL, "sedalib: lancement de la génération du SIP", null); @@ -742,7 +768,7 @@ public void generateSIP(boolean hierarchicalArchiveUnitsFlag, boolean indentedFl Thread.currentThread().interrupt(); } doProgressLogWithoutInterruption(sedaLibProgressLogger, SEDALibProgressLogger.GLOBAL, "sedalib: fichier sauvegardé (" + SEDALibProgressLogger.readableFileSize(new File(sipPathString).length()) - + ")", null); + + ")", null); } /* diff --git a/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/ContentSaphir.java b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/ContentSaphir.java new file mode 100644 index 00000000..d259e45f --- /dev/null +++ b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/ContentSaphir.java @@ -0,0 +1,91 @@ +/** + * Copyright French Prime minister Office/DINSIC/Vitam Program (2015-2019) + *

+ * contact.vitam@programmevitam.fr + *

+ * This software is developed as a validation helper tool, for constructing Submission Information Packages (archives + * sets) in the Vitam program whose purpose is to implement a digital archiving back-office system managing high + * volumetry securely and efficiently. + *

+ * This software is governed by the CeCILL 2.1 license under French law and abiding by the rules of distribution of free + * software. You can use, modify and/ or redistribute the software under the terms of the CeCILL 2.1 license as + * circulated by CEA, CNRS and INRIA archiveDeliveryRequestReply the following URL "http://www.cecill.info". + *

+ * As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, + * users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the + * successive licensors have only limited liability. + *

+ * In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or + * developing or reproducing the software by the user in light of its specific status of free software, that may mean + * that it is complicated to manipulate, and that also therefore means that it is reserved for developers and + * experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the + * software's suitability as regards their requirements in conditions enabling the security of their systems and/or data + * to be ensured and, more generally, to use and operate it in the same conditions as regards security. + *

+ * The fact that you are presently reading this means that you have had knowledge of the CeCILL 2.1 license and that you + * accept its terms. + */ +package fr.gouv.vitam.tools.sedalib.metadata.content; + +import fr.gouv.vitam.tools.sedalib.metadata.namedtype.ComplexListMetadataKind; +import fr.gouv.vitam.tools.sedalib.metadata.namedtype.StringType; + +/** + * The Class ContentSaphir. + *

+ * Class for SEDA element Content. + *

+ * A ArchiveUnit metadata. + *

+ * Standard quote: "Métadonnées de description associées à un ArchiveUnit" + */ +public class ContentSaphir extends Content { + + + static { + + + metadataMap.put("CreatedDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap.put("TransactedDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap.put("AcquiredDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap.put("SentDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap.put("ReceivedDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap.put("RegisteredDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap.put("StartDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap.put("EndDate", new ComplexListMetadataKind(StringType.class, false)); + } + + + static { + + metadataMap_v2.put("CreatedDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap_v2.put("TransactedDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap_v2.put("AcquiredDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap_v2.put("SentDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap_v2.put("ReceivedDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap_v2.put("RegisteredDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap_v2.put("StartDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap_v2.put("EndDate", new ComplexListMetadataKind(StringType.class, false)); + } + + static { + + metadataMap_v3.put("CreatedDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap_v3.put("TransactedDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap_v3.put("AcquiredDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap_v3.put("SentDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap_v3.put("ReceivedDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap_v3.put("RegisteredDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap_v3.put("StartDate", new ComplexListMetadataKind(StringType.class, false)); + metadataMap_v3.put("EndDate", new ComplexListMetadataKind(StringType.class, false)); + } + + /** + * Instantiates a new ContentSaphir. + */ + public ContentSaphir() { + super(); + } + + +} diff --git a/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/EventSaphir.java b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/EventSaphir.java new file mode 100644 index 00000000..fa8f40e6 --- /dev/null +++ b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/EventSaphir.java @@ -0,0 +1,68 @@ +/** + * Copyright French Prime minister Office/DINSIC/Vitam Program (2015-2019) + *

+ * contact.vitam@programmevitam.fr + *

+ * This software is developed as a validation helper tool, for constructing Submission Information Packages (archives + * sets) in the Vitam program whose purpose is to implement a digital archiving back-office system managing high + * volumetry securely and efficiently. + *

+ * This software is governed by the CeCILL 2.1 license under French law and abiding by the rules of distribution of free + * software. You can use, modify and/ or redistribute the software under the terms of the CeCILL 2.1 license as + * circulated by CEA, CNRS and INRIA archiveDeliveryRequestReply the following URL "http://www.cecill.info". + *

+ * As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, + * users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the + * successive licensors have only limited liability. + *

+ * In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or + * developing or reproducing the software by the user in light of its specific status of free software, that may mean + * that it is complicated to manipulate, and that also therefore means that it is reserved for developers and + * experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the + * software's suitability as regards their requirements in conditions enabling the security of their systems and/or data + * to be ensured and, more generally, to use and operate it in the same conditions as regards security. + *

+ * The fact that you are presently reading this means that you have had knowledge of the CeCILL 2.1 license and that you + * accept its terms. + */ +package fr.gouv.vitam.tools.sedalib.metadata.content; + +import fr.gouv.vitam.tools.sedalib.metadata.namedtype.ComplexListMetadataKind; +import fr.gouv.vitam.tools.sedalib.metadata.namedtype.StringType; + +/** + * The Class EventSaphir. + *

+ * Class for SEDA element Event. + *

+ * An Event metadata. + *

+ * Standard quote: "Informations décrivant un événement survenu au cours d’une + * procédure (ex. publication d’un marché, notification d’un marché, recueil + * d’un avis administratif, etc.)." + */ +public class EventSaphir extends Event { + + + static { + + + metadataMap_default.put("EventDateTime", new ComplexListMetadataKind(StringType.class, false)); + + } + + + static { + + metadataMap_v2.put("EventDateTime", new ComplexListMetadataKind(StringType.class, false)); + + } + + /** + * Instantiates a new EventSaphir. + */ + public EventSaphir() { + super(); + } + +} diff --git a/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/SignerSaphir.java b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/SignerSaphir.java new file mode 100644 index 00000000..1e27c15e --- /dev/null +++ b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/SignerSaphir.java @@ -0,0 +1,59 @@ +/** + * Copyright French Prime minister Office/DINSIC/Vitam Program (2015-2019) + *

+ * contact.vitam@programmevitam.fr + *

+ * This software is developed as a validation helper tool, for constructing Submission Information Packages (archives + * sets) in the Vitam program whose purpose is to implement a digital archiving back-office system managing high + * volumetry securely and efficiently. + *

+ * This software is governed by the CeCILL 2.1 license under French law and abiding by the rules of distribution of free + * software. You can use, modify and/ or redistribute the software under the terms of the CeCILL 2.1 license as + * circulated by CEA, CNRS and INRIA archiveDeliveryRequestReply the following URL "http://www.cecill.info". + *

+ * As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, + * users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the + * successive licensors have only limited liability. + *

+ * In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or + * developing or reproducing the software by the user in light of its specific status of free software, that may mean + * that it is complicated to manipulate, and that also therefore means that it is reserved for developers and + * experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the + * software's suitability as regards their requirements in conditions enabling the security of their systems and/or data + * to be ensured and, more generally, to use and operate it in the same conditions as regards security. + *

+ * The fact that you are presently reading this means that you have had knowledge of the CeCILL 2.1 license and that you + * accept its terms. + */ +package fr.gouv.vitam.tools.sedalib.metadata.content; + +import fr.gouv.vitam.tools.sedalib.metadata.namedtype.ComplexListMetadataKind; +import fr.gouv.vitam.tools.sedalib.metadata.namedtype.StringType; + +/** + * The Class SignerSaphir. + *

+ * Class for Signer metadata. + *

+ * Part of Signature ArchiveUnit metadata. + *

+ * Standard quote: "Signataire(s) de la transaction ou de l'objet" + */ +public class SignerSaphir extends Signer { + + + static { + + metadataMap.put(SIGNINGTIME_TAG, new ComplexListMetadataKind(StringType.class, false)); + + } + + /** + * Instantiates a new signerSaphir type. + */ + public SignerSaphir() { + super(); + } + + +} diff --git a/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/ValidatorSaphir.java b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/ValidatorSaphir.java new file mode 100644 index 00000000..cdc1a090 --- /dev/null +++ b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/content/ValidatorSaphir.java @@ -0,0 +1,60 @@ +/** + * Copyright French Prime minister Office/DINSIC/Vitam Program (2015-2019) + *

+ * contact.vitam@programmevitam.fr + *

+ * This software is developed as a validation helper tool, for constructing Submission Information Packages (archives + * sets) in the Vitam program whose purpose is to implement a digital archiving back-office system managing high + * volumetry securely and efficiently. + *

+ * This software is governed by the CeCILL 2.1 license under French law and abiding by the rules of distribution of free + * software. You can use, modify and/ or redistribute the software under the terms of the CeCILL 2.1 license as + * circulated by CEA, CNRS and INRIA archiveDeliveryRequestReply the following URL "http://www.cecill.info". + *

+ * As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, + * users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the + * successive licensors have only limited liability. + *

+ * In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or + * developing or reproducing the software by the user in light of its specific status of free software, that may mean + * that it is complicated to manipulate, and that also therefore means that it is reserved for developers and + * experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the + * software's suitability as regards their requirements in conditions enabling the security of their systems and/or data + * to be ensured and, more generally, to use and operate it in the same conditions as regards security. + *

+ * The fact that you are presently reading this means that you have had knowledge of the CeCILL 2.1 license and that you + * accept its terms. + */ +package fr.gouv.vitam.tools.sedalib.metadata.content; + +import fr.gouv.vitam.tools.sedalib.metadata.namedtype.ComplexListMetadataKind; +import fr.gouv.vitam.tools.sedalib.metadata.namedtype.StringType; + +/** + * The Class ValidatorSaphir. + *

+ * Class for Validator metadata. + *

+ * Part of Signature ArchiveUnit metadata. + *

+ * Standard quote: "Validateur de la signature" + */ +public class ValidatorSaphir extends Validator { + + + + static { + + metadataMap.put("ValidationTime", new ComplexListMetadataKind(StringType.class, false)); + + } + + /** + * Instantiates a new validatorSaphir type. + */ + public ValidatorSaphir() { + super(); + } + + +} diff --git a/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/data/FileInfoSaphir.java b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/data/FileInfoSaphir.java new file mode 100644 index 00000000..0bbfa908 --- /dev/null +++ b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/data/FileInfoSaphir.java @@ -0,0 +1,60 @@ +/** + * Copyright French Prime minister Office/DINSIC/Vitam Program (2015-2019) + *

+ * contact.vitam@programmevitam.fr + *

+ * This software is developed as a validation helper tool, for constructing Submission Information Packages (archives + * sets) in the Vitam program whose purpose is to implement a digital archiving back-office system managing high + * volumetry securely and efficiently. + *

+ * This software is governed by the CeCILL 2.1 license under French law and abiding by the rules of distribution of free + * software. You can use, modify and/ or redistribute the software under the terms of the CeCILL 2.1 license as + * circulated by CEA, CNRS and INRIA archiveTransfer the following URL "http://www.cecill.info". + *

+ * As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, + * users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the + * successive licensors have only limited liability. + *

+ * In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or + * developing or reproducing the software by the user in light of its specific status of free software, that may mean + * that it is complicated to manipulate, and that also therefore means that it is reserved for developers and + * experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the + * software's suitability as regards their requirements in conditions enabling the security of their systems and/or data + * to be ensured and, more generally, to use and operate it in the same conditions as regards security. + *

+ * The fact that you are presently reading this means that you have had knowledge of the CeCILL 2.1 license and that you + * accept its terms. + */ +package fr.gouv.vitam.tools.sedalib.metadata.data; + +import fr.gouv.vitam.tools.sedalib.metadata.namedtype.ComplexListMetadataKind; +import fr.gouv.vitam.tools.sedalib.metadata.namedtype.DateTimeType; +import fr.gouv.vitam.tools.sedalib.metadata.namedtype.StringType; + +/** + * The Class FileInfoSaphir. + *

+ * Class for SEDA element FileInfo. + *

+ * A BinaryDataObject metadata. + *

+ * Standard quote: "Propriétés techniques génériques du fichier (nom d’origine, + * logiciel de création, système d’exploitation de création)" + */ +public class FileInfoSaphir extends FileInfo { + //Custom + + static { + metadataMap.put("DateCreatedByApplication", new ComplexListMetadataKind(StringType.class, false)); + metadataMap.put("LastModified", new ComplexListMetadataKind(StringType.class, false)); + } + + /** + * Instantiates a new FileInfoSaphir. + */ + public FileInfoSaphir() { + super(); + } + + +} diff --git a/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/management/ClassificationRule.java b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/management/ClassificationRule.java index 6ef31ef8..2f9f075e 100644 --- a/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/management/ClassificationRule.java +++ b/sedalib/src/main/java/fr/gouv/vitam/tools/sedalib/metadata/management/ClassificationRule.java @@ -59,6 +59,7 @@ public class ClassificationRule extends RuleType { metadataMap.put(RULE_TAG, new ComplexListMetadataKind(Rule.class, true)); metadataMap.put(PREVENTINHERITANCE_TAG, new ComplexListMetadataKind(BooleanType.class, false)); metadataMap.put(REFNONRULEID_TAG, new ComplexListMetadataKind(StringType.class, true)); + metadataMap.put("ClassificationAudience", new ComplexListMetadataKind(StringType.class, false)); metadataMap.put(CLASSIFICATIONLEVEL_TAG, new ComplexListMetadataKind(StringType.class, false)); metadataMap.put(CLASSIFICATIONOWNER_TAG, new ComplexListMetadataKind(StringType.class, false)); metadataMap.put("ClassificationReassessingDate", new ComplexListMetadataKind(DateType.class, false));