@@ -158,15 +158,29 @@ public String getOntLabel(String ontologyURI) {
158
158
public ResultSet getInputs (String path , String workflowURI ) {
159
159
ParameterizedSparqlString inputsQuery = new ParameterizedSparqlString ();
160
160
inputsQuery .setCommandText (queryCtx +
161
- "SELECT ?name ?type ?format ?label ?doc\n " +
161
+ "SELECT ?name ?type ?items ?null ? format ?label ?doc\n " +
162
162
"WHERE {\n " +
163
163
" GRAPH ?graphName {" +
164
164
" ?wf rdf:type cwl:Workflow .\n " +
165
165
" ?wf cwl:inputs ?name .\n " +
166
- " OPTIONAL { ?name sld:type ?type }\n " +
166
+ " OPTIONAL {\n " +
167
+ " { \n " +
168
+ " ?name sld:type ?type\n " +
169
+ " FILTER(?type != sld:null) \n " +
170
+ " FILTER (!isBlank(?type))\n " +
171
+ " } UNION { \n " +
172
+ " ?name sld:type ?arraytype .\n " +
173
+ " ?arraytype sld:type ?type .\n " +
174
+ " ?arraytype sld:items ?items \n " +
175
+ " }\n " +
176
+ " }\n " +
177
+ " OPTIONAL { \n " +
178
+ " ?name sld:type ?null\n " +
179
+ " FILTER(?null = sld:null)\n " +
180
+ " }\n " +
167
181
" OPTIONAL { ?name cwl:format ?format }\n " +
168
182
" OPTIONAL { ?name sld:label|rdfs:label ?label }\n " +
169
- " OPTIONAL { ?name sld:doc|rdfs:comment ?doc }\n " +
183
+ " OPTIONAL { ?name sld:doc|rdfs:comment ?doc }" +
170
184
" FILTER(regex(str(?wf), ?wfFilter, \" i\" ))" +
171
185
" }" +
172
186
"}" );
@@ -184,15 +198,29 @@ public ResultSet getInputs(String path, String workflowURI) {
184
198
public ResultSet getOutputs (String path , String workflowURI ) {
185
199
ParameterizedSparqlString outputsQuery = new ParameterizedSparqlString ();
186
200
outputsQuery .setCommandText (queryCtx +
187
- "SELECT ?name ?type ?format ?label ?doc\n " +
201
+ "SELECT ?name ?type ?items ?null ? format ?label ?doc\n " +
188
202
"WHERE {\n " +
189
203
" GRAPH ?graphName {" +
190
204
" ?wf rdf:type cwl:Workflow .\n " +
191
205
" ?wf cwl:outputs ?name .\n " +
192
- " OPTIONAL { ?name sld:type ?type }\n " +
206
+ " OPTIONAL {\n " +
207
+ " { \n " +
208
+ " ?name sld:type ?type\n " +
209
+ " FILTER(?type != sld:null) \n " +
210
+ " FILTER (!isBlank(?type))\n " +
211
+ " } UNION { \n " +
212
+ " ?name sld:type ?arraytype .\n " +
213
+ " ?arraytype sld:type ?type .\n " +
214
+ " ?arraytype sld:items ?items \n " +
215
+ " }\n " +
216
+ " }\n " +
217
+ " OPTIONAL { \n " +
218
+ " ?name sld:type ?null\n " +
219
+ " FILTER(?null = sld:null)\n " +
220
+ " }\n " +
193
221
" OPTIONAL { ?name cwl:format ?format }\n " +
194
222
" OPTIONAL { ?name sld:label|rdfs:label ?label }\n " +
195
- " OPTIONAL { ?name sld:doc|rdfs:comment ?doc }\n " +
223
+ " OPTIONAL { ?name sld:doc|rdfs:comment ?doc }" +
196
224
" FILTER(regex(str(?wf), ?wfFilter, \" i\" ))" +
197
225
" }" +
198
226
"}" );
0 commit comments