FCS » History » Version 1
Redmine Admin, 01/04/2017 05:29 PM
1 | 1 | Redmine Admin | h1. FCS |
---|---|---|---|
2 | |||
3 | h2. Endpoints |
||
4 | |||
5 | Currently there are the following three endpoints at the production environment: |
||
6 | |||
7 | * *http://lindat.mff.cuni.cz/services/fcs-bonito* - endpoint for the Bonito corpus manager in Brno (MUNI) |
||
8 | * *http://lindat.mff.cuni.cz/services/fcs-kontext* - endpoint for the LINDAT KonText corpus manager (ÚFAL) |
||
9 | * *http://lindat.mff.cuni.cz/services/fcs* - alias for fcs-kontext |
||
10 | |||
11 | These endpoints are defined on the server lindat.mff.cuni.cz in /etc/apache2/ufal-proxies.conf |
||
12 | fcs-kontext endpoint forwards requests to kontext server on quest. |
||
13 | |||
14 | The testing environment has one endpoint, which is |
||
15 | |||
16 | * *http://ufal-point-dev.ms.mff.cuni.cz/services/fcs* |
||
17 | |||
18 | This endpoint forwards requests to kontext-dev server on quest. |
||
19 | |||
20 | h2. Introduction |
||
21 | |||
22 | h3. FCS |
||
23 | |||
24 | FCS (Federated Content Search) is a protocol built upon SRU/CQL (Search/Retrieve via URL / Contextual Query Language) protocol. See resources below. |
||
25 | FCS is a unified interface that should enable to build metasearch engines and retrieve and present data in unified format. |
||
26 | |||
27 | h3. Aggregator |
||
28 | |||
29 | Aggregator at the University od Tübingen is an example of metasearch engine built upon FCS protocol. |
||
30 | |||
31 | Aggregator has a web user interface here: http://weblicht.sfs.uni-tuebingen.de/Aggregator/ |
||
32 | |||
33 | At the moment, only the @fcs-bonito@ endpoint is being used. |
||
34 | |||
35 | h2. Implementation |
||
36 | |||
37 | h3. Interface |
||
38 | |||
39 | FCS endpoint is implemented in *KonText* source code as an single action named *fcs* in "lib/actions.py":https://redmine.ms.mff.cuni.cz/projects/lindat-services-kontext/repository/entry/lib/actions.py?rev=lindat-release-0.5.x. |
||
40 | This action is supported by XML rendering template in "templates/fcs.py":https://redmine.ms.mff.cuni.cz/projects/lindat-services-kontext/repository/entry/templates/fcs.tmpl?rev=lindat-release-0.5.x and XHTML rendering template in "templates/fcs2html.tmpl":https://redmine.ms.mff.cuni.cz/projects/lindat-services-kontext/repository/entry/templates/fcs2html.tmpl?rev=lindat-release-0.5.x. |
||
41 | |||
42 | FCS action handles all three possible operations: |
||
43 | |||
44 | * *scan* - lists the resources that can be searched by the endpoint |
||
45 | * *searchRetrieve* - returns the actual result of a search query as a set of hits (or KWICs - Key-Words-In-Context) |
||
46 | * *explain* - returns document that describes server's capabilities but is not implemented yet |
||
47 | |||
48 | The code in @lib/actions.py@ implements only the interface layer for the operations above. I.e. it checks the correctness of parameters and throws appropriate exceptions. |
||
49 | |||
50 | h3. Operations |
||
51 | |||
52 | The actual operations are performed by calling the following methods in @lib/conclib.py@ |
||
53 | |||
54 | * def *fcs_search*(corpus, fcs_query, max_rec, start) |
||
55 | * def *fcs_scan*(corpus, scan_query, max_ter, start) |
||
56 | |||
57 | Where corpus is actually a tuple of corpus handle and corpus name. |
||
58 | |||
59 | The methods above in turn call the lower level manatee libraries. |
||
60 | |||
61 | h3. Templates |
||
62 | |||
63 | Templates are implemented in Cheetah (see http://www.cheetahtemplate.org/learn.html), which is python powered templating engine. |
||
64 | Any changes to templates requires recompilation of templates which can be performed by running grunt from the top level directory: |
||
65 | |||
66 | <pre> |
||
67 | ./node_modules/.bin/grunt |
||
68 | </pre> |
||
69 | |||
70 | |||
71 | h3. Additional information |
||
72 | |||
73 | There is another piece of code in @lib/conccgi.py@ |
||
74 | |||
75 | <pre> |
||
76 | def _requires_corpus_access(self, action): |
||
77 | return action not in ('login', 'loginx', 'logoutx', 'fcs', 'fcs2html', 'corplist') |
||
78 | </pre> |
||
79 | |||
80 | which basically tells what actions are callable without specifying corpus and verifying access privileges to that corpus. |
||
81 | |||
82 | h2. Resources |
||
83 | |||
84 | * http://www.clarin.eu/content/federated-content-search-clarin-fcs - Overview |
||
85 | * https://trac.clarin.eu/wiki/FCS - Federated Content Search wiki, specifications and drafts |
||
86 | * http://www.clarin.eu/sites/default/files/Schonefeld_FCS_Specification_and_Software_Components_0.pdf - FCS presentation |
||
87 | |||
88 | * http://www.loc.gov/standards/sru/cql/spec.html - CQL specification |
||
89 | * http://www.loc.gov/standards/sru/sru-1-2.html - SRU 1.2 (current version 2.0) specification |
||
90 | |||
91 | * http://weblicht.sfs.uni-tuebingen.de/Aggregator/ - Aggregator (FCS metasearch engine) |
||
92 | |||
93 | * http://clarin.ids-mannheim.de/srutest/app/ - CLARIN-FCS endpoint conformance tester can be used to check compliance with the specification |