Changes between Version 4 and Version 5 of adeiService_search

Show
Ignore:
Author:
csa (IP: 141.52.232.84)
Timestamp:
09/11/09 04:34:46 (15 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • adeiService_search

    v4 v5  
    1717 * [wiki:adeiParam_experiment experiment ] - The current experiment/run duration 
    1818 * [wiki:adeiParam_window window] - Data Interval (everything by default) 
     19 ... 
    1920 
    2021== Returned Result == 
    2930  </module> 
    3031  ... 
     32</result> 
    3133}}} 
    3234The empty result is returned if nothing is found: 
    4143}}} 
    4244 
    43 The module results are returned by modules in two different forms: XML and HTML
     45The module results are returned by modules in two different forms: standard and custom
    4446 
    45 == XML Results == 
     47== Standard/XML Results == 
    4648The most modules are returning the results in the XML format. Each result is returned in ''Value'' XML node and all ''Value'' nodes are enclosed in the ''result'' node. The ''Value'' node includes several attributes: 
    4749 * ''title'' - describing the result 
    8385 
    8486 
    85 == HTML Results == 
     87== Custom/XHTML Results == 
     88Some search engines may provide non-standard set of results which can't be represented using default XML scheme. In this case the arbitrary XHTML content is returned within the ''Content'' tag inside a module results. 
     89Example: 
     90<result> 
     91  <module name="proxy"> 
     92     <Content>  
     93         ... arbitrary XHTML content is here ... 
     94     </Content> 
     95  </module> 
     96</result> 
     97 
     98The best example here is ''proxy'' search module which downloads XML document from the specified location and applying XSLT stylesheet to convert it into the XHTML. For example, the following request: 
     99{{{ 
     100ipepdvadei.ka.fzk.de/adei/services/search.php?search={proxy(xml=katrin.php?target=runs;xslt=katrinsearch;noprops)}%20interval:1218431322-1253472677 
     101}}} 
     102obtains the data from ''katrin.php'' service, applies the ''katrinsearch'' stylesheet to it and returns the resulting HTML.  
     103 
     104The parameters of proxy module specifies: 
     105 * ''xml'' - the service to obtain XML document from 
     106 * ''xslt'' - the stylesheet to apply to XML, could be omitted if service returns XHTML 
     107 * ''noprops'' - instructs ADEI to not add current properties when calling the service, otherwise the passsed ''db_server'', ''db_name'', and other properties would be added in the end of service request. 
     108 
     109The two properties are passed to the ''katrin.php'' service: 
     110 * ''target'' - it is specified directly within proxy module options (target=runs) 
     111 * ''window'' - it is specified in search limits at the end of search string (interval:1218431322-1253472677) 
     112 
     113The example of HTML returned: 
     114{{{ 
     115<result> 
     116  <module name="proxy"> 
     117     <Content>  
     118        <div> 
     119          <h4>Found runs:</h4> 
     120           <p> 
     121             <a href="javascript:katrin.SetCustomProperties('run=kps00000464')">Run kps00000464</a><br/> 
     122             2008-09-10 11:49:50 - 2008-09-10 11:52:52<br/> 
     123             <a href="javascript:katrin.SetCustomProperties('run=kps00000464.00001')">Subrun kps00000464.00001</a><br/> 
     124             ... 
     125     </Content> 
     126  </module> 
     127</result> 
     128}}}