We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59f10e1 commit ee6d014Copy full SHA for ee6d014
src/main/java/edu/kit/datamanager/ro_crate/entities/data/DataSetEntity.java
@@ -111,10 +111,16 @@ public T addToHasPart(String dataEntity) {
111
public T setAllUnsafe(ObjectNode properties) {
112
super.setAllUnsafe(properties);
113
JsonNode hasPart = properties.path("hasPart");
114
- this.hasPart.add(hasPart.asText());
115
- hasPart.valueStream().forEach(
116
- value -> this.hasPart.add(value.asText())
117
- );
+ String txt = hasPart.asText();
+ if (!txt.isBlank()) {
+ this.hasPart.add(txt);
+ }
118
+ hasPart.valueStream()
119
+ .map(JsonNode::asText)
120
+ .filter(value -> !value.isBlank())
121
+ .forEach(
122
+ value -> this.hasPart.add(value)
123
+ );
124
return self();
125
}
126
0 commit comments