You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by st...@apache.org on 2015/01/15 00:17:48 UTC
svn commit: r1651876 [1/2] - in /incubator/taverna/site/trunk/scripts: ./
scufl2-info/ scufl2-info/resources/ scufl2-info/src/
scufl2-info/src/scufl2_info/ scufl2-info/test/
scufl2-info/test/scufl2_info/ scufl2-info/test/scufl2_info/test/
Author: stain
Date: Wed Jan 14 23:17:47 2015
New Revision: 1651876
URL: http://svn.apache.org/r1651876
Log:
Squashed commit of the following:
commit b13d413403d8ab33a3135a04945e99a3ac7369d4
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Wed Jan 14 23:15:35 2015 +0000
Apache license
commit a8641eba6f4ebffbe41461266abaf09605b29dcf
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Wed Jan 14 23:13:10 2015 +0000
Re-licensed to Apache under Apache License
.. as part of the Apache Taverna software grant from
University of Manchester
commit d85718b694a78eb168012cbc94c4581689367238
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Wed Jan 14 23:09:51 2015 +0000
scufl2-info imported at scripts/scufl2-info/
from https://github.com/stain/scufl2-info
commit 4645e34cd5e76325494ba11ab23aa18b16d6b14b
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Wed Jan 14 23:06:45 2015 +0000
0.5.1-SNAPSHOT
commit 9ed8cd1cc683b2c7e4a83e68f76a84dbe5a1a23b
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Wed Jan 14 23:06:18 2015 +0000
version 0.5.0
commit c26ff8d7e841ba915cc9c85e1e214a497ff4cf41
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Wed Jan 14 23:05:48 2015 +0000
About cgi-bin
commit 6378b2f2fa38e31c3d1bb67c53a00a286c53ac33
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Wed Jan 14 22:38:29 2015 +0000
handle missing :body
commit 3ec710ddeaae880a4ab07b1d0691aa85a023a246
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Wed Jan 14 22:37:08 2015 +0000
Handle all cgi-bin headers somewhat correctly
commit 9fcc3775b44eeb07aac339c4b57ccddd183374df
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Wed Jan 14 18:32:03 2015 +0000
cgibin compatibility layer
.. not very fast - but kind of works
See http://taverna.staging.apache.org/cgi-bin/scufl2info.cgi/
commit 66434f24b53813bb3c3ecef39e50738ec8be60e2
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Dec 9 16:07:40 2014 +0000
Travis link
commit 0e9a5ae85ae618f40d84a976c36ffaf39010781d
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Dec 9 15:43:35 2014 +0000
0.4.1-SNAPSHOT
commit ba4be1403954c636cd9f8a9d6807d8d242cb8806
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Dec 9 15:41:44 2014 +0000
version 0.4.0
commit a961981db49750c93d8827ef6c580ad7d31802f7
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Dec 9 15:41:09 2014 +0000
Also delete /root/.m2
commit d27e4485812d177d25d4694154a6ec1864117d62
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Dec 9 15:34:55 2014 +0000
Shrink image by deleting build data
commit 2b10e3fb5b1e74b0da762cd3217e46c8dd55fbbd
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Dec 9 15:31:39 2014 +0000
About Docker image
commit 4a079c7031dc2c401f313999a5a710ba24b0d5e4
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Dec 9 15:31:27 2014 +0000
Added MAINTAINER to Dockerfile
commit 61132718c8af2f1072e0b2d23ab76cd78374ab1b
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Dec 9 15:27:38 2014 +0000
scufl2-info Dockerfile
commit 59b9ac7e2371f2f60bce29d5e54ac7aa081790b6
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Dec 9 15:06:40 2014 +0000
Missing dependencies added
commit ba347679e420ceb8ff8b9e9499ef87f5d9749cec
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Dec 9 15:06:36 2014 +0000
travis
commit 9eb61976dd62082c741b2c5245e3b335c0cfe385
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Mon Apr 21 19:06:56 2014 +0100
updated dependencies
commit 914f34b87f1d4a94bc9c00f333dfad51751f54fd
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Mon Apr 21 04:02:22 2014 +0100
test restructured
commit d444c912e8767f87e125b36dc86a10400d6d9654
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Mon Apr 21 00:35:47 2014 +0100
No, can't do lazy-set, won't work with (contains)
commit 1ceb89ab35d57a4f3aa9ea08e1b709e846c97f0d
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Mon Apr 21 00:33:59 2014 +0100
some lazy-set stuff just for fun
commit af1bc0294a1659342612a241f239f8eba79887a1
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Mon Apr 21 00:09:33 2014 +0100
test jsonld later
commit d7717d9b9a32e959a13c7260b249ba04aab8b221
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Mon Apr 21 00:08:48 2014 +0100
test rdf types
commit 06a50c6167aca386245be7c5e4ed79b8e5ef47fd
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Sun Apr 20 23:58:58 2014 +0100
content-types as a set
commit a4009edfbc6372c6cf80394bb7e03ef8e4fc3a98
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Sun Apr 20 23:58:43 2014 +0100
find all content types
commit 2a2dd8081355aee1c8a8307b27b3ab0605b1ffb1
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Sun Apr 20 23:17:16 2014 +0100
generic nameToLang
commit 513063106ca55c2166502b8f7d3c248ac38f0553
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Sun Apr 20 23:13:29 2014 +0100
isQuads test
commit 12e2e75346f4fd9787461640d4cc04933a073549
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Sun Apr 20 23:00:22 2014 +0100
dataset
commit 71974923d2ae5a3a108307f998b48d88b4eb8fc8
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Sun Apr 20 23:00:08 2014 +0100
avoid println
commit fef7462771ffdc9ce947b474ff59ecab4e0cb927
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Sun Apr 20 22:56:47 2014 +0100
jsonld -> turtle
commit a2cf1bbabff8071d851258d360a688d4b872a430
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Sun Apr 20 22:37:56 2014 +0100
simple log4j
commit 7cce75f917a1fc148c2321b49a06dcda083cc405
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Sun Apr 20 22:31:57 2014 +0100
rdfxml test
commit 5f1cd8e90751a4d83abc454fcacde33d28e9bdc1
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Sun Apr 20 19:48:34 2014 +0100
test ntriples
commit 311f11df3819a04987a90dc1270a4751369ffde6
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Sun Apr 20 19:46:20 2014 +0100
support for ntriples and rdfxml
commit ce89f18bfa3be65cb67b8bb36baf583c35409bdf
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Sun Apr 20 19:37:29 2014 +0100
test jsonld
jsonld-jena must use inputstream, not reader!
commit c7c314e5d286ee81c166d872fd0fc3cb0da197de
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Apr 11 10:02:12 2014 +0100
stuck..
commit b1d34172e3e53fe43d7efbbd00d8294b38eef84b
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Apr 11 09:38:29 2014 +0100
jsonld test
commit b396e1dfe86ec36aec72c9012e7844d94ebb4af2
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Apr 11 09:17:34 2014 +0100
test lists and errors
commit f2f9260083d2d87f2e4526a1775905e7c5c85f36
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Apr 8 11:02:03 2014 +0100
use in? from http://stackoverflow.com/a/3249777/412540
commit 9c8b97b96328e7129783b364a1b5d2d600ed2035
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Apr 8 10:38:29 2014 +0100
test data reference
commit a884cddbfedb02ad1fb2948ccea85ab832f7143c
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Apr 4 02:53:44 2014 +0100
0.4.0-SNAPSHOT
commit cf49f0e41f34624776b06ab9f72deaa96c2f6801
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Apr 4 02:53:27 2014 +0100
0.3.0
commit 85fb3860eefb9aed60318fa2e9c10ec2b7e02279
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Apr 4 02:52:48 2014 +0100
Wrap in {:body }
commit d840965c41fb6ed197a6cd335fae7bc224d68376
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Apr 4 02:52:36 2014 +0100
Updated README - /data/ now added
commit 2cd04116d1793c49830342c5092ccba48306807c
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Apr 4 02:49:30 2014 +0100
updated URIs in help HTML
commit 364d235e00e70f74a7cc80329e31699464d23092
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Apr 4 02:49:23 2014 +0100
avoid jsonld for now
commit cbaf3623086e593787cee25405626553438e2bd4
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Apr 4 02:49:09 2014 +0100
correct parameters for error-json
commit 04da9f33b6a0da3e6e970614586bacfab53003ae
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Apr 4 02:38:32 2014 +0100
richer types Support for lists
commit 48d4bfeff74dceaa7d166d58f8feb1e046e243e9
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Apr 4 02:20:45 2014 +0100
use catch-data
commit 9b841814fa7f209a66dcef83775f6b810b0c28ac
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Apr 4 01:45:50 2014 +0100
use ex-info-status to check uuids etc.
commit 2c16efeaa05ffcf398ae6c63570d690749e1e820
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Apr 4 01:34:46 2014 +0100
ensure-int and ensure-uuid using ex-info-status middleware
commit 2f06c17af8dce816a78f21e57917310e188d912d
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Wed Apr 2 01:18:13 2014 +0100
handle data/../ref/../
commit 2ab2d086e3e45ceb0423b7f8244958615aea82e1
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Apr 1 23:51:54 2014 +0100
split out uuid test to util
commit 8fb5b04b84cdafb122d14a40b42477d377f0bb69
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Apr 1 11:14:48 2014 +0100
0.3.0-SNAPSHOT
commit 8ce26afde4d96608b51b68371c333cf56d30467a
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Apr 1 11:14:25 2014 +0100
0.2.0
New: Support for /run/
commit b84bd673f1e191752f3c6b88a68b93647aaaf486
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Apr 1 11:13:50 2014 +0100
Same bnode ID for the taverna engine
commit ad1760102a7b30fa24b7187cf3746da51dafbc27
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Apr 1 11:13:42 2014 +0100
Added /data/ as requirement
commit ffd5b09acc1d6188964a5d459d7d4d968c2a1daf
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Apr 1 11:09:40 2014 +0100
more gvim files to ignore ..
commit da01eedb3d698882cb3c5918b5cf107249e7ba44
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Apr 1 11:09:01 2014 +0100
test strange UUIDs in run
commit 4b093f81ef3a9d15079d5f8ff6b041bbdfe12762
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Apr 1 11:04:12 2014 +0100
simplify dependencies
commit 137d4bce7243b90854c3b674951ca4627addd2b9
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Apr 1 11:03:45 2014 +0100
simplify JSON-LD context, add tavernaprov
commit 2bddba2a58119586dd634eb9af6c443b18faeba0
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Apr 1 11:03:33 2014 +0100
Test workflow-run and process-run
commit 80d24941458615be8fecaaefbfd799869bd11f87
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Apr 1 10:07:31 2014 +0100
add run
commit 5f2cd3ae4a3c3c4ec19fdb64b6c0489c8ba7a392
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Tue Apr 1 10:07:23 2014 +0100
uuid-check separate
commit f5cd0adf143991b8287423443f123bfaecd0cc91
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Mon Mar 31 18:41:03 2014 +0100
redirect /workflowBundle (without /)
fix HTML error
commit 9b5abed1d1861238b71d855f8b58e5d0432d0dba
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Mon Mar 31 18:31:49 2014 +0100
test 'scufl2-info' in HTML rather than "Hello World"
commit 72b84abc4bd82466b0107bb41e56a7633fb4eb1e
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Mon Mar 31 18:31:32 2014 +0100
silly typo removed in html
commit ba989693ec56ed4dbf627d66aed9964f96c6f33d
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Mon Mar 31 18:29:18 2014 +0100
Correct number of trailing /
.. avoid /workflowBundle//edbfe524-2a4d-4c0e-a384-07a0442dab25//
commit 0ff6005058f35a726d5e23c6074be389fa5580cf
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Mon Mar 31 18:14:32 2014 +0100
Explicit dependencies; version mismatch somewhere
FIXME: Investigate and report upstream
commit 90a978005c529516ce7829c760784f12e26927b1
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Mon Mar 31 18:14:10 2014 +0100
define workflowBundle context in workflow_bundle
commit 2f75504eeba707e3a495119f94a67cac5d495364
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Mon Mar 31 17:30:34 2014 +0100
move out /workflowBundle to context
commit 6b14ddf2974500cd5af2a205fa6a20c74d581aae
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Sat Mar 29 12:07:06 2014 +0000
split out workflow_bundle routes
commit d3129e5c946ec65f11ab77264cc53c69d4bb46ab
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Mar 28 01:48:52 2014 +0000
hyperlinks in README
commit e6b0fc37039ff1b9c2c7b8d83f9eb34f13a4f9e0
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Mar 28 01:45:39 2014 +0000
0.2.0-SNAPSHOT
commit 40b70bdd51daaf4c6844a0a4f354a055553305b2
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Mar 28 01:45:24 2014 +0000
0.1.0
commit 259ff2047ba85e674260f2c9faef4f0302d39dd8
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Mar 28 01:44:41 2014 +0000
explanation/examples on index page HTML
commit b5dbed93a954054987f7896e2562b88f0099a3eb
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Mar 28 01:44:30 2014 +0000
metadata in project file
commit 53405c197ab80aae30e5cc295b9ec26b209c7122
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Mar 28 01:14:47 2014 +0000
test workflow input/output port
commit 2bb8bf15c51413264a61fd5a0e708a8a34fcb55d
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Mar 28 01:12:03 2014 +0000
Updated README
commit ff078d27efb7e4888e4af69e6460cc6122dff2ce
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Mar 28 01:11:53 2014 +0000
workflow input/output ports
commit fcc179a23940376ad7cb431d4483868fc0efb60a
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Mar 28 00:55:53 2014 +0000
datalink test (don't escape from/to in uri)
commit 0dff4d748c55f2c634ccd0e840fcc7f44e6fee18
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Fri Mar 28 00:34:23 2014 +0000
Ensure workflow bundle uuids are valid UUIDs
400 error if invalid.
Note that this also normalizes any strange uuid casing to lowercase
commit 1e5db64ebec8beffd2adf298e85e1967d1a7015f
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 22:52:51 2014 +0000
iteration strategy stack
commit cbb9f83eaf580b1f3fc08f1ff7a61bd6bfc21e7b
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 22:39:35 2014 +0000
test processor ports
commit fa0526a9a0bc4a5691751ad2d4c302647eb3b902
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 22:39:25 2014 +0000
Spelling mistake in OutputProcessorPort
commit efbe424f1df6ead7509cf2586a33136b228bd964
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 22:35:22 2014 +0000
test processor
commit f4e3504377439bd2945c8e25db59ebe676d1f791
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 22:29:24 2014 +0000
test workflow
commit f0fb778e5884a714a5f1b17f8744524559999d25
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 22:23:41 2014 +0000
test wfbundle
commit 52664396c23baeb214cdb39b3ee0369ab9c68f3a
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 22:15:22 2014 +0000
no .swp from vim
commit d1aaedb2f1161ec59421877208dff2c0aad21595
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 22:09:20 2014 +0000
pretty-print json, workflowBundle/:uuid/ ends /
commit 32f393b61237857cf17e59f01d9c7301661d88af
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 16:51:15 2014 +0000
updated example
commit 3bf89ee1e8f7d39762159386e305eb952d3e1c10
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 16:45:42 2014 +0000
JSON-LD context
commit 976d239c102a1b7324d30fc3e78ebec52b1a35a6
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 16:42:51 2014 +0000
Add JSON-LD @context using @base and @vocab
.. means we can use relative URIs for the @id
commit 6d7e0ebfacd9c4a9bc200a7f2f7eba29c1f267b1
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 16:38:02 2014 +0000
README MarkDown syntax
commit 16ed12c5a97231f906d3fcccebae29c36bd7587c
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 16:36:52 2014 +0000
README reformat
commit e07301a63fa5af5abc415943a47a93b0f0fe08e9
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 16:33:17 2014 +0000
README/License
commit 5981ba79cfefd9f9b37bf5cb7d0714edfb9af5e4
Author: Stian Soiland-Reyes <so...@cs.manchester.ac.uk>
Date: Thu Mar 27 16:27:41 2014 +0000
scufl2 information
Returns Linked Data information about a SCUFL2 URI
The idea is that say
http://ns.taverna.org.uk/2010/workflowBundle/74674670-04d0-4832-9651-bfc3a2ec3a19/workflow/HelloWorld/processor/Hello/out/fred"
will redirect to this service to "guess" the partial workflow structure
expressed in the URI - e.g. that we're talking about an output port
"fred" in processor "Hello" in workflow "HelloWorld" in workflow bundle
"746....a19".
Currently returns almost-JSON-LD:
http://localhost:3000/workflowBundle/74674670-04d0-4832-9651-bfc3a2ec3a19/workflow/HelloWorld/processor/Hello/out/fred
{"workflow":{"processor":{"outputProcessorPort":{"@id":"http://ns.taverna.org.uk/2010/workflowBundle/74674670-04d0-4832-9651-bfc3a2ec3a19/workflow/HelloWorld/processor/Hello/out/fred","@type":"OutputProcesorPort","name":"fred"},"@id":"http://ns.taverna.org.uk/2010/workflowBundle/74674670-04d0-4832-9651-bfc3a2ec3a19/workflow/HelloWorld/processor/Hello/","@type":"Processor","name":"Hello"},"@id":"http://ns.taverna.org.uk/2010/workflowBundle/74674670-04d0-4832-9651-bfc3a2ec3a19/workflow/HelloWorld/","@type":"Workflow","name":"HelloWorld"},"@id":"http://ns.taverna.org.uk/2010/workflowBundle/74674670-04d0-4832-9651-bfc3a2ec3a19/","@type":"WorkflowBundle"}
TODO:
- Make and declare JSON-LD context with scufl2 mapping
- datalinks, control links, activities, profiles, configurations, dispatch layer
- Other RDF formats: RDF/XML and Turtle
- Search myExperiment by UUID to add @seeAlso
- wfdesc
Added:
incubator/taverna/site/trunk/scripts/
incubator/taverna/site/trunk/scripts/scufl2-info/
incubator/taverna/site/trunk/scripts/scufl2-info/.gitignore
incubator/taverna/site/trunk/scripts/scufl2-info/.travis.yml
incubator/taverna/site/trunk/scripts/scufl2-info/Dockerfile
incubator/taverna/site/trunk/scripts/scufl2-info/LICENSE
incubator/taverna/site/trunk/scripts/scufl2-info/NOTICE
incubator/taverna/site/trunk/scripts/scufl2-info/README.md
incubator/taverna/site/trunk/scripts/scufl2-info/project.clj
incubator/taverna/site/trunk/scripts/scufl2-info/resources/
incubator/taverna/site/trunk/scripts/scufl2-info/resources/log4j.properties
incubator/taverna/site/trunk/scripts/scufl2-info/src/
incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/
incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/cgibin.clj
incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/data.clj
incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/handler.clj
incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/jsonld.clj
incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/run.clj
incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/util.clj
incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/workflow_bundle.clj
incubator/taverna/site/trunk/scripts/scufl2-info/test/
incubator/taverna/site/trunk/scripts/scufl2-info/test/scufl2_info/
incubator/taverna/site/trunk/scripts/scufl2-info/test/scufl2_info/test/
incubator/taverna/site/trunk/scripts/scufl2-info/test/scufl2_info/test/handler.clj
incubator/taverna/site/trunk/scripts/scufl2-info/test/scufl2_info/test/jsonld.clj
Added: incubator/taverna/site/trunk/scripts/scufl2-info/.gitignore
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/.gitignore?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/.gitignore (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/.gitignore Wed Jan 14 23:17:47 2015
@@ -0,0 +1,12 @@
+/target
+/lib
+/classes
+/checkouts
+pom.xml
+pom.xml.asc
+*.jar
+*.class
+/.lein-*
+/.nrepl-port
+*.swp
+*.swo
Added: incubator/taverna/site/trunk/scripts/scufl2-info/.travis.yml
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/.travis.yml?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/.travis.yml (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/.travis.yml Wed Jan 14 23:17:47 2015
@@ -0,0 +1,2 @@
+language: clojure
+lein: lein2
Added: incubator/taverna/site/trunk/scripts/scufl2-info/Dockerfile
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/Dockerfile?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/Dockerfile (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/Dockerfile Wed Jan 14 23:17:47 2015
@@ -0,0 +1,19 @@
+FROM tomcat:7-jre7
+MAINTAINER "Stian Soiland-Reyes <orcid.org/0000-0001-9842-9718>"
+
+RUN rm -rf /usr/local/tomcat/webapps/*
+
+# Borrowed from https://registry.hub.docker.com/u/pandeiro/lein/dockerfile/
+ENV LEIN_ROOT true
+RUN wget -q -O /usr/bin/lein \
+ https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein \
+ && chmod +x /usr/bin/lein
+
+WORKDIR /tmp
+
+COPY project.clj /tmp/
+COPY src /tmp/src/
+COPY resources /tmp/resources/
+
+RUN lein deps && lein ring uberwar && cp target/*war /usr/local/tomcat/webapps/ROOT.war && rm -rf /tmp/* /root/.lein /root/.m2
+EXPOSE 8009
Added: incubator/taverna/site/trunk/scripts/scufl2-info/LICENSE
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/LICENSE?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/LICENSE (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/LICENSE Wed Jan 14 23:17:47 2015
@@ -0,0 +1,176 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
Added: incubator/taverna/site/trunk/scripts/scufl2-info/NOTICE
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/NOTICE?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/NOTICE (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/NOTICE Wed Jan 14 23:17:47 2015
@@ -0,0 +1,6 @@
+Apache Taverna (incubating)
+Copyright 2015 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
Added: incubator/taverna/site/trunk/scripts/scufl2-info/README.md
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/README.md?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/README.md (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/README.md Wed Jan 14 23:17:47 2015
@@ -0,0 +1,156 @@
+# scufl2-info
+
+[![Build Status](https://travis-ci.org/stain/scufl2-info.svg?branch=0.4.0)](https://travis-ci.org/stain/scufl2-info)
+
+Returns Linked Data information about a [SCUFL2](http://dev.mygrid.org.uk/wiki/display/developer/SCUFL2)
+resource.
+
+The idea is that say
+
+ http://ns.taverna.org.uk/2010/workflowBundle/74674670-04d0-4832-9651-bfc3a2ec3a19/workflow/HelloWorld/processor/Hello/out/fred"
+
+will redirect to this service to "guess" the partial workflow structure
+expressed in the URI - e.g. that we're talking about an output port
+`fred` in processor `Hello` in workflow `HelloWorld` in workflow bundle
+with uuid `746....a19`.
+
+## Example
+
+ http://localhost:3000/workflowBundle/74674670-04d0-4832-9651-bfc3a2ec3a19/workflow/HelloWorld/processor/Hello%20there/out/fred
+
+returns [JSON-LD](http://json-ld.org/)):
+
+
+ {
+ "workflow": {
+ "processor": {
+ "inputProcessorPort": {
+ "@id": "workflow/HelloWorld/processor/Hello/in/hello",
+ "@type": "InputProcessorPort",
+ "name": "hello"
+ },
+ "@id": "workflow/HelloWorld/processor/Hello/",
+ "@type": "Processor",
+ "name": "Hello"
+ },
+ "@id": "workflow/HelloWorld/",
+ "@type": "Workflow",
+ "name": "HelloWorld"
+ },
+ "@context": {
+ "@base": "http://ns.taverna.org.uk/2010/workflowBundle/74674670-04d0-4832-9651-bfc3a2ec3a19/",
+ "@vocab": "http://ns.taverna.org.uk/2010/scufl2#"
+ },
+ "@id": "http://ns.taverna.org.uk/2010/workflowBundle/74674670-04d0-4832-9651-bfc3a2ec3a19/",
+ "@type": "WorkflowBundle"
+ }
+
+
+
+Which is equivalent to the RDF triples:
+
+ @base <http://ns.taverna.org.uk/2010/workflowBundle/74674670-04d0-4832-9651-bfc3a2ec3a19/> .
+ <> <http://ns.taverna.org.uk/2010/scufl2#workflow> <workflow/HelloWorld/> .
+ <> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://ns.taverna.org.uk/2010/scufl2#WorkflowBundle> .
+ <workflow/HelloWorld/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://ns.taverna.org.uk/2010/scufl2#Workflow> .
+ <workflow/HelloWorld/> <http://ns.taverna.org.uk/2010/scufl2#name> "HelloWorld" .
+ <workflow/HelloWorld/> <http://ns.taverna.org.uk/2010/scufl2#processor> <workflow/HelloWorld/processor/Hello/> .
+ <workflow/HelloWorld/processor/Hello/> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://ns.taverna.org.uk/2010/scufl2#Processor> .
+ <workflow/HelloWorld/processor/Hello/> <http://ns.taverna.org.uk/2010/scufl2#inputProcessorPort> <workflow/HelloWorld/processor/Hello/in/hello> .
+ <workflow/HelloWorld/processor/Hello/> <http://ns.taverna.org.uk/2010/scufl2#name> "Hello" .
+ <workflow/HelloWorld/processor/Hello/in/hello> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://ns.taverna.org.uk/2010/scufl2#InputProcessorPort> .
+ <workflow/HelloWorld/processor/Hello/in/hello> <http://ns.taverna.org.uk/2010/scufl2#name> "hello" .
+
+This corresponds to what is defined inside the scufl2 workflow bundle.
+
+## TODO
+
+- control links, activities, profiles, configurations, dispatch layer
+- Other RDF formats: RDF/XML and Turtle
+- Search myExperiment by UUID to add rdfs:seeAlso
+- wfdesc
+
+
+## Prerequisites
+
+You will need [Leiningen][1] 1.7.0 or above installed.
+
+[1]: https://github.com/technomancy/leiningen
+
+## Running
+
+To start a developer web server for the application, run:
+
+ lein ring server
+
+To generate a WAR that can be installed into a servlet container like Apache Tomcat:
+
+ lein ring uberwar
+
+
+## Docker image
+
+This service is also available as a Docker image
+[stain/scufl2-info](https://registry.hub.docker.com/u/stain/scufl2-info/), exposing the ports `8080` (HTTP) and `8009` (AJP)
+through [tomcat](https://registry.hub.docker.com/_/tomcat/).
+
+ docker run -p 8080:8080 stain/scufl2-info
+
+# cgi-bin
+
+If you are old-skool and unable to run a Servlet application server, it is possible to create a
+[cgi-bin](http://www.ietf.org/rfc/rfc3875)
+version, that although very slow (~ 4s response time), does not require any running processes or memory
+usage when the scufl2info service is not being accessed.
+
+Build as:
+
+ lein ring uberjar
+
+This produces a single jar in `target/scufl2-info-0.4.1-SNAPSHOT-standalone.jar`. You can test this as:
+
+ stain@biggie-utopic:~/src/scufl2-info$ PATH_INFO=/workflowBundle/2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/ java -jar target/scufl2-info-0.4.1-SNAPSHOT-standalone.jar
+ Status: 200
+ Content-Type: application/json; charset=utf-8
+
+ {
+ "@context" : {
+ "@base" : "http://ns.taverna.org.uk/2010/workflowBundle/2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/",
+ "@vocab" : "http://ns.taverna.org.uk/2010/scufl2#"
+ },
+ "@id" : "http://ns.taverna.org.uk/2010/workflowBundle/2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/",
+ "@type" : "WorkflowBundle"
+ }
+
+See [RFC3875](http://www.ietf.org/rfc/rfc3875) for details about the cgi-bin environment variables.
+
+
+Now simply create a `scufl2info.cgi` script to execute `scufl2-info-0.4.1-SNAPSHOT-standalone.jar`:
+
+ #!/bin/sh
+ ## Small memory footprint!
+ java -Xmx32M -jar lib/scufl2-info-0.4.1-SNAPSHOT-standalone.jar 2>&1
+
+Remember to make the script executable with
+
+ chmod 755 scufl2info.cgi
+
+Configuring your web server to run cgi-bin is out of scope for this document.
+
+You might want to pretend this is in a folder `/scufl2info/` using this `.htaccess`:
+
+ RewriteEngine On
+ RewriteRule (.*) /cgi-bin/scufl2info.cgi/$1
+
+Remember to add the final `/` as otherwise the relative links will be wrong.
+
+## License
+
+Copyright © 2014-2015 University of Manchester
+Copyright © 2015 The Apache Software Foundation
+
+This product includes software developed at
+[The Apache Software Foundation](http://www.apache.org/).
+
+This software is licensed under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
+
Added: incubator/taverna/site/trunk/scripts/scufl2-info/project.clj
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/project.clj?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/project.clj (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/project.clj Wed Jan 14 23:17:47 2015
@@ -0,0 +1,34 @@
+; Licensed to the Apache Software Foundation (ASF) under one or more
+; contributor license agreements. See the NOTICE file distributed with
+; this work for additional information regarding copyright ownership.
+; The ASF licenses this file to You under the Apache License, Version 2.0
+; (the "License"); you may not use this file except in compliance with
+; the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+;
+(defproject scufl2-info "0.5.1-SNAPSHOT"
+ :description "SCUFL2 information service"
+ :url "https://github.com/stain/scufl2-info"
+ :dependencies [
+ [org.clojure/clojure "1.5.1"]
+ [com.github.jsonld-java/jsonld-java-jena "0.3"]
+ [ring-middleware-format "0.3.2"]
+ [ring/ring-json "0.3.1"]
+ [com.gfredericks/catch-data "0.1.3"]
+ [ring/ring-mock "0.2.0"]
+ [compojure "1.1.6"]]
+ :plugins [[lein-ring "0.8.10"]]
+ :ring {:handler scufl2-info.handler/app}
+ :main scufl2-info.cgibin
+ :profiles
+ {:uberjar {:aot :all
+ :main scufl2-info.cgibin }
+ :dev {:dependencies [[javax.servlet/servlet-api "2.5"]
+ ]}})
Added: incubator/taverna/site/trunk/scripts/scufl2-info/resources/log4j.properties
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/resources/log4j.properties?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/resources/log4j.properties (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/resources/log4j.properties Wed Jan 14 23:17:47 2015
@@ -0,0 +1,9 @@
+log4j.rootLogger=WARN, CONSOLE
+
+#log4j.logger.org.apache.commons.httpclient=ERROR
+
+# Default output to console
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%-5p %d{ISO8601} (%c:%L) - %m%n
+
Added: incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/cgibin.clj
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/cgibin.clj?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/cgibin.clj (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/cgibin.clj Wed Jan 14 23:17:47 2015
@@ -0,0 +1,92 @@
+; Licensed to the Apache Software Foundation (ASF) under one or more
+; contributor license agreements. See the NOTICE file distributed with
+; this work for additional information regarding copyright ownership.
+; The ASF licenses this file to You under the Apache License, Version 2.0
+; (the "License"); you may not use this file except in compliance with
+; the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+;
+(ns scufl2-info.cgibin
+ (:gen-class)
+ (:import [java.util Locale]
+ [java.net URI])
+ (:require
+ [ring.mock.request :as mock]
+ [scufl2-info.handler :as handler]
+ ))
+
+(defn convert-cgi-header [header]
+ (.. header
+ (replaceFirst "HTTP_" "")
+ (replace "_" "-")
+ (toLowerCase Locale/US)
+ ))
+
+(defn select-http-headers [header]
+ (.startsWith header "HTTP_"))
+
+(defn convert-headers []
+ (let [http-keys (filter select-http-headers (keys (System/getenv)))]
+ (zipmap
+ (map convert-cgi-header http-keys)
+ (vals (select-keys (System/getenv) http-keys)))))
+
+(defn print-header [[k,v]]
+ (println (str k ": " v)))
+
+(defn -main [& args]
+
+ (let [
+ uri (or (System/getenv "PATH_INFO") "/")
+ request-method (or (System/getenv "REQUEST_METHOD") "GET")
+ auth-type (System/getenv "AUTH_TYPE")
+ content-length (System/getenv "CONTENT_LENGTH")
+ content-type (System/getenv "CONTENT_TYPE")
+ server-port (or (System/getenv "SERVER_PORT") "80")
+ server-name (or (System/getenv "SERVER_NAME") "localhost")
+ scheme (or (System/getenv "SERVER_PROTOCOL") "http")
+ remote-addr (or (System/getenv "REMOTE_ADDR") "127.0.0.1")
+ remote-host (or (System/getenv "REMOTE_HOST") "localhost")
+ remote-ident (System/getenv "REMOTE_IDENT")
+ remote-user (System/getenv "REMOTE_USER")
+ query-string (System/getenv "QUERY_STRING")
+ ; see http://www.ietf.org/rfc/rfc3875
+ request { :request-method (keyword (.toLowerCase request-method))
+ :uri (.getRawPath (URI. uri))
+ :server-port (Integer/parseInt server-port)
+ :server-name server-name
+ :scheme scheme
+ :remote-addr remote-addr
+ :remote-host remote-host
+ :remote-ident remote-ident
+ :remote-user remote-user
+ :query-string query-string
+ :content-length (and content-length (Long/parseLong content-length))
+ :content-type content-type
+ :auth-type auth-type
+ :headers (convert-headers) }
+ ; TODO read in content-length submitted bytes and store in :body
+ response (handler/app request)]
+
+ ; FIXME: This is a potential security breach
+ (if (and query-string (.contains query-string "_cgi=debug"))
+ (do
+ (println "Content-Type: text/plain")
+ (println "")
+ (println "Debug from cgibin.clj")
+ (println)
+ (println "env") (doall (map println (System/getenv)))
+ (println "request") (println request))
+ (do
+ (println "Status:" (:status response))
+ (doall (map print-header (:headers response)))
+ (println "")
+ ; Should probably do (print) instead of (println) in case :body is a binary - but we know it's all HTML and JSON)
+ (println (or (:body response) ""))))))
Added: incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/data.clj
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/data.clj?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/data.clj (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/data.clj Wed Jan 14 23:17:47 2015
@@ -0,0 +1,135 @@
+; Licensed to the Apache Software Foundation (ASF) under one or more
+; contributor license agreements. See the NOTICE file distributed with
+; this work for additional information regarding copyright ownership.
+; The ASF licenses this file to You under the Apache License, Version 2.0
+; (the "License"); you may not use this file except in compliance with
+; the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+;
+(ns scufl2-info.data
+ (:use compojure.core)
+ (:use scufl2-info.util)
+ (:require
+ [compojure.handler :as handler]
+ [ring.middleware.json :as middleware]
+ [ring.util.response :as response]
+ [ring.util.codec :as codec]
+ [compojure.route :as route]
+ ))
+
+
+(defn data-uri [data]
+ (str "http://ns.taverna.org.uk/2011/data/" (ensure-uuid data) "/"))
+
+(defn run-uri [uuid]
+ (str "http://ns.taverna.org.uk/2011/run/" (ensure-uuid uuid) "/"))
+
+(defn ref-uri [data reference]
+ (str (data-uri data) "ref/" (ensure-uuid reference) "/"))
+
+(defn error-uri [data error depth]
+ (str (data-uri data) "error/" (ensure-uuid error) "/" (ensure-int depth)))
+
+(defn list-uri [data listref has-errors depth]
+ (str (data-uri data) "list/" (ensure-uuid listref) "/" (ensure-bool has-errors) "/" (ensure-int depth)))
+
+(defn jsonld-context []
+ { "@context" {
+ "@vocab" "http://purl.org/wf4ever/wfprov#"
+ "tavernaprov" "http://ns.taverna.org.uk/2012/tavernaprov/"
+ "prov" "http://www.w3.org/ns/prov#"
+ ; TODO: define new subproperty in tavernaprov
+ "involvedInRun" { "@id" "tavernaprov:involvedInRun"
+ "@type" "@id" }
+ "depth" "tavernaprov:depth"
+ "scufl2" "http://ns.taverna.org.uk/2010/scufl2#"
+ }})
+
+(defn ref-json [data reference]
+ {
+ "@id" (ref-uri data reference)
+ "@type" [:Artifact "prov:Entity"]
+ "involvedInRun" (run-uri data)
+ })
+
+(defn error-json [data error depth]
+ {
+ "@id" (error-uri data error depth)
+ "@type" ["tavernaprov:Error" :Artifact "prov:Entity"]
+ "depth" (ensure-int depth)
+ "involvedInRun" (run-uri data)
+ })
+
+(defn list-json [data listref has-errors depth]
+ {
+ "@id" (list-uri data listref has-errors depth)
+ "@type" (let [types ["prov:Collection" :Artifact "prov:Entity"]]
+ (if (ensure-bool has-errors) (conj types "tavernaprov:ContainsError" has-errors) types))
+ "depth" (ensure-int depth)
+ "involvedInRun" (run-uri data)
+ })
+
+
+(defn ref-json-resource [data reference]
+ {:body
+ (merge
+ (ref-json data reference)
+ (jsonld-context)
+ )})
+
+(defn error-json-resource [data error depth]
+ {:body
+ (merge
+ (error-json data error depth)
+ (jsonld-context)
+ )})
+
+(defn list-json-resource [data listref has-errors depth]
+ {:body
+ (merge
+ (list-json data listref has-errors depth)
+ (jsonld-context)
+ )})
+
+
+(def data-context (context "/data" []
+ (GET "/" [] "
+ <h1>scufl2-info data</h1>
+ This is the <a href='https://github.com/stain/scufl2-info'>scufl2-info</a> web service.
+ <p>
+ This service generates <a href='http://json-ld.org/'>JSON-LD</a> Linked Data descriptions for
+ <a href='http://www.taverna.org.uk/'>Taverna workflow data</a> resources
+ as found in the provenance data bundles exported from Taverna.
+ </p>
+ <p>This service reflects URIs under the namespace
+ <code>http://ns.taverna.org.uk/2011/data/</code>
+ <p>
+ Examples:
+ <ul>
+ <li> <a href='d5ee659e-e11e-43a5-bc0a-58d93674e5e2/ref/a060702f-7962-4773-9be3-99c026dd5da5/'>data artifact</a></li>
+ <li> <a href='d5ee659e-e11e-43a5-bc0a-58d93674e5e2/list/c2f58d3e-8686-40a5-b1cd-b797cd18fbb7/false/1'>list (depth 1)</a></li>
+ <li> <a href='d5ee659e-e11e-43a5-bc0a-58d93674e5e2/list/2cdc8e4c-ebcf-4662-83db-85a2fd496ca7/true/2'>list (depth 2, w/errors)</a></li>
+ <li> <a href='d5ee659e-e11e-43a5-bc0a-58d93674e5e2/error/49785ed7-eda9-4d53-b74f-6c6a7a4940a5/0'>error (depth 0)</a></li>
+ </ul>
+ <p>
+ Questions? Contact support@mygrid.org.uk
+ ")
+ (context "/:data" [data]
+ (GET "/"
+ [uuid] (response/redirect (run-uri data)))
+ (GET "/ref/:reference/"
+ [reference] (ref-json-resource data reference))
+ (GET "/list/:listref/:has-errors/:depth"
+ [listref has-errors depth] (list-json-resource data listref has-errors depth))
+ (GET "/error/:error/:depth"
+ [error depth] (error-json-resource data error depth))
+
+ )))
+
Added: incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/handler.clj
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/handler.clj?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/handler.clj (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/handler.clj Wed Jan 14 23:17:47 2015
@@ -0,0 +1,118 @@
+; Licensed to the Apache Software Foundation (ASF) under one or more
+; contributor license agreements. See the NOTICE file distributed with
+; this work for additional information regarding copyright ownership.
+; The ASF licenses this file to You under the Apache License, Version 2.0
+; (the "License"); you may not use this file except in compliance with
+; the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+;
+(ns scufl2-info.handler
+ (:use compojure.core)
+ (:require
+ [com.gfredericks.catch-data :refer [try+]]
+ [scufl2-info.workflow-bundle :as wfbundle]
+ [scufl2-info.run :as run]
+ [scufl2-info.jsonld :as jsonld]
+ [scufl2-info.data :as data]
+ [compojure.handler :as handler]
+ [ring.middleware.json :as json]
+ [ring.util.codec :as codec]
+ [ring.util.response :as response]
+ [compojure.route :as route]))
+
+(defroutes app-routes
+ (GET "/" [] "
+ <h1>scufl2-info</h1>
+ This is the <a href='https://github.com/stain/scufl2-info'>scufl2-info</a> web service.
+ <p>
+ This service generates <a href='http://json-ld.org/'>JSON-LD</a> Linked Data descriptions for
+ <a href='http://dev.mygrid.org.uk/wiki/display/developer/SCUFL2'>SCUFL2</a> resources,
+ following the same URI syntax as below the base
+ <code>http://ns.taverna.org.uk/2010/workflowBundle/</code>
+ <p>
+ Examples:
+ <ul>
+ <li> <a href='workflowBundle/2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/'>workflow bundle</a>
+ <ul>
+ <li> <a href='workflowBundle/2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/workflow/HelloWorld/'>workflow</a></li>
+ <li> <a href='workflowBundle/2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/workflow/HelloWorld/in/input1'>workflow input port</a></li>
+ <li> <a href='workflowBundle/2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/workflow/HelloWorld/processor/hello/'>processor</a></li>
+ <li> <a href='workflowBundle/2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/workflow/HelloWorld/processor/hello/out/output1'>processor output port</a></li>
+ <li> <a href='workflowBundle/2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/workflow/HelloWorld/datalink?from=processor/hello/out/output1&to=out/result'>datalink</a></li>
+ </ul></li>
+
+ <li> <a href='run/d5ee659e-e11e-43a5-bc0a-58d93674e5e2/'>workflow run</a>
+ <ul>
+ <li> <a href='run/d5ee659e-e11e-43a5-bc0a-58d93674e5e2/process/1e027057-2aeb-47f7-97dc-03e19e9772be/'>process run</a></li>
+ </ul></li>
+
+ <li> <a href='data/d5ee659e-e11e-43a5-bc0a-58d93674e5e2/ref/a060702f-7962-4773-9be3-99c026dd5da5/'>data artifact</a></li>
+ <li> <a href='data/d5ee659e-e11e-43a5-bc0a-58d93674e5e2/list/c2f58d3e-8686-40a5-b1cd-b797cd18fbb7/false/1'>list (depth 1)</a></li>
+ <li> <a href='data/d5ee659e-e11e-43a5-bc0a-58d93674e5e2/list/2cdc8e4c-ebcf-4662-83db-85a2fd496ca7/true/2'>list (depth 2, w/errors)</a></li>
+ <li> <a href='data/d5ee659e-e11e-43a5-bc0a-58d93674e5e2/error/49785ed7-eda9-4d53-b74f-6c6a7a4940a5/0'>error (depth 0)</a></li>
+
+ </ul>
+ <p>
+ Questions? Contact support@mygrid.org.uk
+ ")
+ (GET "/workflowBundle" [] (response/redirect "/workflowBundle/"))
+ (GET "/data" [] (response/redirect "/data/"))
+ (GET "/run" [] (response/redirect "/run/"))
+ wfbundle/wfbundle-context
+ data/data-context
+ run/run-context
+ (route/resources "/")
+ (route/not-found "Not Found"))
+
+(defn ex-info-status
+ "Ring Middleware that catches exceptions which minimally contain the (ex-data) key :status.
+
+ The exception message will be used as body, unless the ex-data contains a :body key.
+ Additional Ring response keys can be used to customize headers, etc.
+
+ Example:
+ (throw (ex-info \"Resource was deleted.\" { :status 410 }))
+
+ Redirection:
+ (throw (ex-info nil (ring.util.response/redirect \"http://example.com/\")))
+
+ Usage with ring:
+ (def app
+ (->
+ (handler/site app-routes)
+ (ex-info-status)))
+ "
+
+ [handler]
+ (fn [request]
+ (try+ (handler request)
+ (catch-data :status {:as data, :ex e}
+ (merge
+ { :body (.getMessage e) }
+ data)))))
+
+(defn convert-jsonld
+ [handler]
+ (fn [request]
+ (let [{status :status
+ body :body
+ :as response} (handler request)]
+ (if (and (= 201 status) (coll? body))
+ (assoc response :body (jsonld/jsonld-to-rdf body :turtle))
+ response))))
+
+
+(def app
+ (->
+ (handler/site app-routes)
+ (ex-info-status)
+ (convert-jsonld)
+ (json/wrap-json-response {:pretty true})
+ ))
Added: incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/jsonld.clj
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/jsonld.clj?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/jsonld.clj (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/jsonld.clj Wed Jan 14 23:17:47 2015
@@ -0,0 +1,73 @@
+; Licensed to the Apache Software Foundation (ASF) under one or more
+; contributor license agreements. See the NOTICE file distributed with
+; this work for additional information regarding copyright ownership.
+; The ASF licenses this file to You under the Apache License, Version 2.0
+; (the "License"); you may not use this file except in compliance with
+; the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+;
+(ns scufl2-info.jsonld
+ (:import com.github.jsonldjava.jena.JenaJSONLD)
+ ;(:import com.github.jsonldjava.utils.JsonUtils)
+ ;(:import com.github.jsonldjava.utils.JSONUtils)
+ (:import org.apache.jena.riot.RDFDataMgr)
+ (:import org.apache.jena.riot.Lang)
+ (:import org.apache.jena.riot.RDFLanguages)
+ (:import com.hp.hpl.jena.rdf.model.ModelFactory)
+ (:import com.hp.hpl.jena.query.DatasetFactory)
+ (:import java.io.StringReader)
+ (:import java.io.StringWriter)
+ (:import java.io.ByteArrayInputStream)
+ (:require [cheshire.core :as json]
+ ))
+
+
+; Initialize Jena binding once -- is this needed as long as we do import?
+(JenaJSONLD/init)
+
+(defn jsonld-to-rdf [json lang]
+ (let [jsonstr (json/generate-string json)
+ stream (ByteArrayInputStream. (.getBytes jsonstr "UTF-8"))
+ writer (StringWriter. )
+ base "app://6b16aa40-ae2a-4fbc-9c8d-321464f03f3d/"
+ dataset (DatasetFactory/createMem)
+ lang (RDFLanguages/nameToLang (name lang))
+ ;model (ModelFactory/createDefaultModel)
+ ]
+ (if (= JenaJSONLD/JSONLD lang) json ; return as is
+ ; need to convert
+ (do
+ (RDFDataMgr/read dataset stream base JenaJSONLD/JSONLD)
+ (if (RDFLanguages/isQuads lang)
+ (RDFDataMgr/write writer dataset lang)
+ (RDFDataMgr/write writer (.getDefaultModel dataset) lang))
+ (str writer)))))
+
+
+
+(defn content-types-of-lang [lang]
+ (conj (seq (.getAltContentTypes lang)) (.getContentType (.getContentType lang))))
+
+; lazy-mapcat by Benny Tsal 2011-08-22
+; https://groups.google.com/d/msg/clojure/vzhFmpGkWTo/SAC-lwzDI8cJ
+; https://groups.google.com/forum/#!topic/clojure/vzhFmpGkWTo
+;(defn- lazy-mapcat [f & colls]
+; (lazy-seq
+; (when (every? seq colls)
+; (concat (apply f (map first colls))
+; (apply lazy-mapcat f (map rest colls))))))
+
+(def rdf-content-types
+ ;(distinct (lazy-mapcat
+ ; Sorry, can't do a lazy-set as it won't work with (contains?)
+ (set (mapcat
+ content-types-of-lang (RDFLanguages/getRegisteredLanguages))))
+
+
Added: incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/run.clj
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/run.clj?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/run.clj (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/run.clj Wed Jan 14 23:17:47 2015
@@ -0,0 +1,106 @@
+; Licensed to the Apache Software Foundation (ASF) under one or more
+; contributor license agreements. See the NOTICE file distributed with
+; this work for additional information regarding copyright ownership.
+; The ASF licenses this file to You under the Apache License, Version 2.0
+; (the "License"); you may not use this file except in compliance with
+; the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+;
+(ns scufl2-info.run
+ (:use compojure.core)
+ (:use scufl2-info.util)
+ (:require
+ [compojure.handler :as handler]
+ [ring.middleware.json :as middleware]
+ [ring.util.response :as response]
+ [ring.util.codec :as codec]
+ [compojure.route :as route]
+ ))
+
+
+(defn run-uri [run]
+ (str "http://ns.taverna.org.uk/2011/run/" (ensure-uuid run) "/"))
+
+(defn process-uri [run process]
+ ; Relative URI from run, as we set @base
+ (str "process/" (ensure-uuid process) "/"))
+
+(defn jsonld-context [run]
+ { "@context" {
+ "@base" (run-uri run)
+ ;"rdfs" "http://www.w3.org/2000/01/rdf-schema#"
+ ;"seeAlso" { "@id" "rdfs:seeAlso"
+ ; "@type" "@id" }
+ ;"label" "rdfs:label"
+ "@vocab" "http://purl.org/wf4ever/wfprov#"
+ "tavernaprov" "http://ns.taverna.org.uk/2012/tavernaprov/"
+ "scufl2" "http://ns.taverna.org.uk/2010/scufl2#"
+ }})
+
+(defn run-json [run]
+ {
+ ; Absolute URI here, because some people would be confused by "" or "."
+ "@id" (run-uri run)
+ "@type" :WorkflowRun
+ "wasEnactedBy" { "@id" "_:tavernaEngine"
+ "@type" "tavernaprov:TavernaEngine" }
+ })
+
+(defn run-json-resource [run]
+ {:body
+ (merge
+ (run-json run)
+ (jsonld-context run) ;; last -> on top
+ )})
+
+
+(defn process-json [run process]
+ { "@id" (process-uri run process)
+ "@type" :ProcessRun
+ "wasEnactedBy" { "@id" "_:tavernaEngine"
+ "@type" "tavernaprov:TavernaEngine" }
+ "wasPartOfWorkflowRun" (run-json run)
+ })
+
+(defn process-json-resource [run process]
+ {:body
+ (merge
+ (process-json run process)
+ (jsonld-context run) ;; last -> on top
+ )})
+
+
+
+(def run-context (context "/run" []
+ (GET "/" [] "
+ <h1>scufl2-info run</h1>
+ This is the <a href='https://github.com/stain/scufl2-info'>scufl2-info</a> web service.
+ <p>
+ This service generates <a href='http://json-ld.org/'>JSON-LD</a> Linked Data descriptions for
+ <a href='http://www.taverna.org.uk/'>Taverna workflow runs</a>
+ as found in the provenance run bundles exported from Taverna.
+ </p>
+ <p>This service reflects URIs under the namespace
+ <code>http://ns.taverna.org.uk/2011/run/</code>
+ <p>
+ Examples:
+ <ul>
+ <li> <a href='d5ee659e-e11e-43a5-bc0a-58d93674e5e2/'>workflow run</a></li>
+ <li> <a href='d5ee659e-e11e-43a5-bc0a-58d93674e5e2/process/1e027057-2aeb-47f7-97dc-03e19e9772be/'>process run</a></li>
+ </ul>
+ <p>
+ Questions? Contact support@mygrid.org.uk
+ ")
+ (context "/:run" [run]
+ (GET "/"
+ [uuid] (run-json-resource run))
+ (GET "/process/:process/"
+ [process] (process-json-resource run process)))))
+
Added: incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/util.clj
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/util.clj?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/util.clj (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/util.clj Wed Jan 14 23:17:47 2015
@@ -0,0 +1,42 @@
+; Licensed to the Apache Software Foundation (ASF) under one or more
+; contributor license agreements. See the NOTICE file distributed with
+; this work for additional information regarding copyright ownership.
+; The ASF licenses this file to You under the Apache License, Version 2.0
+; (the "License"); you may not use this file except in compliance with
+; the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+;
+(ns scufl2-info.util
+ )
+
+
+(defn ensure-uuid [uuid]
+ (try
+ (java.util.UUID/fromString uuid)
+ (catch Exception e
+ (throw (ex-info (str "Invalid UUID: " uuid) {:status 400})))))
+
+(defn ensure-int [number]
+ (try
+ (Integer/parseInt number)
+ (catch NumberFormatException e
+ (throw (ex-info (str "Invalid integer: " number) {:status 400})))))
+
+(defn ensure-bool [bool-str]
+ (Boolean/parseBoolean bool-str))
+
+;; by g-faustus http://stackoverflow.com/a/3249777
+(defn in?
+ "true if seq contains elm"
+ [seq elm]
+ (some #(= elm %) seq))
+
+
+
Added: incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/workflow_bundle.clj
URL: http://svn.apache.org/viewvc/incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/workflow_bundle.clj?rev=1651876&view=auto
==============================================================================
--- incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/workflow_bundle.clj (added)
+++ incubator/taverna/site/trunk/scripts/scufl2-info/src/scufl2_info/workflow_bundle.clj Wed Jan 14 23:17:47 2015
@@ -0,0 +1,163 @@
+; Licensed to the Apache Software Foundation (ASF) under one or more
+; contributor license agreements. See the NOTICE file distributed with
+; this work for additional information regarding copyright ownership.
+; The ASF licenses this file to You under the Apache License, Version 2.0
+; (the "License"); you may not use this file except in compliance with
+; the License. You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+;
+(ns scufl2-info.workflow-bundle
+ (:use compojure.core)
+ (:use scufl2-info.util)
+ (:require
+ [compojure.handler :as handler]
+ [ring.middleware.json :as middleware]
+ [ring.util.response :as response]
+ [ring.util.codec :as codec]
+ [compojure.route :as route]
+ ))
+
+(defn wfbundle-uri [uuid]
+ (str "http://ns.taverna.org.uk/2010/workflowBundle/" (ensure-uuid uuid) "/"))
+
+(defn workflow-uri [uuid workflow]
+ ; Relative URI from wfbundle, as we set @base
+ (str "workflow/" (codec/url-encode workflow) "/"))
+
+(defn processor-uri [uuid workflow processor]
+ (str (workflow-uri uuid workflow) "processor/" (codec/url-encode processor) "/"))
+
+(defn processor-port-uri [uuid workflow processor inOrOut port]
+ (str (processor-uri uuid workflow processor) (name inOrOut) "/" (codec/url-encode port)))
+
+(defn workflow-port-uri [uuid workflow inOrOut port]
+ (str (workflow-uri uuid workflow) (name inOrOut) "/" (codec/url-encode port)))
+
+(defn iterationstrategy-uri [uuid workflow processor]
+ (str (processor-uri uuid workflow processor) "iterationstrategy/"))
+
+(defn datalink-uri [uuid workflow from to]
+ (str (workflow-uri uuid workflow) "datalink?from=" from "&to=" to))
+
+(defn wfbundle-json [uuid]
+ { "@context" {
+ "@base" (wfbundle-uri uuid)
+; "rdfs" "http://www.w3.org/2000/01/rdf-schema#"
+; "seeAlso" "rdfs:seeAlso"
+ "@vocab" "http://ns.taverna.org.uk/2010/scufl2#"
+ }
+ ; Absolute URI here, because some people would be confused by "" or "."
+ "@id" (wfbundle-uri uuid)
+ "@type" :WorkflowBundle})
+
+(defn workflow-json [uuid workflow]
+ (assoc (wfbundle-json uuid)
+ :workflow {
+ "@id" (workflow-uri uuid workflow)
+ "@type" :Workflow
+ :name workflow}))
+
+(defn processor-json [uuid workflow processor]
+ (assoc-in (workflow-json uuid workflow)
+ [:workflow :processor]
+ { "@id" (processor-uri uuid workflow processor)
+ "@type" :Processor
+ :name processor }))
+
+(defn processor-port-json [uuid workflow processor inOrOut port]
+ (assoc-in (processor-json uuid workflow processor)
+ [:workflow :processor (case inOrOut
+ :in :inputProcessorPort
+ :out :outputProcessorPort)]
+ { "@id" (processor-port-uri uuid workflow processor inOrOut port)
+ "@type" (case inOrOut
+ :in :InputProcessorPort
+ :out :OutputProcessorPort)
+ "name" port}))
+
+(defn workflow-port-json [uuid workflow inOrOut port]
+ (assoc-in (workflow-json uuid workflow)
+ [:workflow (case inOrOut
+ :in :inputWorkflowPort
+ :out :outputWorkflowPort)]
+ { "@id" (workflow-port-uri uuid workflow inOrOut port)
+ "@type" (case inOrOut
+ :in :InputWorkflowPort
+ :out :OutputWorkflowPort)
+ "name" port}))
+
+(defn iteration-stack-json [uuid workflow processor]
+ (assoc-in (processor-json uuid workflow processor)
+ [:workflow :processor :iterationStrategyStack]
+ { "@id" (iterationstrategy-uri uuid workflow processor)
+ "@type" :IterationStrategyStack }))
+
+(defn datalink-json [uuid workflow from to]
+ (assoc-in (workflow-json uuid workflow)
+ [:workflow :datalink]
+ { "@id" (datalink-uri uuid workflow from to)
+ "@type" :DataLink
+ ; TODO: support merge
+ :receiveFrom { "@id" (str (workflow-uri uuid workflow) from)
+ "@type" (if (.startsWith from "in/") :InputWorkflowPort :OutputProcessorPort)
+ }
+ :sendTo { "@id" (str (workflow-uri uuid workflow) to)
+ "@type" (if (.startsWith to "out/") :OutputWorkflowPort :InputProcessorPort)
+ }
+ ; TODO: Should we also expand from and to here to show ports and
+ ; processors, or expect the client to simply follow the links?
+ }))
+
+(def wfbundle-context (context "/workflowBundle" []
+ (GET "/" [] "
+ <h1>scufl2-info wfbundles</h1>
+ This is the <a href='https://github.com/stain/scufl2-info'>scufl2-info</a> web service.
+ <p>
+ This service generates <a href='http://json-ld.org/'>JSON-LD</a> Linked Data descriptions for
+ <a href='http://dev.mygrid.org.uk/wiki/display/developer/SCUFL2'>SCUFL2</a> <code>workflowBundle/</code>resources,
+ following the same URI syntax as below the base
+ <code>http://ns.taverna.org.uk/2010/workflowBundle/</code>
+ <p>
+ Examples:
+ <ul>
+ <li> <a href='2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/'>workflow bundle</a></li>
+ <li> <a href='2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/workflow/HelloWorld/'>workflow</a></li>
+ <li> <a href='2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/workflow/HelloWorld/in/input1'>workflow input port</a></li>
+ <li> <a href='2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/workflow/HelloWorld/processor/hello/'>processor</a></li>
+ <li> <a href='2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/workflow/HelloWorld/processor/hello/out/output1'>processor output port</a></li>
+ <li> <a href='2f0e94ef-b5c4-455d-aeab-1e9611f46b8b/workflow/HelloWorld/datalink?from=processor/hello/out/output1&to=out/result'>datalink</a></li>
+ </ul>
+ <p>
+ Questions? Contact support@mygrid.org.uk
+ ")
+ (context "/:uuid" [uuid]
+ (GET "/"
+ [uuid] {:body (wfbundle-json uuid) } )
+ (GET "/workflow/:workflow/"
+ [workflow] {:body (workflow-json uuid workflow)})
+ (GET "/workflow/:workflow/in/:port"
+ [workflow processor port] {:body (workflow-port-json uuid workflow :in port)})
+ (GET "/workflow/:workflow/out/:port"
+ [workflow processor port] {:body (workflow-port-json uuid workflow :out port)})
+ (GET "/workflow/:workflow/processor/:processor/"
+ [workflow processor] {:body (processor-json uuid workflow processor)})
+ (GET "/workflow/:workflow/processor/:processor/in/:port"
+ [workflow processor port] {:body (processor-port-json uuid workflow processor :in port)})
+ (GET "/workflow/:workflow/processor/:processor/out/:port"
+ [workflow processor port] {:body (processor-port-json uuid workflow processor :out port)})
+ (GET "/workflow/:workflow/processor/:processor/iterationstrategy/"
+ [workflow processor] {:body (iteration-stack-json uuid workflow processor)})
+ (GET "/workflow/:workflow/datalink"
+ [workflow from to]
+ (if (or (nil? from) (nil? to))
+ {:status 404
+ :body "Not Found.\ndatalink requires query parameters 'from' and 'to'" }
+ {:body (datalink-json uuid workflow from to)})))))
+