<?xml version="1.0" encoding="utf-8"?>

<resource schema="dc" resdir="wirr">

	<!--
	!  ===================
	!  Service Description
	!  ===================
	!-->

	<meta name="title">Web UI to the VO Relational Registry</meta>
	<meta name="creationDate">2014-02-16T22:40:00Z</meta>
	<meta name="description" format="plain">A web interface for browsing the
		relational registry to retrieve data collections and services in the
		Virtual Observatory.</meta>
	<meta name="creator.name">Demleitner, M.; Rothmaier, F.</meta>

	<meta name="subject">virtual-observatories</meta>

	<meta name="_longdoc" format="rst"><![CDATA[
		The Web Interface to the Relational Registry (WIRR) allows for browsing
		the relational registry to retrieve data collections and services in the
		Virtual Observatory.

		It aims at providing a powerful and user-friendly query interface making
		a knowledge of SQL/ADQL dispensable.

		WIRR is capable to interoperate with other VO applications by using the
		Simple Application Messaging Protocol (SAMP).
	]]></meta>
	<meta name="contact.name">Markus Demleitner</meta>
	<meta name="contact.email">msdemlei@ari.uni-heidelberg.de</meta>


	<!--
	!  ==================
	!  Service Definition
	!  ==================
	!-->

	<service id="ui" allowed="fixed, static, custom" defaultRenderer="fixed"
			customPage="bin/dbadapter">
		<property name="staticData">static</property>
		<meta name="shortName">WIRR</meta>
		<meta name="title">WIRR VO Registry</meta>
		<nullCore/>
		<template key="fixed">res/main.html</template>
		<publish render="fixed" sets="local, ivo_managed"></publish>
	</service>
	
	<regSuite title="DaCHS regression">
		<regTest title="JS is minified">
			<url>ui/static/wirr.js</url>
			<code>
				self.assertHasStrings('strict";const PAGE_SIZE=100;const JSONROOT')
			</code>
		</regTest>

		<regTest title="WIRR query endpoint returns proper json">
			<url field1="ivorn" operator1="=" operand1="org.gavo.dc/tap"
				MAXREC="20" OFFSET="0">ui/custom/parameterQuery</url>
			<code>
				self.assertHasStrings("[{", 
					'"ivoid": "ivo://org.gavo.dc/tap"',
					'"res_title": "GAVO Data Center TAP service"')
			</code>
		</regTest>

		<regTest title="WIRR query for contact looks about right">
			<url ivoid="ivo://org.gavo.dc/tap">ui/custom/responsibilityQuery</url>
			<code>
				self.assertHasStrings('"status": "ok"',
					'"content": [{',
					'"telephone": "++49 6221 54 1837"')
			</code>
		</regTest>
	</regSuite>
</resource>
