-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
story #11600 feat(archive-unit-viewer): simple tags story #11618 feat(archive-unit-viewer): nested tags story #11642 feat(archive-unit-viewer): external metadata
- Loading branch information
Showing
99 changed files
with
15,346 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...mmons/src/main/java/fr/gouv/vitamui/referential/common/dto/ExtendedOntologyCreateDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2015-2022) | ||
* | ||
* contact.vitam@culture.gouv.fr | ||
* | ||
* This software is a computer 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 at the following URL "https://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.vitamui.referential.common.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import fr.gouv.vitam.common.model.administration.OntologyOrigin; | ||
import fr.gouv.vitam.common.model.administration.SchemaType; | ||
import fr.gouv.vitamui.referential.common.model.Cardinality; | ||
import fr.gouv.vitamui.referential.common.model.Collection; | ||
import lombok.Data; | ||
import lombok.experimental.Accessors; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@Accessors(chain = true) | ||
public class ExtendedOntologyCreateDto { | ||
@JsonProperty("Tenant") private Integer tenant; | ||
@JsonProperty("Version") private Integer version; | ||
@JsonProperty("Depth") private Integer depth; // TODO: Useless, easy to compute | ||
@JsonProperty("path") private String path; | ||
@JsonProperty("DataType") private String dataType; | ||
@JsonProperty("DataSize") private String dataSize; // TODO: Useless, don't know how to use this | ||
@JsonProperty("Cardinality") private Cardinality cardinality; | ||
@JsonProperty("Identifier") private String identifier; | ||
@JsonProperty("ShortName") private String shortName; | ||
@JsonProperty("Description") private String description; | ||
@JsonProperty("CreationDate") private String creationDate; | ||
@JsonProperty("LastUpdate") private String lastUpdate; | ||
@JsonProperty("SedaField") private String sedaField; | ||
@JsonProperty("ApiField") private String apiField; | ||
@JsonProperty("Type") private SchemaType type; | ||
@JsonProperty("Origin") private OntologyOrigin origin; | ||
@JsonProperty("Collections") private List<Collection> collections; | ||
@JsonProperty("SedaVersions") private List<String> sedaVersions; | ||
@JsonProperty("RootPaths") private List<String> rootPaths; | ||
} |
40 changes: 40 additions & 0 deletions
40
...ial-commons/src/main/java/fr/gouv/vitamui/referential/common/dto/ExtendedOntologyDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2015-2022) | ||
* | ||
* contact.vitam@culture.gouv.fr | ||
* | ||
* This software is a computer 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 at the following URL "https://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.vitamui.referential.common.dto; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.experimental.Accessors; | ||
|
||
|
||
@Data | ||
@Accessors(chain = true) | ||
@EqualsAndHashCode(callSuper = true) | ||
public class ExtendedOntologyDto extends ExtendedOntologyCreateDto { | ||
private String id; | ||
} |
33 changes: 33 additions & 0 deletions
33
...l/referential-commons/src/main/java/fr/gouv/vitamui/referential/common/dto/SchemaDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2015-2022) | ||
* | ||
* contact.vitam@culture.gouv.fr | ||
* | ||
* This software is a computer 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 at the following URL "https://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.vitamui.referential.common.dto; | ||
|
||
import java.util.ArrayList; | ||
|
||
public class SchemaDto extends ArrayList<ExtendedOntologyDto> { | ||
} |
39 changes: 39 additions & 0 deletions
39
...ons/src/main/java/fr/gouv/vitamui/referential/common/exception/NoCollectionException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2015-2022) | ||
* | ||
* contact.vitam@culture.gouv.fr | ||
* | ||
* This software is a computer 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 at the following URL "https://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.vitamui.referential.common.exception; | ||
|
||
import org.springframework.web.bind.annotation.ResponseStatus; | ||
|
||
import static org.springframework.http.HttpStatus.BAD_REQUEST; | ||
|
||
@ResponseStatus(value = BAD_REQUEST) | ||
public class NoCollectionException extends Exception { | ||
public NoCollectionException() { | ||
super("No collection provided"); | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
...ferential-commons/src/main/java/fr/gouv/vitamui/referential/common/model/Cardinality.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2015-2022) | ||
* | ||
* contact.vitam@culture.gouv.fr | ||
* | ||
* This software is a computer 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 at the following URL "https://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.vitamui.referential.common.model; | ||
|
||
import java.util.Arrays; | ||
import java.util.Objects; | ||
|
||
public enum Cardinality { | ||
ZERO_OR_ONE("0-1"), | ||
ZERO_OR_MORE("0-N"), | ||
ONE_OR_ONE("1-1"), | ||
ONE_OR_MORE("1-N"); | ||
|
||
private final String cardinality; | ||
|
||
Cardinality(final String cardinality) { | ||
this.cardinality = cardinality; | ||
} | ||
|
||
public String getValue() { | ||
return cardinality; | ||
} | ||
|
||
public boolean isMandatory() { | ||
return this.cardinality.contains("1"); | ||
} | ||
|
||
public boolean isMultiple() { | ||
return this.cardinality.contains("N"); | ||
} | ||
|
||
public static Cardinality of(final String cardinality) { | ||
return Arrays.stream(Cardinality.values()).filter(c -> Objects.equals(c.getValue(), cardinality)).findFirst() | ||
.orElseThrow(); | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...eferential-commons/src/main/java/fr/gouv/vitamui/referential/common/model/Collection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2015-2022) | ||
* | ||
* contact.vitam@culture.gouv.fr | ||
* | ||
* This software is a computer 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 at the following URL "https://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.vitamui.referential.common.model; | ||
|
||
import java.util.Arrays; | ||
import java.util.Objects; | ||
|
||
public enum Collection { | ||
ARCHIVE_UNIT("archive-unit"), | ||
OBJECT_GROUP("object-group"); | ||
|
||
private final String type; | ||
|
||
Collection(final String type) { | ||
this.type = type; | ||
} | ||
|
||
public String getValue() { | ||
return type; | ||
} | ||
|
||
public static Collection of(final String collection) { | ||
return Arrays.stream(Collection.values()).filter(c -> Objects.equals(c.getValue(), collection)).findFirst() | ||
.orElseThrow(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.