@@ -33,15 +33,18 @@ $graph:
33
33
- cwl:draft-3
34
34
- cwl:draft-4.dev1
35
35
- cwl:draft-4.dev2
36
+ - cwl:draft-4.dev3
36
37
37
38
- name : CWLType
38
39
type : enum
39
40
extends : " sld:PrimitiveType"
40
41
symbols :
41
42
- cwl:File
43
+ - cwl:Directory
42
44
doc :
43
45
- " Extends primitive types with the concept of a file as a first class type."
44
46
- " File: A File object"
47
+ - " Directory: A Directory object"
45
48
46
49
- name : File
47
50
type : record
@@ -58,28 +61,95 @@ $graph:
58
61
symbols :
59
62
- cwl:File
60
63
jsonldPredicate :
61
- " _id " : " @type"
62
- " _type " : " @vocab"
64
+ _id : " @type"
65
+ _type : " @vocab"
63
66
doc : Must be `File` to indicate this object describes a file.
64
- - name : path
67
+ - name : location
65
68
type : string
66
- doc : The path to the file.
69
+ doc : |
70
+ A URI that identifies the file resource. This may be a relative
71
+ reference, in which case it must be resolved using the base URI of the
72
+ document. The location may refer to a local or remote resource; the
73
+ implementation must use the URI to retrieve file content. If an
74
+ implementation is unable to retrieve the file content stored at a
75
+ remote resource (due to unsupported protocol, access denied, or other
76
+ issue) it must signal an error.
77
+
78
+ If the `path` field is provided but the `location` field is not, an
79
+ implementation may assign the value of the `path` field to `location`,
80
+ then follow the rules above.
81
+ jsonldPredicate :
82
+ _id : " @id"
83
+ _type : " @id"
84
+ - name : path
85
+ type : string?
86
+ doc : |
87
+ The local path where the File is made available prior to executing a
88
+ CommandLineTool. This must be set by the implementation. This field
89
+ must not be used in any other context. The command line tool being
90
+ executed must be able to to access the file at `path` using the POSIX
91
+ `open(2)` syscall.
67
92
jsonldPredicate :
68
93
" _id " : " cwl:path"
69
94
" _type " : " @id"
95
+ - name : basename
96
+ type : string?
97
+ doc : |
98
+ The base name of the file, that is, the path component following the
99
+ final slash in the path.
100
+
101
+ The implementation must set this field based on the value of `path`
102
+ prior to evaluating parameter references or expressions in a
103
+ CommandLineTool document. This field must not be used in any other
104
+ context.
105
+ - name : dirname
106
+ type : string?
107
+ doc : |
108
+ The name of the directory containing file, that is, the path leading up
109
+ to the final slash in the path such that `dirname + '/' + basename =
110
+ path`.
111
+
112
+ The implementation must set this field based on the value of `path`
113
+ prior to evaluating parameter references or expressions in a
114
+ CommandLineTool document. This field must not be used in any other
115
+ context.
116
+ - name : nameroot
117
+ type : string?
118
+ doc : |
119
+ The basename root such that `nameroot + nameext == basename`, and
120
+ `nameext` is empty or begins with a period and contains at most one
121
+ period. Leading periods on the basename are ignored; a basename of
122
+ `.cshrc` will have a nameroot of `.cshrc`.
123
+
124
+ The implementation must set this field based on the value of `path`
125
+ prior to evaluating parameter references or expressions in a
126
+ CommandLineTool document. This field must not be used in any other
127
+ context.
128
+ - name : nameext
129
+ type : string?
130
+ doc : |
131
+ The basename extension such that `nameroot + nameext == basename`, and
132
+ `nameext` is empty or begins with a period and contains at most one
133
+ period. Leading periods on the basename are ignored; a basename of
134
+ `.cshrc` will have an empty `nameext`.
135
+
136
+ The implementation must set this field based on the value of `path`
137
+ prior to evaluating parameter references or expressions in a
138
+ CommandLineTool document. This field must not be used in any other
139
+ context.
70
140
- name : checksum
71
141
type : ["null", string]
72
142
doc : |
73
143
Optional hash code for validating file integrity. Currently must be in the form
74
- "sha1$ + hexidecimal string" using the SHA-1 algorithm.
144
+ "sha1$ + hexadecimal string" using the SHA-1 algorithm.
75
145
- name : size
76
146
type : ["null", long]
77
147
doc : Optional file size.
78
148
- name : " secondaryFiles"
79
149
type :
80
150
- " null"
81
151
- type : array
82
- items : " # File"
152
+ items : [ File, Dirent]
83
153
jsonldPredicate : " cwl:secondaryFiles"
84
154
doc : |
85
155
A list of additional files that are associated with the primary file
@@ -111,12 +181,24 @@ $graph:
111
181
runtime may perform exact file format matches.
112
182
113
183
184
+ - name : Dirent
185
+ type : record
186
+ fields :
187
+ - name : entryname
188
+ type : string
189
+ jsonldPredicate :
190
+ " _id " : cwl:entryname
191
+ - name : entry
192
+ type : [File, Directory]
193
+ jsonldPredicate :
194
+ " _id " : cwl:entry
195
+
114
196
- name : Directory
115
197
type : record
116
198
docParent : " #CWLType"
117
199
doc : |
118
200
Represents a directory to present to a command line tool. This could be a virtual
119
- directory, made of files assembled from a number of concrete directories .
201
+ directory, made of files assembled from multiple locations .
120
202
fields :
121
203
- name : class
122
204
type :
@@ -125,18 +207,48 @@ $graph:
125
207
symbols :
126
208
- cwl:Directory
127
209
jsonldPredicate :
128
- " _id " : " @type"
129
- " _type " : " @vocab"
210
+ _id : " @type"
211
+ _type : " @vocab"
130
212
doc : Must be `Directory` to indicate this object describes a Directory.
131
- - name : path
213
+ - name : location
132
214
type : string
133
- doc : The path to the directory.
215
+ doc : |
216
+ A URI that identifies the directory resource. This may be a relative
217
+ reference, in which case it must be resolved using the base URI of the
218
+ document. The location may refer to a local or remote resource. If
219
+ the `listing` field is not set, the implementation must use the
220
+ location URI to retrieve directory listing. If an implementation is
221
+ unable to retrieve the directory listing stored at a remote resource (due to
222
+ unsupported protocol, access denied, or other issue) it must signal an
223
+ error.
224
+
225
+ If the `path` field is provided but the `location` field is not, an
226
+ implementation may assign the value of the `path` field to `location`,
227
+ then follow the rules above.
134
228
jsonldPredicate :
135
- " _id " : " cwl:path"
136
- " _type " : " @id"
137
- # - name: size
138
- # type: ["null", long]
139
- # doc: Optional directory size.
229
+ _id : " @id"
230
+ _type : " @id"
231
+ - name : path
232
+ type : string?
233
+ doc : |
234
+ The local path where the Directory is made available prior to executing a
235
+ CommandLineTool. This must be set by the implementation. This field
236
+ must not be used in any other context. The command line tool being
237
+ executed must be able to to access the directory at `path` using the POSIX
238
+ `opendir(2)` syscall.
239
+ jsonldPredicate :
240
+ _id : " cwl:path"
241
+ _type : " @id"
242
+ - name : listing
243
+ type :
244
+ - " null"
245
+ - type : array
246
+ items : [File, Dirent]
247
+ doc : List of files or subdirectories contained in this directory
248
+ jsonldPredicate :
249
+ _id : " cwl:listing"
250
+ mapSubject : entryname
251
+ mapPredicate : entry
140
252
141
253
- name : SchemaBase
142
254
type : record
0 commit comments