Skip to content

Commit 0080dd3

Browse files
committed
"id" is a required field in for Parameters and WorkflowSteps
1 parent 50b25c0 commit 0080dd3

22 files changed

+133
-183
lines changed

src/main/java/org/commonwl/cwlsdk/cwl1_2/CommandInputParameter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ public interface CommandInputParameter extends InputParameter, Saveable {
2727
LoadingOptions getLoadingOptions();
2828

2929
/**
30-
* Getter for property <I>https://w3id.org/cwl/cwl#Identified/id</I><BR>
30+
* Getter for property <I>https://w3id.org/cwl/cwl#Parameter/id</I><BR>
3131
* <BLOCKQUOTE>
32-
* The unique identifier for this object. * </BLOCKQUOTE>
32+
* The unique identifier for this Parameter. * </BLOCKQUOTE>
3333
*/
3434

35-
java.util.Optional<String> getId();
35+
String getId();
3636
/**
3737
* Getter for property <I>https://w3id.org/cwl/cwl#Labeled/label</I><BR>
3838
* <BLOCKQUOTE>

src/main/java/org/commonwl/cwlsdk/cwl1_2/CommandInputParameterImpl.java

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ public java.util.Map<String, Object> getExtensionFields() {
3535
return this.extensionFields_;
3636
}
3737

38-
private java.util.Optional<String> id;
38+
private String id;
3939

4040
/**
41-
* Getter for property <I>https://w3id.org/cwl/cwl#Identified/id</I><BR>
41+
* Getter for property <I>https://w3id.org/cwl/cwl#Parameter/id</I><BR>
4242
* <BLOCKQUOTE>
43-
* The unique identifier for this object. * </BLOCKQUOTE>
43+
* The unique identifier for this Parameter. * </BLOCKQUOTE>
4444
*/
4545

46-
public java.util.Optional<String> getId() {
46+
public String getId() {
4747
return this.id;
4848
}
4949

@@ -275,13 +275,13 @@ public CommandInputParameterImpl(
275275
if (__loadingOptions != null) {
276276
this.loadingOptions_ = __loadingOptions;
277277
}
278-
java.util.Optional<String> id;
278+
String id;
279279

280280
if (__doc.containsKey("id")) {
281281
try {
282282
id =
283283
LoaderInstances
284-
.uri_optional_StringInstance_True_False_None_None
284+
.uri_StringInstance_True_False_None_None
285285
.loadField(__doc.get("id"), __baseUri, __loadingOptions);
286286
} catch (ValidationException e) {
287287
id = null; // won't be used but prevents compiler from complaining.
@@ -293,19 +293,14 @@ public CommandInputParameterImpl(
293293
id = null;
294294
}
295295

296-
Boolean __original_is_null = id == null;
297296
if (id == null) {
298297
if (__docRoot != null) {
299-
id = java.util.Optional.of(__docRoot);
298+
id = __docRoot;
300299
} else {
301-
id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
300+
throw new ValidationException("Missing id");
302301
}
303302
}
304-
if (__original_is_null) {
305-
__baseUri = __baseUri_;
306-
} else {
307-
__baseUri = (String) id.orElse(null);
308-
}
303+
__baseUri = (String) id;
309304
java.util.Optional<String> label;
310305

311306
if (__doc.containsKey("label")) {
@@ -477,7 +472,7 @@ public CommandInputParameterImpl(
477472
this.secondaryFiles = (Object) secondaryFiles;
478473
this.streamable = (java.util.Optional<Boolean>) streamable;
479474
this.doc = (Object) doc;
480-
this.id = (java.util.Optional<String>) id;
475+
this.id = (String) id;
481476
this.format = (Object) format;
482477
this.loadContents = (java.util.Optional<Boolean>) loadContents;
483478
this.loadListing = (java.util.Optional<LoadListingEnum>) loadListing;

src/main/java/org/commonwl/cwlsdk/cwl1_2/CommandOutputParameter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ public interface CommandOutputParameter extends OutputParameter, Saveable {
2727
LoadingOptions getLoadingOptions();
2828

2929
/**
30-
* Getter for property <I>https://w3id.org/cwl/cwl#Identified/id</I><BR>
30+
* Getter for property <I>https://w3id.org/cwl/cwl#Parameter/id</I><BR>
3131
* <BLOCKQUOTE>
32-
* The unique identifier for this object. * </BLOCKQUOTE>
32+
* The unique identifier for this Parameter. * </BLOCKQUOTE>
3333
*/
3434

35-
java.util.Optional<String> getId();
35+
String getId();
3636
/**
3737
* Getter for property <I>https://w3id.org/cwl/cwl#Labeled/label</I><BR>
3838
* <BLOCKQUOTE>

src/main/java/org/commonwl/cwlsdk/cwl1_2/CommandOutputParameterImpl.java

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ public java.util.Map<String, Object> getExtensionFields() {
3535
return this.extensionFields_;
3636
}
3737

38-
private java.util.Optional<String> id;
38+
private String id;
3939

4040
/**
41-
* Getter for property <I>https://w3id.org/cwl/cwl#Identified/id</I><BR>
41+
* Getter for property <I>https://w3id.org/cwl/cwl#Parameter/id</I><BR>
4242
* <BLOCKQUOTE>
43-
* The unique identifier for this object. * </BLOCKQUOTE>
43+
* The unique identifier for this Parameter. * </BLOCKQUOTE>
4444
*/
4545

46-
public java.util.Optional<String> getId() {
46+
public String getId() {
4747
return this.id;
4848
}
4949

@@ -213,13 +213,13 @@ public CommandOutputParameterImpl(
213213
if (__loadingOptions != null) {
214214
this.loadingOptions_ = __loadingOptions;
215215
}
216-
java.util.Optional<String> id;
216+
String id;
217217

218218
if (__doc.containsKey("id")) {
219219
try {
220220
id =
221221
LoaderInstances
222-
.uri_optional_StringInstance_True_False_None_None
222+
.uri_StringInstance_True_False_None_None
223223
.loadField(__doc.get("id"), __baseUri, __loadingOptions);
224224
} catch (ValidationException e) {
225225
id = null; // won't be used but prevents compiler from complaining.
@@ -231,19 +231,14 @@ public CommandOutputParameterImpl(
231231
id = null;
232232
}
233233

234-
Boolean __original_is_null = id == null;
235234
if (id == null) {
236235
if (__docRoot != null) {
237-
id = java.util.Optional.of(__docRoot);
236+
id = __docRoot;
238237
} else {
239-
id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
238+
throw new ValidationException("Missing id");
240239
}
241240
}
242-
if (__original_is_null) {
243-
__baseUri = __baseUri_;
244-
} else {
245-
__baseUri = (String) id.orElse(null);
246-
}
241+
__baseUri = (String) id;
247242
java.util.Optional<String> label;
248243

249244
if (__doc.containsKey("label")) {
@@ -364,7 +359,7 @@ public CommandOutputParameterImpl(
364359
this.secondaryFiles = (Object) secondaryFiles;
365360
this.streamable = (java.util.Optional<Boolean>) streamable;
366361
this.doc = (Object) doc;
367-
this.id = (java.util.Optional<String>) id;
362+
this.id = (String) id;
368363
this.format = (Object) format;
369364
this.type = (Object) type;
370365
this.outputBinding = (java.util.Optional<CommandOutputBinding>) outputBinding;

src/main/java/org/commonwl/cwlsdk/cwl1_2/ExpressionToolOutputParameter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ public interface ExpressionToolOutputParameter extends OutputParameter, Saveable
2626
LoadingOptions getLoadingOptions();
2727

2828
/**
29-
* Getter for property <I>https://w3id.org/cwl/cwl#Identified/id</I><BR>
29+
* Getter for property <I>https://w3id.org/cwl/cwl#Parameter/id</I><BR>
3030
* <BLOCKQUOTE>
31-
* The unique identifier for this object. * </BLOCKQUOTE>
31+
* The unique identifier for this Parameter. * </BLOCKQUOTE>
3232
*/
3333

34-
java.util.Optional<String> getId();
34+
String getId();
3535
/**
3636
* Getter for property <I>https://w3id.org/cwl/cwl#Labeled/label</I><BR>
3737
* <BLOCKQUOTE>

src/main/java/org/commonwl/cwlsdk/cwl1_2/ExpressionToolOutputParameterImpl.java

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ public java.util.Map<String, Object> getExtensionFields() {
3434
return this.extensionFields_;
3535
}
3636

37-
private java.util.Optional<String> id;
37+
private String id;
3838

3939
/**
40-
* Getter for property <I>https://w3id.org/cwl/cwl#Identified/id</I><BR>
40+
* Getter for property <I>https://w3id.org/cwl/cwl#Parameter/id</I><BR>
4141
* <BLOCKQUOTE>
42-
* The unique identifier for this object. * </BLOCKQUOTE>
42+
* The unique identifier for this Parameter. * </BLOCKQUOTE>
4343
*/
4444

45-
public java.util.Optional<String> getId() {
45+
public String getId() {
4646
return this.id;
4747
}
4848

@@ -202,13 +202,13 @@ public ExpressionToolOutputParameterImpl(
202202
if (__loadingOptions != null) {
203203
this.loadingOptions_ = __loadingOptions;
204204
}
205-
java.util.Optional<String> id;
205+
String id;
206206

207207
if (__doc.containsKey("id")) {
208208
try {
209209
id =
210210
LoaderInstances
211-
.uri_optional_StringInstance_True_False_None_None
211+
.uri_StringInstance_True_False_None_None
212212
.loadField(__doc.get("id"), __baseUri, __loadingOptions);
213213
} catch (ValidationException e) {
214214
id = null; // won't be used but prevents compiler from complaining.
@@ -220,19 +220,14 @@ public ExpressionToolOutputParameterImpl(
220220
id = null;
221221
}
222222

223-
Boolean __original_is_null = id == null;
224223
if (id == null) {
225224
if (__docRoot != null) {
226-
id = java.util.Optional.of(__docRoot);
225+
id = __docRoot;
227226
} else {
228-
id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
227+
throw new ValidationException("Missing id");
229228
}
230229
}
231-
if (__original_is_null) {
232-
__baseUri = __baseUri_;
233-
} else {
234-
__baseUri = (String) id.orElse(null);
235-
}
230+
__baseUri = (String) id;
236231
java.util.Optional<String> label;
237232

238233
if (__doc.containsKey("label")) {
@@ -336,7 +331,7 @@ public ExpressionToolOutputParameterImpl(
336331
this.secondaryFiles = (Object) secondaryFiles;
337332
this.streamable = (java.util.Optional<Boolean>) streamable;
338333
this.doc = (Object) doc;
339-
this.id = (java.util.Optional<String>) id;
334+
this.id = (String) id;
340335
this.format = (Object) format;
341336
this.type = (Object) type;
342337
for (String field:__doc.keySet()) {

src/main/java/org/commonwl/cwlsdk/cwl1_2/OperationInputParameter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ public interface OperationInputParameter extends InputParameter, Saveable {
2828
LoadingOptions getLoadingOptions();
2929

3030
/**
31-
* Getter for property <I>https://w3id.org/cwl/cwl#Identified/id</I><BR>
31+
* Getter for property <I>https://w3id.org/cwl/cwl#Parameter/id</I><BR>
3232
* <BLOCKQUOTE>
33-
* The unique identifier for this object. * </BLOCKQUOTE>
33+
* The unique identifier for this Parameter. * </BLOCKQUOTE>
3434
*/
3535

36-
java.util.Optional<String> getId();
36+
String getId();
3737
/**
3838
* Getter for property <I>https://w3id.org/cwl/cwl#Labeled/label</I><BR>
3939
* <BLOCKQUOTE>

src/main/java/org/commonwl/cwlsdk/cwl1_2/OperationInputParameterImpl.java

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ public java.util.Map<String, Object> getExtensionFields() {
3636
return this.extensionFields_;
3737
}
3838

39-
private java.util.Optional<String> id;
39+
private String id;
4040

4141
/**
42-
* Getter for property <I>https://w3id.org/cwl/cwl#Identified/id</I><BR>
42+
* Getter for property <I>https://w3id.org/cwl/cwl#Parameter/id</I><BR>
4343
* <BLOCKQUOTE>
44-
* The unique identifier for this object. * </BLOCKQUOTE>
44+
* The unique identifier for this Parameter. * </BLOCKQUOTE>
4545
*/
4646

47-
public java.util.Optional<String> getId() {
47+
public String getId() {
4848
return this.id;
4949
}
5050

@@ -262,13 +262,13 @@ public OperationInputParameterImpl(
262262
if (__loadingOptions != null) {
263263
this.loadingOptions_ = __loadingOptions;
264264
}
265-
java.util.Optional<String> id;
265+
String id;
266266

267267
if (__doc.containsKey("id")) {
268268
try {
269269
id =
270270
LoaderInstances
271-
.uri_optional_StringInstance_True_False_None_None
271+
.uri_StringInstance_True_False_None_None
272272
.loadField(__doc.get("id"), __baseUri, __loadingOptions);
273273
} catch (ValidationException e) {
274274
id = null; // won't be used but prevents compiler from complaining.
@@ -280,19 +280,14 @@ public OperationInputParameterImpl(
280280
id = null;
281281
}
282282

283-
Boolean __original_is_null = id == null;
284283
if (id == null) {
285284
if (__docRoot != null) {
286-
id = java.util.Optional.of(__docRoot);
285+
id = __docRoot;
287286
} else {
288-
id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
287+
throw new ValidationException("Missing id");
289288
}
290289
}
291-
if (__original_is_null) {
292-
__baseUri = __baseUri_;
293-
} else {
294-
__baseUri = (String) id.orElse(null);
295-
}
290+
__baseUri = (String) id;
296291
java.util.Optional<String> label;
297292

298293
if (__doc.containsKey("label")) {
@@ -447,7 +442,7 @@ public OperationInputParameterImpl(
447442
this.secondaryFiles = (Object) secondaryFiles;
448443
this.streamable = (java.util.Optional<Boolean>) streamable;
449444
this.doc = (Object) doc;
450-
this.id = (java.util.Optional<String>) id;
445+
this.id = (String) id;
451446
this.format = (Object) format;
452447
this.loadContents = (java.util.Optional<Boolean>) loadContents;
453448
this.loadListing = (java.util.Optional<LoadListingEnum>) loadListing;

src/main/java/org/commonwl/cwlsdk/cwl1_2/OperationOutputParameter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ public interface OperationOutputParameter extends OutputParameter, Saveable {
2828
LoadingOptions getLoadingOptions();
2929

3030
/**
31-
* Getter for property <I>https://w3id.org/cwl/cwl#Identified/id</I><BR>
31+
* Getter for property <I>https://w3id.org/cwl/cwl#Parameter/id</I><BR>
3232
* <BLOCKQUOTE>
33-
* The unique identifier for this object. * </BLOCKQUOTE>
33+
* The unique identifier for this Parameter. * </BLOCKQUOTE>
3434
*/
3535

36-
java.util.Optional<String> getId();
36+
String getId();
3737
/**
3838
* Getter for property <I>https://w3id.org/cwl/cwl#Labeled/label</I><BR>
3939
* <BLOCKQUOTE>

0 commit comments

Comments
 (0)