skip navigation
URC Consortium Logo

You are here: MyURC.org > Tools & Prototypes > UCHj > tutorial > How to add Local Resource to UCH

How to Add local resource to UCH

How to Add Local Resource to UCH


Page Contents:


Local Resource Directory Location

The Local Resource Directory is located at: [TOMCAT_HOME]/webapps/UCH/resources.


Add Resource

STEPS:

NOTE : Details of Resource Types and their properties is available at: Resource Property Vocabulary 1.0 (DRAFT)



UCH Resource Configuration File (extension .ucf) Format

<?xml version="1.0" encoding="UTF-8"?>
<props>
   <prop>
      <name>Property Name</name>
      <value>Property Value</value>
   </prop>
</props>

Whereby:



Sample TDM UCF file

Below is a sample UCF file for an offline TDM:

<?xml version="1.0" encoding="UTF-8"?>
<props>
   <prop>
      <name>http://myurc.org/ns/res#name</name>
      <value>http://res.myurc.org/upnp/tdm/java</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#dynamicLibClass</name>
      <value>edu.wisc.trace.uch.tdm.upnp.UpnpTDM</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#type</name>
      <value>http://myurc.org/restypes#tdm</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#platform</name>
      <value>java</value>
   </prop>
   <prop>
      <name>http://purl.org/dc/elements/1.1/title</name>
      <value>UPnP-TDM</value>
   </prop>
   <prop>
      <name>http://purl.org/dc/terms/modified</name>
      <value>2008-11-15T00:00:00Z</value>
   </prop>
   <prop>
      <name>http://purl.org/dc/terms/conformsTo</name>
      <value>http://myurc.org/TR/uch1.0-20091103/</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#mimeType</name>
      <value>application/java-archive</value>
   </prop>
   <prop> <!-- Relative path of resource file or directory -->
      <name>http://myurc.org/ns/res#resourceUri</name>
      <value>upnptdm.jar</value>
   </prop>
</props>

Sample TA UCF file

Below is a sample UCF file for an offline TA:

<?xml version="1.0" encoding="UTF-8"?>
<props>
   <prop>
      <name>http://myurc.org/ns/res#name</name>
      <value>http://res.myurc.org/upnp/av/ta/java</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#deviceType</name>
      <value>urn:schemas-upnp-org:device:ues:1</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#dynamicLibClass</name>
      <value>edu.wisc.trace.uch.ta.upnpav.UpnpAvTAFacade</value>
   </prop>
   <prop>
      <name>http://purl.org/dc/terms/conformsTo</name>
      <value>http://myurc.org/TR/uch1.0-20091103/</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#mimeType</name>
      <value>application/java-archive</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#platform</name>
      <value>java</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#type</name>
      <value>http://myurc.org/restypes#ta</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#devicePlatform</name>
      <value>UPnP</value>
   </prop>
   <prop> <!-- Whether subscribe mediaremerer's AV Transport Service -->
      <name>http://res.myurc.org/ta/upnp-av#eventSubscription</name>
      <value>no</value>
   </prop>
   <prop> <!-- Time-interval(in seconds) between two consecutive call on media renderer for getting updated values. -->
      <name>http://res.myurc.org/ta/upnp-av#pollingRate</name>
      <value>1</value>
   </prop>
   <prop> <!-- Time-interval(in seconds) between two pictures in case of playing picture slide show -->
      <name>http://res.myurc.org/ta/upnp-av#frameDelay</name>
      <value>5</value>
   </prop>
   <prop> <!-- Relative path of Target Description File to docRoot -->
      <name>http://myurc.org/ns/res#tdUri</name>
      <value>upnpav/UpnpEntertainmentSystem.td</value>
   </prop>
   <prop> <!-- Relative path of resource file or directory -->
      <name>http://myurc.org/ns/res#resourceUri</name>
      <value>upnpavta.jar</value>
   </prop>
</props>

Sample UIPM UCF file

Below is a sample UCF file for an offline UIPM:

<?xml version="1.0" encoding="UTF-8"?>
<props>
   <prop>
      <name>http://myurc.org/ns/res#name</name>
      <value>http://res.myurc.org/upnp/av/uipm/urchttp/java</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#dynamicLibClass</name>
      <value>edu.wisc.trace.uch.uipm.urchttp.UrcHttpUIPM</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#type</name>
      <value>http://myurc.org/restypes#uipm</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#platform</name>
      <value>java</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#devicePlatform</name>
      <value>*</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#protocolShortName</name>
      <value>URC-HTTP</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#urlBasePath</name>
      <value>/urchttp</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#urlPortNo</name>
      <value>80</value>
   </prop>
   <prop>
      <name>http://purl.org/dc/elements/1.1/title</name>
      <value>URC-HTTP UIPM</value>
   </prop>
   <prop><!-- Time-interval(in mili-seconds) between two consecutive call of getCompatibleUIs on IUIPMListener-->
      <name>http://res.myurc.org/uipm/urc-http#getCompatibleUIsInteval</name>
      <value>60000</value>
   </prop>
   <prop>
      <name>http://res.myurc.org/uipm/urc-http#tcpIpPortNo</name>
      <value>8888</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#forTargetName</name>
      <value>*</value>
   </prop>
   <prop>
      <name>http://purl.org/dc/terms/conformsTo</name>
      <value>http://myurc.org/TR/uch1.0-20091103/</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#mimeType</name>
      <value>application/java-archive</value>
   </prop>
   <prop> <!-- Relative path of resource file or directory -->
      <name>http://myurc.org/ns/res#resourceUri</name>
      <value>urchttpuipm.jar</value>
   </prop>
</props>

Sample Target Description (TD) UCF file

Below is a sample UCF file for an offline TD:

<?xml version="1.0" encoding="UTF-8"?>
<props>
   <prop>
      <name>http://myurc.org/ns/res#name</name>
      <value>http://res.myurc.org/upnp/av</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#mimeType</name>
      <value>application/urc-targetdesc+xml</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#forTargetName</name>
      <value>http://res.myurc.org/upnp/av</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#type</name>
      <value>http://myurc.org/restypes#targetdesc</value>
   </prop>
   <prop>
      <name>http://purl.org/dc/terms/conformsTo</name>
      <value>http://myurc.org/iso24752-4/2007</value>
   <prop> <!-- Relative path of resource file or directory -->
      <name>http://myurc.org/ns/res#resourceUri</name>
      <value>upnpav/UpnpEntertainmentSystem.td</value>
   </prop>
</props>


Sample Socket Description (UIS) UCF file

Below is a sample UCF file for an offline UIS:

<?xml version="1.0" encoding="UTF-8"?>
<props>
   <prop>
      <name>http://myurc.org/ns/res#name</name>
      <value>http://res.myurc.org/devices/dvd/uisocketdesc/template/dvd.uis</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#mimeType</name>
      <value>application/urc-uisocketdesc+xml</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#forTargetName</name>
      <value>http://res.myurc.org/devices/dvd/targetdesc/template/dvd.td</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#type</name>
      <value>http://myurc.org/restypes#uisocketdesc</value>
   </prop>
   <prop>
      <name>http://purl.org/dc/terms/conformsTo</name>
      <value>http://myurc.org/iso24752-2/2007</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#forSocketName</name>
      <value>http://res.myurc.org/devices/dvd/uisocketdesc/template/dvd.uis</value>
   </prop>
   <prop> <!-- Relative path of resource file or directory -->
      <name>http://myurc.org/ns/res#resourceUri</name>
      <value>dvd.uis</value>
   </prop>
</props>


Sample Resource Sheet (RSHEET) UCF Properties

Below is a sample UCF file for an offline RSHEET:

<?xml version="1.0" encoding="UTF-8"?>
<props>
   <prop>
      <name>http://myurc.org/ns/res#name</name>
      <value>http://res.myurc.org/devices/dvd/ressheet/template/dvd.rsheet</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#type</name>
      <value>http://myurc.org/restypes#ressheet</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#aResDescForDomain</name>
      <value>http://res.myurc.org/devices/dvd/uisocketdesc/template/dvd.uis</value>
   </prop>
   <prop>
      <name>http://purl.org/dc/terms/conformsTo</name>
      <value>http://myurc.org/iso24752-5/2007</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#mimeType</name>
      <value>application/urc-ressheet+xml</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#forLang</name>
      <value>en</value>
   </prop>
   <prop> <!-- Relative path of resource file or directory -->
      <name>http://myurc.org/ns/res#resourceUri</name>
      <value>dvd.rsheet</value>
   </prop>
</props>


Sample IR Code UCF File

Below is a sample UCF file for an offline IR code file:

<?xml version="1.0" encoding="UTF-8"?>
<props>
   <prop>
      <name>http://myurc.org/ns/res#name</name>
      <value>http://res.myurc.org/devices/dvd/denon/prontocode/rc-1017.config</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#type</name>
      <value>http://myurc.org/TR/uch/#irconfig</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#deviceType</name>
      <value>http://myurc.org/devicetypes#dvdPlayer</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#deviceModelNumber</name>
      <value>1940CI</value>
   </prop>
   <prop>
      <name>http://myurc.org/ns/res#manufacturer</name>
      <value>DENON</value>
   </prop>
   <prop>
      <name>http://purl.org/dc/elements/1.1/creator</name>
      <value>Sandip Patel</value>
   </prop>
   <prop>
      <name>http://purl.org/dc/elements/1.1/description</name>
      <value>Denon-1940CI dvd's pronto code</value>
   </prop>
   <prop>
      <name>http://purl.org/dc/elements/1.1/title</name>
      <value>Denon-1940CI</value>
   </prop>
   <prop>
      <name>http://purl.org/dc/terms/modified</name>
      <value>2009-12-26T09:27:12.0Z</value>
   </prop>
   <prop> <!-- Relative path of resource file or directory -->
      <name>http://myurc.org/ns/res#resourceUri</name>
      <value>rc-1017.config</value>
   </prop>
</props>


Last update: Parikshit Thakur & Team, 2010-04-30

This site is maintained by the University of Wisconsin Trace Center, a member of the Universal Remote Console Consortium.