Skip to content

Commit 16d3291

Browse files
committed
some ID fields are mandatory
1 parent fa5e8c2 commit 16d3291

22 files changed

+133
-183
lines changed

src/main/java/org/w3id/cwl/cwl1_2/CommandInputParameter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ public interface CommandInputParameter extends InputParameter, Saveable {
2525
java.util.Map<String, Object> getExtensionFields();
2626

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

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

src/main/java/org/w3id/cwl/cwl1_2/CommandInputParameterImpl.java

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

35-
private java.util.Optional<String> id;
35+
private String id;
3636

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

43-
public java.util.Optional<String> getId() {
43+
public String getId() {
4444
return this.id;
4545
}
4646

@@ -272,13 +272,13 @@ public CommandInputParameterImpl(
272272
if (__loadingOptions != null) {
273273
this.loadingOptions_ = __loadingOptions;
274274
}
275-
java.util.Optional<String> id;
275+
String id;
276276

277277
if (__doc.containsKey("id")) {
278278
try {
279279
id =
280280
LoaderInstances
281-
.uri_optional_StringInstance_True_False_None_None
281+
.uri_StringInstance_True_False_None_None
282282
.loadField(__doc.get("id"), __baseUri, __loadingOptions);
283283
} catch (ValidationException e) {
284284
id = null; // won't be used but prevents compiler from complaining.
@@ -290,19 +290,14 @@ public CommandInputParameterImpl(
290290
id = null;
291291
}
292292

293-
Boolean __original_is_null = id == null;
294293
if (id == null) {
295294
if (__docRoot != null) {
296-
id = java.util.Optional.of(__docRoot);
295+
id = __docRoot;
297296
} else {
298-
id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
297+
throw new ValidationException("Missing id");
299298
}
300299
}
301-
if (__original_is_null) {
302-
__baseUri = __baseUri_;
303-
} else {
304-
__baseUri = (String) id.orElse(null);
305-
}
300+
__baseUri = (String) id;
306301
java.util.Optional<String> label;
307302

308303
if (__doc.containsKey("label")) {
@@ -474,7 +469,7 @@ public CommandInputParameterImpl(
474469
this.secondaryFiles = (Object) secondaryFiles;
475470
this.streamable = (java.util.Optional<Boolean>) streamable;
476471
this.doc = (Object) doc;
477-
this.id = (java.util.Optional<String>) id;
472+
this.id = (String) id;
478473
this.format = (Object) format;
479474
this.loadContents = (java.util.Optional<Boolean>) loadContents;
480475
this.loadListing = (java.util.Optional<LoadListingEnum>) loadListing;

src/main/java/org/w3id/cwl/cwl1_2/CommandOutputParameter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ public interface CommandOutputParameter extends OutputParameter, Saveable {
2525
java.util.Map<String, Object> getExtensionFields();
2626

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

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

src/main/java/org/w3id/cwl/cwl1_2/CommandOutputParameterImpl.java

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

35-
private java.util.Optional<String> id;
35+
private String id;
3636

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

43-
public java.util.Optional<String> getId() {
43+
public String getId() {
4444
return this.id;
4545
}
4646

@@ -210,13 +210,13 @@ public CommandOutputParameterImpl(
210210
if (__loadingOptions != null) {
211211
this.loadingOptions_ = __loadingOptions;
212212
}
213-
java.util.Optional<String> id;
213+
String id;
214214

215215
if (__doc.containsKey("id")) {
216216
try {
217217
id =
218218
LoaderInstances
219-
.uri_optional_StringInstance_True_False_None_None
219+
.uri_StringInstance_True_False_None_None
220220
.loadField(__doc.get("id"), __baseUri, __loadingOptions);
221221
} catch (ValidationException e) {
222222
id = null; // won't be used but prevents compiler from complaining.
@@ -228,19 +228,14 @@ public CommandOutputParameterImpl(
228228
id = null;
229229
}
230230

231-
Boolean __original_is_null = id == null;
232231
if (id == null) {
233232
if (__docRoot != null) {
234-
id = java.util.Optional.of(__docRoot);
233+
id = __docRoot;
235234
} else {
236-
id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
235+
throw new ValidationException("Missing id");
237236
}
238237
}
239-
if (__original_is_null) {
240-
__baseUri = __baseUri_;
241-
} else {
242-
__baseUri = (String) id.orElse(null);
243-
}
238+
__baseUri = (String) id;
244239
java.util.Optional<String> label;
245240

246241
if (__doc.containsKey("label")) {
@@ -361,7 +356,7 @@ public CommandOutputParameterImpl(
361356
this.secondaryFiles = (Object) secondaryFiles;
362357
this.streamable = (java.util.Optional<Boolean>) streamable;
363358
this.doc = (Object) doc;
364-
this.id = (java.util.Optional<String>) id;
359+
this.id = (String) id;
365360
this.format = (Object) format;
366361
this.type = (Object) type;
367362
this.outputBinding = (java.util.Optional<CommandOutputBinding>) outputBinding;

src/main/java/org/w3id/cwl/cwl1_2/ExpressionToolOutputParameter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ public interface ExpressionToolOutputParameter extends OutputParameter, Saveable
2424
java.util.Map<String, Object> getExtensionFields();
2525

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

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

src/main/java/org/w3id/cwl/cwl1_2/ExpressionToolOutputParameterImpl.java

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

34-
private java.util.Optional<String> id;
34+
private String id;
3535

3636
/**
37-
* Getter for property <I>https://w3id.org/cwl/cwl#Identified/id</I><BR>
37+
* Getter for property <I>https://w3id.org/cwl/cwl#Parameter/id</I><BR>
3838
* <BLOCKQUOTE>
39-
* The unique identifier for this object. * </BLOCKQUOTE>
39+
* The unique identifier for this Parameter. * </BLOCKQUOTE>
4040
*/
4141

42-
public java.util.Optional<String> getId() {
42+
public String getId() {
4343
return this.id;
4444
}
4545

@@ -199,13 +199,13 @@ public ExpressionToolOutputParameterImpl(
199199
if (__loadingOptions != null) {
200200
this.loadingOptions_ = __loadingOptions;
201201
}
202-
java.util.Optional<String> id;
202+
String id;
203203

204204
if (__doc.containsKey("id")) {
205205
try {
206206
id =
207207
LoaderInstances
208-
.uri_optional_StringInstance_True_False_None_None
208+
.uri_StringInstance_True_False_None_None
209209
.loadField(__doc.get("id"), __baseUri, __loadingOptions);
210210
} catch (ValidationException e) {
211211
id = null; // won't be used but prevents compiler from complaining.
@@ -217,19 +217,14 @@ public ExpressionToolOutputParameterImpl(
217217
id = null;
218218
}
219219

220-
Boolean __original_is_null = id == null;
221220
if (id == null) {
222221
if (__docRoot != null) {
223-
id = java.util.Optional.of(__docRoot);
222+
id = __docRoot;
224223
} else {
225-
id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
224+
throw new ValidationException("Missing id");
226225
}
227226
}
228-
if (__original_is_null) {
229-
__baseUri = __baseUri_;
230-
} else {
231-
__baseUri = (String) id.orElse(null);
232-
}
227+
__baseUri = (String) id;
233228
java.util.Optional<String> label;
234229

235230
if (__doc.containsKey("label")) {
@@ -333,7 +328,7 @@ public ExpressionToolOutputParameterImpl(
333328
this.secondaryFiles = (Object) secondaryFiles;
334329
this.streamable = (java.util.Optional<Boolean>) streamable;
335330
this.doc = (Object) doc;
336-
this.id = (java.util.Optional<String>) id;
331+
this.id = (String) id;
337332
this.format = (Object) format;
338333
this.type = (Object) type;
339334
}

src/main/java/org/w3id/cwl/cwl1_2/OperationInputParameter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ public interface OperationInputParameter extends InputParameter, Saveable {
2626
java.util.Map<String, Object> getExtensionFields();
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/w3id/cwl/cwl1_2/OperationInputParameterImpl.java

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

36-
private java.util.Optional<String> id;
36+
private String id;
3737

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

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

@@ -259,13 +259,13 @@ public OperationInputParameterImpl(
259259
if (__loadingOptions != null) {
260260
this.loadingOptions_ = __loadingOptions;
261261
}
262-
java.util.Optional<String> id;
262+
String id;
263263

264264
if (__doc.containsKey("id")) {
265265
try {
266266
id =
267267
LoaderInstances
268-
.uri_optional_StringInstance_True_False_None_None
268+
.uri_StringInstance_True_False_None_None
269269
.loadField(__doc.get("id"), __baseUri, __loadingOptions);
270270
} catch (ValidationException e) {
271271
id = null; // won't be used but prevents compiler from complaining.
@@ -277,19 +277,14 @@ public OperationInputParameterImpl(
277277
id = null;
278278
}
279279

280-
Boolean __original_is_null = id == null;
281280
if (id == null) {
282281
if (__docRoot != null) {
283-
id = java.util.Optional.of(__docRoot);
282+
id = __docRoot;
284283
} else {
285-
id = java.util.Optional.of("_:" + java.util.UUID.randomUUID().toString());
284+
throw new ValidationException("Missing id");
286285
}
287286
}
288-
if (__original_is_null) {
289-
__baseUri = __baseUri_;
290-
} else {
291-
__baseUri = (String) id.orElse(null);
292-
}
287+
__baseUri = (String) id;
293288
java.util.Optional<String> label;
294289

295290
if (__doc.containsKey("label")) {
@@ -444,7 +439,7 @@ public OperationInputParameterImpl(
444439
this.secondaryFiles = (Object) secondaryFiles;
445440
this.streamable = (java.util.Optional<Boolean>) streamable;
446441
this.doc = (Object) doc;
447-
this.id = (java.util.Optional<String>) id;
442+
this.id = (String) id;
448443
this.format = (Object) format;
449444
this.loadContents = (java.util.Optional<Boolean>) loadContents;
450445
this.loadListing = (java.util.Optional<LoadListingEnum>) loadListing;

src/main/java/org/w3id/cwl/cwl1_2/OperationOutputParameter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ public interface OperationOutputParameter extends OutputParameter, Saveable {
2626
java.util.Map<String, Object> getExtensionFields();
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>

0 commit comments

Comments
 (0)