Project

General

Profile

Actions

FCS

Endpoints

Currently there are the following three endpoints at the production environment:

These endpoints are defined on the server lindat.mff.cuni.cz in /etc/apache2/ufal-proxies.conf
fcs-kontext endpoint forwards requests to kontext server on quest.

The testing environment has one endpoint, which is

This endpoint forwards requests to kontext-dev server on quest.

Introduction

FCS

FCS (Federated Content Search) is a protocol built upon SRU/CQL (Search/Retrieve via URL / Contextual Query Language) protocol. See resources below.
FCS is a unified interface that should enable to build metasearch engines and retrieve and present data in unified format.

Aggregator

Aggregator at the University od Tübingen is an example of metasearch engine built upon FCS protocol.

Aggregator has a web user interface here: http://weblicht.sfs.uni-tuebingen.de/Aggregator/

At the moment, only the fcs-bonito endpoint is being used.

Implementation

Interface

FCS endpoint is implemented in KonText source code as an single action named fcs in lib/actions.py.
This action is supported by XML rendering template in templates/fcs.py and XHTML rendering template in templates/fcs2html.tmpl.

FCS action handles all three possible operations:

  • scan - lists the resources that can be searched by the endpoint
  • searchRetrieve - returns the actual result of a search query as a set of hits (or KWICs - Key-Words-In-Context)
  • explain - returns document that describes server's capabilities but is not implemented yet

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.

Operations

The actual operations are performed by calling the following methods in lib/conclib.py

  • def fcs_search(corpus, fcs_query, max_rec, start)
  • def fcs_scan(corpus, scan_query, max_ter, start)

Where corpus is actually a tuple of corpus handle and corpus name.

The methods above in turn call the lower level manatee libraries.

Templates

Templates are implemented in Cheetah (see http://www.cheetahtemplate.org/learn.html), which is python powered templating engine.
Any changes to templates requires recompilation of templates which can be performed by running grunt from the top level directory:

./node_modules/.bin/grunt

Additional information

There is another piece of code in lib/conccgi.py

def _requires_corpus_access(self, action):
    return action not in ('login', 'loginx', 'logoutx', 'fcs', 'fcs2html', 'corplist')

which basically tells what actions are callable without specifying corpus and verifying access privileges to that corpus.

Resources

Updated by Redmine Admin almost 8 years ago · 1 revisions