1 package de.dlr.shepard.neo4Core.io;
2
3 import de.dlr.shepard.neo4Core.entities.BasicReference;
4 import io.swagger.v3.oas.annotations.media.Schema;
5 import io.swagger.v3.oas.annotations.media.Schema.AccessMode;
6 import lombok.Data;
7 import lombok.EqualsAndHashCode;
8 import lombok.NoArgsConstructor;
9
10 @Data
11 @EqualsAndHashCode(callSuper = true)
12 @NoArgsConstructor
13 @Schema(name = "BasicReference")
14 public class BasicReferenceIO extends BasicEntityIO {
15
16 @Schema(accessMode = AccessMode.READ_ONLY)
17 private long dataObjectId;
18
19 @Schema(accessMode = AccessMode.READ_ONLY)
20 private String type;
21
22 public BasicReferenceIO(BasicReference ref) {
23 super(ref);
24 this.type = ref.getType();
25 this.dataObjectId = ref.getDataObject().getId();
26 }
27 }