Skip to content

Commit

Permalink
resolve imports of shape profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomociti committed Sep 10, 2024
1 parent d4cd799 commit 471b718
Showing 1 changed file with 17 additions and 46 deletions.
63 changes: 17 additions & 46 deletions cli/pipelines/publish.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -141,62 +141,33 @@
[
:stepList
(
<#shapeURLs>
<#getShapes>
<#open>
<#imports>
)
] .

<#shapeURLs> a :Step ;
code:implementedBy [
a code:EcmaScriptModule ;
code:link <node:stream#Readable.from> ;
] ;
code:arguments (
"""[
'https://cube.link/v0.2.1/shape/standalone-constraint-constraint',
// 'https://cube.link/v0.1.0/shape/datacatalog-constraint',
]"""^^code:EcmaScript
)
.

<#getShapes> a :Step ;
code:implementedBy [
a code:EcmaScriptModule ;
code:link <node:barnard59-base/forEach.js#default> ;
] ;
code:arguments ( <#getShape> "shapeURL" )
.

<#getShape> a :Pipeline , :ReadableObjectMode;
:steps
[
:stepList
(
<#fetch>
<#parse>
)
] .

<#fetch> a :Step ;
code:implementedBy
<#open> a :Step ;
code:implementedBy
[
a code:EcmaScriptModule ;
code:link <node:barnard59-http/get.js#default>
code:link <node:barnard59-rdf/open.js#default>
] ;
code:arguments
[
code:name "url";
code:value "shapeURL"^^:VariableName ;
]
.
code:arguments
(
'https://cube.link/v0.2.1/shape/standalone-constraint-constraint'
# 'https://cube.link/latest/shape/standalone-constraint-constraint'
# 'https://cube.link/latest/shape/profile-opendataswiss'
# 'https://cube.link/latest/shape/profile-visualize'
)
.

<#parse> a :Step ;
<#imports> a :Step ;
code:implementedBy
[
code:link <node:barnard59-formats/n3.js#parse> ;
a code:EcmaScriptModule ;
]
.
code:link <node:barnard59-rdf/imports.js#default>
] ;
.


<#flatten> a :Step ;
Expand Down

0 comments on commit 471b718

Please sign in to comment.