File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/main/java/edu/kit/datamanager/ro_crate/entities/data Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 11package edu .kit .datamanager .ro_crate .entities .data ;
22
33import com .fasterxml .jackson .annotation .JsonInclude ;
4+ import com .fasterxml .jackson .databind .JsonNode ;
45import com .fasterxml .jackson .databind .annotation .JsonSerialize ;
56
7+ import com .fasterxml .jackson .databind .node .ObjectNode ;
68import edu .kit .datamanager .ro_crate .entities .serializers .HasPartSerializer ;
79
810import java .util .HashSet ;
@@ -97,6 +99,17 @@ public T addToHasPart(String dataEntity) {
9799 return self ();
98100 }
99101
102+ @ Override
103+ public T setAllUnsafe (ObjectNode properties ) {
104+ super .setAllUnsafe (properties );
105+ JsonNode hasPart = properties .path ("hasPart" );
106+ this .hasPart .add (hasPart .asText ());
107+ hasPart .valueStream ().forEach (
108+ value -> this .hasPart .add (value .asText ())
109+ );
110+ return self ();
111+ }
112+
100113 @ Override
101114 public abstract DataSetEntity build ();
102115 }
You can’t perform that action at this time.
0 commit comments