Protocols

In addition to Linked Data, CLLD Apps implement various protocols to embed them firmly in the web fabric.

Sitemaps

view callables implementing the sitemap protocol.

clld.web.views.sitemap.resourcemap(req)[source]

Resource-specific JSON response listing all resource instances.

clld.web.views.sitemap.robots(req)[source]

robots.txt response listing the sitemaps.

clld.web.views.sitemap.sitemap(req)[source]

Resource-specific sitemap.

Note

The resource is looked up using the URL parameter rsc.

clld.web.views.sitemap.sitemapindex(req)[source]

Response listing resource-specific sitemaps.

OAI-PMH for OLAC

Support for the provider implementation of an OLAC OAI-PMH repository.

class clld.web.views.olac.Institution(name, url, location)
location

Alias for field number 2

name

Alias for field number 0

url

Alias for field number 1

class clld.web.views.olac.OlacConfig[source]

Configuration of an applications OLAC repository.

admin(req)[source]

Configure the archive participant with role admin.

Note: According to http://www.language-archives.org/OLAC/repositories.html the list of participants > must include the system administrator whose email address is given in the > <oai:adminEmail> element of the Identify response.

Parameters:

req – The current request.

Returns:

A suitable Participant instance or None.

class clld.web.views.olac.Participant(role, name, email)
email

Alias for field number 2

name

Alias for field number 1

role

Alias for field number 0

class clld.web.views.olac.ResumptionToken(url_arg=None, offset=None, from_=None, until=None)[source]

Represents an OAI-PMH resumption token.

We encode all information from a List query in the resumption token so that we do not actually have to keep track of sequences of requests (in the spirit of REST).

clld.web.views.olac.olac(req)[source]

View implementing the OLAC OAI-PMH repository protocol.

clld.web.views.olac.olac_with_cfg(req, cfg)[source]

Factory function for olac views with different configurations.

If applications want to disseminate metadata for other resources than languages this function can be used to provide a second olac repository.