1 package de.dlr.shepard.neo4Core.io;
2
3 import de.dlr.shepard.neo4Core.entities.Collection;
4 import lombok.Data;
5 import lombok.EqualsAndHashCode;
6 import lombok.NoArgsConstructor;
7 import org.eclipse.microprofile.openapi.annotations.media.Schema;
8
9 @Data
10 @EqualsAndHashCode(callSuper = true)
11 @NoArgsConstructor
12 @Schema(name = "Collection")
13 public class CollectionIO extends AbstractDataObjectIO {
14
15 @Schema(readOnly = true, required = true)
16 private long[] dataObjectIds;
17
18 @Schema(readOnly = true, required = true)
19 private long[] incomingIds;
20
21 public CollectionIO(Collection collection) {
22 super(collection);
23 this.dataObjectIds = extractShepardIds(collection.getDataObjects());
24 this.incomingIds = extractShepardIds(collection.getIncoming());
25 }
26 }