Changeset 28356

Show
Ignore:
Timestamp:
12/26/07 12:49:21 (1 year ago)
Author:
ddupraz
Message:

virtual navigation documentation updated

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/nuxeo-book/trunk/src/docbook/virtual-navigation/virtual-navigation.xml

    r27820 r28356  
    9595      <para>You have to create a vocabulary that will be used for the new 
    9696      Virtual Navigation, keep in mind that you can set up a multi-level 
    97       vocabulary, so you can imagine a vocabulary with parents and children. 
     97      vocabulary, so you can imagine a vocabulary with parent and children. 
    9898      Ther is no limitation on this side.</para> 
    9999 
     
    145145 
    146146 
    147 CONTENT OF THE SECOND FILE (indicate the children
     147CONTENT OF THE SECOND FILE (with a "parent" parameter added
    148148 
    149149<emphasis role="bold">id, label, parent, obsolete</emphasis> 
     
    183183 
    184184    <section> 
     185      <title>Set up a new Document Type for search purpose</title> 
     186 
     187      <para>The query based search service of Nuxeo 5 requires that you create 
     188      a document type that will be a base for a document model to register 
     189      data handeld by the query. To understand it more here is an example 
     190      :</para> 
     191 
     192      <para>You are browsing your documents by coverage. You are selecting the 
     193      path Europe/France in the tree. The data Europe/France is the base of 
     194      the query and need to be registered in a document model created from a 
     195      document type. In this case the document type can be very simple, cause 
     196      the query must register only one data at a time. Creating a document 
     197      type with only one schema that contains one field will be enough.</para> 
     198 
     199      <para>This document type will be referenced as <emphasis 
     200      role="bold">query document type</emphasis> in this walkthrough. Create 
     201      it and register it as a normal document type. See Nuxeo Book part 6 to 
     202      get more informations about document type creation.</para> 
     203    </section> 
     204 
     205    <section> 
    185206      <title>Set up new navigation tree</title> 
    186207 
     
    192213      <emphasis role="bold">virtualNavigation</emphasis> package.</para> 
    193214 
    194       <para>The new tree contribution needs many information, the <emphasis 
    195       role="bold">schema</emphasis> and the <emphasis role="bold">element of 
    196       the schema (field)</emphasis> that you will use to navigate through 
    197       documents,<emphasis role="bold"> a queryModel</emphasis> to indicate the 
    198       query you will use to get your documents, an <emphasis 
     215      <para>The new tree contribution needs many informations,<emphasis 
     216      role="bold"> a queryModel</emphasis> to indicate the query you will use 
     217      to get your documents, a <emphasis role="bold">schema</emphasis> and a 
     218      <emphasis role="bold">field</emphasis> coming from the query document 
     219      type you just set up in part 3, an <emphasis 
    199220      role="bold">outcome</emphasis> that indicates the page where documents 
    200221      will be displayed after the request and a list of vocabularies you can 
     
    223244 
    224245      <para>Now you need to contribute to 2 extension points that will set up 
    225       the request and the results provider. Here are the 2 extension point you 
     246      the query and the results provider. Here are the 2 extension point you 
    226247      will need to contribute. For a full example see the file <emphasis 
    227248      role="bold">querymodel-contrib.xml</emphasis> and <emphasis 
     
    230251 
    231252      <para>The query model contribution needs many information. In the 
     253      <emphasis role="bold">docType</emphasis> parameter you have to put the 
     254      name of the documentType you created in part 3. In the 
    232255      &lt;predicate&gt;&lt;/predicate&gt; tag you must set up the name of the 
    233       element (field) you will use to search for document. It is the same as 
    234       seen above. If there is no prefix set the name like this<emphasis 
     256      element (field) that is the field storing the data used for virtual tree 
     257      construction.</para> 
     258 
     259      <para>EXAMPLE :</para> 
     260 
     261      <para>You want to browse documents by coverage, each of your document 
     262      have a coverage registered in dc:coverage field. You have to use the 
     263      <emphasis role="bold">dc:coverage</emphasis> parameter.</para> 
     264 
     265      <para> If there is no prefix set the name like this<emphasis 
    235266      role="bold"> schema:field</emphasis>, if there is a prefix set it up 
    236267      like this <emphasis role="bold">prefix:field</emphasis>. In the operator 
    237268      param put the value STARTSWITH. In the &lt;field/&gt; tag put the schema 
    238       and the field again. The <emphasis role="bold">docType</emphasis> 
    239       parameter in the <emphasis 
    240       role="bold">&lt;queryModel&gt;&lt;/queryModel&gt;</emphasis> tag must 
    241       contain a registered document type that contain the schema you are using 
    242       now for the queryModel. For more details on document type please see the 
    243       Nuxeo-Book chapter 6.</para> 
     269      and the name of the field coming from the <emphasis role="bold">query 
     270      document type</emphasis> you set up in part 3.</para> 
    244271 
    245272      <para><example> 
     
    269296 
    270297      <para>Now you need to register a new indexing configuration in the 
    271       search service. You will index the field you are using since the 
    272       begining of this configuration. Here is the extension point you have to 
    273       contribute. For a full example see the <emphasis 
    274       role="bold">nxsearch-contrib.xml</emphasis> file in the <emphasis 
    275       role="bold">search-core</emphasis> package.</para> 
     298      search service. You will index the field that register the data you want 
     299      to apply the search on, it is the same data as saw at the end of part 5 
     300      . Here is the extension point you have to contribute. For a full example 
     301      see the <emphasis role="bold">nxsearch-contrib.xml</emphasis> file in 
     302      the <emphasis role="bold">search-core</emphasis> package.</para> 
    276303 
    277304      <para>You will have to create a new &lt;resource&gt;&lt;/resource&gt; 
    278305      tag if it doesn't exist for your schema. For the <emphasis 
    279       role="bold">name</emphasis> param you have to put the name of your 
     306      role="bold">name</emphasis> parameter you have to put the name of your 
    280307      schema, <emphasis role="bold">type</emphasis> param must be "schema" and 
    281308      <emphasis role="bold">indexAllFields</emphasis> param must be "true". In 
    282309      a &lt;field/&gt; tag you have to indicate the indexing strategy, the 
    283       <emphasis role="bold">type</emphasis> param must be "Path", if the field 
    284       that register your vocabulary is a complexType (many String for example) 
    285       you can add the parameter <emphasis role="bold">multiple</emphasis> and 
    286       set it at "true".</para> 
     310      <emphasis role="bold">type</emphasis> param must be "<emphasis 
     311      role="bold">Path</emphasis>", if the field that register your vocabulary 
     312      is a complexType (list of String for example) you can add the parameter 
     313      <emphasis role="bold">multiple</emphasis> and set it at "true".</para> 
    287314 
    288315      <para><example> 
     
    310337      role="bold">coverage_virtual_navigation.xml</emphasis> .</para> 
    311338 
    312       <para>All theme contributions and widget displaying already exist in 
    313       <emphasis role="bold">webapp-core</emphasis> and <emphasis 
    314       role="bold">virtualNavigation</emphasis> package, you can take a look if 
    315       you want to modify some parts.</para> 
     339      <para>All theme contributions and tree navigation widget already exist 
     340      in <emphasis role="bold">webapp-core</emphasis> and <emphasis 
     341      role="bold">virtualNavigation</emphasis> package, you can take a look 
     342      for information purpose.</para> 
    316343 
    317344      <para>Indeed you have to add vitualNavigation to Nuxeo 5 plugin if you 
    318       want a fully fonctional Virtual Navigation immediatly. All 
    319       configurations seen above can be done directly in existing files.</para> 
     345      want a fully fonctional Virtual Navigation immediatly.</para> 
    320346    </section> 
    321347  </section>