Master WSDL

From Gcube Wiki
Jump to: navigation, search


<?xml version="1.0" encoding="UTF-8"?>
<definitions name="Master"
	targetNamespace="http://gcube-system.org/namespaces/dir/master"
    xmlns:tns="http://gcube-system.org/namespaces/dir/master"
  	xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:wsdlpp="http://www.globus.org/namespaces/2004/10/WSDLPreprocessor"
    xmlns:wsrpw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
    xmlns:coretypes="http://gcube-system.org/namespaces/common/core/types"   
    xmlns:corefaults="http://gcube-system.org/namespaces/common/core/faults" 
    xmlns:provider="http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider">
 


	<import namespace="http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider" location="../gcube/common/core/providers/GCUBEProvider.wsdl"/>
    <import namespace="http://gcube-system.org/namespaces/common/core/faults" location="../gcube/common/core/faults/GCUBEFaults.wsdl"/> 


	<types>
		<xsd:schema targetNamespace="http://gcube-system.org/namespaces/dir/master">	
		
			<xsd:import namespace="http://gcube-system.org/namespaces/common/core/types" schemaLocation="../gcube/common/core/types/GCUBETypes.xsd"/>
				
			<xsd:element name="getCollectionIDs" type="coretypes:VOID" />
			<xsd:element name="getCollectionIDsResponse" type="coretypes:stringArray"/>
		
			<xsd:element name="addCollection" nillable="false" type="coretypes:OID" />
			<xsd:element name="addCollectionResponse" type="coretypes:VOID" />
			
			
			<!--  SELECTION I/O  -->

			<xsd:element name="select" nillable="false" type="tns:ISelectionParameters" />
			<xsd:element name="selectResponse" type="tns:ICollectionRanking" />
			
			
			<xsd:complexType name="ISelectionParameters">
				<xsd:sequence>
					<xsd:element name="query" nillable="false" type="tns:IQuery" minOccurs="1" maxOccurs="1"/>
					<xsd:element name="criterion" nillable="false" type="tns:ISelectionCriterion" minOccurs="1" maxOccurs="1"/>
				</xsd:sequence>			
			</xsd:complexType>

					
			<xsd:complexType name="ICollectionRanking">
				<xsd:sequence>
					<xsd:element name="ranks"  type="tns:ICollectionRank" minOccurs="0" maxOccurs="unbounded"/>
				</xsd:sequence>
			</xsd:complexType>
			
			<xsd:complexType name="ICollectionRank">
				<xsd:sequence>
					<xsd:element name="collectionID" type="coretypes:OID" minOccurs="1" maxOccurs="1"/>
					<xsd:element name="score" type="xsd:float" minOccurs="1" maxOccurs="1"/>
				</xsd:sequence>	
			</xsd:complexType>
			
			<xsd:complexType name="IExtendedCollectionRank">
				<xsd:complexContent>
					<xsd:extension base="tns:ICollectionRank">
						<xsd:sequence>
							<xsd:element name="resultEstimate" type="xsd:long" minOccurs="1" maxOccurs="1"/>
						</xsd:sequence>
					</xsd:extension>
				</xsd:complexContent>	
			</xsd:complexType>
			
			<!-- SELECTION CRITERIA -->
					
			<xsd:complexType name="ISelectionCriterion" />
			
			<xsd:complexType name="ITopNCriterion">
				<xsd:complexContent>
					<xsd:extension base="tns:ISelectionCriterion">
						<xsd:sequence>
							<xsd:element name="cutOff" type="xsd:int"  minOccurs="1" maxOccurs="1" />
						</xsd:sequence>
					</xsd:extension>		
				</xsd:complexContent>
			</xsd:complexType>
			
			<xsd:complexType name="IBestScoresCriterion">
				<xsd:complexContent>
					<xsd:extension base="tns:ISelectionCriterion">
						<xsd:sequence>
							<xsd:element name="threshold" type="xsd:float" minOccurs="1" maxOccurs="1" />
						</xsd:sequence>
					</xsd:extension>		
				</xsd:complexContent>
			</xsd:complexType>
			
			<xsd:complexType name="IResultDistributionCriterion">
				<xsd:complexContent>
					<xsd:extension base="tns:ISelectionCriterion">
						<xsd:sequence>
							<xsd:element name="numberOfResults" type="xsd:int" minOccurs="1" maxOccurs="1" />
						</xsd:sequence>
					</xsd:extension>		
				</xsd:complexContent>
			</xsd:complexType>
			
			<!-- FUSION I/O -->
			
			<xsd:element name="merge" nillable="false" type="tns:IFusionParameters" />
			<xsd:element name="mergeResponse" type="xsd:string" />
			
			<xsd:complexType name="IFusionParameters">
				<xsd:sequence>
					<xsd:element name="query" nillable="false" type ="tns:IQuery" minOccurs="1" maxOccurs="1" />
					<xsd:element name="RSEntries" nillable="false" type="tns:RSEntry" minOccurs="2" maxOccurs="unbounded"/>
					<xsd:element name="numberOfResults" nillable="false" type="xsd:int" minOccurs="1" maxOccurs="1" />
				</xsd:sequence>
			</xsd:complexType>
						
			<xsd:complexType name="RSEntry">
				<xsd:sequence>
					<xsd:element name="collectionID" nillable="false" type="xsd:string" minOccurs="1" maxOccurs="1"/>
					<xsd:element name="resultSetEPR" nillable="false" type="xsd:string" minOccurs="1" maxOccurs="1"/>
				</xsd:sequence>
			</xsd:complexType>
			
			
			<!-- QUERIES -->
	
			<xsd:complexType name="IQuery" />
			
			<xsd:complexType name="IDefaultQuery">
				<xsd:complexContent>
					<xsd:extension base="tns:IQuery">
						<xsd:sequence>
							<xsd:element name="terms" type="tns:IQueryTerm" minOccurs="1" maxOccurs="unbounded" />
						</xsd:sequence>
					</xsd:extension>		
				</xsd:complexContent>
			</xsd:complexType>
			
			<xsd:complexType name="IQueryTerm">
				<xsd:sequence>
					<xsd:element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
				</xsd:sequence>
			</xsd:complexType>
				
			<xsd:complexType name="IDefaultQueryTerm">
				<xsd:complexContent>
					<xsd:extension base="tns:IQueryTerm">
						<xsd:sequence>
							<xsd:element name="weight" type="xsd:float" minOccurs="1" maxOccurs="1"/>
						</xsd:sequence>
					</xsd:extension>		
				</xsd:complexContent>
			</xsd:complexType>
				
			<!-- RESOURCE PROPERTIES -->
			
			<xsd:element name="DIRMasterResourceProperties">
			<xsd:complexType>
				<xsd:sequence>
					<xsd:element name="CollectionIDs" type="coretypes:OID" minOccurs="1" maxOccurs="unbounded"/>
				</xsd:sequence>
			</xsd:complexType>
			</xsd:element> 	
	      
		</xsd:schema>
	</types>
	
	<message name="getCollectionIDsInputMessage">
		<part name="parameters" element="tns:getCollectionIDs"/>
	</message>
	<message name="getCollectionIDsOutputMessage">
		<part name="parameters" element="tns:getCollectionIDsResponse"/>
	</message>
	
	<message name="addCollectionInputMessage">
	<part name="parameters" element="tns:addCollection"/>
	</message>
	<message name="addCollectionOutputMessage">
		<part name="parameters" element="tns:addCollectionResponse"/>
	</message>
	
	<message name="selectInputMessage">
		<part name="parameters" element="tns:select"/>
	</message>
	<message name="selectOutputMessage">
		<part name="parameters" element="tns:selectResponse"/>
	</message>
	
	<message name="mergeInputMessage">
		<part name="parameters" element="tns:merge"/>
	</message>
	<message name="mergeOutputMessage">
		<part name="parameters" element="tns:mergeResponse"/>
	</message>
	
	<portType name="MasterPortType" 
	    wsdlpp:extends="provider:GCUBEProvider"
	    wsrpw:ResourceProperties="tns:DIRMasterResourceProperties">
		
		<operation name="getCollectionIDs">
			<documentation>Returns the identifiers of the collections in the bound set.</documentation>	
			<input message="tns:getCollectionIDsInputMessage"/>
			<output message="tns:getCollectionIDsOutputMessage"/>
			<fault name="fault" message="corefaults:GCUBEFaultMessage"></fault>
		</operation>
	
		<operation name="addCollection">
			<documentation>Adds a collection to the bound collection set.</documentation>
			<input message="tns:addCollectionInputMessage"/>
			<output message="tns:addCollectionOutputMessage"/>
			<fault name="fault" message="corefaults:GCUBEFaultMessage"></fault>
		</operation>
		
		<operation name="select">
			<documentation>
				Returns the list of RankEntries which results from selecting over the collections in the bound set
				with respect to a given quert and in accordance with given selection criteria.
			</documentation>
			<input message="tns:selectInputMessage"/>
			<output message="tns:selectOutputMessage"/>
			<fault name="fault" message="corefaults:GCUBEFaultMessage"></fault>
		</operation>
		
		<operation name="merge">
			<documentation>
				Returns the endpoint of a resultset obtained by merging the results produced by executing
				a given query against one more collections in the bound set.
			</documentation>
			<input message="tns:mergeInputMessage"/>
			<output message="tns:mergeOutputMessage"/>
			<fault name="fault" message="corefaults:GCUBEFaultMessage"></fault>
		</operation>
		

	
	</portType>

</definitions>