View Javadoc
1   package de.dlr.shepard.neo4Core.entities;
2   
3   import de.dlr.shepard.mongoDB.StructuredData;
4   import de.dlr.shepard.util.Constants;
5   import java.util.ArrayList;
6   import java.util.List;
7   import lombok.Data;
8   import lombok.EqualsAndHashCode;
9   import lombok.NoArgsConstructor;
10  import org.neo4j.ogm.annotation.NodeEntity;
11  import org.neo4j.ogm.annotation.Relationship;
12  
13  @NodeEntity
14  @Data
15  @NoArgsConstructor
16  @EqualsAndHashCode(callSuper = true)
17  public class StructuredDataContainer extends BasicContainer {
18  
19    private String mongoId;
20  
21    @Relationship(type = Constants.STRUCTUREDDATA_IN_CONTAINER)
22    private List<StructuredData> structuredDatas = new ArrayList<>();
23  
24    /**
25     * For testing purposes only
26     *
27     * @param id identifies the entity
28     */
29    public StructuredDataContainer(long id) {
30      super(id);
31    }
32  
33    public void addStructuredData(StructuredData structuredData) {
34      structuredDatas.add(structuredData);
35    }
36  }