Package Search/Design

From openSUSE

< Package Search(Redirected from PKGSearch-design)

N.B. This project has been superseded by the Software_Portal Project.

Web Service Interface

Do a simple search for a search term in both package name and contents:

 GET Search/Simple/<distribution>/<searchterm>
 GET Search/Simple/<distribution>/<searchterm>?number=<numberofresults>&page=<pagenumber>

Do a search in only package names:

 GET Search/ByName/<distribution>/<searchterm>
 GET Search/ByName/<distribution>/<searchterm>?number=<numberofresults>&page=<pagenumber>

Do a search in only package contents:

 GET Search/ByContents/<distribution>/<searchterm>   
 GET Search/ByContents/<distribution>/<searchterm>?number=<numberofresults>&page=<pagenumber>

Get the file list for specified package:

 GET Package/Contents/<distribution>/<package checksum>

Get the summary and description information for specified package:

 GET Package/Info/<distribution>/<package checksum>

Get all the indexed repositories:

 GET Repos/<distribution>

Get indexed repositories matching a search term:

 GET Repos/<distribution>/<searchterm>

Get a MetaPackage for installing the specified package automatically:

 GET YMPs/<distribution>/<checksum>

Schemas

Search Result:

 <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='http://ws.pkgsearch.benjiweber.co.uk' xmlns:bw='http://ws.pkgsearch.benjiweber.co.uk'>
 	<xs:complexType name="package">
 		<xs:sequence>
 			<xs:element name="name" type="xs:string"/>
 			<xs:element name="version" type="xs:string"/>
 			<xs:element name="repoURL" type="xs:string"/>
 			<xs:element name="archs">
 				<xs:complexType>
 					<xs:sequence>
 						<xs:element name="arch" minOccurs="1" maxOccurs="unbounded" type="xs:string"/>
 					</xs:sequence>
 				</xs:complexType>
 			</xs:element>
 			<xs:element name="distro" type="xs:string"/>
 			<xs:element name="priority" type="xs:integer"/>
 			<xs:element name="checksum" type="xs:string"/>
 			<xs:element name="matchedFileName" type="xs:string"/>
 		</xs:sequence>
 	</xs:complexType>
 	<xs:element name="packages">
 		<xs:complexType>
 			<xs:sequence>
 				<xs:element name="package" minOccurs="0" maxOccurs="unbounded" type="bw:package"/>  
 			</xs:sequence>
 		</xs:complexType>
 	</xs:element>
 </xs:schema>

Package information:

 <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='http://ws.pkgsearch.benjiweber.co.uk' xmlns:bw='http://ws.pkgsearch.benjiweber.co.uk'>
 	<xs:element name="packageInfo">
 		<xs:complexType>
 			<xs:sequence>
 				<xs:element name="name" type="xs:string"/>
 				<xs:element name="summary" type="xs:string"/>
 				<xs:element name="description" type="xs:string"/>
 			</xs:sequence>
 		</xs:complexType>
 	</xs:element>
 </xs:schema>

Package Contents:

 <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='http://ws.pkgsearch.benjiweber.co.uk' xmlns:bw='http://ws.pkgsearch.benjiweber.co.uk'>
 	<xs:element name="packageContents">
 		<xs:complexType>
 			<xs:sequence>
 				<xs:element name="name" type="xs:string"/>
 				<xs:element name="file" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
 			</xs:sequence>
 		</xs:complexType>
 	</xs:element>
 </xs:schema>

Repos:

 <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='http://datastructures.pkgsearch.benjiweber.co.uk' xmlns:bw='http://datastructures.pkgsearch.benjiweber.co.uk'>
 	<xs:complexType name="repo">
 		<xs:sequence>
 			<xs:element name="url" type="xs:string"/>
 		</xs:sequence>
 	</xs:complexType>
 	<xs:element name="repos">
 		<xs:complexType>
 			<xs:sequence>
 				<xs:element name="repo" minOccurs="0" maxOccurs="unbounded" type="bw:repo"/>
 			</xs:sequence>
 		</xs:complexType>
 	</xs:element>
 </xs:schema>

YMP:

 <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='http://suse.benjiweber.co.uk' xmlns:bw='http://suse.benjiweber.co.uk'>
 	<xs:complexType name="package">
 		<xs:sequence>
 			<xs:element name="name" type="xs:string"/>
 			<xs:element name="summary" type="xs:string"/>
 			<xs:element name="description" type="xs:string"/>
 		</xs:sequence>
 		<xs:attribute name="recommended" type="xs:boolean"/>
 	</xs:complexType>
 	<xs:complexType name="repo">
 		<xs:sequence>
 			<xs:element name="name" type="xs:string"/>
 			<xs:element name="summary" type="xs:string"/>
 			<xs:element name="description" type="xs:string"/>
 			<xs:element name="url" type="xs:string"/>
 		</xs:sequence>
 		<xs:attribute name="recommended" type="xs:boolean"/>
 	</xs:complexType>
 	<xs:element name="metapackage">
 		<xs:complexType>
 			<xs:sequence>
 				<xs:element name="repos">
 					<xs:complexType>
 						<xs:sequence>
 							<xs:element name="repo" minOccurs="0" maxOccurs="unbounded" type="bw:repo"/>
 						</xs:sequence>
 					</xs:complexType>
 				</xs:element>
 				<xs:element name="packages">
 					<xs:complexType>
 						<xs:sequence>
 							<xs:element name="package" minOccurs="0" maxOccurs="unbounded" type="bw:package"/>
 						</xs:sequence>
 					</xs:complexType>
 				</xs:element>
 			</xs:sequence>
 		</xs:complexType>
 	</xs:element>
 </xs:schema>

Diagrams

Image:PKGSearchDesign1.png

Image:PKGSearchDesign2.png

Image:PKGSearchDesign3.png