1 package de.dlr.shepard.neo4Core.entities;
2
3 import java.util.ArrayList;
4 import java.util.List;
5
6 import org.neo4j.ogm.annotation.NodeEntity;
7 import org.neo4j.ogm.annotation.Relationship;
8
9 import de.dlr.shepard.mongoDB.ShepardFile;
10 import de.dlr.shepard.util.Constants;
11 import lombok.Data;
12 import lombok.EqualsAndHashCode;
13 import lombok.NoArgsConstructor;
14
15 @NodeEntity
16 @Data
17 @NoArgsConstructor
18 @EqualsAndHashCode(callSuper = true)
19 public class FileContainer extends BasicContainer {
20
21 private String mongoId;
22
23 @Relationship(type = Constants.FILE_IN_CONTAINER)
24 private List<ShepardFile> files = new ArrayList<>();
25
26
27
28
29
30
31 public FileContainer(long id) {
32 super(id);
33 }
34
35 public void addFile(ShepardFile file) {
36 files.add(file);
37 }
38
39 }