Skip to content
Snippets Groups Projects
Commit 7caeedc5 authored by Arkhangelskiy, Timofey's avatar Arkhangelskiy, Timofey
Browse files

Extend explain response templates

parent 54d4e173
Branches
No related tags found
No related merge requests found
p. 3: "The value of the @version attribute MUST be 2." But SRU 1.2 EndpointDescription will have version="1", per example on p. 12. (By the way, some examples are numbered and some are not.)
p. 4: Link 'section "Layers"' leads to a CLARIN-internal Trac instance.
p. 10: "Send explain request without version and operation parameter" -- but an explain request has to have the operation parameter with 'explain' as its value
p. 14: x-cmd-resource-info parameter present in the query example, but never explained (mentioned in some 2013 slides on FCS; should now probably be x-fcs-endpoint-description)
......
<sru:extraResponseData>
<ed:EndpointDescription xmlns:ed="http://clarin.eu/fcs/endpoint-description" version="1">
<ed:Capabilities>
<ed:Capability>http://clarin.eu/fcs/capability/basic-search</ed:Capability>
<ed:EndpointDescription xmlns:ed="http://clarin.eu/fcs/endpoint-description" version="{{ ep_version }}">
<ed:Capabilities>{% if capability_basic_search %}
<ed:Capability>http://clarin.eu/fcs/capability/basic-search</ed:Capability>{% endif %}{% if capability_advanced_search and ep_version >= 2 %}
<ed:Capability>http://clarin.eu/fcs/capability/advanced-search</ed:Capability>{% endif %}
</ed:Capabilities>
<ed:SupportedDataViews>
<ed:SupportedDataView id="hits" delivery-policy="send-by-default">application/x-clarin-fcs-hits+xml</ed:SupportedDataView>
</ed:SupportedDataViews>
<ed:SupportedDataViews>{% if hits_supported %}
<ed:SupportedDataView id="hits" delivery-policy="send-by-default">application/x-clarin-fcs-hits+xml</ed:SupportedDataView>{% endif %}{% if adv_supported and ep_version >= 2%}
<ed:SupportedDataView id="adv" delivery-policy="send-by-default">application/x-clarin-fcs-adv+xml</ed:SupportedDataView>{% endif %}
</ed:SupportedDataViews>{% if capability_advanced_search and ep_version >= 2 %}
<ed:SupportedLayers>{% for layer in supported_layers %}
<ed:SupportedLayer id="{{ layer.id }}" result-id="{{ layer.result_id }}"{% if layer.alt_value_info %} alt-value-info="{{ layer.alt_value_info }}"{% endif %}{% if layer.alt_value_info_uri %} alt-value-info-uri="{{ layer.alt_value_info_uri }}"{% endif %}{% if layer.qualifier %} qualifier="{{ layer.qualifier }}"{% endif %}>{{ layer.layer_type }}</ed:SupportedLayer>{% endfor %}
</ed:SupportedLayers>
{% endif %}
<ed:Resources>{% for r in resources %}
<ed:Resource pid="{{ r.pid }}">{% for title in r.titles %}
<ed:Title xml:lang="{{ title.lang }}">{{ title.content }}</ed:Title>{% endfor %}{% for desc in r.descriptions %}
<ed:Description xml:lang="{{ desc.lang }}">{{ desc.content }}</ed:Description>
<ed:LandingPageURI>{{ r.landing_page }}</ed:LandingPageURI>{% if r.languages|length > 0 %}
<ed:Description xml:lang="{{ desc.lang }}">{{ desc.content }}</ed:Description>{% if landing_page|length > 0%}
<ed:LandingPageURI>{{ r.landing_page }}</ed:LandingPageURI>{% endif %}
<ed:Languages>{% for lang in r.languages %}
<ed:Language>{{ lang }}</ed:Language>{% endfor %}
</ed:Languages>{% endif %}
<ed:AvailableDataViews ref="hits"/>
</ed:Languages>
<ed:AvailableDataViews ref="{{ r.data_views }}"/>
</ed:Resource>{% endfor %}
</ed:Resources>
</ed:EndpointDescription>
......
{% set ep_version = 1 %}
<?xml version='1.0' encoding='utf-8'?>
<sru:explainResponse xmlns:sru="http://www.loc.gov/zing/srw/">
<sru:version>1.2</sru:version>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment