File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/main/java/edu/kit/datamanager/ro_crate/entities Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,21 @@ public JsonNode getProperty(String propertyKey) {
112
112
return this .properties .get (propertyKey );
113
113
}
114
114
115
+ /**
116
+ * Returns the value of the property with the given key as a String.
117
+ * If the property is not found, it returns null.
118
+ *
119
+ * @param propertyKey the key of the property.
120
+ * @return the value of the property as a String or null if not found.
121
+ */
122
+ public String getIdProperty (String propertyKey ) {
123
+ JsonNode node = this .properties .get (propertyKey );
124
+ if (node != null ) {
125
+ return node .path ("@id" ).asText (null );
126
+ }
127
+ return null ;
128
+ }
129
+
115
130
@ JsonIgnore
116
131
public String getId () {
117
132
JsonNode id = this .properties .get ("@id" );
You can’t perform that action at this time.
0 commit comments