Skip to content

Commit 7d27475

Browse files
committed
Add correct permalinks to overall retrievedFrom and ID
1 parent 6f0250b commit 7d27475

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/org/commonwl/view/researchobject/ROBundleService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ public Bundle createBundle(Workflow workflow, GitDetails gitInfo) throws IOExcep
124124

125125
// Simplified attribution for RO bundle
126126
try {
127-
manifest.setId(new URI("https://w3id.org/cwl/v/git/" + workflow.getLastCommit() +
128-
"/" + workflow.getRetrievedFrom().getPath() + "?format=ro"));
127+
String id = "https://w3id.org/cwl/v/git/" + workflow.getLastCommit() +
128+
"/" + workflow.getRetrievedFrom().getPath();
129+
manifest.setId(new URI(id));
129130

130131
// Tool attribution in createdBy
131132
manifest.setCreatedBy(appAgent);
@@ -134,7 +135,7 @@ public Bundle createBundle(Workflow workflow, GitDetails gitInfo) throws IOExcep
134135
// TODO: Make this importedBy/On/From
135136
manifest.setRetrievedBy(appAgent);
136137
manifest.setRetrievedOn(manifest.getCreatedOn());
137-
manifest.setRetrievedFrom(new URI(gitInfo.getUrl()));
138+
manifest.setRetrievedFrom(new URI(id + "?format=ro"));
138139

139140
// Make a directory in the RO bundle to store the files
140141
Path bundleRoot = bundle.getRoot();

0 commit comments

Comments
 (0)