[Yanel-commits] rev 48720 - public/yanel/trunk/src/realms/yanel-website/content/documentation/create-new-resource

memo at wyona.com memo at wyona.com
Mon Apr 12 14:53:49 CEST 2010


Author: memo
Date: 2010-04-12 14:53:49 +0200 (Mon, 12 Apr 2010)
New Revision: 48720

Modified:
   public/yanel/trunk/src/realms/yanel-website/content/documentation/create-new-resource/en.xhtml
Log:
docs for new resource creation updated

Modified: public/yanel/trunk/src/realms/yanel-website/content/documentation/create-new-resource/en.xhtml
===================================================================
--- public/yanel/trunk/src/realms/yanel-website/content/documentation/create-new-resource/en.xhtml	2010-04-12 11:54:52 UTC (rev 48719)
+++ public/yanel/trunk/src/realms/yanel-website/content/documentation/create-new-resource/en.xhtml	2010-04-12 12:53:49 UTC (rev 48720)
@@ -1,83 +1,69 @@
-<?xml version="1.0"?>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
-  <title>Create a new resource type from scratch</title>
-</head>
-
-
-<body>
-<h1>Create a new resource type from scratch</h1>
-<ul>
-	<li><h3>Run build Script</h3></li>
-	<ul>
-		<li>First we create an empty resource-type. For this type following build script in the console<br />
-			 <pre>    ./build.sh new-resource-type for Linux</pre>
-			 <pre>     build.bat new-resource-type for windows</pre>
-			 </li>
-			 <li>It will ask you for a name for your resource-type and type a name (e.g.: your-resource)</li>
-			<li>It asks you for a namespace for your resource. Insert a namespace:( e.g. http://yourname.org/yanel/resource/1.0)</li>
-			<li>Then give a short description for your resource-type</li>
-			<li>Now it asks you for a package name where java class of your resource type to be stored. Type a package e.g.
-				org.wyona.yanel.impl.resources.yourpackage</li>
-			<li>Enter a java class name of this resource-type (e.g.YourResource) </li>
-			<li>Now choose the template for your java class. Type any one of the following: (empty, xml, usecase, examples).</li>
-			<li>Then it will ask to implement some interfaces to your java class.Type yes to implement interfaces.</li>
-			<li>You will be asked for the different interfaces. Type yes for necessary interfaces. </li>
-			<li>Now the newly created resource is available in the following directory. $YANELHOME/src/contributions/resources </li>
-	</ul>
-			
-			<br/>
-			<h4>Your resource type directory contains the following:</h4>
-			<ul>
-				<li>./yanel-htdocs/doc/index.html</li>
-				<li>./yanel-htdocs/icons/scalable/rt-icon.svg</li>
-				<li>./yanel-htdocs/icons/32x32/rt-icon.png</li>
-				<li>./yanel-htdocs/icons/22x22/rt-icon.png</li>
-				<li>./yanel-htdocs/icons/16x16/rt-icon.png</li>
-				<li>./resource.xml</li>
-				<li>./build.xml</li>
-				<li>./src/build/dependencies.xml</li>
-				<li>./src/build/build.properties</li>
-				<li>./src/java/org/yourname/yanel/impl/resources/ YourResource.java</li>
-			</ul>
-	<li><h3>Register New Resource</h3></li>
-		<ul><li>Register your newly created resource to the local.resource-type.xml  ($YANELHOME/conf/local/local.resource-type.xml) by adding following line: </li></ul>
-		<pre>           &lt;resource-type src=&quot;@YANEL_SRC_DIR@/src/contributions/resources/your-resource/&quot; compile=&quot;true&quot;/&gt;</pre>
-		
-	<li><h3>Implement Functionality</h3></li>
-		<ul><li>Implement necessary functionality in the YourResource.java.</li></ul>
-
-	<li><h3>Rebuild Yanel</h3></li>
-		<ul><li>Rebuild the Yanel so that yanel can build our newly created resource-type also.</li>
-
-			<li>Please note that a resource type can also be built on its own
-				(e.g. ./build.sh -f src/resources/xml/build.xml), whereas one might has to
-				update the dependencies (e.g. src/resources/xml/src/build/dependencies.xml)</li></ul>
-
-	<li><h3>Restart Yanel</h3></li>
-		<ul><li>Type build script ./yanel.sh start for Linux or start-yanel.bat for Windows</li>
-			<li>Your new resource type should be listed now at http://127.0.0.1:8080/yanel/</li></ul>
-
-	<li><h3>Add Resource Type configuration</h3></li>
-		<ul><li>Yanel looks up
-			a configuration for a requested URL, to determine what resource-type to use.
-			This resource-type configuration files are located in the repository which is configured
-			as the rti (resource type identifier) repository in a realm.</li>
-
-			<li>(e.g $YANELHOME/src/realms/use-cases/yanel/rti/your-resource.html.yanel-rc)</li></ul>
-
-			<pre>
-				&lt;?xml version=&quot;1.0&quot;?&gt;&lt;yanel:resource-config xmlns:yanel=&quot;http://www.wyona.org/yanel/rti/1.0&quot;&gt;
-				&nbsp; &lt;yanel:rti name=&quot;hello-world&quot;namespace=&quot;http://yourname.org/yanel/resource/1.0&quot;/&gt;&lt;/yanel:resource-config&gt;</pre>
-
-	<li><h3>Browse Resource</h3></li>
-		<ul><li>You can view the newly created resource by browsing
-			http://localhost:8080/yanel/test/use-cases/your-resource.html. </li></ul>
-		</ul>
-
-</body>
+<?xml version="1.0"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <title>Create a new resource type from scratch</title>
+  </head>
+  <body>
+<h1>Create a new resource type from scratch</h1>
+<h2>Run build Script</h2>
+<ul>
+<li>First we create an empty resource-type. For this, use the build script in the console:<br />
+<blockquote><code>./build.sh new-resource-type</code> for Linux<br /> <code>build.bat new-resource-type</code> for windows</blockquote>
+</li>
+<li>It will ask you for a name for your resource-type and type a name (this should be all lower case and hyphen separated, e.g.: <code>my-resource</code>). This will also be the name of the directory where your resource will reside.</li>
+<li>Next, it will ask you for a namespace for your resource. Insert a namespace, e.g. <code>http://myproject.org/yanel/resource/1.0</code></li>
+<li>Then, give a short description for your resource-type</li>
+<li>Now, it will ask you for a package name for the java class of your resource type. Type a package name, e.g. <code>org.wyona.yanel.impl.resources.mypackage</code></li>
+<li>Enter a java class name of this resource-type, e.g. <code>MyNewResource</code> </li>
+<li>Now choose the template for your java class. Type any one of the following: {empty | xml | usecase | examples}.</li>
+<li>Then, you will be asked if you want to implement interfaces in your java class. Type <code>yes</code> to implement interfaces.</li>
+<li>You will be asked for the different interfaces. Type yes for necessary interfaces. </li>
+<li>Now the newly created resource is available in the directory <code>$YANELHOME/src/contributions/resources</code> </li>
+<li>Your resource type directory now contains the following items:       
+<ul>
+<li><code>./yanel-htdocs/doc/index.html</code></li>
+<li><code>./yanel-htdocs/icons/scalable/rt-icon.svg</code></li>
+<li><code>./yanel-htdocs/icons/32x32/rt-icon.png</code></li>
+<li><code>./yanel-htdocs/icons/22x22/rt-icon.png</code></li>
+<li><code>./yanel-htdocs/icons/16x16/rt-icon.png</code></li>
+<li><code>./resource.xml</code></li>
+<li><code>./build.xml</code></li>
+<li><code>./src/build/dependencies.xml</code></li>
+<li><code>./src/build/build.properties</code></li>
+<li><code>./src/java/org/myproject/yanel/impl/resources/MyNewResource.java</code></li>
+</ul>
+</li>
+</ul>
+<h2>Register New Resource</h2>
+<ul>
+<li>Register your newly created resource to the <code>local.resource-type.xml</code> (in <code>$YANELHOME/conf/local/local.resource-type.xml</code>) by adding the following line: </li>
+<pre>&lt;resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/your-resource/" compile="true"/&gt;</pre>
+</ul>
+<h2>Implement Functionality</h2>
+<ul>
+<li>Implement necessary functionality in the MyNewResource.java.</li>
+</ul>
+<h2>Rebuild Yanel</h2>
+<ul>
+<li>Rebuild Yanel so that yanel can build our newly created resource-type also.</li>
+<li>Please note that a resource type can also be built on its own (e.g. <code>./build.sh -f src/resources/xml/build.xml</code>), whereas one might have to update the dependencies (e.g. in <code>src/resources/xml/src/build/dependencies.xml</code>)</li>
+</ul>
+<h2>Restart Yanel</h2>
+<ul>
+<li>Type <code>./yanel.sh start</code> for Linux or <code>start-yanel.bat</code> for Windows</li>
+<li>Your new resource type should be listed now at http://127.0.0.1:8080/yanel/</li>
+</ul>
+<h2>Add Resource Type configuration</h2>
+<ul>
+<li>Yanel looks up the configuration for a requested URL, to determine what resource-type to use. The resource-type configuration files are located in the repository which is configured as the <em>rti</em> (resource type identifier) repository in a realm (e.g <code>$YANELHOME/src/realms/use-cases/yanel/rti/my-new-resource.html.yanel-rc)</code>.
+<pre>&lt;?xml version="1.0"?&gt;<br />&lt;yanel:resource-config xmlns:yanel="http://www.wyona.org/yanel/rti/1.0"&gt;<br />  &lt;yanel:rti name="hello-world" namespace="http://myproject.org/yanel/resource/1.0"/&gt;<br />&lt;/yanel:resource-config&gt;</pre>
+</li>
+</ul>
+<h2>Browse Resource</h2>
+<ul>
+<li>You can view the newly created resource by visiting <code>http://localhost:8080/yanel/test/use-cases/your-resource.html</code>. </li>
+</ul>
+</body>
 </html>
\ No newline at end of file



More information about the Yanel-commits mailing list