Skip to content

Commit acebcde

Browse files
committed
Change prefix from /v/git to /view/git
Avoids conflicts with CWL spec versions like https://w3id.org/cwl/v1.0
1 parent 92a7d06 commit acebcde

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/main/java/org/commonwl/view/cwl/CWLService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public Workflow parseWorkflowWithCwltool(Workflow basicModel,
260260
if (!rdfService.graphExists(url)) {
261261
String rdf = cwlTool.getRDF(localPath);
262262
rdf = rdf.replace("file://" + workTree.toAbsolutePath().toString(),
263-
"https://w3id.org/cwl/v/git/" + latestCommit);
263+
"https://w3id.org/cwl/view/git/" + latestCommit);
264264
// Workaround for common-workflow-language/cwltool#427
265265
rdf = rdf.replace("<rdfs:>", "<http://www.w3.org/2000/01/rdf-schema#>");
266266

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ private void addFilesToBundle(GitDetails gitDetails, Bundle bundle, Path bundleP
249249
Path gitPath = Paths.get(gitDetails.getPath()).resolve(file.getName());
250250

251251
// Get direct URL permalink
252-
URI rawURI = new URI("https://w3id.org/cwl/v/git/" + workflow.getLastCommit() +
252+
URI rawURI = new URI("https://w3id.org/cwl/view/git/" + workflow.getLastCommit() +
253253
"/" + gitPath + "?format=raw");
254254

255255
// Variable to store file contents and aggregation

src/main/java/org/commonwl/view/workflow/Workflow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public String getRoBundleLink() {
215215
public String getPermalink(String format) {
216216
String formatPart = (format != null && !format.isEmpty()) ? "?format=" + format : "";
217217
String packedPart = (retrievedFrom.getPackedId() != null) ? "#" + retrievedFrom.getPackedId() : "";
218-
return "https://w3id.org/cwl/v/git/" + lastCommit +
218+
return "https://w3id.org/cwl/view/git/" + lastCommit +
219219
"/" + retrievedFrom.getPath() + formatPart + packedPart;
220220
}
221221

src/test/java/org/commonwl/view/researchobject/ROBundleServiceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public void generateAndSaveROBundle() throws Exception {
145145
// Check cwl aggregation information
146146
PathMetadata cwlAggregate = manifest.getAggregation(
147147
bundleRoot.resolve("lobSTR-workflow.cwl"));
148-
assertEquals("https://w3id.org/cwl/v/git/null/lobstr-draft3/lobSTR-workflow.cwl?format=raw",
148+
assertEquals("https://w3id.org/cwl/view/git/null/lobstr-draft3/lobSTR-workflow.cwl?format=raw",
149149
cwlAggregate.getRetrievedFrom().toString());
150150
assertEquals("Mark Robinson", cwlAggregate.getAuthoredBy().get(0).getName());
151151
assertEquals("mailto:[email protected]", cwlAggregate.getAuthoredBy().get(0).getUri().toString());
@@ -209,7 +209,7 @@ public void filesOverLimit() throws Exception {
209209
assertEquals(14, manifest.getAggregates().size());
210210

211211
PathMetadata urlAggregate = manifest.getAggregation(
212-
new URI("https://w3id.org/cwl/v/git/null/lobstr-draft3/models/illumina_v3.pcrfree.stepmodel?format=raw"));
212+
new URI("https://w3id.org/cwl/view/git/null/lobstr-draft3/models/illumina_v3.pcrfree.stepmodel?format=raw"));
213213
assertEquals("Mark Robinson", urlAggregate.getAuthoredBy().get(0).getName());
214214

215215
}

0 commit comments

Comments
 (0)