wiki:RpResDescription

Resource Description

The Resource Description is essential for your Resources published in SENSEI domains. Based on the Resource Description Resource Users will lookup available Resources so that it is important you provide sufficient information about the Resources you have published.

The basic elements of Resource Descriptions are:

Resource ID: is a unique identifier you assign to your Resource. The IPv6 address is an appropriate identifier for instance.

Name: an arbitrary name that describes your Resource

Tag: tags are optional, it is used to provide key words for search engines

RAI-Description: a RAI description shows the Resource Users how to access your Resource in order to retrieve its values. A Resource can expose several RAI interfaces for the same Resource. There could be a REST interface and an interface for SOAP web services. To distinguish between different RAI interfaces the RAI-ID is required. The REP-Locator determines the path to the Resource the Resource User's request is sent to. A WADL description of the RAI interface can be retrieved on the Document-Link. An example Resource Description for a Telos B light sensor deployed in the domain 'sensinode.com' in Finland as used in the sample project is shown below:

<?xml version="1.0"?>
<!DOCTYPE Resources [
 <!ENTITY eui64 "fa80-0342-001a-4201"> 
 <!ENTITY ipaddress "gateway.sensinode.com">
 <!ENTITY domain "sensinode.com">
 <!ENTITY wsan "Vuokatti">
 <!ENTITY nodeid "node1">
 ]>
<Resources xsi:noNamespaceSchemaLocation="ResourceDescription.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 	<Resource-Description>
		<Resource-ID>urn:sensei:&domain;:Telosb:light:&eui64;</Resource-ID>
		<Name>Light sensor</Name>
	  	<Tag>urn:sensei:wsan:&wsan;</Tag>
	  	<Tag>urn:sensei:node:&eui64;</Tag>
		<RAI-Description>
			<RAI-ID>0</RAI-ID>
			<REP-Locator>http://&ipaddress;/&nodeid;/s/light</REP-Locator>
			<Document-Link>urn:sensei:rai:sensor</Document-Link>
		</RAI-Description>
	</Resource-Description>
</Resources>

See the Java REP resource publication interface for more information on publishing a resource description to a Resource Directory.

Last modified 13 years ago Last modified on Nov 4, 2010, 7:48:07 AM