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 2018/01/04 14:59:26 UTC
[1/9] incubator-taverna-server git commit: Reformat: XML indentation
in WADL definition
Repository: incubator-taverna-server
Updated Branches:
refs/heads/master 7f145e245 -> e593ab8ea
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/7b4939b2/taverna-server-client/src/main/wadl/tavserv.wadl
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/wadl/tavserv.wadl b/taverna-server-client/src/main/wadl/tavserv.wadl
index c3cb60a..68bba2f 100644
--- a/taverna-server-client/src/main/wadl/tavserv.wadl
+++ b/taverna-server-client/src/main/wadl/tavserv.wadl
@@ -1,9 +1,8 @@
-<application xmlns="http://wadl.dev.java.net/2009/02"
- xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:prefix1="http://ns.taverna.org.uk/2010/xml/server/rest/"
- xmlns:prefix3="http://ns.taverna.org.uk/2010/xml/server/"
- xmlns:prefix10="http://ns.taverna.org.uk/2010/port/" xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
- xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" jxb:version="2.1">
+<application jxb:version="2.1" xmlns="http://wadl.dev.java.net/2009/02"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:rest="http://ns.taverna.org.uk/2010/xml/server/rest/"
+ xmlns:server="http://ns.taverna.org.uk/2010/xml/server/" xmlns:port="http://ns.taverna.org.uk/2010/port/"
+ xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd ">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -21,7 +20,15 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<grammars>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="http://ns.taverna.org.uk/2010/xml/server/admin/" xmlns:feed="http://ns.taverna.org.uk/2010/xml/server/feed/" xmlns:port="http://ns.taverna.org.uk/2010/port/" xmlns:tns="http://ns.taverna.org.uk/2010/xml/server/rest/" xmlns:ts="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts-rest="http://ns.taverna.org.uk/2010/xml/server/rest/" xmlns:ts-soap="http://ns.taverna.org.uk/2010/xml/server/soap/" xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/xml/server/rest/" jxb:version="2.1">
+ <xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:admin="http://ns.taverna.org.uk/2010/xml/server/admin/"
+ xmlns:feed="http://ns.taverna.org.uk/2010/xml/server/feed/"
+ xmlns:port="http://ns.taverna.org.uk/2010/port/" xmlns:tns="http://ns.taverna.org.uk/2010/xml/server/rest/"
+ xmlns:ts="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts-rest="http://ns.taverna.org.uk/2010/xml/server/rest/"
+ xmlns:ts-soap="http://ns.taverna.org.uk/2010/xml/server/soap/"
+ xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified"
+ elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/xml/server/rest/"
+ jxb:version="2.1">
<xs:annotation>
<xs:appinfo>
<jxb:schemaBindings>
@@ -29,53 +36,53 @@ limitations under the License.
</jxb:schemaBindings>
</xs:appinfo>
</xs:annotation>
- <xs:import namespace="http://ns.taverna.org.uk/2010/xml/server/"/>
- <xs:import namespace="http://www.w3.org/1999/xlink"/>
+ <xs:import namespace="http://ns.taverna.org.uk/2010/xml/server/" />
+ <xs:import namespace="http://www.w3.org/1999/xlink" />
<xs:element name="capabilities">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="capability" type="ts:Capability"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="capability" type="ts:Capability" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="credential" type="ts-rest:Credential"/>
- <xs:element name="credentials" type="ts-rest:credentialList"/>
- <xs:element name="directoryContents" type="ts-rest:DirectoryContents"/>
+ <xs:element name="credential" type="ts-rest:Credential" />
+ <xs:element name="credentials" type="ts-rest:credentialList" />
+ <xs:element name="directoryContents" type="ts-rest:DirectoryContents" />
<xs:element name="enabledNotificationFabrics">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="notifier" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="notifier" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="filesystemOperation" type="ts-rest:FilesystemCreationOperation"/>
- <xs:element name="listenerDefinition" type="ts-rest:ListenerDefinition"/>
- <xs:element name="listenerDescription" type="ts-rest:ListenerDescription"/>
+ <xs:element name="filesystemOperation" type="ts-rest:FilesystemCreationOperation" />
+ <xs:element name="listenerDefinition" type="ts-rest:ListenerDefinition" />
+ <xs:element name="listenerDescription" type="ts-rest:ListenerDescription" />
<xs:element name="listeners">
<xs:complexType>
<xs:complexContent>
<xs:extension base="ts:VersionedElement">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="listener" type="ts-rest:ListenerDescription"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="listener" type="ts-rest:ListenerDescription" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
- <xs:element name="mkdir" type="ts-rest:MakeDirectory"/>
- <xs:element name="permissionUpdate" type="ts-rest:permissionDescription"/>
- <xs:element name="permissionsDescriptor" type="ts-rest:permissionsDescription"/>
+ <xs:element name="mkdir" type="ts-rest:MakeDirectory" />
+ <xs:element name="permissionUpdate" type="ts-rest:permissionDescription" />
+ <xs:element name="permissionsDescriptor" type="ts-rest:permissionsDescription" />
<xs:element name="permittedListeners">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="type" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="type" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="permittedWorkflows">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="workflow" type="xs:string"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="workflow" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -84,12 +91,12 @@ limitations under the License.
<xs:complexContent>
<xs:extension base="ts:VersionedElement">
<xs:sequence>
- <xs:element minOccurs="0" name="runLimit" type="ts:Location"/>
- <xs:element minOccurs="0" name="operatingLimit" type="ts:Location"/>
- <xs:element minOccurs="0" name="permittedWorkflows" type="ts:Location"/>
- <xs:element minOccurs="0" name="permittedListenerTypes" type="ts:Location"/>
- <xs:element minOccurs="0" name="enabledNotificationFabrics" type="ts:Location"/>
- <xs:element minOccurs="0" name="capabilities" type="ts:Location"/>
+ <xs:element minOccurs="0" name="runLimit" type="ts:Location" />
+ <xs:element minOccurs="0" name="operatingLimit" type="ts:Location" />
+ <xs:element minOccurs="0" name="permittedWorkflows" type="ts:Location" />
+ <xs:element minOccurs="0" name="permittedListenerTypes" type="ts:Location" />
+ <xs:element minOccurs="0" name="enabledNotificationFabrics" type="ts:Location" />
+ <xs:element minOccurs="0" name="capabilities" type="ts:Location" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -100,7 +107,7 @@ limitations under the License.
<xs:complexContent>
<xs:extension base="ts:VersionedElement">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="property" type="ts-rest:PropertyDescription"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="property" type="ts-rest:PropertyDescription" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -115,72 +122,72 @@ limitations under the License.
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
- <xs:attribute ref="xlink:href"/>
+ <xs:attribute ref="xlink:href" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
- <xs:element minOccurs="0" name="creationWorkflow" type="ts:Location"/>
- <xs:element minOccurs="0" name="createTime" type="ts:Location"/>
- <xs:element minOccurs="0" name="startTime" type="ts:Location"/>
- <xs:element minOccurs="0" name="finishTime" type="ts:Location"/>
- <xs:element minOccurs="0" name="status" type="ts:Location"/>
- <xs:element minOccurs="0" name="workingDirectory" type="ts:Location"/>
- <xs:element minOccurs="0" name="inputs" type="ts:Location"/>
- <xs:element minOccurs="0" name="output" type="ts:Location"/>
- <xs:element minOccurs="0" name="securityContext" type="ts:Location"/>
+ <xs:element minOccurs="0" name="creationWorkflow" type="ts:Location" />
+ <xs:element minOccurs="0" name="createTime" type="ts:Location" />
+ <xs:element minOccurs="0" name="startTime" type="ts:Location" />
+ <xs:element minOccurs="0" name="finishTime" type="ts:Location" />
+ <xs:element minOccurs="0" name="status" type="ts:Location" />
+ <xs:element minOccurs="0" name="workingDirectory" type="ts:Location" />
+ <xs:element minOccurs="0" name="inputs" type="ts:Location" />
+ <xs:element minOccurs="0" name="output" type="ts:Location" />
+ <xs:element minOccurs="0" name="securityContext" type="ts:Location" />
<xs:element minOccurs="0" name="listeners">
<xs:complexType>
<xs:complexContent>
<xs:extension base="ts:Location">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="listener" nillable="true" type="ts:Location"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="listener" nillable="true" type="ts:Location" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
- <xs:element minOccurs="0" name="interaction" type="ts:Location"/>
- <xs:element minOccurs="0" name="name" type="ts:Location"/>
- <xs:element minOccurs="0" name="stdout" type="ts:Location"/>
- <xs:element minOccurs="0" name="stderr" type="ts:Location"/>
- <xs:element minOccurs="0" name="usage" type="ts:Location"/>
- <xs:element minOccurs="0" name="log" type="ts:Location"/>
- <xs:element minOccurs="0" name="run-bundle" type="ts:Location"/>
- <xs:element minOccurs="0" name="generate-provenance" type="ts:Location"/>
+ <xs:element minOccurs="0" name="interaction" type="ts:Location" />
+ <xs:element minOccurs="0" name="name" type="ts:Location" />
+ <xs:element minOccurs="0" name="stdout" type="ts:Location" />
+ <xs:element minOccurs="0" name="stderr" type="ts:Location" />
+ <xs:element minOccurs="0" name="usage" type="ts:Location" />
+ <xs:element minOccurs="0" name="log" type="ts:Location" />
+ <xs:element minOccurs="0" name="run-bundle" type="ts:Location" />
+ <xs:element minOccurs="0" name="generate-provenance" type="ts:Location" />
</xs:sequence>
- <xs:attribute ref="ts-rest:owner"/>
+ <xs:attribute ref="ts-rest:owner" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
- <xs:element name="runInput" type="ts-rest:InputDescription"/>
- <xs:element name="runInputs" type="ts-rest:TavernaRunInputs"/>
+ <xs:element name="runInput" type="ts-rest:InputDescription" />
+ <xs:element name="runInputs" type="ts-rest:TavernaRunInputs" />
<xs:element name="runList">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="run" type="ts:TavernaRun"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="run" type="ts:TavernaRun" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="securityDescriptor" type="ts-rest:SecurityDescriptor"/>
+ <xs:element name="securityDescriptor" type="ts-rest:SecurityDescriptor" />
<xs:element name="serverDescription">
<xs:complexType>
<xs:complexContent>
<xs:extension base="ts:VersionedElement">
<xs:sequence>
- <xs:element minOccurs="0" name="runs" type="ts:Location"/>
- <xs:element minOccurs="0" name="policy" type="ts:Location"/>
- <xs:element minOccurs="0" name="feed" type="ts:Location"/>
- <xs:element minOccurs="0" name="interactionFeed" type="ts:Location"/>
+ <xs:element minOccurs="0" name="runs" type="ts:Location" />
+ <xs:element minOccurs="0" name="policy" type="ts:Location" />
+ <xs:element minOccurs="0" name="feed" type="ts:Location" />
+ <xs:element minOccurs="0" name="interactionFeed" type="ts:Location" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
- <xs:element name="trustedIdentities" type="ts-rest:trustList"/>
- <xs:element name="upload" type="ts-rest:UploadFile"/>
- <xs:element name="userPermission" type="ts-rest:linkedPermissionDescription"/>
+ <xs:element name="trustedIdentities" type="ts-rest:trustList" />
+ <xs:element name="upload" type="ts-rest:UploadFile" />
+ <xs:element name="userPermission" type="ts-rest:linkedPermissionDescription" />
<xs:complexType name="InputDescription">
<xs:complexContent>
<xs:extension base="ts:VersionedElement">
@@ -189,59 +196,59 @@ limitations under the License.
<xs:element name="file">
<xs:complexType>
<xs:simpleContent>
- <xs:extension base="ts-rest:InputContents"/>
+ <xs:extension base="ts-rest:InputContents" />
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="reference">
<xs:complexType>
<xs:simpleContent>
- <xs:extension base="ts-rest:InputContents"/>
+ <xs:extension base="ts-rest:InputContents" />
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="value">
<xs:complexType>
<xs:simpleContent>
- <xs:extension base="ts-rest:InputContents"/>
+ <xs:extension base="ts-rest:InputContents" />
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:sequence>
- <xs:attribute ref="ts-rest:name"/>
- <xs:attribute ref="ts-rest:descriptorRef"/>
- <xs:attribute ref="ts-rest:listDelimiter"/>
+ <xs:attribute ref="ts-rest:name" />
+ <xs:attribute ref="ts-rest:descriptorRef" />
+ <xs:attribute ref="ts-rest:listDelimiter" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="InputContents">
- <xs:restriction base="xs:string"/>
+ <xs:restriction base="xs:string" />
</xs:simpleType>
<xs:complexType name="ListenerDescription">
<xs:complexContent>
<xs:extension base="ts:VersionedElement">
<xs:sequence>
- <xs:element minOccurs="0" name="configuration" type="ts:Location"/>
+ <xs:element minOccurs="0" name="configuration" type="ts:Location" />
<xs:element minOccurs="0" name="properties">
<xs:complexType>
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="property" type="ts-rest:PropertyDescription"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="property" type="ts-rest:PropertyDescription" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
- <xs:attribute ref="xlink:href"/>
- <xs:attribute ref="ts-rest:name"/>
- <xs:attribute ref="ts-rest:type"/>
+ <xs:attribute ref="xlink:href" />
+ <xs:attribute ref="ts-rest:name" />
+ <xs:attribute ref="ts-rest:type" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="PropertyDescription">
<xs:complexContent>
<xs:extension base="ts:Location">
- <xs:sequence/>
- <xs:attribute ref="ts-rest:name"/>
+ <xs:sequence />
+ <xs:attribute ref="ts-rest:name" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
@@ -249,49 +256,49 @@ limitations under the License.
<xs:complexContent>
<xs:extension base="ts:VersionedElement">
<xs:sequence>
- <xs:element minOccurs="0" name="expected" type="ts:Location"/>
- <xs:element minOccurs="0" name="baclava" type="ts:Location"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="input" nillable="true" type="ts:Location"/>
+ <xs:element minOccurs="0" name="expected" type="ts:Location" />
+ <xs:element minOccurs="0" name="baclava" type="ts:Location" />
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="input" nillable="true" type="ts:Location" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType final="extension restriction" name="Credential">
<xs:choice>
- <xs:element ref="ts:keypair"/>
- <xs:element ref="ts:userpass"/>
+ <xs:element ref="ts:keypair" />
+ <xs:element ref="ts:userpass" />
</xs:choice>
</xs:complexType>
<xs:complexType name="DirectoryContents">
<xs:sequence>
<xs:choice maxOccurs="unbounded" minOccurs="0">
- <xs:element ref="ts:dir"/>
- <xs:element ref="ts:file"/>
+ <xs:element ref="ts:dir" />
+ <xs:element ref="ts:file" />
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FilesystemCreationOperation">
<xs:simpleContent>
<xs:extension base="xs:base64Binary">
- <xs:attribute ref="ts-rest:name"/>
+ <xs:attribute ref="ts-rest:name" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="MakeDirectory">
<xs:simpleContent>
- <xs:extension base="ts-rest:FilesystemCreationOperation"/>
+ <xs:extension base="ts-rest:FilesystemCreationOperation" />
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="UploadFile">
<xs:simpleContent>
- <xs:extension base="ts-rest:FilesystemCreationOperation"/>
+ <xs:extension base="ts-rest:FilesystemCreationOperation" />
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="permissionsDescription">
<xs:complexContent>
<xs:extension base="ts:VersionedElement">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="permission" type="ts-rest:linkedPermissionDescription"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="permission" type="ts-rest:linkedPermissionDescription" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -300,8 +307,8 @@ limitations under the License.
<xs:complexContent>
<xs:extension base="ts:Location">
<xs:sequence>
- <xs:element minOccurs="0" name="userName" type="xs:string"/>
- <xs:element minOccurs="0" name="permission" type="ts:Permission"/>
+ <xs:element minOccurs="0" name="userName" type="xs:string" />
+ <xs:element minOccurs="0" name="permission" type="ts:Permission" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -310,46 +317,46 @@ limitations under the License.
<xs:complexContent>
<xs:extension base="ts:VersionedElement">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="trust" type="ts:TrustDescriptor"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="trust" type="ts:TrustDescriptor" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="permissionDescription">
<xs:sequence>
- <xs:element minOccurs="0" name="userName" type="xs:string"/>
- <xs:element minOccurs="0" name="permission" type="ts:Permission"/>
+ <xs:element minOccurs="0" name="userName" type="xs:string" />
+ <xs:element minOccurs="0" name="permission" type="ts:Permission" />
</xs:sequence>
</xs:complexType>
<xs:complexType final="extension restriction" name="SecurityDescriptor">
<xs:complexContent>
<xs:extension base="ts:VersionedElement">
<xs:sequence>
- <xs:element minOccurs="0" name="owner" type="xs:string"/>
- <xs:element minOccurs="0" name="permissions" type="ts:Location"/>
- <xs:element minOccurs="0" name="credentials" type="ts-rest:CredentialCollection"/>
- <xs:element minOccurs="0" name="trusts" type="ts-rest:TrustCollection"/>
+ <xs:element minOccurs="0" name="owner" type="xs:string" />
+ <xs:element minOccurs="0" name="permissions" type="ts:Location" />
+ <xs:element minOccurs="0" name="credentials" type="ts-rest:CredentialCollection" />
+ <xs:element minOccurs="0" name="trusts" type="ts-rest:TrustCollection" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType final="extension restriction" name="CredentialCollection">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" ref="ts-rest:credential"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" ref="ts-rest:credential" />
</xs:sequence>
- <xs:attribute ref="xlink:href"/>
+ <xs:attribute ref="xlink:href" />
</xs:complexType>
<xs:complexType final="extension restriction" name="TrustCollection">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="trust" type="ts:TrustDescriptor"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="trust" type="ts:TrustDescriptor" />
</xs:sequence>
- <xs:attribute ref="xlink:href"/>
+ <xs:attribute ref="xlink:href" />
</xs:complexType>
<xs:complexType final="extension restriction" name="credentialList">
<xs:complexContent>
<xs:extension base="ts:VersionedElement">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" ref="ts-rest:credential"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" ref="ts-rest:credential" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -357,20 +364,28 @@ limitations under the License.
<xs:complexType name="ListenerDefinition">
<xs:simpleContent>
<xs:extension base="xs:string">
- <xs:attribute ref="ts-rest:type"/>
+ <xs:attribute ref="ts-rest:type" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
- <xs:attribute name="descriptorRef" type="xs:anyURI"/>
- <xs:attribute name="listDelimiter" type="xs:string"/>
- <xs:attribute name="name" type="xs:string"/>
- <xs:attribute name="owner" type="xs:string"/>
- <xs:attribute name="type" type="xs:string"/>
+ <xs:attribute name="descriptorRef" type="xs:anyURI" />
+ <xs:attribute name="listDelimiter" type="xs:string" />
+ <xs:attribute name="name" type="xs:string" />
+ <xs:attribute name="owner" type="xs:string" />
+ <xs:attribute name="type" type="xs:string" />
</xs:schema>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/1999/xlink" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://www.w3.org/1999/xlink" jxb:version="2.1">
- <xs:attribute name="href" type="xs:string"/>
+<xs:schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://www.w3.org/1999/xlink" attributeFormDefault="unqualified"
+ elementFormDefault="unqualified" targetNamespace="http://www.w3.org/1999/xlink"
+ jxb:version="2.1">
+ <xs:attribute name="href" type="xs:string" />
</xs:schema>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:port="http://ns.taverna.org.uk/2010/port/" xmlns:run="http://ns.taverna.org.uk/2010/run/" xmlns:tns="http://ns.taverna.org.uk/2010/port/" xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/port/" jxb:version="2.1">
+<xs:schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:port="http://ns.taverna.org.uk/2010/port/"
+ xmlns:run="http://ns.taverna.org.uk/2010/run/" xmlns:tns="http://ns.taverna.org.uk/2010/port/"
+ xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified"
+ elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/port/"
+ jxb:version="2.1">
<xs:annotation>
<xs:appinfo>
<jxb:schemaBindings>
@@ -378,62 +393,62 @@ limitations under the License.
</jxb:schemaBindings>
</xs:appinfo>
</xs:annotation>
- <xs:import namespace="http://www.w3.org/1999/xlink"/>
- <xs:element name="inputDescription" type="port:inputDescription"/>
- <xs:element name="workflowOutputs" type="port:outputDescription"/>
+ <xs:import namespace="http://www.w3.org/1999/xlink" />
+ <xs:element name="inputDescription" type="port:inputDescription" />
+ <xs:element name="workflowOutputs" type="port:outputDescription" />
<xs:complexType name="outputDescription">
<xs:complexContent>
<xs:extension base="port:PortDescription">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="output" type="port:OutputPort"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="output" type="port:OutputPort" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType abstract="true" name="PortDescription">
- <xs:sequence/>
- <xs:attribute ref="port:workflowId"/>
- <xs:attribute ref="port:workflowRun"/>
- <xs:attribute ref="port:workflowRunId"/>
+ <xs:sequence />
+ <xs:attribute ref="port:workflowId" />
+ <xs:attribute ref="port:workflowRun" />
+ <xs:attribute ref="port:workflowRunId" />
</xs:complexType>
<xs:complexType name="OutputPort">
<xs:complexContent>
<xs:extension base="port:Port">
<xs:choice>
- <xs:element name="value" type="port:LeafValue"/>
- <xs:element name="list" type="port:ListValue"/>
- <xs:element name="error" type="port:ErrorValue"/>
- <xs:element name="absent" type="port:AbsentValue"/>
+ <xs:element name="value" type="port:LeafValue" />
+ <xs:element name="list" type="port:ListValue" />
+ <xs:element name="error" type="port:ErrorValue" />
+ <xs:element name="absent" type="port:AbsentValue" />
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Port">
- <xs:sequence/>
- <xs:attribute ref="port:name" use="required"/>
- <xs:attribute ref="port:depth"/>
+ <xs:sequence />
+ <xs:attribute ref="port:name" use="required" />
+ <xs:attribute ref="port:depth" />
</xs:complexType>
<xs:complexType name="LeafValue">
<xs:complexContent>
<xs:extension base="port:Value">
- <xs:sequence/>
- <xs:attribute ref="port:contentFile"/>
- <xs:attribute ref="port:contentType"/>
- <xs:attribute ref="port:contentByteLength"/>
+ <xs:sequence />
+ <xs:attribute ref="port:contentFile" />
+ <xs:attribute ref="port:contentType" />
+ <xs:attribute ref="port:contentByteLength" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType abstract="true" name="Value">
- <xs:sequence/>
- <xs:attribute ref="xlink:href"/>
+ <xs:sequence />
+ <xs:attribute ref="xlink:href" />
</xs:complexType>
<xs:complexType name="ErrorValue">
<xs:complexContent>
<xs:extension base="port:Value">
- <xs:sequence/>
- <xs:attribute ref="port:depth"/>
- <xs:attribute ref="port:errorFile"/>
- <xs:attribute ref="port:errorByteLength"/>
+ <xs:sequence />
+ <xs:attribute ref="port:depth" />
+ <xs:attribute ref="port:errorFile" />
+ <xs:attribute ref="port:errorByteLength" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
@@ -442,20 +457,20 @@ limitations under the License.
<xs:extension base="port:Value">
<xs:sequence>
<xs:choice maxOccurs="unbounded" minOccurs="0">
- <xs:element name="value" type="port:LeafValue"/>
- <xs:element name="list" type="port:ListValue"/>
- <xs:element name="error" type="port:ErrorValue"/>
- <xs:element name="absent" type="port:AbsentValue"/>
+ <xs:element name="value" type="port:LeafValue" />
+ <xs:element name="list" type="port:ListValue" />
+ <xs:element name="error" type="port:ErrorValue" />
+ <xs:element name="absent" type="port:AbsentValue" />
</xs:choice>
</xs:sequence>
- <xs:attribute ref="port:length"/>
+ <xs:attribute ref="port:length" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="AbsentValue">
<xs:complexContent>
<xs:extension base="port:Value">
- <xs:sequence/>
+ <xs:sequence />
</xs:extension>
</xs:complexContent>
</xs:complexType>
@@ -463,7 +478,7 @@ limitations under the License.
<xs:complexContent>
<xs:extension base="port:PortDescription">
<xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="input" type="port:InputPort"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="input" type="port:InputPort" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -471,24 +486,31 @@ limitations under the License.
<xs:complexType name="InputPort">
<xs:complexContent>
<xs:extension base="port:Port">
- <xs:sequence/>
- <xs:attribute ref="xlink:href"/>
+ <xs:sequence />
+ <xs:attribute ref="xlink:href" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
- <xs:attribute name="contentByteLength" type="xs:long"/>
- <xs:attribute name="contentFile" type="xs:string"/>
- <xs:attribute name="contentType" type="xs:string"/>
- <xs:attribute name="depth" type="xs:int"/>
- <xs:attribute name="errorByteLength" type="xs:long"/>
- <xs:attribute name="errorFile" type="xs:string"/>
- <xs:attribute name="length" type="xs:int"/>
- <xs:attribute name="name" type="xs:ID"/>
- <xs:attribute name="workflowId" type="xs:string"/>
- <xs:attribute name="workflowRun" type="xs:anyURI"/>
- <xs:attribute name="workflowRunId" type="xs:string"/>
+ <xs:attribute name="contentByteLength" type="xs:long" />
+ <xs:attribute name="contentFile" type="xs:string" />
+ <xs:attribute name="contentType" type="xs:string" />
+ <xs:attribute name="depth" type="xs:int" />
+ <xs:attribute name="errorByteLength" type="xs:long" />
+ <xs:attribute name="errorFile" type="xs:string" />
+ <xs:attribute name="length" type="xs:int" />
+ <xs:attribute name="name" type="xs:ID" />
+ <xs:attribute name="workflowId" type="xs:string" />
+ <xs:attribute name="workflowRun" type="xs:anyURI" />
+ <xs:attribute name="workflowRunId" type="xs:string" />
</xs:schema>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:admin="http://ns.taverna.org.uk/2010/xml/server/admin/" xmlns:feed="http://ns.taverna.org.uk/2010/xml/server/feed/" xmlns:tns="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts-rest="http://ns.taverna.org.uk/2010/xml/server/rest/" xmlns:ts-soap="http://ns.taverna.org.uk/2010/xml/server/soap/" xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/xml/server/" jxb:version="2.1">
+<xs:schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:admin="http://ns.taverna.org.uk/2010/xml/server/admin/"
+ xmlns:feed="http://ns.taverna.org.uk/2010/xml/server/feed/" xmlns:tns="http://ns.taverna.org.uk/2010/xml/server/"
+ xmlns:ts="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts-rest="http://ns.taverna.org.uk/2010/xml/server/rest/"
+ xmlns:ts-soap="http://ns.taverna.org.uk/2010/xml/server/soap/"
+ xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified"
+ elementFormDefault="qualified" targetNamespace="http://ns.taverna.org.uk/2010/xml/server/"
+ jxb:version="2.1">
<xs:annotation>
<xs:appinfo>
<jxb:schemaBindings>
@@ -496,55 +518,55 @@ limitations under the License.
</jxb:schemaBindings>
</xs:appinfo>
</xs:annotation>
- <xs:import namespace="http://www.w3.org/1999/xlink"/>
- <xs:element name="capability" type="ts:Capability"/>
- <xs:element name="dir" type="ts:DirectoryReference"/>
- <xs:element name="file" type="ts:FileReference"/>
- <xs:element name="keypair" type="ts:KeyPairCredential"/>
- <xs:element name="runReference" type="ts:TavernaRun"/>
- <xs:element name="trustedIdentity" type="ts:TrustDescriptor"/>
- <xs:element name="userpass" type="ts:PasswordCredential"/>
- <xs:element name="workflow" type="ts:Workflow"/>
+ <xs:import namespace="http://www.w3.org/1999/xlink" />
+ <xs:element name="capability" type="ts:Capability" />
+ <xs:element name="dir" type="ts:DirectoryReference" />
+ <xs:element name="file" type="ts:FileReference" />
+ <xs:element name="keypair" type="ts:KeyPairCredential" />
+ <xs:element name="runReference" type="ts:TavernaRun" />
+ <xs:element name="trustedIdentity" type="ts:TrustDescriptor" />
+ <xs:element name="userpass" type="ts:PasswordCredential" />
+ <xs:element name="workflow" type="ts:Workflow" />
<xs:complexType abstract="true" name="VersionedElement">
- <xs:sequence/>
- <xs:attribute ref="ts:serverVersion"/>
- <xs:attribute ref="ts:serverRevision"/>
- <xs:attribute ref="ts:serverBuildTimestamp"/>
+ <xs:sequence />
+ <xs:attribute ref="ts:serverVersion" />
+ <xs:attribute ref="ts:serverRevision" />
+ <xs:attribute ref="ts:serverBuildTimestamp" />
</xs:complexType>
<xs:complexType name="Location">
- <xs:sequence/>
- <xs:attribute ref="xlink:href"/>
+ <xs:sequence />
+ <xs:attribute ref="xlink:href" />
</xs:complexType>
<xs:complexType name="Capability">
- <xs:sequence/>
- <xs:attribute ref="ts:capability"/>
- <xs:attribute ref="ts:version"/>
+ <xs:sequence />
+ <xs:attribute ref="ts:capability" />
+ <xs:attribute ref="ts:version" />
</xs:complexType>
<xs:complexType name="KeyPairCredential">
<xs:complexContent>
<xs:extension base="ts:CredentialDescriptor">
<xs:sequence>
- <xs:element name="credentialName" type="xs:string"/>
- <xs:element minOccurs="0" name="credentialFile" type="xs:string"/>
- <xs:element minOccurs="0" name="fileType" type="xs:string"/>
- <xs:element minOccurs="0" name="unlockPassword" type="xs:string"/>
- <xs:element minOccurs="0" name="credentialBytes" type="xs:base64Binary"/>
+ <xs:element name="credentialName" type="xs:string" />
+ <xs:element minOccurs="0" name="credentialFile" type="xs:string" />
+ <xs:element minOccurs="0" name="fileType" type="xs:string" />
+ <xs:element minOccurs="0" name="unlockPassword" type="xs:string" />
+ <xs:element minOccurs="0" name="credentialBytes" type="xs:base64Binary" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType abstract="true" name="CredentialDescriptor">
<xs:sequence>
- <xs:element minOccurs="0" name="serviceURI" type="xs:anyURI"/>
+ <xs:element minOccurs="0" name="serviceURI" type="xs:anyURI" />
</xs:sequence>
- <xs:attribute ref="xlink:href"/>
+ <xs:attribute ref="xlink:href" />
</xs:complexType>
<xs:complexType name="PasswordCredential">
<xs:complexContent>
<xs:extension base="ts:CredentialDescriptor">
<xs:sequence>
- <xs:element name="username" type="xs:string"/>
- <xs:element name="password" type="xs:string"/>
+ <xs:element name="username" type="xs:string" />
+ <xs:element name="password" type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -552,56 +574,1262 @@ limitations under the License.
<xs:complexType name="DirectoryEntry">
<xs:simpleContent>
<xs:extension base="xs:string">
- <xs:attribute ref="xlink:href"/>
- <xs:attribute ref="ts:name"/>
+ <xs:attribute ref="xlink:href" />
+ <xs:attribute ref="ts:name" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="DirectoryReference">
<xs:simpleContent>
- <xs:extension base="ts:DirectoryEntry"/>
+ <xs:extension base="ts:DirectoryEntry" />
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="FileReference">
<xs:simpleContent>
- <xs:extension base="ts:DirectoryEntry"/>
+ <xs:extension base="ts:DirectoryEntry" />
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="TavernaRun">
<xs:simpleContent>
<xs:extension base="xs:string">
- <xs:attribute ref="xlink:href"/>
- <xs:attribute ref="ts:serverVersion"/>
+ <xs:attribute ref="xlink:href" />
+ <xs:attribute ref="ts:serverVersion" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Workflow">
<xs:sequence>
- <xs:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="lax"/>
+ <xs:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="lax" />
</xs:sequence>
</xs:complexType>
<xs:complexType final="extension restriction" name="TrustDescriptor">
<xs:sequence>
- <xs:element minOccurs="0" name="certificateFile" type="xs:string"/>
- <xs:element minOccurs="0" name="fileType" type="xs:string"/>
- <xs:element minOccurs="0" name="certificateBytes" type="xs:base64Binary"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="serverName" type="xs:string"/>
+ <xs:element minOccurs="0" name="certificateFile" type="xs:string" />
+ <xs:element minOccurs="0" name="fileType" type="xs:string" />
+ <xs:element minOccurs="0" name="certificateBytes" type="xs:base64Binary" />
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="serverName" type="xs:string" />
</xs:sequence>
- <xs:attribute ref="xlink:href"/>
+ <xs:attribute ref="xlink:href" />
</xs:complexType>
<xs:simpleType name="Permission">
<xs:restriction base="xs:string">
- <xs:enumeration value="none"/>
- <xs:enumeration value="read"/>
- <xs:enumeration value="update"/>
- <xs:enumeration value="destroy"/>
+ <xs:enumeration value="none" />
+ <xs:enumeration value="read" />
+ <xs:enumeration value="update" />
+ <xs:enumeration value="destroy" />
</xs:restriction>
</xs:simpleType>
- <xs:attribute name="capability" type="xs:anyURI"/>
- <xs:attribute name="name" type="xs:string"/>
- <xs:attribute name="serverBuildTimestamp" type="xs:string"/>
- <xs:attribute name="serverRevision" type="xs:string"/>
- <xs:attribute name="serverVersion" type="xs:string"/>
- <xs:attribute name="version" type="xs:string"/>
-</xs:schema>
-</grammars><resources base="http://example.com/taverna/rest"><resource path="/"><method name="GET"><doc>Produces the description of the service.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:serverDescription"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the service.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><resource path="runs"><method name="GET"><doc>Produces a list of all runs visible to the user.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:runList"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the operations on the collection of runs.</doc><response><representation mediaType="application/octet-stream"><
/representation></response></method><method name="POST"><doc>Accepts (or not) a request to create a new run executing the given workflow.</doc><request><representation mediaType="application/vnd.taverna.t2flow+xml" element="prefix3:workflow"><doc>Accepts (or not) a request to create a new run executing the given workflow.</doc></representation><representation mediaType="application/xml" element="prefix3:workflow"><doc>Accepts (or not) a request to create a new run executing the given workflow.</doc></representation></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="POST"><doc>Accepts a URL to a workflow to download and run. The URL must be hosted on a publicly-accessible service.</doc><request><representation mediaType="text/uri-list"><doc>Accepts a URL to a workflow to download and run. The URL must be hosted on a publicly-accessible service.</doc></representation></request><response><representation mediaType=
"application/octet-stream"></representation></response></method></resource><resource path="/policy"><method name="GET"><doc>Describe the parts of this policy.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:policyDescription"></representation><representation mediaType="application/json"></representation></response></method><resource path="/capabilities"><method name="GET"><doc>Gets a description of the capabilities supported by this installation of Taverna Server.</doc><response><representation mediaType="application/xml" element="prefix1:capabilities"></representation><representation mediaType="application/json"></representation></response></method></resource><resource path="/enabledNotificationFabrics"><method name="GET"><doc>Gets the list of supported, enabled notification fabrics. Each corresponds (approximately) to a protocol, e.g., email.</doc><response><representation mediaType="application/xml" element="prefix1:enabledNotificati
onFabrics"></representation><representation mediaType="application/json"></representation></response></method></resource><resource path="/operatingLimit"><method name="GET"><doc>Gets the maximum number of simultaneously operating runs that the user may have. Note that this is often a global limit; it does not represent a promise that a particular user may be able to have that many operating runs at once.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:int"><doc>Gets the maximum number of simultaneously operating runs that the user may have. Note that this is often a global limit; it does not represent a promise that a particular user may be able to have that many operating runs at once.</doc></param></representation></response></method></resource><resource path="/permittedListenerTypes"><method name="GET"><doc>Gets the list of permitted event listener types.</doc><response><representation mediaType="application/xml" element="prefix1:
permittedListeners"></representation><representation mediaType="application/json"></representation></response></method></resource><resource path="/permittedWorkflows"><method name="GET"><doc>Gets the list of permitted workflows.</doc><response><representation mediaType="application/xml" element="prefix1:permittedWorkflows"></representation><representation mediaType="application/json"></representation></response></method></resource><resource path="/runLimit"><method name="GET"><doc>Gets the maximum number of simultaneous runs in any state that the user may create.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:int"><doc>Gets the maximum number of simultaneous runs in any state that the user may create.</doc></param></representation></response></method></resource></resource><resource path="/runs/{runName}"><doc>This represents how a Taverna Server workflow run looks to a RESTful API.</doc><param name="runName" style="template" type="x
s:string"/><method name="DELETE"><doc>Deletes a workflow run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="GET"><doc>Describes a workflow run.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:runDescription"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><resource path="/createTime"><method name="GET"><doc>Gives the time when the workflow run was first submitted to the server.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the time when the workflow run was first submitted to the server.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the d
escription of the run create time.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/expiry"><method name="GET"><doc>Gives the time when the workflow run becomes eligible for automatic deletion.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the time when the workflow run becomes eligible for automatic deletion.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run expiry.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Sets the time when the workflow run becomes eligible for automatic deletion.</doc><request><representation mediaType="text/plain"><param name="request" style="plain" type="xs:string"><doc>Sets the time when the workflow run becomes eligible for automatic deletion.</doc></param><
/representation></request><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Sets the time when the workflow run becomes eligible for automatic deletion.</doc></param></representation></response></method></resource><resource path="/finishTime"><method name="GET"><doc>Gives the time when the workflow run was first detected as finished, or an empty string if it has not yet finished (including if it has never started).</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the time when the workflow run was first detected as finished, or an empty string if it has not yet finished (including if it has never started).</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run finish time.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="
/generate-provenance"><method name="GET"><doc>Whether to create the run bundle for the workflow run.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:boolean"><doc>Whether to create the run bundle for the workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Whether to create the run bundle for the workflow run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Whether to create the run bundle for the workflow run.</doc><request><representation mediaType="text/plain"><param name="request" style="plain" type="xs:boolean"><doc>Whether to create the run bundle for the workflow run.</doc></param></representation></request><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:boolean"><doc>Whether to create the run bundle for the workflow run.</doc></param></representation></response></
method></resource><resource path="/log"><method name="GET"><doc>Return the log for the workflow run.</doc><response><representation mediaType="text/plain"></representation></response></method><method name="OPTIONS"><doc>Return the log for the workflow run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/name"><method name="GET"><doc>Gives the descriptive name of the workflow run.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the descriptive name of the workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of the operations on the run's descriptive name.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Set the descriptive name of the workflow run. Note that this value may be arbitraril
y truncated by the implementation.</doc><request><representation mediaType="text/plain"><param name="request" style="plain" type="xs:string"><doc>Set the descriptive name of the workflow run. Note that this value may be arbitrarily truncated by the implementation.</doc></param></representation></request><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Set the descriptive name of the workflow run. Note that this value may be arbitrarily truncated by the implementation.</doc></param></representation></response></method></resource><resource path="/output"><method name="GET"><doc>Gives the Baclava file where output will be written; empty means use multiple simple files in the out directory.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the Baclava file where output will be written; empty means use multiple simple files in the out directory.</doc></param></repre
sentation></response></method><method name="GET"><doc>Gives a description of the outputs, as currently understood</doc><request></request><response><representation mediaType="application/xml" element="prefix10:workflowOutputs"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run output.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Sets the Baclava file where output will be written; empty means use multiple simple files in the out directory.</doc><request><representation mediaType="text/plain"><param name="request" style="plain" type="xs:string"><doc>Sets the Baclava file where output will be written; empty means use multiple simple files in the out directory.</doc></param></representation></request><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:st
ring"><doc>Sets the Baclava file where output will be written; empty means use multiple simple files in the out directory.</doc></param></representation></response></method></resource><resource path="/run-bundle"><method name="GET"><doc>Return the run bundle for the workflow run.</doc><response><representation mediaType="application/vnd.wf4ever.robundle+zip"></representation></response></method><method name="OPTIONS"><doc>Return the run bundle for the workflow run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/startTime"><method name="GET"><doc>Gives the time when the workflow run was started, or an empty string if the run has not yet started.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the time when the workflow run was started, or an empty string if the run has not yet started.</doc></param></representation></response></met
hod><method name="OPTIONS"><doc>Produces the description of the run start time.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/status"><method name="GET"><doc>Gives the current status of the workflow run.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the current status of the workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run status.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Attempts to update the status of the workflow run.</doc><request><representation mediaType="text/plain"><param name="request" style="plain" type="xs:string"><doc>Attempts to update the status of the workflow run.</doc></param></representation></request><response><representation mediaType="text/pla
in"></representation></response></method></resource><resource path="/stderr"><method name="GET"><doc>Return the stderr for the workflow run.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Return the stderr for the workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Return the stderr for the workflow run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/stdout"><method name="GET"><doc>Return the stdout for the workflow run.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Return the stdout for the workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Return the stdout for the workflow run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resour
ce><resource path="/usage"><method name="GET"><doc>Return the usage record for the workflow run.</doc><response><representation mediaType="application/xml"></representation></response></method><method name="OPTIONS"><doc>Return the usage record for the workflow run.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/workflow"><method name="GET"><doc>Gives the workflow document used to create the workflow run.</doc><response><representation mediaType="application/vnd.taverna.t2flow+xml" element="prefix3:workflow"></representation><representation mediaType="application/xml" element="prefix3:workflow"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run workflow.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/inp
ut"><doc>This represents how a Taverna Server workflow run's inputs looks to a RESTful API.</doc><method name="GET"><doc>Describe the sub-URIs of this resource.</doc><response><representation mediaType="application/xml" element="prefix1:runInputs"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run's inputs' operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><resource path="/baclava"><method name="GET"><doc>Gives the Baclava file describing the inputs, or empty if individual files are used.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the Baclava file describing the inputs, or empty if individual files are used.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of the inp
uts' baclava operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Sets the Baclava file describing the inputs.</doc><request><representation mediaType="text/plain"><param name="request" style="plain" type="xs:string"><doc>Sets the Baclava file describing the inputs.</doc></param></representation></request><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Sets the Baclava file describing the inputs.</doc></param></representation></response></method></resource><resource path="/expected"><method name="GET"><doc>Describe the expected inputs of this workflow run.</doc><response><representation mediaType="application/xml" element="prefix10:inputDescription"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the expected inputs' operati
ons.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/input/{name}"><param name="name" style="template" type="xs:string"/><method name="GET"><doc>Gives a description of what is used to supply a particular input.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:runInput"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the one input's operations.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Sets the source for a particular input port.</doc><request><representation mediaType="application/xml" element="prefix1:runInput"><doc>Sets the source for a particular input port.</doc></representation><representation mediaType="application/json"><doc>Sets the
source for a particular input port.</doc></representation></request><response><representation mediaType="application/xml" element="prefix1:runInput"></representation><representation mediaType="application/json"></representation></response></method></resource></resource><resource path="/interaction"><method name="GET"><doc>Get the feed document for this ATOM feed.</doc><response><representation mediaType="application/atom+xml"></representation></response></method><method name="OPTIONS"><doc>Describes what HTTP operations are supported on the feed.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="POST"><doc>Adds an entry to this ATOM feed.</doc><request><representation mediaType="application/atom+xml"><doc>Adds an entry to this ATOM feed.</doc></representation></request><response><representation mediaType="application/atom+xml"></representation></response></method><resource path="/{id}"><param name="id" style="temp
late" type="xs:string"/><method name="DELETE"><doc>Deletes an entry from this ATOM feed.</doc><request></request><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Deletes an entry from this ATOM feed.</doc></param></representation></response></method><method name="GET"><doc>Get the entry with a particular ID within this ATOM feed.</doc><request></request><response><representation mediaType="application/atom+xml"></representation></response></method><method name="OPTIONS"><doc>Describes what HTTP operations are supported on an entry.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method></resource></resource><resource path="/listeners"><doc>This represents all the event listeners attached to a workflow run.</doc><method name="GET"><doc>Get the listeners installed in the workflow run.</doc><request></request><response><representation mediaType="application/xml"
element="prefix1:listeners"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run listeners' operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="POST"><doc>Add a new event listener to the named workflow run.</doc><request><representation mediaType="application/xml" element="prefix1:listenerDefinition"><doc>Add a new event listener to the named workflow run.</doc></representation><representation mediaType="application/json"><doc>Add a new event listener to the named workflow run.</doc></representation></request><response><representation mediaType="application/octet-stream"></representation></response></method><resource path="/{name}"><doc>This represents a single event listener attached to a workflow run.</doc><param name="name" style="template" type="xs:string"/><method name="GET"><doc>Get th
e description of this listener.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:listenerDescription"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run listener's operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><resource path="/configuration"><method name="GET"><doc>Get the configuration for the given event listener that is attached to a workflow run.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Get the configuration for the given event listener that is attached to a workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run listener's configuration's operations.</doc><response><representation mediaType="applica
tion/octet-stream"></representation></response></method></resource><resource path="/properties"><method name="GET"><doc>Get the list of properties supported by a given event listener attached to a workflow run.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:properties"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run listener's properties' operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/properties/{propertyName}"><doc>This represents a single property attached of an event listener.</doc><param name="propertyName" style="template" type="xs:string"/><method name="GET"><doc>Get the value of the particular property of an event listener attached to a workflow run.</doc><response><representation mediaType="text/plain"><param
name="result" style="plain" type="xs:string"><doc>Get the value of the particular property of an event listener attached to a workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run listener's property's operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Set the value of the particular property of an event listener attached to a workflow run.</doc><request><representation mediaType="text/plain"><param name="request" style="plain" type="xs:string"><doc>Set the value of the particular property of an event listener attached to a workflow run.</doc></param></representation></request><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Set the value of the particular property of an event listener attached to a workflow run.</doc></param></representation></response><
/method></resource></resource></resource><resource path="/security"><doc>Manages the security of the workflow run. In general, only the owner of a run may access this resource.</doc><method name="GET"><doc>Gives a description of the security information supported by the workflow run.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:securityDescriptor"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run security.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><resource path="/credentials"><method name="DELETE"><doc>Deletes all credentials.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="GET"><doc>Gives a list of credentials supplied to this workflow run.</doc><response><representation
mediaType="application/xml" element="prefix1:credentials"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run credentials' operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="POST"><doc>Creates a new credential.</doc><request><representation mediaType="application/xml" element="prefix1:credential"><doc>Creates a new credential.</doc></representation><representation mediaType="application/json"><doc>Creates a new credential.</doc></representation></request><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/credentials/{id}"><param name="id" style="template" type="xs:string"/><method name="DELETE"><doc>Deletes a particular credential.</doc><request></request><response><representation mediaType="application/octet-stre
am"></representation></response></method><method name="GET"><doc>Describes a particular credential.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:credential"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run credential's operations.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Updates a particular credential.</doc><request><representation mediaType="application/xml" element="prefix1:credential"><doc>Updates a particular credential.</doc></representation><representation mediaType="application/json"><doc>Updates a particular credential.</doc></representation></request><response><representation mediaType="application/xml" element="prefix1:credential"></representation><representation mediaType="application/json"></represe
ntation></response></method></resource><resource path="/owner"><method name="GET"><doc>Gives the identity of who owns the workflow run.</doc><response><representation mediaType="text/plain"><param name="result" style="plain" type="xs:string"><doc>Gives the identity of who owns the workflow run.</doc></param></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run owner.</doc><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/permissions"><method name="GET"><doc>Gives a list of all non-default permissions associated with the enclosing workflow run. By default, nobody has any access at all except for the owner of the run.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:permissionsDescriptor"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Pro
duces the description of the run permissions' operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="POST"><doc>Creates a new assignment of permissions to a particular user.</doc><request><representation mediaType="application/xml" element="prefix1:permissionUpdate"><doc>Creates a new assignment of permissions to a particular user.</doc></representation><representation mediaType="application/json"><doc>Creates a new assignment of permissions to a particular user.</doc></representation></request><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/permissions/{id}"><param name="id" style="template" type="xs:string"/><method name="DELETE"><doc>Deletes (by resetting to default) the permissions associated with a particular user.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></
response></method><method name="GET"><doc>Describes the permission granted to a particular user.</doc><request></request><response><representation mediaType="text/plain"></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run permission's operations.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Updates the permissions granted to a particular user.</doc><request><representation mediaType="text/plain"><doc>Updates the permissions granted to a particular user.</doc></representation></request><response><representation mediaType="text/plain"></representation></response></method></resource><resource path="/trusts"><method name="DELETE"><doc>Deletes all trusted identities.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="GET"><doc>Gives a list of trust
ed identities supplied to this workflow run.</doc><response><representation mediaType="application/xml" element="prefix1:trustedIdentities"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the run trusted certificates' operations.</doc><response><representation mediaType="application/octet-stream"></representation></response></method><method name="POST"><doc>Adds a new trusted identity.</doc><request><representation mediaType="application/xml" element="prefix3:trustedIdentity"><doc>Adds a new trusted identity.</doc></representation><representation mediaType="application/json"><doc>Adds a new trusted identity.</doc></representation></request><response><representation mediaType="application/octet-stream"></representation></response></method></resource><resource path="/trusts/{id}"><param name="id" style="template" type="xs:string"/><method name="DELETE"><doc>Deletes a particu
lar trusted identity.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="GET"><doc>Describes a particular trusted identity.</doc><request></request><response><representation mediaType="application/xml" element="prefix3:trustedIdentity"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of one run trusted certificate's operations.</doc><request></request><response><representation mediaType="application/octet-stream"></representation></response></method><method name="PUT"><doc>Updates a particular trusted identity.</doc><request><representation mediaType="application/xml" element="prefix3:trustedIdentity"><doc>Updates a particular trusted identity.</doc></representation><representation mediaType="application/json"><doc>Updates a particular trusted identity.</doc></representation></request><respo
nse><representation mediaType="application/xml" element="prefix3:trustedIdentity"></representation><representation mediaType="application/json"></representation></response></method></resource></resource><resource path="/wd"><doc>Representation of how a workflow run's working directory tree looks.</doc><method name="GET"><doc>Describes the working directory of the workflow run.</doc><request></request><response><representation mediaType="application/xml" element="prefix1:directoryContents"></representation><representation mediaType="application/json"></representation></response></method><resource path="/{path:(.*)}"><param name="path" style="template" repeating="true"/><method name="POST"><doc>Creates or updates a file in a particular location beneath the working directory of the workflow run with the contents of a publicly readable URL.</doc><request><representation mediaType="text/uri-list"><doc>Creates or updates a file in a particular location beneath the working directory o
f the workflow run with the contents of a publicly readable URL.</doc></representation></request><response><representation mediaType="application/xml"></representation><representation mediaType="application/json"></representation></response></method><method name="PUT"><doc>Creates or updates a file in a particular location beneath the working directory of the workflow run.</doc><request><representation mediaType="application/octet-stream"><doc>Creates or updates a file in a particular location beneath the working directory of the workflow run.</doc></representation><representation mediaType="*/*"><doc>Creates or updates a file in a particular location beneath the working directory of the workflow run.</doc></representation></request><response><representation mediaType="application/xml"></representation><representation mediaType="application/json"></representation></response></method></resource><resource path="/{path:.*}"><param name="path" style="template" repeating="true"/><method
name="DELETE"><doc>Deletes a file or directory that is in or below the working directory of a workflow run.</doc><request></request><response><representation mediaType="application/xml"></representation><representation mediaType="application/json"></representation></response></method><method name="OPTIONS"><doc>Produces the description of the files/directories' baclava operations.</doc><request></request><response><representation mediaType="application/xml"></representation><representation mediaType="application/json"></representation></response></method><method name="POST"><doc>Creates a directory in the filesystem beneath the working directory of the workflow run, or creates or updates a file's contents, where that file is in or below the working directory of a workflow run.</doc><request><representation mediaType="application/xml" element="prefix1:filesystemOperation"><doc>Creates a directory in the filesystem beneath the working directory of the workflow run, or create
s or updates a file's contents, where that file is in or below the working directory of a workflow run.</doc></representation><representation mediaType="application/json"><doc>Creates a directory in the filesystem beneath the working directory of the workflow run, or creates or updates a file's contents, where that file is in or below the working directory of a workflow run.</doc></representation></request><response><representation mediaType="application/xml"></representation><representation mediaType="application/json"></representation></response></method></resource><resource path="/{path:.+}"><param name="path" style="template" repeating="true"/><method name="GET"><doc>Gives a description of the named entity in or beneath the working directory of the workflow run (either a Directory or File).</doc><request></request><response><representation mediaType="application/xml"></representation><representation mediaType="application/json"></representation><representation mediaTyp
e="application/octet-stream"></representation><representation mediaType="application/zip"></representation><representation mediaType="*/*"></representation></response></method></resource></resource></resource></resource></resources></application>
\ No newline at end of file
+ <xs:attribute name="capability" type="xs:anyURI" />
+ <xs:attribute name="name" type="xs:string" />
+ <xs:attribute name="serverBuildTimestamp" type="xs:string" />
+ <xs:attribute name="serverRevision" type="xs:string" />
+ <xs:attribute name="serverVersion" type="xs:string" />
+ <xs:attribute name="version" type="xs:string" />
+ </xs:schema>
+</grammars>
+ <resources base="http://example.com/taverna/rest">
+ <resource path="/">
+ <method name="GET">
+ <doc>Produces the description of the service.</doc>
+ <request></request>
+ <response>
+ <representation mediaType="application/xml" element="server:serverDescription"></representation>
+ <representation mediaType="application/json"></representation>
+ </response>
+ </method>
+ <method name="OPTIONS">
+ <doc>Produces the description of the service.</doc>
+ <response>
+ <representation mediaType="application/octet-stream"></representation>
+ </response>
+ </method>
+ <resource path="runs">
+ <method name="GET">
+ <doc>Produces a list of all runs visible to the user.</doc>
+ <request></request>
+ <response>
+ <representation mediaType="application/xml" element="server:runList"></representation>
+ <representation mediaType="application/json"></representation>
+ </response>
+ </method>
+ <method name="OPTIONS">
+ <doc>Produces the description of the operations on the collection
+ of runs.</doc>
+ <response>
+ <representation mediaType="application/octet-stream"></representation>
+ </response>
+ </method>
+ <method name="POST">
+ <doc>Accepts (or not) a request to create a new run executing the
+ given workflow.</doc>
+ <request>
+ <representation mediaType="application/vnd.taverna.t2flow+xml" element="server:workflow">
+ <doc>Accepts (or not) a request to create a new run executing the
+ given workflow.</doc>
+ </representation>
+ <representation mediaType="application/xml" element="server:workflow">
+ <doc>Accepts (or not) a request to create a new run executing the
+ given workflow.</doc>
+ </representation>
+ </request>
+ <response>
+ <representation mediaType="application/octet-stream"></representation>
+ </response>
+ </method>
+ <method name="POST">
+ <doc>Accepts a URL to a workflow to download and run. The URL must
+ be hosted on a publicly-accessible service.</doc>
+ <request>
+ <representation mediaType="text/uri-list">
+ <doc>Accepts a URL to a workflow to download and run. The URL
+ must be hosted on a publicly-accessible service.</doc>
+ </representation>
+ </request>
+ <response>
+ <representation mediaType="application/octet-stream"></representation>
+ </response>
+ </method>
+ </resource>
+ <resource path="/policy">
+ <method name="GET">
+ <doc>Describe the parts of this policy.</doc>
+ <request></request>
+ <response>
+ <representation mediaType="application/xml" element="server:policyDescription"></representation>
+ <representation mediaType="application/json"></representation>
+ </response>
+ </method>
+ <resource path="/capabilities">
+ <method name="GET">
+ <doc>Gets a description of the capabilities supported by this
+ installation of Taverna Server.</doc>
+ <response>
+ <representation mediaType="application/xml" element="server:capabilities"></representation>
+ <representation mediaType="application/json"></representation>
+ </response>
+ </method>
+ </resource>
+ <resource path="/enabledNotificationFabrics">
+ <method name="GET">
+ <doc>Gets the list of supported, enabled notification fabrics.
+ Each corresponds (approximately) to a protocol, e.g., email.
+ </doc>
+ <response>
+ <representation mediaType="application/xml" element="server:enabledNotificationFabrics"></representation>
+ <representation mediaType="application/json"></representation>
+ </response>
+ </method>
+ </resource>
+ <resource path="/operatingLimit">
+ <method name="GET">
+ <doc>Gets the maximum number of simultaneously operating runs that
+ the user may have. Note that this is often a global limit; it
+ does not represent a promise that a particular user may be able
+ to have that many operating runs at once.</doc>
+ <response>
+ <representation mediaType="text/plain">
+ <param name="result" style="plain" type="xs:int">
+ <doc>Gets the maximum number of simultaneously operating runs
+ that the user may have. Note that this is often a global
+ limit; it does not represent a promise that a particular user
+ may be able to have that many operating runs at once.</doc>
+ </param>
+ </representation>
+ </response>
+ </method>
+ </resource>
+ <resource path="/permittedListenerTypes">
+ <method name="GET">
+ <doc>Gets the list of permitted event listener types.</doc>
+ <response>
+ <representation mediaType="application/xml" element="server:permittedListeners"></representation>
+ <representation mediaType="application/json"></representation>
+ </response>
+ </method>
+ </resource>
+ <resource path="/permittedWorkflows">
+ <method name="GET">
+ <doc>Gets the list of permitted workflows.</doc>
+ <response>
+ <representation mediaType="application/xml" element="server:permittedWorkflows"></representation>
+ <representation mediaType="application/json"></representation>
+ </response>
+ </method>
+ </resource>
+ <resource path="/runLimit">
+ <method name="GET">
+ <doc>Gets the maximum number of simultaneous runs in any state
+ that the user may create.</doc>
+ <response>
+ <representation mediaType="text/plain">
+ <param name="result" style="plain" type="xs:int">
+ <doc>Gets the maximum number of simultaneous runs in any state
+ that the user may create.</doc>
+ </param>
+ </representation>
+ </response>
+ </method>
+ </resource>
+ </resource>
+ <resource path="/runs/{runName}">
+ <doc>This represents how a Taverna Server workflow run looks to a
+ RESTful API.</doc>
+ <param name="runName" style="template" type="xs:string" />
+ <method name="DELETE">
+ <doc>Deletes a workflow run.</doc>
+ <response>
+ <representation mediaType="application/octet-stream"></representation>
+ </response>
+ </method>
+ <method name="GET">
+ <doc>Describes a workflow run.</doc>
+ <request></request>
+ <response>
+ <representation mediaType="application/xml" element="server:runDescription"></representation>
+ <representation mediaType="a
<TRUNCATED>
[5/9] incubator-taverna-server git commit: Use package
org.apache.taverna.server.client.*
Posted by st...@apache.org.
Use package org.apache.taverna.server.client.*
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/92acc9eb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/92acc9eb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/92acc9eb
Branch: refs/heads/master
Commit: 92acc9ebfb499acedec7685db6c56b5fee786716
Parents: 348fe7f
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jan 4 12:20:14 2018 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jan 4 12:20:14 2018 +0000
----------------------------------------------------------------------
taverna-server-client/pom.xml | 6 ++---
.../apache/taverna/server/client/Connected.java | 6 ++---
.../apache/taverna/server/client/DirEntry.java | 9 ++++----
.../apache/taverna/server/client/Directory.java | 21 +++++++++---------
.../org/apache/taverna/server/client/File.java | 9 ++++----
.../apache/taverna/server/client/Property.java | 2 +-
.../org/apache/taverna/server/client/Run.java | 23 ++++++++++----------
.../apache/taverna/server/client/Status.java | 2 +-
.../taverna/server/client/TavernaServer.java | 15 ++++++-------
.../client/TavernaServerConnectionFactory.java | 2 +-
.../taverna/server/client/package-info.java | 2 +-
.../src/main/wadl/tavserv.wadl | 6 ++---
12 files changed, 49 insertions(+), 54 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92acc9eb/taverna-server-client/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-server-client/pom.xml b/taverna-server-client/pom.xml
index 3250e5c..ae633cd 100644
--- a/taverna-server-client/pom.xml
+++ b/taverna-server-client/pom.xml
@@ -61,8 +61,8 @@ limitations under the License.
<extensions>true</extensions>
<configuration>
<instructions>
- <Export-Package>uk.org.taverna.server.client</Export-Package>
- <Private-Package>uk.org.taverna.server.client.*</Private-Package>
+ <Export-Package>org.apache.taverna.server.client</Export-Package>
+ <Private-Package>org.apache.taverna.server.client.xml.*</Private-Package>
</instructions>
</configuration>
</plugin>
@@ -100,7 +100,7 @@ limitations under the License.
</execution>
</executions>
<configuration>
- <packageName>org.taverna.server.client.wadl</packageName>
+ <packageName>org.apache.taverna.server.client.wadl</packageName>
<includes>*.wadl</includes>
<customClassNames>
<property>
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92acc9eb/taverna-server-client/src/main/java/org/apache/taverna/server/client/Connected.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Connected.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Connected.java
index be2682d..206747b 100644
--- a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Connected.java
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Connected.java
@@ -1,4 +1,4 @@
-package uk.org.taverna.server.client;
+package org.apache.taverna.server.client;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -16,8 +16,8 @@ package uk.org.taverna.server.client;
* limitations under the License.
*/
-import uk.org.taverna.server.client.TavernaServer.ClientException;
-import uk.org.taverna.server.client.TavernaServer.ServerException;
+import org.apache.taverna.server.client.TavernaServer.ClientException;
+import org.apache.taverna.server.client.TavernaServer.ServerException;
import com.sun.jersey.api.client.ClientResponse;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92acc9eb/taverna-server-client/src/main/java/org/apache/taverna/server/client/DirEntry.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/DirEntry.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/DirEntry.java
index d5947ab..99629b6 100644
--- a/taverna-server-client/src/main/java/org/apache/taverna/server/client/DirEntry.java
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/DirEntry.java
@@ -1,4 +1,4 @@
-package uk.org.taverna.server.client;
+package org.apache.taverna.server.client;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -16,10 +16,9 @@ package uk.org.taverna.server.client;
* limitations under the License.
*/
-import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd.Path2;
-
-import uk.org.taverna.server.client.TavernaServer.ClientException;
-import uk.org.taverna.server.client.TavernaServer.ServerException;
+import org.apache.taverna.server.client.TavernaServer.ClientException;
+import org.apache.taverna.server.client.TavernaServer.ServerException;
+import org.apache.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd.Path2;
import com.sun.jersey.api.client.ClientResponse;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92acc9eb/taverna-server-client/src/main/java/org/apache/taverna/server/client/Directory.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Directory.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Directory.java
index cb1fbc5..4e008bc 100644
--- a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Directory.java
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Directory.java
@@ -1,4 +1,4 @@
-package uk.org.taverna.server.client;
+package org.apache.taverna.server.client;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -28,16 +28,15 @@ import java.util.ArrayList;
import java.util.List;
import java.util.zip.ZipFile;
-import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd;
-
-import uk.org.taverna.server.client.TavernaServer.ClientException;
-import uk.org.taverna.server.client.TavernaServer.ServerException;
-import uk.org.taverna.server.client.generic.DirectoryEntry;
-import uk.org.taverna.server.client.generic.DirectoryReference;
-import uk.org.taverna.server.client.generic.FileReference;
-import uk.org.taverna.server.client.rest.DirectoryContents;
-import uk.org.taverna.server.client.rest.MakeDirectory;
-import uk.org.taverna.server.client.rest.UploadFile;
+import org.apache.taverna.server.client.TavernaServer.ClientException;
+import org.apache.taverna.server.client.TavernaServer.ServerException;
+import org.apache.taverna.server.client.generic.DirectoryEntry;
+import org.apache.taverna.server.client.generic.DirectoryReference;
+import org.apache.taverna.server.client.generic.FileReference;
+import org.apache.taverna.server.client.rest.DirectoryContents;
+import org.apache.taverna.server.client.rest.MakeDirectory;
+import org.apache.taverna.server.client.rest.UploadFile;
+import org.apache.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd;
import com.sun.jersey.api.client.ClientResponse;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92acc9eb/taverna-server-client/src/main/java/org/apache/taverna/server/client/File.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/File.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/File.java
index edcfdd5..1535187 100644
--- a/taverna-server-client/src/main/java/org/apache/taverna/server/client/File.java
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/File.java
@@ -1,4 +1,4 @@
-package uk.org.taverna.server.client;
+package org.apache.taverna.server.client;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -28,11 +28,10 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.nio.charset.Charset;
+import org.apache.taverna.server.client.TavernaServer.ClientException;
+import org.apache.taverna.server.client.TavernaServer.ServerException;
+import org.apache.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd;
import org.apache.tika.mime.MimeTypeException;
-import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd;
-
-import uk.org.taverna.server.client.TavernaServer.ClientException;
-import uk.org.taverna.server.client.TavernaServer.ServerException;
import com.sun.jersey.api.client.ClientHandlerException;
import com.sun.jersey.api.client.ClientResponse;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92acc9eb/taverna-server-client/src/main/java/org/apache/taverna/server/client/Property.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Property.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Property.java
index e67a06d..f7bfdd1 100644
--- a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Property.java
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Property.java
@@ -1,4 +1,4 @@
-package uk.org.taverna.server.client;
+package org.apache.taverna.server.client;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92acc9eb/taverna-server-client/src/main/java/org/apache/taverna/server/client/Run.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Run.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Run.java
index 6bcae87..4c1699b 100644
--- a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Run.java
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Run.java
@@ -1,4 +1,4 @@
-package uk.org.taverna.server.client;
+package org.apache.taverna.server.client;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -29,20 +29,19 @@ import java.util.List;
import javax.xml.bind.JAXBException;
import org.apache.commons.io.IOUtils;
-import org.joda.time.DateTime;
+import org.apache.taverna.server.client.TavernaServer.ClientException;
+import org.apache.taverna.server.client.TavernaServer.ServerException;
+import org.apache.taverna.server.client.generic.KeyPairCredential;
+import org.apache.taverna.server.client.generic.PasswordCredential;
+import org.apache.taverna.server.client.port.InputPort;
+import org.apache.taverna.server.client.port.OutputPort;
+import org.apache.taverna.server.client.rest.InputDescription;
+import org.apache.taverna.server.client.rest.InputDescription.Value;
+import org.apache.taverna.server.client.wadl.TavernaServer.Root.RunsRunName;
import org.apache.taverna.server.usagerecord.JobUsageRecord;
-import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName;
+import org.joda.time.DateTime;
import org.w3c.dom.Element;
-import uk.org.taverna.server.client.TavernaServer.ClientException;
-import uk.org.taverna.server.client.TavernaServer.ServerException;
-import uk.org.taverna.server.client.generic.KeyPairCredential;
-import uk.org.taverna.server.client.generic.PasswordCredential;
-import uk.org.taverna.server.client.generic.port.InputPort;
-import uk.org.taverna.server.client.generic.port.OutputPort;
-import uk.org.taverna.server.client.rest.InputDescription;
-import uk.org.taverna.server.client.rest.InputDescription.Value;
-
import com.sun.jersey.api.client.ClientResponse;
public class Run extends Connected {
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92acc9eb/taverna-server-client/src/main/java/org/apache/taverna/server/client/Status.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Status.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Status.java
index c318e04..e9ac36c 100644
--- a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Status.java
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Status.java
@@ -1,4 +1,4 @@
-package uk.org.taverna.server.client;
+package org.apache.taverna.server.client;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92acc9eb/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServer.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServer.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServer.java
index 40b7045..0cb8e6a 100644
--- a/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServer.java
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServer.java
@@ -1,4 +1,4 @@
-package uk.org.taverna.server.client;
+package org.apache.taverna.server.client;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -17,8 +17,8 @@ package uk.org.taverna.server.client;
*/
import static java.nio.file.Files.readAllBytes;
-import static org.taverna.server.client.wadl.TavernaServer.createClient;
-import static org.taverna.server.client.wadl.TavernaServer.root;
+import static org.apache.taverna.server.client.wadl.TavernaServer.createClient;
+import static org.apache.taverna.server.client.wadl.TavernaServer.root;
import java.io.File;
import java.io.IOException;
@@ -26,11 +26,10 @@ import java.net.URI;
import java.util.ArrayList;
import java.util.List;
-import org.taverna.server.client.wadl.TavernaServer.Root;
-
-import uk.org.taverna.server.client.generic.Capability;
-import uk.org.taverna.server.client.generic.TavernaRun;
-import uk.org.taverna.server.client.generic.VersionedElement;
+import org.apache.taverna.server.client.generic.Capability;
+import org.apache.taverna.server.client.generic.TavernaRun;
+import org.apache.taverna.server.client.generic.VersionedElement;
+import org.apache.taverna.server.client.wadl.TavernaServer.Root;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92acc9eb/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServerConnectionFactory.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServerConnectionFactory.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServerConnectionFactory.java
index f11485d..1d1bf9d 100644
--- a/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServerConnectionFactory.java
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServerConnectionFactory.java
@@ -1,4 +1,4 @@
-package uk.org.taverna.server.client;
+package org.apache.taverna.server.client;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92acc9eb/taverna-server-client/src/main/java/org/apache/taverna/server/client/package-info.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/package-info.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/package-info.java
index 92837b6..09d700f 100644
--- a/taverna-server-client/src/main/java/org/apache/taverna/server/client/package-info.java
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/package-info.java
@@ -2,7 +2,7 @@
* Implementation of a basic client for Taverna Server.
* @author Donal Fellows
*/
-package uk.org.taverna.server.client;
+package org.apache.taverna.server.client;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/92acc9eb/taverna-server-client/src/main/wadl/tavserv.wadl
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/wadl/tavserv.wadl b/taverna-server-client/src/main/wadl/tavserv.wadl
index b59c693..1ded877 100644
--- a/taverna-server-client/src/main/wadl/tavserv.wadl
+++ b/taverna-server-client/src/main/wadl/tavserv.wadl
@@ -32,7 +32,7 @@ limitations under the License.
<xs:annotation>
<xs:appinfo>
<jxb:schemaBindings>
- <jxb:package name="org.apache.taverna.server.client.xml.rest" />
+ <jxb:package name="org.apache.taverna.server.client.rest" />
</jxb:schemaBindings>
</xs:appinfo>
</xs:annotation>
@@ -389,7 +389,7 @@ limitations under the License.
<xs:annotation>
<xs:appinfo>
<jxb:schemaBindings>
- <jxb:package name="org.apache.taverna.server.client.xml.port" />
+ <jxb:package name="org.apache.taverna.server.client.port" />
</jxb:schemaBindings>
</xs:appinfo>
</xs:annotation>
@@ -514,7 +514,7 @@ limitations under the License.
<xs:annotation>
<xs:appinfo>
<jxb:schemaBindings>
- <jxb:package name="org.apache.taverna.server.client.xml" />
+ <jxb:package name="org.apache.taverna.server.client.generic" />
</jxb:schemaBindings>
</xs:appinfo>
</xs:annotation>
[7/9] incubator-taverna-server git commit: Ensure xlink works
Posted by st...@apache.org.
Ensure xlink works
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/7fdfe10c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/7fdfe10c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/7fdfe10c
Branch: refs/heads/master
Commit: 7fdfe10c861283cf89b0549a0359ce0955b7e7db
Parents: 65e57db
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jan 4 14:58:46 2018 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jan 4 14:58:46 2018 +0000
----------------------------------------------------------------------
taverna-server-client/src/main/wadl/tavserv.wadl | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/7fdfe10c/taverna-server-client/src/main/wadl/tavserv.wadl
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/wadl/tavserv.wadl b/taverna-server-client/src/main/wadl/tavserv.wadl
index 9abe957..20bfe18 100644
--- a/taverna-server-client/src/main/wadl/tavserv.wadl
+++ b/taverna-server-client/src/main/wadl/tavserv.wadl
@@ -1,6 +1,7 @@
<application jxb:version="2.1" xmlns="http://wadl.dev.java.net/2009/02"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:rest="http://ns.taverna.org.uk/2010/xml/server/rest/"
xmlns:server="http://ns.taverna.org.uk/2010/xml/server/" xmlns:port="http://ns.taverna.org.uk/2010/port/"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd ">
<!--
@@ -573,6 +574,14 @@ limitations under the License.
</xs:extension>
</xs:complexContent>
</xs:complexType>
+ <xs:complexType name="TavernaRun">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute ref="xlink:href" />
+ <xs:attribute ref="ts:serverVersion" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
<xs:complexType name="DirectoryEntry">
<xs:simpleContent>
<xs:extension base="xs:string">
@@ -591,14 +600,6 @@ limitations under the License.
<xs:extension base="ts:DirectoryEntry" />
</xs:simpleContent>
</xs:complexType>
- <xs:complexType name="TavernaRun">
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute ref="xlink:href" />
- <xs:attribute ref="ts:serverVersion" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
<xs:complexType name="Workflow">
<xs:sequence>
<xs:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="lax" />
[6/9] incubator-taverna-server git commit: Corrected prefixes in WADL
references
Posted by st...@apache.org.
Corrected prefixes in WADL references
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/65e57dbd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/65e57dbd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/65e57dbd
Branch: refs/heads/master
Commit: 65e57dbdac542de015b14a606900052922734b15
Parents: 92acc9e
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jan 4 13:40:19 2018 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jan 4 13:46:26 2018 +0000
----------------------------------------------------------------------
.../src/main/wadl/tavserv.wadl | 72 ++++++++++----------
1 file changed, 37 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/65e57dbd/taverna-server-client/src/main/wadl/tavserv.wadl
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/wadl/tavserv.wadl b/taverna-server-client/src/main/wadl/tavserv.wadl
index 1ded877..9abe957 100644
--- a/taverna-server-client/src/main/wadl/tavserv.wadl
+++ b/taverna-server-client/src/main/wadl/tavserv.wadl
@@ -20,7 +20,15 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<grammars>
- <xs:schema
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://www.w3.org/1999/xlink" attributeFormDefault="unqualified"
+ elementFormDefault="unqualified" targetNamespace="http://www.w3.org/1999/xlink"
+ jxb:version="2.1">
+ <xs:attribute name="href" type="xs:string" />
+</xs:schema>
+
+<xs:schema
xmlns:admin="http://ns.taverna.org.uk/2010/xml/server/admin/"
xmlns:feed="http://ns.taverna.org.uk/2010/xml/server/feed/"
xmlns:port="http://ns.taverna.org.uk/2010/port/" xmlns:tns="http://ns.taverna.org.uk/2010/xml/server/rest/"
@@ -374,12 +382,6 @@ limitations under the License.
<xs:attribute name="owner" type="xs:string" />
<xs:attribute name="type" type="xs:string" />
</xs:schema>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns="http://www.w3.org/1999/xlink" attributeFormDefault="unqualified"
- elementFormDefault="unqualified" targetNamespace="http://www.w3.org/1999/xlink"
- jxb:version="2.1">
- <xs:attribute name="href" type="xs:string" />
-</xs:schema>
<xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:port="http://ns.taverna.org.uk/2010/port/"
xmlns:run="http://ns.taverna.org.uk/2010/run/" xmlns:tns="http://ns.taverna.org.uk/2010/port/"
@@ -625,7 +627,7 @@ limitations under the License.
<xs:attribute name="serverRevision" type="xs:string" />
<xs:attribute name="serverVersion" type="xs:string" />
<xs:attribute name="version" type="xs:string" />
- </xs:schema>
+</xs:schema>
</grammars>
<resources base="http://example.com/taverna/rest">
<resource path="/">
@@ -633,7 +635,7 @@ limitations under the License.
<doc>Produces the description of the service.</doc>
<request></request>
<response>
- <representation mediaType="application/xml" element="server:serverDescription"></representation>
+ <representation mediaType="application/xml" element="rest:serverDescription"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -648,7 +650,7 @@ limitations under the License.
<doc>Produces a list of all runs visible to the user.</doc>
<request></request>
<response>
- <representation mediaType="application/xml" element="server:runList"></representation>
+ <representation mediaType="application/xml" element="rest:runList"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -695,7 +697,7 @@ limitations under the License.
<doc>Describe the parts of this policy.</doc>
<request></request>
<response>
- <representation mediaType="application/xml" element="server:policyDescription"></representation>
+ <representation mediaType="application/xml" element="rest:policyDescription"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -704,7 +706,7 @@ limitations under the License.
<doc>Gets a description of the capabilities supported by this
installation of Taverna Server.</doc>
<response>
- <representation mediaType="application/xml" element="server:capabilities"></representation>
+ <representation mediaType="application/xml" element="rest:capabilities"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -715,7 +717,7 @@ limitations under the License.
Each corresponds (approximately) to a protocol, e.g., email.
</doc>
<response>
- <representation mediaType="application/xml" element="server:enabledNotificationFabrics"></representation>
+ <representation mediaType="application/xml" element="rest:enabledNotificationFabrics"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -742,7 +744,7 @@ limitations under the License.
<method name="GET">
<doc>Gets the list of permitted event listener types.</doc>
<response>
- <representation mediaType="application/xml" element="server:permittedListeners"></representation>
+ <representation mediaType="application/xml" element="rest:permittedListeners"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -751,7 +753,7 @@ limitations under the License.
<method name="GET">
<doc>Gets the list of permitted workflows.</doc>
<response>
- <representation mediaType="application/xml" element="server:permittedWorkflows"></representation>
+ <representation mediaType="application/xml" element="rest:permittedWorkflows"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -785,7 +787,7 @@ limitations under the License.
<doc>Describes a workflow run.</doc>
<request></request>
<response>
- <representation mediaType="application/xml" element="server:runDescription"></representation>
+ <representation mediaType="application/xml" element="rest:runDescription"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -1157,7 +1159,7 @@ limitations under the License.
<method name="GET">
<doc>Describe the sub-URIs of this resource.</doc>
<response>
- <representation mediaType="application/xml" element="server:runInputs"></representation>
+ <representation mediaType="application/xml" element="rest:runInputs"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -1229,7 +1231,7 @@ limitations under the License.
input.</doc>
<request></request>
<response>
- <representation mediaType="application/xml" element="server:runInput"></representation>
+ <representation mediaType="application/xml" element="rest:runInput"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -1244,7 +1246,7 @@ limitations under the License.
<method name="PUT">
<doc>Sets the source for a particular input port.</doc>
<request>
- <representation mediaType="application/xml" element="server:runInput">
+ <representation mediaType="application/xml" element="rest:runInput">
<doc>Sets the source for a particular input port.</doc>
</representation>
<representation mediaType="application/json">
@@ -1252,7 +1254,7 @@ limitations under the License.
</representation>
</request>
<response>
- <representation mediaType="application/xml" element="server:runInput"></representation>
+ <representation mediaType="application/xml" element="rest:runInput"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -1321,7 +1323,7 @@ limitations under the License.
<doc>Get the listeners installed in the workflow run.</doc>
<request></request>
<response>
- <representation mediaType="application/xml" element="server:listeners"></representation>
+ <representation mediaType="application/xml" element="rest:listeners"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -1335,7 +1337,7 @@ limitations under the License.
<method name="POST">
<doc>Add a new event listener to the named workflow run.</doc>
<request>
- <representation mediaType="application/xml" element="server:listenerDefinition">
+ <representation mediaType="application/xml" element="rest:listenerDefinition">
<doc>Add a new event listener to the named workflow run.</doc>
</representation>
<representation mediaType="application/json">
@@ -1354,7 +1356,7 @@ limitations under the License.
<doc>Get the description of this listener.</doc>
<request></request>
<response>
- <representation mediaType="application/xml" element="server:listenerDescription"></representation>
+ <representation mediaType="application/xml" element="rest:listenerDescription"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -1392,7 +1394,7 @@ limitations under the License.
listener attached to a workflow run.</doc>
<request></request>
<response>
- <representation mediaType="application/xml" element="server:properties"></representation>
+ <representation mediaType="application/xml" element="rest:properties"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -1458,7 +1460,7 @@ limitations under the License.
the workflow run.</doc>
<request></request>
<response>
- <representation mediaType="application/xml" element="server:securityDescriptor"></representation>
+ <representation mediaType="application/xml" element="rest:securityDescriptor"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -1480,7 +1482,7 @@ limitations under the License.
<doc>Gives a list of credentials supplied to this workflow run.
</doc>
<response>
- <representation mediaType="application/xml" element="server:credentials"></representation>
+ <representation mediaType="application/xml" element="rest:credentials"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -1494,7 +1496,7 @@ limitations under the License.
<method name="POST">
<doc>Creates a new credential.</doc>
<request>
- <representation mediaType="application/xml" element="server:credential">
+ <representation mediaType="application/xml" element="rest:credential">
<doc>Creates a new credential.</doc>
</representation>
<representation mediaType="application/json">
@@ -1519,7 +1521,7 @@ limitations under the License.
<doc>Describes a particular credential.</doc>
<request></request>
<response>
- <representation mediaType="application/xml" element="server:credential"></representation>
+ <representation mediaType="application/xml" element="rest:credential"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -1534,7 +1536,7 @@ limitations under the License.
<method name="PUT">
<doc>Updates a particular credential.</doc>
<request>
- <representation mediaType="application/xml" element="server:credential">
+ <representation mediaType="application/xml" element="rest:credential">
<doc>Updates a particular credential.</doc>
</representation>
<representation mediaType="application/json">
@@ -1542,7 +1544,7 @@ limitations under the License.
</representation>
</request>
<response>
- <representation mediaType="application/xml" element="server:credential"></representation>
+ <representation mediaType="application/xml" element="rest:credential"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -1572,7 +1574,7 @@ limitations under the License.
all except for the owner of the run.</doc>
<request></request>
<response>
- <representation mediaType="application/xml" element="server:permissionsDescriptor"></representation>
+ <representation mediaType="application/xml" element="rest:permissionsDescriptor"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -1587,7 +1589,7 @@ limitations under the License.
<doc>Creates a new assignment of permissions to a particular
user.</doc>
<request>
- <representation mediaType="application/xml" element="server:permissionUpdate">
+ <representation mediaType="application/xml" element="rest:permissionUpdate">
<doc>Creates a new assignment of permissions to a particular
user.</doc>
</representation>
@@ -1651,7 +1653,7 @@ limitations under the License.
<doc>Gives a list of trusted identities supplied to this workflow
run.</doc>
<response>
- <representation mediaType="application/xml" element="server:trustedIdentities"></representation>
+ <representation mediaType="application/xml" element="rest:trustedIdentities"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -1726,7 +1728,7 @@ limitations under the License.
<doc>Describes the working directory of the workflow run.</doc>
<request></request>
<response>
- <representation mediaType="application/xml" element="server:directoryContents"></representation>
+ <representation mediaType="application/xml" element="rest:directoryContents"></representation>
<representation mediaType="application/json"></representation>
</response>
</method>
@@ -1793,7 +1795,7 @@ limitations under the License.
file's contents, where that file is in or below the working
directory of a workflow run.</doc>
<request>
- <representation mediaType="application/xml" element="server:filesystemOperation">
+ <representation mediaType="application/xml" element="rest:filesystemOperation">
<doc>Creates a directory in the filesystem beneath the working
directory of the workflow run, or creates or updates a
file's contents, where that file is in or below the
[8/9] incubator-taverna-server git commit: Don't OSGi export XML
bindings
Posted by st...@apache.org.
Don't OSGi export XML bindings
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/885940ff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/885940ff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/885940ff
Branch: refs/heads/master
Commit: 885940ffa40f035f122d7140b75f3c7f05d22938
Parents: 7fdfe10
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jan 4 14:58:55 2018 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jan 4 14:58:55 2018 +0000
----------------------------------------------------------------------
taverna-server-client/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/885940ff/taverna-server-client/pom.xml
----------------------------------------------------------------------
diff --git a/taverna-server-client/pom.xml b/taverna-server-client/pom.xml
index ae633cd..507b2b6 100644
--- a/taverna-server-client/pom.xml
+++ b/taverna-server-client/pom.xml
@@ -62,7 +62,7 @@ limitations under the License.
<configuration>
<instructions>
<Export-Package>org.apache.taverna.server.client</Export-Package>
- <Private-Package>org.apache.taverna.server.client.xml.*</Private-Package>
+ <Private-Package>org.apache.taverna.server.client.*</Private-Package>
</instructions>
</configuration>
</plugin>
[4/9] incubator-taverna-server git commit: package
org.apache.taverna.server.client
Posted by st...@apache.org.
package org.apache.taverna.server.client
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/348fe7f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/348fe7f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/348fe7f5
Branch: refs/heads/master
Commit: 348fe7f51326ac2f26622bb75e09b20a4a15af40
Parents: 58c6d3f
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jan 4 12:20:04 2018 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jan 4 12:20:04 2018 +0000
----------------------------------------------------------------------
.../apache/taverna/server/client/Connected.java | 36 +++
.../apache/taverna/server/client/DirEntry.java | 55 +++++
.../apache/taverna/server/client/Directory.java | 110 +++++++++
.../org/apache/taverna/server/client/File.java | 111 +++++++++
.../apache/taverna/server/client/Property.java | 34 +++
.../org/apache/taverna/server/client/Run.java | 231 +++++++++++++++++++
.../apache/taverna/server/client/Status.java | 52 +++++
.../taverna/server/client/TavernaServer.java | 144 ++++++++++++
.../client/TavernaServerConnectionFactory.java | 39 ++++
.../taverna/server/client/package-info.java | 21 ++
.../uk/org/taverna/server/client/Connected.java | 36 ---
.../uk/org/taverna/server/client/DirEntry.java | 55 -----
.../uk/org/taverna/server/client/Directory.java | 110 ---------
.../java/uk/org/taverna/server/client/File.java | 111 ---------
.../uk/org/taverna/server/client/Property.java | 34 ---
.../java/uk/org/taverna/server/client/Run.java | 231 -------------------
.../uk/org/taverna/server/client/Status.java | 52 -----
.../taverna/server/client/TavernaServer.java | 144 ------------
.../client/TavernaServerConnectionFactory.java | 39 ----
.../org/taverna/server/client/package-info.java | 21 --
20 files changed, 833 insertions(+), 833 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/org/apache/taverna/server/client/Connected.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Connected.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Connected.java
new file mode 100644
index 0000000..be2682d
--- /dev/null
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Connected.java
@@ -0,0 +1,36 @@
+package uk.org.taverna.server.client;
+/*
+ * 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.
+ */
+
+import uk.org.taverna.server.client.TavernaServer.ClientException;
+import uk.org.taverna.server.client.TavernaServer.ServerException;
+
+import com.sun.jersey.api.client.ClientResponse;
+
+abstract class Connected {
+ void checkError(ClientResponse response) throws ClientException,
+ ServerException {
+ ClientResponse.Status s = response.getClientResponseStatus();
+ if (s.getStatusCode() == 401)
+ throw new TavernaServer.AuthorizationException("not authorized",
+ null);
+ if (s.getStatusCode() >= 500)
+ throw new TavernaServer.ServerException(s.getReasonPhrase(), null);
+ if (s.getStatusCode() >= 400)
+ throw new TavernaServer.ClientException(s.getReasonPhrase(), null);
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/org/apache/taverna/server/client/DirEntry.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/DirEntry.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/DirEntry.java
new file mode 100644
index 0000000..d5947ab
--- /dev/null
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/DirEntry.java
@@ -0,0 +1,55 @@
+package uk.org.taverna.server.client;
+/*
+ * 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.
+ */
+
+import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd.Path2;
+
+import uk.org.taverna.server.client.TavernaServer.ClientException;
+import uk.org.taverna.server.client.TavernaServer.ServerException;
+
+import com.sun.jersey.api.client.ClientResponse;
+
+public abstract class DirEntry extends Connected {
+ final Path2 handle;
+ final String path;
+ final Run run;
+
+ protected DirEntry(Run run, String path) {
+ this.run = run;
+ this.path = path.replaceFirst("/+$", "");
+ this.handle = run.run.wd().path2(this.path);
+ }
+
+ public void delete() throws ClientException, ServerException {
+ checkError(handle.deleteAsXml(ClientResponse.class));
+ }
+
+ String path(ClientResponse response) throws ClientException, ServerException {
+ checkError(response);
+ String[] bits = response.getLocation().getPath().split("/");
+ return concat(bits[bits.length - 1]);
+ }
+
+ String localName() {
+ String[] bits = path.split("/");
+ return bits[bits.length - 1];
+ }
+
+ String concat(String name) {
+ return path + "/" + name.split("/", 2)[0];
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/org/apache/taverna/server/client/Directory.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Directory.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Directory.java
new file mode 100644
index 0000000..cb1fbc5
--- /dev/null
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Directory.java
@@ -0,0 +1,110 @@
+package uk.org.taverna.server.client;
+/*
+ * 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.
+ */
+
+import static java.io.File.createTempFile;
+import static javax.ws.rs.client.Entity.entity;
+import static javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM_TYPE;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.zip.ZipFile;
+
+import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd;
+
+import uk.org.taverna.server.client.TavernaServer.ClientException;
+import uk.org.taverna.server.client.TavernaServer.ServerException;
+import uk.org.taverna.server.client.generic.DirectoryEntry;
+import uk.org.taverna.server.client.generic.DirectoryReference;
+import uk.org.taverna.server.client.generic.FileReference;
+import uk.org.taverna.server.client.rest.DirectoryContents;
+import uk.org.taverna.server.client.rest.MakeDirectory;
+import uk.org.taverna.server.client.rest.UploadFile;
+
+import com.sun.jersey.api.client.ClientResponse;
+
+public class Directory extends DirEntry {
+ private final Wd wd;
+
+ Directory(Run run) {
+ super(run, "");
+ this.wd = run.run.wd();
+ }
+
+ Directory(Run run, String path) {
+ super(run, path);
+ this.wd = run.run.wd();
+ }
+
+ public List<DirEntry> list() {
+ List<DirEntry> result = new ArrayList<>();
+ for (DirectoryEntry de : wd.path3(path)
+ .getAsXml(DirectoryContents.class).getDirOrFile())
+ if (de instanceof DirectoryReference)
+ result.add(new Directory(run, de.getValue()));
+ else if (de instanceof FileReference)
+ result.add(new File(run, de.getValue()));
+ return result;
+ }
+
+ public File createFile(String name, byte[] content) throws ClientException,
+ ServerException {
+ UploadFile uf = new UploadFile();
+ uf.setName(name);
+ uf.setValue(content);
+ return new File(run, path(wd.path(path).putAsXml(uf,
+ ClientResponse.class)));
+ }
+
+ public File createFile(String name, java.io.File content)
+ throws ClientException, ServerException {
+ return new File(run, path(wd.path(concat(name)).putOctetStreamAsXml(
+ entity(content, APPLICATION_OCTET_STREAM_TYPE),
+ ClientResponse.class)));
+ }
+
+ public File createFile(String name, URI source) throws ClientException,
+ ServerException {
+ return new File(run, path(wd.path(concat(name)).postTextUriListAsXml(
+ source.toString(), ClientResponse.class)));
+ }
+
+ public Directory createDirectory(String name) throws ClientException,
+ ServerException {
+ MakeDirectory mkdir = new MakeDirectory();
+ mkdir.setName(name);
+ return new Directory(run, path(wd.path(path).putAsXml(mkdir,
+ ClientResponse.class)));
+ }
+
+ public byte[] getZippedContents() {
+ return wd.path3(path).getAsZip(byte[].class);
+ }
+
+ public ZipFile getZip() throws IOException {
+ byte[] contents = getZippedContents();
+ java.io.File tmp = createTempFile(localName(), ".zip");
+ try (OutputStream os = new FileOutputStream(tmp)) {
+ os.write(contents);
+ }
+ return new ZipFile(tmp);
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/org/apache/taverna/server/client/File.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/File.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/File.java
new file mode 100644
index 0000000..edcfdd5
--- /dev/null
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/File.java
@@ -0,0 +1,111 @@
+package uk.org.taverna.server.client;
+/*
+ * 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.
+ */
+
+import static java.io.File.createTempFile;
+import static javax.ws.rs.client.Entity.entity;
+import static javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM_TYPE;
+import static org.apache.commons.io.IOUtils.copy;
+import static org.apache.tika.mime.MimeTypes.getDefaultMimeTypes;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.charset.Charset;
+
+import org.apache.tika.mime.MimeTypeException;
+import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd;
+
+import uk.org.taverna.server.client.TavernaServer.ClientException;
+import uk.org.taverna.server.client.TavernaServer.ServerException;
+
+import com.sun.jersey.api.client.ClientHandlerException;
+import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.api.client.UniformInterfaceException;
+
+public class File extends DirEntry {
+ private final Wd wd;
+
+ File(Run run, String path) {
+ super(run, path);
+ wd = run.run.wd();
+ }
+
+ public InputStream getAsStream() {
+ return wd.path3(path).getAsOctetStream(InputStream.class);
+ }
+
+ public byte[] get() {
+ return wd.path3(path).getAsOctetStream(byte[].class);
+ }
+
+ public String get(Charset encoding) {
+ return new String(wd.path3(path).getAsOctetStream(byte[].class),
+ encoding);
+ }
+
+ public java.io.File getAsFile() throws ClientHandlerException,
+ UniformInterfaceException, IOException, MimeTypeException,
+ ClientException, ServerException {
+ ClientResponse cr = wd.path3(path).getAsOctetStream(
+ ClientResponse.class);
+ checkError(cr);
+ String[] bits = localName().split("[.]");
+ String ext = getDefaultMimeTypes().forName(
+ cr.getHeaders().getFirst("Content-Type")).getExtension();
+ if (ext == null)
+ ext = bits[bits.length - 1];
+ java.io.File tmp = createTempFile(bits[0], ext);
+ try (OutputStream os = new FileOutputStream(tmp);
+ InputStream is = cr.getEntity(InputStream.class)) {
+ copy(is, os);
+ }
+ return tmp;
+ }
+
+ public void setContents(byte[] newContents) throws ClientException,
+ ServerException {
+ checkError(wd.path(path).putOctetStreamAsXml(newContents,
+ ClientResponse.class));
+ }
+
+ public void setContents(String newContents) throws ClientException,
+ ServerException {
+ checkError(wd.path(path).putOctetStreamAsXml(newContents,
+ ClientResponse.class));
+ }
+
+ public void setContents(String newContents, Charset encoding)
+ throws ClientException, ServerException {
+ checkError(wd.path(path).putOctetStreamAsXml(
+ newContents.getBytes(encoding), ClientResponse.class));
+ }
+
+ public void setContents(InputStream newContents) throws ClientException,
+ ServerException {
+ checkError(wd.path(path).putOctetStreamAsXml(newContents,
+ ClientResponse.class));
+ }
+
+ public void setContents(java.io.File newContents) throws IOException,
+ ClientException, ServerException {
+ checkError(wd.path(path).putOctetStreamAsXml(
+ entity(newContents, APPLICATION_OCTET_STREAM_TYPE),
+ ClientResponse.class));
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/org/apache/taverna/server/client/Property.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Property.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Property.java
new file mode 100644
index 0000000..e67a06d
--- /dev/null
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Property.java
@@ -0,0 +1,34 @@
+package uk.org.taverna.server.client;
+/*
+ * 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.
+ */
+
+public enum Property {
+ STDOUT("stdout"), STDERR("stderr"), EXIT_CODE("exitcode"), READY_TO_NOTIFY(
+ "readyToNotify"), EMAIL("notificationAddress"), USAGE(
+ "usageRecord");
+
+ private String s;
+
+ private Property(String s) {
+ this.s = s;
+ }
+
+ @Override
+ public String toString() {
+ return s;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/org/apache/taverna/server/client/Run.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Run.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Run.java
new file mode 100644
index 0000000..6bcae87
--- /dev/null
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Run.java
@@ -0,0 +1,231 @@
+package uk.org.taverna.server.client;
+/*
+ * 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.
+ */
+
+import static org.joda.time.format.ISODateTimeFormat.dateTime;
+import static org.joda.time.format.ISODateTimeFormat.dateTimeParser;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.util.Date;
+import java.util.List;
+
+import javax.xml.bind.JAXBException;
+
+import org.apache.commons.io.IOUtils;
+import org.joda.time.DateTime;
+import org.apache.taverna.server.usagerecord.JobUsageRecord;
+import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName;
+import org.w3c.dom.Element;
+
+import uk.org.taverna.server.client.TavernaServer.ClientException;
+import uk.org.taverna.server.client.TavernaServer.ServerException;
+import uk.org.taverna.server.client.generic.KeyPairCredential;
+import uk.org.taverna.server.client.generic.PasswordCredential;
+import uk.org.taverna.server.client.generic.port.InputPort;
+import uk.org.taverna.server.client.generic.port.OutputPort;
+import uk.org.taverna.server.client.rest.InputDescription;
+import uk.org.taverna.server.client.rest.InputDescription.Value;
+
+import com.sun.jersey.api.client.ClientResponse;
+
+public class Run extends Connected {
+ RunsRunName run;
+
+ Run(TavernaServer server, String value) {
+ run = server.root.runsRunName(value);
+ }
+
+ public String getName() {
+ return run.name().getAsTextPlain(ClientResponse.class)
+ .getEntity(String.class);
+ }
+
+ public void setName(String name) {
+ run.name().putTextPlain(name, String.class);
+ }
+
+ public Date getExpiry() {
+ return dateTimeParser().parseDateTime(
+ run.expiry().getAsTextPlain(String.class)).toDate();
+ }
+
+ public void setExpiry(Date expiryTimestamp) {
+ run.expiry().putTextPlain(
+ dateTime().print(new DateTime(expiryTimestamp)), String.class);
+ }
+
+ public Date getCreate() {
+ String timestamp = run.createTime().getAsTextPlain(String.class);
+ if (timestamp == null || timestamp.trim().isEmpty())
+ return null;
+ return dateTimeParser().parseDateTime(timestamp).toDate();
+ }
+
+ public Date getStart() {
+ String timestamp = run.startTime().getAsTextPlain(String.class);
+ if (timestamp == null || timestamp.trim().isEmpty())
+ return null;
+ return dateTimeParser().parseDateTime(timestamp).toDate();
+ }
+
+ public Date getFinish() {
+ String timestamp = run.finishTime().getAsTextPlain(String.class);
+ if (timestamp == null || timestamp.trim().isEmpty())
+ return null;
+ return dateTimeParser().parseDateTime(timestamp).toDate();
+ }
+
+ public Status getStatus() {
+ return Status.valueOf(run.status().getAsTextPlain(String.class));
+ }
+
+ public void setStatus(Status status) {
+ run.status().putTextPlain(status, String.class);
+ }
+
+ public void start() {
+ setStatus(Status.Operating);
+ }
+
+ public void kill() {
+ setStatus(Status.Finished);
+ }
+
+ public boolean isRunning() {
+ return getStatus() == Status.Operating;
+ }
+
+ public String getStandardOutput() {
+ return run.stdout().getAsTextPlain(String.class);
+ }
+
+ public String getStandardError() {
+ return run.stderr().getAsTextPlain(String.class);
+ }
+
+ public String getLog() {
+ return run.log().getAsTextPlain(String.class);
+ }
+
+ public Integer getExitCode() {
+ String code = run.listeners().name("io")
+ .propertiesPropertyName("exitCode")
+ .getAsTextPlain(String.class);
+ if (code == null || code.trim().isEmpty())
+ return null;
+ return Integer.parseInt(code);
+ }
+
+ public String getProperty(Property prop) {
+ return run.listeners().name("io")
+ .propertiesPropertyName(prop.toString())
+ .getAsTextPlain(String.class);
+ }
+
+ public void setGenerateRunBundle(boolean generateRunBundle) {
+ run.generateProvenance().putTextPlain(generateRunBundle, String.class);
+ }
+
+ public byte[] getRunBundle() {
+ return run.runBundle().getAsVndWf4everRobundleZip(byte[].class);
+ }
+
+ public List<InputPort> getInputs() {
+ return run.input().expected().getAsInputDescriptionXml().getInput();
+ }
+
+ public List<OutputPort> getOutputs() {
+ return run.output().getAsOutputDescriptionXml().getOutput();
+ }
+
+ public void setInput(String name, String value) {
+ Value v = new Value();
+ v.setValue(value);
+ InputDescription idesc = new InputDescription();
+ idesc.setValue(v);
+ run.input().inputName(name).putXmlAsInputDescription(idesc);
+ }
+
+ public void setInput(String name, String value, char listSeparator) {
+ Value v = new Value();
+ v.setValue(value);
+ InputDescription idesc = new InputDescription();
+ idesc.setValue(v);
+ idesc.setListDelimiter(new String(new char[] { listSeparator }));
+ run.input().inputName(name).putXmlAsInputDescription(idesc);
+ }
+
+ public byte[] getWorkflow() {
+ return run.workflow().getAsVndTavernaT2flowXml(byte[].class);
+ }
+
+ // TODO Consider better ways to do this
+ public Element getInteractionFeed() {
+ return run.interaction().getAsAtomXml(Element.class);
+ }
+
+ public Element getInteractionEntry(String id) {
+ return run.interaction().id(id).getAsAtomXml(Element.class);
+ }
+
+ public JobUsageRecord getUsageRecord() throws JAXBException {
+ return JobUsageRecord.unmarshal(run.usage().getAsXml(Element.class));
+ }
+
+ public Directory getWorkingDirectory() {
+ return new Directory(this);
+ }
+
+ public String getOwner() {
+ return run.security().owner().getAsTextPlain(String.class);
+ }
+
+ // TODO permissions
+
+ public void grantPasswordCredential(URI contextService, String username,
+ String password) throws ClientException, ServerException {
+ PasswordCredential pc = new PasswordCredential();
+ pc.setServiceURI(contextService.toString());
+ pc.setUsername(username);
+ pc.setPassword(password);
+ checkError(run.security().credentials()
+ .postXmlAsOctetStream(pc, ClientResponse.class));
+ }
+
+ public void grantKeyCredential(URI contextService, java.io.File source,
+ String unlockPassword, String aliasEntry) throws IOException,
+ ClientException, ServerException {
+ KeyPairCredential kpc = new KeyPairCredential();
+ kpc.setServiceURI(contextService.toString());
+ try (InputStream in = new FileInputStream(source)) {
+ byte[] buffer = new byte[(int) source.length()];
+ IOUtils.read(in, buffer);
+ kpc.setCredentialBytes(buffer);
+ }
+ if (source.getName().endsWith(".p12"))
+ kpc.setFileType("PKCS12");
+ else
+ kpc.setFileType("JKS");
+ kpc.setCredentialName(aliasEntry);
+ kpc.setUnlockPassword(unlockPassword);
+ checkError(run.security().credentials()
+ .postXmlAsOctetStream(kpc, ClientResponse.class));
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/org/apache/taverna/server/client/Status.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/Status.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Status.java
new file mode 100644
index 0000000..c318e04
--- /dev/null
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/Status.java
@@ -0,0 +1,52 @@
+package uk.org.taverna.server.client;
+/*
+ * 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.
+ */
+
+/**
+ * States of a workflow run. They are {@link #Initialized Initialized},
+ * {@link #Operating Operating}, {@link #Stopped Stopped}, and
+ * {@link #Finished Finished}. Conceptually, there is also a
+ * <tt>Destroyed</tt> state, but the workflow run does not exist (and hence
+ * can't have its state queried or set) in that case.
+ *
+ * @author Donal Fellows
+ */
+public enum Status {
+ /**
+ * The workflow run has been created, but is not yet running. The run
+ * will need to be manually moved to {@link #Operating Operating} when
+ * ready.
+ */
+ Initialized,
+ /**
+ * The workflow run is going, reading input, generating output, etc.
+ * Will eventually either move automatically to {@link #Finished
+ * Finished} or can be moved manually to {@link #Stopped Stopped} (where
+ * supported).
+ */
+ Operating,
+ /**
+ * The workflow run is paused, and will need to be moved back to
+ * {@link #Operating Operating} manually.
+ */
+ Stopped,
+ /**
+ * The workflow run has ceased; data files will continue to exist until
+ * the run is destroyed (which may be manual or automatic).
+ */
+ Finished
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServer.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServer.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServer.java
new file mode 100644
index 0000000..40b7045
--- /dev/null
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServer.java
@@ -0,0 +1,144 @@
+package uk.org.taverna.server.client;
+/*
+ * 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.
+ */
+
+import static java.nio.file.Files.readAllBytes;
+import static org.taverna.server.client.wadl.TavernaServer.createClient;
+import static org.taverna.server.client.wadl.TavernaServer.root;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.taverna.server.client.wadl.TavernaServer.Root;
+
+import uk.org.taverna.server.client.generic.Capability;
+import uk.org.taverna.server.client.generic.TavernaRun;
+import uk.org.taverna.server.client.generic.VersionedElement;
+
+import com.sun.jersey.api.client.Client;
+import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter;
+
+public class TavernaServer extends Connected {
+ final Root root;
+ private final URI location;
+ private final boolean authenticated;
+
+ TavernaServer(URI serviceRoot) {
+ root = root(createClient(), location = serviceRoot);
+ authenticated = false;
+ }
+
+ TavernaServer(URI serviceRoot, String username, String password) {
+ Client client = createClient();
+ client.addFilter(new HTTPBasicAuthFilter(username, password));
+ authenticated = true;
+ root = root(client, location = serviceRoot);
+ }
+
+ TavernaServer(TavernaServer service, String username, String password) {
+ Client client = createClient();
+ client.addFilter(new HTTPBasicAuthFilter(username, password));
+ authenticated = true;
+ root = root(client, location = service.location);
+ getServerVersionInfo();
+ }
+
+ public TavernaServer upgradeToAuth(String username, String password) {
+ if (authenticated)
+ throw new IllegalStateException("may only upgrade an unauthenticated connection");
+ return new TavernaServer(this, username, password);
+ }
+
+ public List<Capability> getCapabilities() {
+ return root.policy().capabilities().getAsCapabilitiesXml()
+ .getCapability();
+ }
+
+ public int getRunLimit() {
+ return root.policy().runLimit().getAsTextPlain(Integer.class);
+ }
+
+ public int getOperatingLimit() {
+ return root.policy().operatingLimit().getAsTextPlain(Integer.class);
+ }
+
+ public List<String> getPermittedWorkflows() {
+ return root.policy().permittedWorkflows().getAsPermittedWorkflowsXml()
+ .getWorkflow();
+ }
+
+ public List<Run> getExistingRuns() {
+ List<Run> runs = new ArrayList<>();
+ for (TavernaRun run : root.runs().getAsRunListXml().getRun())
+ runs.add(new Run(this, run.getValue()));
+ return runs;
+ }
+
+ public VersionedElement getServerVersionInfo() {
+ return root.getAsServerDescriptionXml();
+ }
+
+ private Run response2run(ClientResponse response) throws ClientException, ServerException {
+ checkError(response);
+ if (response.getClientResponseStatus().getStatusCode() == 201) {
+ String[] path = response.getLocation().getPath().split("/");
+ return new Run(this, path[path.length - 1]);
+ }
+ return null;
+ }
+
+ public Run createWorkflowRun(byte[] t2flowBytes) throws ClientException, ServerException {
+ return response2run(root.runs().postVndTavernaT2flowXmlAsOctetStream(
+ t2flowBytes, ClientResponse.class));
+ }
+
+ public Run createWorkflowRun(File t2flowFile) throws IOException, ClientException, ServerException {
+ return createWorkflowRun(readAllBytes(t2flowFile.toPath()));
+ }
+
+ public Run createWorkflowRun(URI t2flowUri) throws ClientException, ServerException {
+ return response2run(root.runs().postTextUriListAsOctetStream(
+ t2flowUri.toString(), ClientResponse.class));
+ }
+
+
+ public static class ClientException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ ClientException(String msg, Throwable cause) {
+ super(msg, cause);
+ }
+ }
+ public static class AuthorizationException extends ClientException {
+ private static final long serialVersionUID = 1L;
+
+ AuthorizationException(String msg, Throwable cause) {
+ super(msg, cause);
+ }
+ }
+ static class ServerException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ ServerException(String msg, Throwable cause) {
+ super(msg, cause);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServerConnectionFactory.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServerConnectionFactory.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServerConnectionFactory.java
new file mode 100644
index 0000000..f11485d
--- /dev/null
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServerConnectionFactory.java
@@ -0,0 +1,39 @@
+package uk.org.taverna.server.client;
+/*
+ * 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.
+ */
+
+import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+
+public class TavernaServerConnectionFactory {
+ private Map<URI, TavernaServer> cache = new HashMap<>();
+
+ public synchronized TavernaServer connectNoAuth(URI uri) {
+ TavernaServer conn = cache.get(uri);
+ if (conn == null)
+ cache.put(uri, conn = new TavernaServer(uri));
+ return conn;
+ }
+
+ public TavernaServer connectAuth(URI uri, String username, String password) {
+ TavernaServer conn = new TavernaServer(uri, username, password);
+ // Force a check of the credentials by getting the server version
+ conn.getServerVersionInfo();
+ return conn;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/org/apache/taverna/server/client/package-info.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/package-info.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/package-info.java
new file mode 100644
index 0000000..92837b6
--- /dev/null
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/package-info.java
@@ -0,0 +1,21 @@
+/**
+ * Implementation of a basic client for Taverna Server.
+ * @author Donal Fellows
+ */
+package uk.org.taverna.server.client;
+/*
+ * 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.
+ */
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/uk/org/taverna/server/client/Connected.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/uk/org/taverna/server/client/Connected.java b/taverna-server-client/src/main/java/uk/org/taverna/server/client/Connected.java
deleted file mode 100644
index be2682d..0000000
--- a/taverna-server-client/src/main/java/uk/org/taverna/server/client/Connected.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package uk.org.taverna.server.client;
-/*
- * 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.
- */
-
-import uk.org.taverna.server.client.TavernaServer.ClientException;
-import uk.org.taverna.server.client.TavernaServer.ServerException;
-
-import com.sun.jersey.api.client.ClientResponse;
-
-abstract class Connected {
- void checkError(ClientResponse response) throws ClientException,
- ServerException {
- ClientResponse.Status s = response.getClientResponseStatus();
- if (s.getStatusCode() == 401)
- throw new TavernaServer.AuthorizationException("not authorized",
- null);
- if (s.getStatusCode() >= 500)
- throw new TavernaServer.ServerException(s.getReasonPhrase(), null);
- if (s.getStatusCode() >= 400)
- throw new TavernaServer.ClientException(s.getReasonPhrase(), null);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/uk/org/taverna/server/client/DirEntry.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/uk/org/taverna/server/client/DirEntry.java b/taverna-server-client/src/main/java/uk/org/taverna/server/client/DirEntry.java
deleted file mode 100644
index d5947ab..0000000
--- a/taverna-server-client/src/main/java/uk/org/taverna/server/client/DirEntry.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package uk.org.taverna.server.client;
-/*
- * 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.
- */
-
-import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd.Path2;
-
-import uk.org.taverna.server.client.TavernaServer.ClientException;
-import uk.org.taverna.server.client.TavernaServer.ServerException;
-
-import com.sun.jersey.api.client.ClientResponse;
-
-public abstract class DirEntry extends Connected {
- final Path2 handle;
- final String path;
- final Run run;
-
- protected DirEntry(Run run, String path) {
- this.run = run;
- this.path = path.replaceFirst("/+$", "");
- this.handle = run.run.wd().path2(this.path);
- }
-
- public void delete() throws ClientException, ServerException {
- checkError(handle.deleteAsXml(ClientResponse.class));
- }
-
- String path(ClientResponse response) throws ClientException, ServerException {
- checkError(response);
- String[] bits = response.getLocation().getPath().split("/");
- return concat(bits[bits.length - 1]);
- }
-
- String localName() {
- String[] bits = path.split("/");
- return bits[bits.length - 1];
- }
-
- String concat(String name) {
- return path + "/" + name.split("/", 2)[0];
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/uk/org/taverna/server/client/Directory.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/uk/org/taverna/server/client/Directory.java b/taverna-server-client/src/main/java/uk/org/taverna/server/client/Directory.java
deleted file mode 100644
index cb1fbc5..0000000
--- a/taverna-server-client/src/main/java/uk/org/taverna/server/client/Directory.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package uk.org.taverna.server.client;
-/*
- * 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.
- */
-
-import static java.io.File.createTempFile;
-import static javax.ws.rs.client.Entity.entity;
-import static javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM_TYPE;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.zip.ZipFile;
-
-import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd;
-
-import uk.org.taverna.server.client.TavernaServer.ClientException;
-import uk.org.taverna.server.client.TavernaServer.ServerException;
-import uk.org.taverna.server.client.generic.DirectoryEntry;
-import uk.org.taverna.server.client.generic.DirectoryReference;
-import uk.org.taverna.server.client.generic.FileReference;
-import uk.org.taverna.server.client.rest.DirectoryContents;
-import uk.org.taverna.server.client.rest.MakeDirectory;
-import uk.org.taverna.server.client.rest.UploadFile;
-
-import com.sun.jersey.api.client.ClientResponse;
-
-public class Directory extends DirEntry {
- private final Wd wd;
-
- Directory(Run run) {
- super(run, "");
- this.wd = run.run.wd();
- }
-
- Directory(Run run, String path) {
- super(run, path);
- this.wd = run.run.wd();
- }
-
- public List<DirEntry> list() {
- List<DirEntry> result = new ArrayList<>();
- for (DirectoryEntry de : wd.path3(path)
- .getAsXml(DirectoryContents.class).getDirOrFile())
- if (de instanceof DirectoryReference)
- result.add(new Directory(run, de.getValue()));
- else if (de instanceof FileReference)
- result.add(new File(run, de.getValue()));
- return result;
- }
-
- public File createFile(String name, byte[] content) throws ClientException,
- ServerException {
- UploadFile uf = new UploadFile();
- uf.setName(name);
- uf.setValue(content);
- return new File(run, path(wd.path(path).putAsXml(uf,
- ClientResponse.class)));
- }
-
- public File createFile(String name, java.io.File content)
- throws ClientException, ServerException {
- return new File(run, path(wd.path(concat(name)).putOctetStreamAsXml(
- entity(content, APPLICATION_OCTET_STREAM_TYPE),
- ClientResponse.class)));
- }
-
- public File createFile(String name, URI source) throws ClientException,
- ServerException {
- return new File(run, path(wd.path(concat(name)).postTextUriListAsXml(
- source.toString(), ClientResponse.class)));
- }
-
- public Directory createDirectory(String name) throws ClientException,
- ServerException {
- MakeDirectory mkdir = new MakeDirectory();
- mkdir.setName(name);
- return new Directory(run, path(wd.path(path).putAsXml(mkdir,
- ClientResponse.class)));
- }
-
- public byte[] getZippedContents() {
- return wd.path3(path).getAsZip(byte[].class);
- }
-
- public ZipFile getZip() throws IOException {
- byte[] contents = getZippedContents();
- java.io.File tmp = createTempFile(localName(), ".zip");
- try (OutputStream os = new FileOutputStream(tmp)) {
- os.write(contents);
- }
- return new ZipFile(tmp);
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/uk/org/taverna/server/client/File.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/uk/org/taverna/server/client/File.java b/taverna-server-client/src/main/java/uk/org/taverna/server/client/File.java
deleted file mode 100644
index edcfdd5..0000000
--- a/taverna-server-client/src/main/java/uk/org/taverna/server/client/File.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package uk.org.taverna.server.client;
-/*
- * 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.
- */
-
-import static java.io.File.createTempFile;
-import static javax.ws.rs.client.Entity.entity;
-import static javax.ws.rs.core.MediaType.APPLICATION_OCTET_STREAM_TYPE;
-import static org.apache.commons.io.IOUtils.copy;
-import static org.apache.tika.mime.MimeTypes.getDefaultMimeTypes;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.charset.Charset;
-
-import org.apache.tika.mime.MimeTypeException;
-import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName.Wd;
-
-import uk.org.taverna.server.client.TavernaServer.ClientException;
-import uk.org.taverna.server.client.TavernaServer.ServerException;
-
-import com.sun.jersey.api.client.ClientHandlerException;
-import com.sun.jersey.api.client.ClientResponse;
-import com.sun.jersey.api.client.UniformInterfaceException;
-
-public class File extends DirEntry {
- private final Wd wd;
-
- File(Run run, String path) {
- super(run, path);
- wd = run.run.wd();
- }
-
- public InputStream getAsStream() {
- return wd.path3(path).getAsOctetStream(InputStream.class);
- }
-
- public byte[] get() {
- return wd.path3(path).getAsOctetStream(byte[].class);
- }
-
- public String get(Charset encoding) {
- return new String(wd.path3(path).getAsOctetStream(byte[].class),
- encoding);
- }
-
- public java.io.File getAsFile() throws ClientHandlerException,
- UniformInterfaceException, IOException, MimeTypeException,
- ClientException, ServerException {
- ClientResponse cr = wd.path3(path).getAsOctetStream(
- ClientResponse.class);
- checkError(cr);
- String[] bits = localName().split("[.]");
- String ext = getDefaultMimeTypes().forName(
- cr.getHeaders().getFirst("Content-Type")).getExtension();
- if (ext == null)
- ext = bits[bits.length - 1];
- java.io.File tmp = createTempFile(bits[0], ext);
- try (OutputStream os = new FileOutputStream(tmp);
- InputStream is = cr.getEntity(InputStream.class)) {
- copy(is, os);
- }
- return tmp;
- }
-
- public void setContents(byte[] newContents) throws ClientException,
- ServerException {
- checkError(wd.path(path).putOctetStreamAsXml(newContents,
- ClientResponse.class));
- }
-
- public void setContents(String newContents) throws ClientException,
- ServerException {
- checkError(wd.path(path).putOctetStreamAsXml(newContents,
- ClientResponse.class));
- }
-
- public void setContents(String newContents, Charset encoding)
- throws ClientException, ServerException {
- checkError(wd.path(path).putOctetStreamAsXml(
- newContents.getBytes(encoding), ClientResponse.class));
- }
-
- public void setContents(InputStream newContents) throws ClientException,
- ServerException {
- checkError(wd.path(path).putOctetStreamAsXml(newContents,
- ClientResponse.class));
- }
-
- public void setContents(java.io.File newContents) throws IOException,
- ClientException, ServerException {
- checkError(wd.path(path).putOctetStreamAsXml(
- entity(newContents, APPLICATION_OCTET_STREAM_TYPE),
- ClientResponse.class));
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/uk/org/taverna/server/client/Property.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/uk/org/taverna/server/client/Property.java b/taverna-server-client/src/main/java/uk/org/taverna/server/client/Property.java
deleted file mode 100644
index e67a06d..0000000
--- a/taverna-server-client/src/main/java/uk/org/taverna/server/client/Property.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package uk.org.taverna.server.client;
-/*
- * 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.
- */
-
-public enum Property {
- STDOUT("stdout"), STDERR("stderr"), EXIT_CODE("exitcode"), READY_TO_NOTIFY(
- "readyToNotify"), EMAIL("notificationAddress"), USAGE(
- "usageRecord");
-
- private String s;
-
- private Property(String s) {
- this.s = s;
- }
-
- @Override
- public String toString() {
- return s;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/uk/org/taverna/server/client/Run.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/uk/org/taverna/server/client/Run.java b/taverna-server-client/src/main/java/uk/org/taverna/server/client/Run.java
deleted file mode 100644
index 6bcae87..0000000
--- a/taverna-server-client/src/main/java/uk/org/taverna/server/client/Run.java
+++ /dev/null
@@ -1,231 +0,0 @@
-package uk.org.taverna.server.client;
-/*
- * 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.
- */
-
-import static org.joda.time.format.ISODateTimeFormat.dateTime;
-import static org.joda.time.format.ISODateTimeFormat.dateTimeParser;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.util.Date;
-import java.util.List;
-
-import javax.xml.bind.JAXBException;
-
-import org.apache.commons.io.IOUtils;
-import org.joda.time.DateTime;
-import org.apache.taverna.server.usagerecord.JobUsageRecord;
-import org.taverna.server.client.wadl.TavernaServer.Root.RunsRunName;
-import org.w3c.dom.Element;
-
-import uk.org.taverna.server.client.TavernaServer.ClientException;
-import uk.org.taverna.server.client.TavernaServer.ServerException;
-import uk.org.taverna.server.client.generic.KeyPairCredential;
-import uk.org.taverna.server.client.generic.PasswordCredential;
-import uk.org.taverna.server.client.generic.port.InputPort;
-import uk.org.taverna.server.client.generic.port.OutputPort;
-import uk.org.taverna.server.client.rest.InputDescription;
-import uk.org.taverna.server.client.rest.InputDescription.Value;
-
-import com.sun.jersey.api.client.ClientResponse;
-
-public class Run extends Connected {
- RunsRunName run;
-
- Run(TavernaServer server, String value) {
- run = server.root.runsRunName(value);
- }
-
- public String getName() {
- return run.name().getAsTextPlain(ClientResponse.class)
- .getEntity(String.class);
- }
-
- public void setName(String name) {
- run.name().putTextPlain(name, String.class);
- }
-
- public Date getExpiry() {
- return dateTimeParser().parseDateTime(
- run.expiry().getAsTextPlain(String.class)).toDate();
- }
-
- public void setExpiry(Date expiryTimestamp) {
- run.expiry().putTextPlain(
- dateTime().print(new DateTime(expiryTimestamp)), String.class);
- }
-
- public Date getCreate() {
- String timestamp = run.createTime().getAsTextPlain(String.class);
- if (timestamp == null || timestamp.trim().isEmpty())
- return null;
- return dateTimeParser().parseDateTime(timestamp).toDate();
- }
-
- public Date getStart() {
- String timestamp = run.startTime().getAsTextPlain(String.class);
- if (timestamp == null || timestamp.trim().isEmpty())
- return null;
- return dateTimeParser().parseDateTime(timestamp).toDate();
- }
-
- public Date getFinish() {
- String timestamp = run.finishTime().getAsTextPlain(String.class);
- if (timestamp == null || timestamp.trim().isEmpty())
- return null;
- return dateTimeParser().parseDateTime(timestamp).toDate();
- }
-
- public Status getStatus() {
- return Status.valueOf(run.status().getAsTextPlain(String.class));
- }
-
- public void setStatus(Status status) {
- run.status().putTextPlain(status, String.class);
- }
-
- public void start() {
- setStatus(Status.Operating);
- }
-
- public void kill() {
- setStatus(Status.Finished);
- }
-
- public boolean isRunning() {
- return getStatus() == Status.Operating;
- }
-
- public String getStandardOutput() {
- return run.stdout().getAsTextPlain(String.class);
- }
-
- public String getStandardError() {
- return run.stderr().getAsTextPlain(String.class);
- }
-
- public String getLog() {
- return run.log().getAsTextPlain(String.class);
- }
-
- public Integer getExitCode() {
- String code = run.listeners().name("io")
- .propertiesPropertyName("exitCode")
- .getAsTextPlain(String.class);
- if (code == null || code.trim().isEmpty())
- return null;
- return Integer.parseInt(code);
- }
-
- public String getProperty(Property prop) {
- return run.listeners().name("io")
- .propertiesPropertyName(prop.toString())
- .getAsTextPlain(String.class);
- }
-
- public void setGenerateRunBundle(boolean generateRunBundle) {
- run.generateProvenance().putTextPlain(generateRunBundle, String.class);
- }
-
- public byte[] getRunBundle() {
- return run.runBundle().getAsVndWf4everRobundleZip(byte[].class);
- }
-
- public List<InputPort> getInputs() {
- return run.input().expected().getAsInputDescriptionXml().getInput();
- }
-
- public List<OutputPort> getOutputs() {
- return run.output().getAsOutputDescriptionXml().getOutput();
- }
-
- public void setInput(String name, String value) {
- Value v = new Value();
- v.setValue(value);
- InputDescription idesc = new InputDescription();
- idesc.setValue(v);
- run.input().inputName(name).putXmlAsInputDescription(idesc);
- }
-
- public void setInput(String name, String value, char listSeparator) {
- Value v = new Value();
- v.setValue(value);
- InputDescription idesc = new InputDescription();
- idesc.setValue(v);
- idesc.setListDelimiter(new String(new char[] { listSeparator }));
- run.input().inputName(name).putXmlAsInputDescription(idesc);
- }
-
- public byte[] getWorkflow() {
- return run.workflow().getAsVndTavernaT2flowXml(byte[].class);
- }
-
- // TODO Consider better ways to do this
- public Element getInteractionFeed() {
- return run.interaction().getAsAtomXml(Element.class);
- }
-
- public Element getInteractionEntry(String id) {
- return run.interaction().id(id).getAsAtomXml(Element.class);
- }
-
- public JobUsageRecord getUsageRecord() throws JAXBException {
- return JobUsageRecord.unmarshal(run.usage().getAsXml(Element.class));
- }
-
- public Directory getWorkingDirectory() {
- return new Directory(this);
- }
-
- public String getOwner() {
- return run.security().owner().getAsTextPlain(String.class);
- }
-
- // TODO permissions
-
- public void grantPasswordCredential(URI contextService, String username,
- String password) throws ClientException, ServerException {
- PasswordCredential pc = new PasswordCredential();
- pc.setServiceURI(contextService.toString());
- pc.setUsername(username);
- pc.setPassword(password);
- checkError(run.security().credentials()
- .postXmlAsOctetStream(pc, ClientResponse.class));
- }
-
- public void grantKeyCredential(URI contextService, java.io.File source,
- String unlockPassword, String aliasEntry) throws IOException,
- ClientException, ServerException {
- KeyPairCredential kpc = new KeyPairCredential();
- kpc.setServiceURI(contextService.toString());
- try (InputStream in = new FileInputStream(source)) {
- byte[] buffer = new byte[(int) source.length()];
- IOUtils.read(in, buffer);
- kpc.setCredentialBytes(buffer);
- }
- if (source.getName().endsWith(".p12"))
- kpc.setFileType("PKCS12");
- else
- kpc.setFileType("JKS");
- kpc.setCredentialName(aliasEntry);
- kpc.setUnlockPassword(unlockPassword);
- checkError(run.security().credentials()
- .postXmlAsOctetStream(kpc, ClientResponse.class));
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/uk/org/taverna/server/client/Status.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/uk/org/taverna/server/client/Status.java b/taverna-server-client/src/main/java/uk/org/taverna/server/client/Status.java
deleted file mode 100644
index c318e04..0000000
--- a/taverna-server-client/src/main/java/uk/org/taverna/server/client/Status.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package uk.org.taverna.server.client;
-/*
- * 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.
- */
-
-/**
- * States of a workflow run. They are {@link #Initialized Initialized},
- * {@link #Operating Operating}, {@link #Stopped Stopped}, and
- * {@link #Finished Finished}. Conceptually, there is also a
- * <tt>Destroyed</tt> state, but the workflow run does not exist (and hence
- * can't have its state queried or set) in that case.
- *
- * @author Donal Fellows
- */
-public enum Status {
- /**
- * The workflow run has been created, but is not yet running. The run
- * will need to be manually moved to {@link #Operating Operating} when
- * ready.
- */
- Initialized,
- /**
- * The workflow run is going, reading input, generating output, etc.
- * Will eventually either move automatically to {@link #Finished
- * Finished} or can be moved manually to {@link #Stopped Stopped} (where
- * supported).
- */
- Operating,
- /**
- * The workflow run is paused, and will need to be moved back to
- * {@link #Operating Operating} manually.
- */
- Stopped,
- /**
- * The workflow run has ceased; data files will continue to exist until
- * the run is destroyed (which may be manual or automatic).
- */
- Finished
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java b/taverna-server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java
deleted file mode 100644
index 40b7045..0000000
--- a/taverna-server-client/src/main/java/uk/org/taverna/server/client/TavernaServer.java
+++ /dev/null
@@ -1,144 +0,0 @@
-package uk.org.taverna.server.client;
-/*
- * 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.
- */
-
-import static java.nio.file.Files.readAllBytes;
-import static org.taverna.server.client.wadl.TavernaServer.createClient;
-import static org.taverna.server.client.wadl.TavernaServer.root;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.taverna.server.client.wadl.TavernaServer.Root;
-
-import uk.org.taverna.server.client.generic.Capability;
-import uk.org.taverna.server.client.generic.TavernaRun;
-import uk.org.taverna.server.client.generic.VersionedElement;
-
-import com.sun.jersey.api.client.Client;
-import com.sun.jersey.api.client.ClientResponse;
-import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter;
-
-public class TavernaServer extends Connected {
- final Root root;
- private final URI location;
- private final boolean authenticated;
-
- TavernaServer(URI serviceRoot) {
- root = root(createClient(), location = serviceRoot);
- authenticated = false;
- }
-
- TavernaServer(URI serviceRoot, String username, String password) {
- Client client = createClient();
- client.addFilter(new HTTPBasicAuthFilter(username, password));
- authenticated = true;
- root = root(client, location = serviceRoot);
- }
-
- TavernaServer(TavernaServer service, String username, String password) {
- Client client = createClient();
- client.addFilter(new HTTPBasicAuthFilter(username, password));
- authenticated = true;
- root = root(client, location = service.location);
- getServerVersionInfo();
- }
-
- public TavernaServer upgradeToAuth(String username, String password) {
- if (authenticated)
- throw new IllegalStateException("may only upgrade an unauthenticated connection");
- return new TavernaServer(this, username, password);
- }
-
- public List<Capability> getCapabilities() {
- return root.policy().capabilities().getAsCapabilitiesXml()
- .getCapability();
- }
-
- public int getRunLimit() {
- return root.policy().runLimit().getAsTextPlain(Integer.class);
- }
-
- public int getOperatingLimit() {
- return root.policy().operatingLimit().getAsTextPlain(Integer.class);
- }
-
- public List<String> getPermittedWorkflows() {
- return root.policy().permittedWorkflows().getAsPermittedWorkflowsXml()
- .getWorkflow();
- }
-
- public List<Run> getExistingRuns() {
- List<Run> runs = new ArrayList<>();
- for (TavernaRun run : root.runs().getAsRunListXml().getRun())
- runs.add(new Run(this, run.getValue()));
- return runs;
- }
-
- public VersionedElement getServerVersionInfo() {
- return root.getAsServerDescriptionXml();
- }
-
- private Run response2run(ClientResponse response) throws ClientException, ServerException {
- checkError(response);
- if (response.getClientResponseStatus().getStatusCode() == 201) {
- String[] path = response.getLocation().getPath().split("/");
- return new Run(this, path[path.length - 1]);
- }
- return null;
- }
-
- public Run createWorkflowRun(byte[] t2flowBytes) throws ClientException, ServerException {
- return response2run(root.runs().postVndTavernaT2flowXmlAsOctetStream(
- t2flowBytes, ClientResponse.class));
- }
-
- public Run createWorkflowRun(File t2flowFile) throws IOException, ClientException, ServerException {
- return createWorkflowRun(readAllBytes(t2flowFile.toPath()));
- }
-
- public Run createWorkflowRun(URI t2flowUri) throws ClientException, ServerException {
- return response2run(root.runs().postTextUriListAsOctetStream(
- t2flowUri.toString(), ClientResponse.class));
- }
-
-
- public static class ClientException extends Exception {
- private static final long serialVersionUID = 1L;
-
- ClientException(String msg, Throwable cause) {
- super(msg, cause);
- }
- }
- public static class AuthorizationException extends ClientException {
- private static final long serialVersionUID = 1L;
-
- AuthorizationException(String msg, Throwable cause) {
- super(msg, cause);
- }
- }
- static class ServerException extends Exception {
- private static final long serialVersionUID = 1L;
-
- ServerException(String msg, Throwable cause) {
- super(msg, cause);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/uk/org/taverna/server/client/TavernaServerConnectionFactory.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/uk/org/taverna/server/client/TavernaServerConnectionFactory.java b/taverna-server-client/src/main/java/uk/org/taverna/server/client/TavernaServerConnectionFactory.java
deleted file mode 100644
index f11485d..0000000
--- a/taverna-server-client/src/main/java/uk/org/taverna/server/client/TavernaServerConnectionFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package uk.org.taverna.server.client;
-/*
- * 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.
- */
-
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-
-public class TavernaServerConnectionFactory {
- private Map<URI, TavernaServer> cache = new HashMap<>();
-
- public synchronized TavernaServer connectNoAuth(URI uri) {
- TavernaServer conn = cache.get(uri);
- if (conn == null)
- cache.put(uri, conn = new TavernaServer(uri));
- return conn;
- }
-
- public TavernaServer connectAuth(URI uri, String username, String password) {
- TavernaServer conn = new TavernaServer(uri, username, password);
- // Force a check of the credentials by getting the server version
- conn.getServerVersionInfo();
- return conn;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/348fe7f5/taverna-server-client/src/main/java/uk/org/taverna/server/client/package-info.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/uk/org/taverna/server/client/package-info.java b/taverna-server-client/src/main/java/uk/org/taverna/server/client/package-info.java
deleted file mode 100644
index 92837b6..0000000
--- a/taverna-server-client/src/main/java/uk/org/taverna/server/client/package-info.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Implementation of a basic client for Taverna Server.
- * @author Donal Fellows
- */
-package uk.org.taverna.server.client;
-/*
- * 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.
- */
[3/9] incubator-taverna-server git commit: Package name
org.apache.taverna.server.client.xml.*
Posted by st...@apache.org.
Package name org.apache.taverna.server.client.xml.*
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/58c6d3f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/58c6d3f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/58c6d3f8
Branch: refs/heads/master
Commit: 58c6d3f83d5134156a599953cf5e9afbe0ee4058
Parents: 7b4939b
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jan 4 12:08:31 2018 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jan 4 12:08:31 2018 +0000
----------------------------------------------------------------------
taverna-server-client/src/main/wadl/tavserv.wadl | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/58c6d3f8/taverna-server-client/src/main/wadl/tavserv.wadl
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/wadl/tavserv.wadl b/taverna-server-client/src/main/wadl/tavserv.wadl
index 68bba2f..b59c693 100644
--- a/taverna-server-client/src/main/wadl/tavserv.wadl
+++ b/taverna-server-client/src/main/wadl/tavserv.wadl
@@ -20,7 +20,7 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<grammars>
- <xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
+ <xs:schema
xmlns:admin="http://ns.taverna.org.uk/2010/xml/server/admin/"
xmlns:feed="http://ns.taverna.org.uk/2010/xml/server/feed/"
xmlns:port="http://ns.taverna.org.uk/2010/port/" xmlns:tns="http://ns.taverna.org.uk/2010/xml/server/rest/"
@@ -32,7 +32,7 @@ limitations under the License.
<xs:annotation>
<xs:appinfo>
<jxb:schemaBindings>
- <jxb:package name="uk.org.taverna.server.client.rest" />
+ <jxb:package name="org.apache.taverna.server.client.xml.rest" />
</jxb:schemaBindings>
</xs:appinfo>
</xs:annotation>
@@ -374,13 +374,13 @@ limitations under the License.
<xs:attribute name="owner" type="xs:string" />
<xs:attribute name="type" type="xs:string" />
</xs:schema>
-<xs:schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1999/xlink" attributeFormDefault="unqualified"
elementFormDefault="unqualified" targetNamespace="http://www.w3.org/1999/xlink"
jxb:version="2.1">
<xs:attribute name="href" type="xs:string" />
</xs:schema>
-<xs:schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema"
+<xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:port="http://ns.taverna.org.uk/2010/port/"
xmlns:run="http://ns.taverna.org.uk/2010/run/" xmlns:tns="http://ns.taverna.org.uk/2010/port/"
xmlns:xlink="http://www.w3.org/1999/xlink" attributeFormDefault="qualified"
@@ -389,7 +389,7 @@ limitations under the License.
<xs:annotation>
<xs:appinfo>
<jxb:schemaBindings>
- <jxb:package name="uk.org.taverna.server.client.generic.port" />
+ <jxb:package name="org.apache.taverna.server.client.xml.port" />
</jxb:schemaBindings>
</xs:appinfo>
</xs:annotation>
@@ -503,7 +503,7 @@ limitations under the License.
<xs:attribute name="workflowRun" type="xs:anyURI" />
<xs:attribute name="workflowRunId" type="xs:string" />
</xs:schema>
-<xs:schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:admin="http://ns.taverna.org.uk/2010/xml/server/admin/"
xmlns:feed="http://ns.taverna.org.uk/2010/xml/server/feed/" xmlns:tns="http://ns.taverna.org.uk/2010/xml/server/"
xmlns:ts="http://ns.taverna.org.uk/2010/xml/server/" xmlns:ts-rest="http://ns.taverna.org.uk/2010/xml/server/rest/"
@@ -514,7 +514,7 @@ limitations under the License.
<xs:annotation>
<xs:appinfo>
<jxb:schemaBindings>
- <jxb:package name="uk.org.taverna.server.client.generic" />
+ <jxb:package name="org.apache.taverna.server.client.xml" />
</jxb:schemaBindings>
</xs:appinfo>
</xs:annotation>
[9/9] incubator-taverna-server git commit: (At least some) Javadoc
Posted by st...@apache.org.
(At least some) Javadoc
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/e593ab8e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/e593ab8e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/e593ab8e
Branch: refs/heads/master
Commit: e593ab8ea202a1ed1a2156e9b6c14748392d5776
Parents: 885940f
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jan 4 14:59:11 2018 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jan 4 14:59:11 2018 +0000
----------------------------------------------------------------------
.../taverna/server/client/TavernaServer.java | 71 +++++++++++++++++---
.../client/TavernaServerConnectionFactory.java | 29 ++++++++
2 files changed, 89 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/e593ab8e/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServer.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServer.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServer.java
index 0cb8e6a..932347c 100644
--- a/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServer.java
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServer.java
@@ -35,6 +35,20 @@ import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter;
+/**
+ * Client connection to a Taverna Server.
+ * <p>
+ * To construct a {@link TavernaServer}, use
+ * {@link TavernaServerConnectionFactory}.
+ * <p>
+ * This class provides the general information from the server, e.g.
+ * {@link #getCapabilities()} and {@link #getPermittedWorkflows()}.
+ * <p>
+ * Use {@link #getExistingRuns()} to list existing {@link Run}s, or use
+ * {@link #createWorkflowRun(File)} and friends to create a new run.
+ *
+ * @see TavernaServerConnectionFactory
+ */
public class TavernaServer extends Connected {
final Root root;
private final URI location;
@@ -67,8 +81,7 @@ public class TavernaServer extends Connected {
}
public List<Capability> getCapabilities() {
- return root.policy().capabilities().getAsCapabilitiesXml()
- .getCapability();
+ return root.policy().capabilities().getAsCapabilitiesXml().getCapability();
}
public int getRunLimit() {
@@ -80,8 +93,7 @@ public class TavernaServer extends Connected {
}
public List<String> getPermittedWorkflows() {
- return root.policy().permittedWorkflows().getAsPermittedWorkflowsXml()
- .getWorkflow();
+ return root.policy().permittedWorkflows().getAsPermittedWorkflowsXml().getWorkflow();
}
public List<Run> getExistingRuns() {
@@ -104,21 +116,56 @@ public class TavernaServer extends Connected {
return null;
}
+ /**
+ * Create a new Run by uploading the bytes of a t2flow workflow definition.
+ * <p>
+ * The returned {@link Run} be configured (e.g. with
+ * {@link Run#setInput(String, String)}) before invoking it
+ * with {@link Run#start()}.
+ *
+ * @param t2flowBytes Content of workflow definition file to upload, should be in the format <code>application/vnd.taverna.t2flow+xml</code>
+ * @return A {@link Run} that is {@link Status#Initialized}
+ * @throws ClientException If client configuration failed, e.g. AuthorizationException
+ * @throws ServerException If the server refuses upload (e.g. because only {@link #getPermittedWorkflows()} are allowed)
+ */
public Run createWorkflowRun(byte[] t2flowBytes) throws ClientException, ServerException {
- return response2run(root.runs().postVndTavernaT2flowXmlAsOctetStream(
- t2flowBytes, ClientResponse.class));
- }
-
+ return response2run(root.runs().postVndTavernaT2flowXmlAsOctetStream(t2flowBytes, ClientResponse.class));
+ }
+
+ /**
+ * Create a new Run by uploading a local t2flow workflow definition File.
+ * <p>
+ * The returned {@link Run} be configured (e.g. with
+ * {@link Run#setInput(String, String)}) before invoking it
+ * with {@link Run#start()}.
+ *
+ * @param t2flowFile File of workflow to upload, typically with the extension <code>.t2flow</code>
+ * @return A {@link Run} that is {@link Status#Initialized}
+ * @throws IOException If the file can't be read or a network error occurs
+ * @throws ClientException If client configuration failed, e.g. AuthorizationException
+ * @throws ServerException If the server refuses upload (e.g. because only {@link #getPermittedWorkflows()} are allowed)
+ */
public Run createWorkflowRun(File t2flowFile) throws IOException, ClientException, ServerException {
return createWorkflowRun(readAllBytes(t2flowFile.toPath()));
}
+ /**
+ * Create a new Run by referencing an external t2flow workflow definition URI.
+ * <p>
+ * The returned {@link Run} be configured (e.g. with
+ * {@link Run#setInput(String, String)}) before invoking it
+ * with {@link Run#start()}.
+ *
+ * @param t2flowUri URI of workflow to run, should have content-type <code>application/vnd.taverna.t2flow+xml</code>
+ * @return A {@link Run} that is {@link Status#Initialized}
+ * @throws ClientException If client configuration failed, e.g. AuthorizationException
+ * @throws ServerException If the server refuses the URI (e.g. it could not be retrieved)
+ */
+
public Run createWorkflowRun(URI t2flowUri) throws ClientException, ServerException {
- return response2run(root.runs().postTextUriListAsOctetStream(
- t2flowUri.toString(), ClientResponse.class));
+ return response2run(root.runs().postTextUriListAsOctetStream(t2flowUri.toString(), ClientResponse.class));
}
-
public static class ClientException extends Exception {
private static final long serialVersionUID = 1L;
@@ -126,6 +173,7 @@ public class TavernaServer extends Connected {
super(msg, cause);
}
}
+
public static class AuthorizationException extends ClientException {
private static final long serialVersionUID = 1L;
@@ -133,6 +181,7 @@ public class TavernaServer extends Connected {
super(msg, cause);
}
}
+
static class ServerException extends Exception {
private static final long serialVersionUID = 1L;
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/e593ab8e/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServerConnectionFactory.java
----------------------------------------------------------------------
diff --git a/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServerConnectionFactory.java b/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServerConnectionFactory.java
index 1d1bf9d..4d876aa 100644
--- a/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServerConnectionFactory.java
+++ b/taverna-server-client/src/main/java/org/apache/taverna/server/client/TavernaServerConnectionFactory.java
@@ -20,9 +20,28 @@ import java.net.URI;
import java.util.HashMap;
import java.util.Map;
+/**
+ * Connect to a Taverna Server.
+ * <p>
+ * To create a connected {@link TavernaServer} instance,use
+ * {@link #connectNoAuth(URI)} for anonymous connection, or
+ * {@link #connectAuth(URI, String, String)}) for authenticated access.
+ *
+ */
public class TavernaServerConnectionFactory {
private Map<URI, TavernaServer> cache = new HashMap<>();
+ /**
+ * Connect to the Taverna Server without authentication.
+ * <p>
+ * The connection will be anonymous, but can later be made authenticated using
+ * {@link TavernaServer#upgradeToAuth(String, String)}.
+ *
+ * @param uri
+ * URI of Taverna Server REST endpoint, e.g.
+ * <code>http://localhost:8080/taverna-server/rest</code>
+ * @return A configured {@link TavernaServer} instance
+ */
public synchronized TavernaServer connectNoAuth(URI uri) {
TavernaServer conn = cache.get(uri);
if (conn == null)
@@ -30,6 +49,16 @@ public class TavernaServerConnectionFactory {
return conn;
}
+ /**
+ * Connect to the Taverna Server with the given authentication.
+ *
+ * @param uri
+ * URI of Taverna Server REST endpoint, e.g.
+ * <code>http://localhost:8080/taverna-server/rest</code>
+ * @param username Username
+ * @param password Password
+ * @return A configured {@link TavernaServer} instance
+ */
public TavernaServer connectAuth(URI uri, String username, String password) {
TavernaServer conn = new TavernaServer(uri, username, password);
// Force a check of the credentials by getting the server version
[2/9] incubator-taverna-server git commit: Reformat: XML indentation
in WADL definition
Posted by st...@apache.org.
Reformat: XML indentation in WADL definition
Also renamed some prefixes
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/commit/7b4939b2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/tree/7b4939b2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/diff/7b4939b2
Branch: refs/heads/master
Commit: 7b4939b2dd8c90a785af6d8d3cb440bcb03dd399
Parents: 7f145e2
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Thu Jan 4 11:59:26 2018 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Thu Jan 4 12:01:37 2018 +0000
----------------------------------------------------------------------
.../src/main/wadl/tavserv.wadl | 1640 +++++++++++++++---
1 file changed, 1434 insertions(+), 206 deletions(-)
----------------------------------------------------------------------