http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/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 new file mode 100644 index 0000000..2ba8fbe --- /dev/null +++ b/taverna-server-client/src/main/wadl/tavserv.wadl @@ -0,0 +1,591 @@ +<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"> +<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:annotation> + <xs:appinfo> + <jxb:schemaBindings> + <jxb:package name="uk.org.taverna.server.client.rest" /> + </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:element name="capabilities"> + <xs:complexType> + <xs:sequence> + <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="enabledNotificationFabrics"> + <xs:complexType> + <xs:sequence> + <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="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: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="permittedListeners"> + <xs:complexType> + <xs:sequence> + <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:sequence> + </xs:complexType> + </xs:element> + <xs:element name="policyDescription"> + <xs:complexType> + <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:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + <xs:element name="properties"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="ts:VersionedElement"> + <xs:sequence> + <xs:element maxOccurs="unbounded" minOccurs="0" name="property" type="ts-rest:PropertyDescription"/> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + <xs:element name="runDescription"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="ts:VersionedElement"> + <xs:sequence> + <xs:element minOccurs="0" name="expiry"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:string"> + <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="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: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:sequence> + <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="runList"> + <xs:complexType> + <xs:sequence> + <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="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: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:complexType name="InputDescription"> + <xs:complexContent> + <xs:extension base="ts:VersionedElement"> + <xs:sequence> + <xs:choice minOccurs="0"> + <xs:element name="file"> + <xs:complexType> + <xs:simpleContent> + <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:simpleContent> + </xs:complexType> + </xs:element> + <xs:element name="value"> + <xs:complexType> + <xs:simpleContent> + <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:extension> + </xs:complexContent> + </xs:complexType> + <xs:simpleType name="InputContents"> + <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="properties"> + <xs:complexType> + <xs:sequence> + <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: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:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="TavernaRunInputs"> + <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: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: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:choice> + </xs:sequence> + </xs:complexType> + <xs:complexType name="FilesystemCreationOperation"> + <xs:simpleContent> + <xs:extension base="xs:base64Binary"> + <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:simpleContent> + </xs:complexType> + <xs:complexType name="UploadFile"> + <xs:simpleContent> + <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:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="linkedPermissionDescription"> + <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:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType final="extension restriction" name="trustList"> + <xs:complexContent> + <xs:extension base="ts:VersionedElement"> + <xs:sequence> + <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: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: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:sequence> + <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:sequence> + <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:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="ListenerDefinition"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <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: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: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> + <jxb:package name="uk.org.taverna.server.client.generic.port" /> + </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:complexType name="outputDescription"> + <xs:complexContent> + <xs:extension base="port:PortDescription"> + <xs:sequence> + <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: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: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: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:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType abstract="true" name="Value"> + <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:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="ListValue"> + <xs:complexContent> + <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:choice> + </xs:sequence> + <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:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="inputDescription"> + <xs:complexContent> + <xs:extension base="port:PortDescription"> + <xs:sequence> + <xs:element maxOccurs="unbounded" minOccurs="0" name="input" type="port:InputPort"/> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="InputPort"> + <xs:complexContent> + <xs:extension base="port:Port"> + <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: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:annotation> + <xs:appinfo> + <jxb:schemaBindings> + <jxb:package name="uk.org.taverna.server.client.generic" /> + </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:complexType abstract="true" name="VersionedElement"> + <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:complexType> + <xs:complexType name="Capability"> + <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: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:sequence> + <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:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="DirectoryEntry"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <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:simpleContent> + </xs:complexType> + <xs:complexType name="FileReference"> + <xs:simpleContent> + <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"/> + </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:sequence> + <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: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
http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-distribution/pom.xml ---------------------------------------------------------------------- diff --git a/taverna-server-distribution/pom.xml b/taverna-server-distribution/pom.xml new file mode 100644 index 0000000..8939dbf --- /dev/null +++ b/taverna-server-distribution/pom.xml @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.taverna.server</groupId> + <artifactId>taverna-server</artifactId> + <version>3.1.0-incubating-SNAPSHOT</version> + </parent> + <artifactId>taverna-server-distribution</artifactId> + <name>Apache Taverna Server Distribution Packaging</name> + <packaging>pom</packaging> + + <dependencies> + <dependency> + <groupId>${project.parent.version}</groupId> + <artifactId>taverna-server-webapp</artifactId> + <version>${project.parent.version}</version> + <type>war</type> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <finalName>TavernaServer-${project.parent.version}</finalName> + <descriptors> + <descriptor>src/assemble/dist.xml</descriptor> + </descriptors> + </configuration> + <executions> + <execution> + <id>make-t2server-distribution</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <executions> + <execution> + <id>default</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <executions> + <execution> + <id>default</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-project-info-reports-plugin</artifactId> + <version>2.4</version> + <reportSets> + <reportSet> + <reports> + <!-- Only generate the index, nothing else. --> + <report>index</report> + </reports> + </reportSet> + </reportSets> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.8</version> + <reportSets> + <reportSet /> + </reportSets> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-changelog-plugin</artifactId> + <version>2.2</version> + <reportSets> + <reportSet /> + </reportSets> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-changes-plugin</artifactId> + <version>2.6</version> + <reportSets> + <reportSet /> + </reportSets> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>2.7</version> + <reportSets> + <reportSet /> + </reportSets> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-pmd-plugin</artifactId> + <version>2.5</version> + <reportSets> + <reportSet /> + </reportSets> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-report-plugin</artifactId> + <version>2.9</version> + <reportSets> + <reportSet /> + </reportSets> + </plugin> + </plugins> + </reporting> +</project> http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-distribution/src/assemble/dist.xml ---------------------------------------------------------------------- diff --git a/taverna-server-distribution/src/assemble/dist.xml b/taverna-server-distribution/src/assemble/dist.xml new file mode 100644 index 0000000..a77883c --- /dev/null +++ b/taverna-server-distribution/src/assemble/dist.xml @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="UTF-8"?> +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> + <id>distribution</id> + <formats> + <format>zip</format> + </formats> +<!-- + <dependencySets> + <dependencySet> + <useTransitiveDependencies>false</useTransitiveDependencies> + <useProjectArtifact>false</useProjectArtifact> + <unpack>false</unpack> + <scope>runtime</scope> + <fileMode>0644</fileMode> + </dependencySet> + </dependencySets> + <fileSets> + <fileSet> + <includes> + <include>*.html</include> + <include>*.xml</include> + <include>*.txt</include> + <include>*.pdf</include> + </includes> + <excludes> + <exclude>pom.xml</exclude> + </excludes> + </fileSet> + </fileSets> +--> + <fileSets> + <fileSet> + <directory>${project.parent.basedir}</directory> + <includes> + <include>*.xml</include> + <include>*.txt</include> + <include>*.pdf</include> + </includes> + <excludes> + <exclude>pom.xml</exclude> + </excludes> + <fileMode>0644</fileMode> + <outputDirectory>.</outputDirectory> + </fileSet> + <fileSet> + <directory>${project.parent.basedir}/server-webapp/target</directory> + <includes> + <include>*.war</include> + </includes> + <outputDirectory>.</outputDirectory> + <fileMode>0644</fileMode> + </fileSet> + </fileSets> +<!-- + <moduleSets> + <moduleSet> + <includes> + <include>uk.org.taverna.server:server</include> + </includes> + <sources> + <fileSets> + <fileSet> + <includes> + <include>*.html</include> + <include>*.txt</include> + </includes> + </fileSet> + </fileSets> + </sources> + </moduleSet> + <moduleSet> + <includes> + <include>uk.org.taverna.server:server-webapp</include> + </includes> + <binaries /> + </moduleSet> + </moduleSets> +--> +</assembly> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-execution-delegate/pom.xml ---------------------------------------------------------------------- diff --git a/taverna-server-execution-delegate/pom.xml b/taverna-server-execution-delegate/pom.xml new file mode 100644 index 0000000..59c8aff --- /dev/null +++ b/taverna-server-execution-delegate/pom.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.taverna.server</groupId> + <artifactId>taverna-server</artifactId> + <version>3.1.0-incubating-SNAPSHOT</version> + </parent> + <artifactId>taverna-server-execution-delegate</artifactId> + <packaging>bundle</packaging> + <name>Apache Taverna Server Reporting Probe</name> + <dependencies> + <dependency> + <groupId>org.apache.taverna.engine</groupId> + <artifactId>taverna-execution-api</artifactId> + <version>${taverna.engine.version}</version> + <type>bundle</type> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + </dependencies> +</project> http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-execution-delegate/src/main/java/org/taverna/server/execution_delegate/ExecutionDelegate.java ---------------------------------------------------------------------- diff --git a/taverna-server-execution-delegate/src/main/java/org/taverna/server/execution_delegate/ExecutionDelegate.java b/taverna-server-execution-delegate/src/main/java/org/taverna/server/execution_delegate/ExecutionDelegate.java new file mode 100644 index 0000000..7ea9998 --- /dev/null +++ b/taverna-server-execution-delegate/src/main/java/org/taverna/server/execution_delegate/ExecutionDelegate.java @@ -0,0 +1,172 @@ +package org.taverna.server.execution_delegate; + +import java.net.URI; +import java.rmi.RemoteException; +import java.rmi.server.UnicastRemoteObject; +import java.util.ArrayList; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.Map; + +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; + +import org.taverna.server.execution_delegate.RemoteExecution.ProcessorReportDocument.Property; + +import uk.org.taverna.platform.data.api.Data; +import uk.org.taverna.platform.data.api.DataLocation; +import uk.org.taverna.platform.execution.api.Execution; +import uk.org.taverna.platform.report.ActivityReport; +import uk.org.taverna.platform.report.ProcessorReport; +import uk.org.taverna.platform.report.StatusReport; +import uk.org.taverna.platform.report.WorkflowReport; +import uk.org.taverna.scufl2.api.common.AbstractNamed; + +public class ExecutionDelegate extends UnicastRemoteObject implements + RemoteExecution { + private Execution delegated; + private DatatypeFactory dtf; + + public ExecutionDelegate(Execution execution) throws RemoteException, + DatatypeConfigurationException { + super(); + delegated = execution; + dtf = DatatypeFactory.newInstance(); + } + + @Override + public String getID() { + return delegated.getID(); + } + + @Override + public void delete() { + delegated.delete(); + } + + @Override + public void start() { + delegated.start(); + } + + @Override + public void pause() { + delegated.pause(); + } + + @Override + public void resume() { + delegated.resume(); + } + + @Override + public void cancel() { + delegated.cancel(); + } + + private XMLGregorianCalendar date(Date d) { + if (d == null) + return null; + GregorianCalendar c = new GregorianCalendar(); + c.setTime(d); + return dtf.newXMLGregorianCalendar(c); + } + + private <R extends ReportDocument, T extends AbstractNamed> R init( + R snapshot, StatusReport<T, ?, ?> report) { + snapshot.created = date(report.getCreatedDate()); + snapshot.completed = date(report.getCompletedDate()); + snapshot.cancelled = date(report.getCancelledDate()); + snapshot.failed = date(report.getFailedDate()); + snapshot.started = date(report.getStartedDate()); + for (Date d : report.getPausedDates()) + snapshot.paused.add(date(d)); + for (Date d : report.getResumedDates()) + snapshot.resumed.add(date(d)); + snapshot.subject = report.getSubject().getName(); + snapshot.state = report.getState().toString(); + return snapshot; + } + + private WorkflowReportDocument getReport(WorkflowReport report) { + WorkflowReportDocument snapshot = init(new WorkflowReportDocument(), + report); + for (ProcessorReport pr : report.getChildReports()) + snapshot.processor.add(getReport(pr)); + initMap(snapshot.inputs, report.getInputs()); + initMap(snapshot.outputs, report.getOutputs()); + return snapshot; + } + + private void initMap(ArrayList<PortMapping> snapshot, Map<String, ?> report) { + for (String port : report.keySet()) + snapshot.add(data(port, report.get(port))); + } + + private static final String DEFAULT_PROPERTY_STRING = ""; + + private PortMapping data(String name, Object o) { + String loc; + if (o instanceof DataLocation) { + DataLocation d = (DataLocation) o; + loc = d.getDataServiceURI() + "#" + d.getDataID(); + } else { + Data d = (Data) o; + loc = null; + if (d.hasReferences()) { + try { + loc = d.getReferences().iterator().next().getURI() + .toString(); + } catch (Exception e) { + } + } + if (loc == null) { + DataLocation dl = d.getDataService().getDataLocation(d); + loc = dl.getDataServiceURI() + "#" + dl.getDataID(); + } + } + return new PortMapping(name, URI.create(loc)); + } + + private ProcessorReportDocument getReport(ProcessorReport report) { + ProcessorReportDocument snapshot = init(new ProcessorReportDocument(), + report); + for (ActivityReport pr : report.getChildReports()) + snapshot.activity.add(getReport(pr)); + snapshot.jobsQueued = report.getJobsStarted(); + snapshot.jobsStarted = report.getJobsStarted(); + snapshot.jobsCompleted = report.getJobsCompleted(); + snapshot.jobsErrored = report.getJobsCompletedWithErrors(); + for (String key : report.getPropertyKeys()) { + Object value = report.getProperty(key); + if (value instanceof String || value instanceof Number) + snapshot.properties.add(new Property(key, value.toString())); + else + snapshot.properties.add(new Property(key, + DEFAULT_PROPERTY_STRING)); + } + return snapshot; + } + + private ActivityReportDocument getReport(ActivityReport report) { + ActivityReportDocument snapshot = init(new ActivityReportDocument(), + report); + for (WorkflowReport pr : report.getChildReports()) + snapshot.workflow.add(getReport(pr)); + initMap(snapshot.inputs, report.getInputs()); + initMap(snapshot.outputs, report.getOutputs()); + return snapshot; + } + + @Override + public WorkflowReportDocument getWorkflowReport() { + return getReport(delegated.getWorkflowReport()); + } +} + +// ExecutionDelegate.java:[96,2] +// initMap(java.util.ArrayList<org.taverna.server.execution_delegate.RemoteExecution.PortMapping>,java.util.Map<java.lang.String,uk.org.taverna.platform.data.api.Data>) +// in org.taverna.server.execution_delegate.ExecutionDelegate cannot be applied +// to +// (java.util.ArrayList<org.taverna.server.execution_delegate.RemoteExecution.PortMapping>,java.util.Map<java.lang.String,uk.org.taverna.platform.data.api.DataLocation>) http://git-wip-us.apache.org/repos/asf/incubator-taverna-server/blob/2c71f9a9/taverna-server-execution-delegate/src/main/java/org/taverna/server/execution_delegate/RemoteExecution.java ---------------------------------------------------------------------- diff --git a/taverna-server-execution-delegate/src/main/java/org/taverna/server/execution_delegate/RemoteExecution.java b/taverna-server-execution-delegate/src/main/java/org/taverna/server/execution_delegate/RemoteExecution.java new file mode 100644 index 0000000..b8510df --- /dev/null +++ b/taverna-server-execution-delegate/src/main/java/org/taverna/server/execution_delegate/RemoteExecution.java @@ -0,0 +1,188 @@ +package org.taverna.server.execution_delegate; + +import static javax.xml.bind.annotation.XmlAccessType.NONE; + +import java.net.URI; +import java.rmi.Remote; +import java.rmi.RemoteException; +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.datatype.XMLGregorianCalendar; + +/** + * Interface for a single execution of a Taverna workflow in a remote process. + * + * @author David Withers + */ +public interface RemoteExecution extends Remote { + + /** + * Returns the identifier for this execution. + * + * @return the identifier for this execution + */ + String getID() throws RemoteException; + + /** + * Returns the <code>WorkflowReport</code> for the execution. + * + * @return the <code>WorkflowReport</code> for the execution + */ + WorkflowReportDocument getWorkflowReport() throws RemoteException; + + /** + * Deletes the execution. + */ + void delete() throws RemoteException; + + /** + * Starts the execution. + */ + void start() throws RemoteException; + + /** + * Pauses the execution. + */ + void pause() throws RemoteException; + + /** + * Resumes a paused execution. + */ + void resume() throws RemoteException; + + /** + * Cancels the execution. + */ + void cancel() throws RemoteException; + + @XmlType(name = "Report", propOrder = { "state", "created", "started", + "completed", "failed", "cancelled", "paused", "resumed" }) + @XmlSeeAlso({ WorkflowReportDocument.class, ProcessorReportDocument.class, + ActivityReportDocument.class }) + @XmlAccessorType(NONE) + public static abstract class ReportDocument { + @XmlAttribute + public String subject; + @XmlElement + public String state; + @XmlElement(required = true) + @XmlSchemaType(name = "dateTime") + public XMLGregorianCalendar created; + @XmlElement + @XmlSchemaType(name = "dateTime") + public XMLGregorianCalendar started; + @XmlElement + @XmlSchemaType(name = "dateTime") + public XMLGregorianCalendar completed; + @XmlElement + @XmlSchemaType(name = "dateTime") + public XMLGregorianCalendar failed; + @XmlElement + @XmlSchemaType(name = "dateTime") + public XMLGregorianCalendar cancelled; + @XmlElement + @XmlSchemaType(name = "dateTime") + public List<XMLGregorianCalendar> paused; + @XmlElement + @XmlSchemaType(name = "dateTime") + public List<XMLGregorianCalendar> resumed; + } + + @XmlType(name = "WorkflowReport", propOrder = { "processor", "inputs", + "outputs" }) + @XmlRootElement(name = "workflowReport") + @XmlAccessorType(NONE) + public static class WorkflowReportDocument extends ReportDocument { + @XmlElement(name = "processor") + public ArrayList<ProcessorReportDocument> processor = new ArrayList<ProcessorReportDocument>(); + @XmlElement(name = "input") + public ArrayList<PortMapping> inputs = new ArrayList<PortMapping>(); + @XmlElement(name = "output") + public ArrayList<PortMapping> outputs = new ArrayList<PortMapping>(); + } + + @XmlType(name = "ProcessorReport", propOrder = { "jobsQueued", + "jobsStarted", "jobsCompleted", "jobsErrored", "properties", + "activity" }) + @XmlAccessorType(NONE) + public static class ProcessorReportDocument extends ReportDocument { + @XmlElement(name = "jobsQueued", required = true) + public int jobsQueued; + @XmlElement(name = "jobsStarted", required = true) + public int jobsStarted; + @XmlElement(name = "jobsCompleted", required = true) + public int jobsCompleted; + @XmlElement(name = "jobsErrored", required = true) + public int jobsErrored; + @XmlElement(name = "property") + @XmlElementWrapper(name = "properties") + public ArrayList<Property> properties = new ArrayList<Property>(); + @XmlElement(name = "activity") + public ArrayList<ActivityReportDocument> activity = new ArrayList<ActivityReportDocument>(); + + @XmlType(name = "ProcessorProperty") + @XmlAccessorType(NONE) + public static class Property { + @XmlAttribute(name = "key", required = true) + String key; + @XmlValue + String value; + + public Property() { + } + + public String getKey() { + return key; + } + + public String getValue() { + return value; + } + + Property(String key, String value) { + this.key = key; + this.value = value; + } + } + } + + @XmlType(name = "ActivityReport", propOrder = { "workflow", "inputs", + "outputs" }) + @XmlAccessorType(NONE) + public static class ActivityReportDocument extends ReportDocument { + @XmlElement(name = "workflow") + public ArrayList<WorkflowReportDocument> workflow = new ArrayList<WorkflowReportDocument>(); + @XmlElement(name = "input") + public ArrayList<PortMapping> inputs = new ArrayList<PortMapping>(); + @XmlElement(name = "output") + public ArrayList<PortMapping> outputs = new ArrayList<PortMapping>(); + } + + @XmlType(name = "PortMapping") + @XmlAccessorType(NONE) + public static class PortMapping { + public PortMapping() { + } + + PortMapping(String port, URI data) { + this.name = port; + this.reference = data; + } + + @XmlAttribute(name = "name") + public String name; + @XmlAttribute(name = "ref") + @XmlSchemaType(name = "anyURI") + public URI reference; + } +}
