Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / mcr-test / WWW / Doc / User / resource.html
diff --git a/JMCR-Stable/mcr-test/WWW/Doc/User/resource.html b/JMCR-Stable/mcr-test/WWW/Doc/User/resource.html
new file mode 100644 (file)
index 0000000..ca3564b
--- /dev/null
@@ -0,0 +1,219 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> \r
+<HTML>\r
+<HEAD>\r
+    <link rel="stylesheet" type="text/css" href="../style/doc.css">\r
+    <TITLE>Resource configuration</TITLE>\r
+</HEAD>\r
+<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B"\r
+    ALINK="#FF0000">\r
+    <div class="icons-w3c">\r
+      <a href="../../../">\r
+       <img src="/Icons/w3c_home" \r
+         border="0" \r
+         alt="W3C logo"\r
+         height="48" \r
+         width="72">\r
+      </a>\r
+    </div>\r
+    <div class="icons-jigsaw">\r
+      <a href="../../">\r
+       <img src="/Icons/jigsaw" \r
+         border="0"\r
+         alt="Jigsaw"\r
+         height="49"\r
+         width="212">\r
+      </a>\r
+    </div>\r
+\r
+    <div class="title">\r
+      <H1 class="title">\r
+       Resource configuration\r
+      </H1>\r
+      <hr NOSHADE width="70%" align="left">\r
+      <a href="../../Overview.html">Jigsaw Home</a> /\r
+      <a href="../Overview.html">Documentation Overview</a> /\r
+      <a href="Tutorials.html">Tutorials</a>\r
+    </div>\r
+    <div class="body">\r
+<P>\r
+In this section, the new resource model of Jigsaw 2.0 will be presented,\r
+along with a tutorial on how to create and edit a resource in Jigsaw.\r
+<H1>\r
+  What is a resource?\r
+</H1>\r
+<P>\r
+A resource is the basic object served by Jigsaw. It encapsulate a "real"\r
+object like a file (text, image or whatever) or a generated content (by a\r
+cgi-script or a servlet). This object is accessible within the server according\r
+to its URL. To be able to serve this object, Jigsaw needs to know a protocol\r
+that can serve this object. All the informations about the resource are stored\r
+in "Frames". Those frames may be of different kinds: protocol frames, describing\r
+the way to serve this resource for a specific protocol (ex:\r
+<CODE>HTTPFrame</CODE>), or describing the resource itself (ex: a metada\r
+frame encoded in RDF). The combination of an HTTPFrame and a basic resource\r
+corresponds to the HTTPResource of the Jigsaw 1.0.\r
+<H1>\r
+  Description of a resource\r
+</H1>\r
+<P>\r
+Basically, there are not many things in the resource itself as all the\r
+information is stored in the frames. There are two kinds of resource, the\r
+containers and the leafs. A basic resource will only have the identifier\r
+and last-modified attributes. A container will have also an indexer attribute\r
+to select the <A HREF="indexers.html">indexer</A> used to index this the\r
+resources contained. There are extra attributes for:\r
+<DL>\r
+  <DT>\r
+    <CODE>org.w3c.jigsaw.resources.DirectoryResource</CODE>\r
+  <DD>\r
+    <DL>\r
+      <DT>\r
+       <CODE>extensible</CODE>\r
+      <DD>\r
+       If true, new resources can be created by the indexer.\r
+      <DT>\r
+       <CODE>negotiable</CODE>\r
+      <DD>\r
+       If true, Content-Negotiation is activated, it means that an image named "foo"\r
+       will match foo.png or foo.gif depending on the browser's preferences.\r
+    </DL>\r
+  <DT>\r
+    <CODE>org.w3c.tools.resources.FileResource</CODE>\r
+  <DD>\r
+    <DL>\r
+      <DT>\r
+       <CODE>filename</CODE>\r
+      <DD>\r
+       If set, gives the relative name of the real resource (default file name is\r
+       the identifier).\r
+    </DL>\r
+</DL>\r
+<H1>\r
+  Configuration of a resource\r
+</H1>\r
+<P>\r
+To configure a resource, you have to add frames and edit the attributes of\r
+this resource. If the resource is a container, you can also add resources\r
+to it.\r
+<H2>\r
+  Frames\r
+</H2>\r
+<P>\r
+Using <B>JigAdmin</B>, click on the resource in the tree, on the right part\r
+of the window, you will have some buttons (usually, two if the resource is\r
+a leaf, three if it is a container) located at the top. These button are\r
+used to select the helpers. To edit the frames, click on "frames" and the\r
+corresponding helper will appear below the button bar.\r
+<P>\r
+At the bottom of the window, a new tree browser will appear, containing the\r
+resource. if you open it, you will see all the frames attached to it. To\r
+add a new frame to the resource, click on the resource (highlight in a pinkish\r
+color) then click on "back to add frame menu", or, if you did not open the\r
+little tree, add directly the frame by selecting (or typing) the frame class.\r
+<P>\r
+To edit the attributes of a frame, just click on the frame, its own attribute\r
+helper will show up in the top part of the window.\r
+<P>\r
+A filter is now a frame of a protocol frame. If you want to add a CounterFilter\r
+to a HTTPFrame:\r
+<OL>\r
+  <LI>\r
+    Click on the resource\r
+  <LI>\r
+    select the frames helper\r
+  <LI>\r
+    open the resource in the little tree\r
+  <LI>\r
+    click on the HTTPFrame to edit it\r
+  <LI>\r
+    click on "back to add frame menu"\r
+  <LI>\r
+    select <CODE>org.w3c.jigsaw.filters.CounterFilter</CODE>\r
+  <LI>\r
+    click on Add Frame\r
+</OL>\r
+<P>\r
+Now you can click on the new filter added and edit its attributes.\r
+<H2>\r
+  Attributes\r
+</H2>\r
+<P>\r
+&nbsp;Using <B>JigAdmin</B>, click on the resource in the tree, then select\r
+the Attributes helper. You will then have, in the attributes helper, the\r
+descrition of attributes on the left hand size, and the editable fields on\r
+the right hand side. To understand the meaning of the attributes names for\r
+each resource, see the <A HREF="../Reference/">reference documentation</A>.\r
+For example, the meaning of the "negotiable" attribute of\r
+<CODE>org.w3c.jigsaw.resources.DirectoryResource</CODE> is:\r
+<P>\r
+  <HR>\r
+<CODE><A NAME="negotiable">negotiable</A></CODE>\r
+<DL>\r
+  <DT>\r
+    <I>semantics</I>\r
+  <DD>\r
+    Should the directory resource automatically create resource with\r
+    <A HREF="../Reference/org.w3c.jigsaw.frames.NegotiatedFrame.html">NegotiatedFrame</A>?\r
+    When this flag is turned to true, the directory resource will automatically\r
+    create negotiable frames on top of normal resources: each time a new resource\r
+    is added to the directory, the resource looks up for a resource having the\r
+    new child name, but possibly different extensions. If this succeeds, either\r
+    the found resource is already a negotiated resource, in which case the new\r
+    child is added as one of its variant resource; otherwise (the negotiated\r
+    resource doesn't exist), the directory resource creates it with only one\r
+    variant (the new child resource).\r
+  <DT>\r
+    <I>type</I>\r
+  <DD>\r
+    This attribute is an editable\r
+    <A HREF="http://jigsaw.w3.org/Doc/Programmer/api/org/w3c/tools/resources/BooleanAttribute.html">BooleanAttribute</A>\r
+  <DT>\r
+    <I>default value</I>\r
+  <DD>\r
+    This attribute defaults to <B>false</B>.\r
+</DL>\r
+<P>\r
+<P>\r
+  <HR>\r
+<P>\r
+There is also a specific tutorial on the <A HREF="attributes.html">edition\r
+of the attributes</A>.\r
+    </div> <!-- body -->\r
+    <div class="footer">\r
+<P>\r
+  <HR noshade>\r
+    <a href="mailto:jigsaw@w3.org">Jigsaw Team</a><br>\r
+    <span class="mini">\r
+      $Id: resource.html,v 1.1 2010/06/15 12:23:05 smhuang Exp $\r
+    </span>\r
+    <p class="policyfooter">\r
+      <font size=-1>\r
+       <a href="/Consortium/Legal/ipr-notice.html#Copyright">Copyright</a>\r
+       &copy; 1999 <a href="http://www.w3.org">W3C</a> \r
+       (<a href="http://www.lcs.mit.edu">MIT</a>, \r
+       <a href="http://www.inria.fr/">INRIA</a>, \r
+       <a href="http://www.keio.ac.jp/">Keio</a> ), \r
+       All Rights Reserved. W3C \r
+       <a href="/Consortium/Legal/ipr-notice.html#Legal Disclaimer">\r
+         liability,\r
+       </a>\r
+       <a href="/Consortium/Legal/ipr-notice.html#W3C Trademarks">\r
+         trademark\r
+       </a>, \r
+       <a href="/Consortium/Legal/copyright-documents.html">\r
+         document use \r
+       </a>\r
+       and\r
+       <a href="/Consortium/Legal/copyright-software.html">\r
+         software licensing\r
+       </a> rules apply. Your interactions with this site are in\r
+       accordance with our \r
+       <a href="/Consortium/Legal/privacy-statement.html#Public">\r
+         public\r
+       </a> and \r
+       <a href="/Consortium/Legal/privacy-statement.html#Members">\r
+         Member\r
+       </a>\r
+       privacy statements.</font>\r
+    </div>\r
+</BODY></HTML>\r