gws.plugin.ows_server.csw¶
CSW service.
Basic implementation of the OGC Catalogue Service for the Web (CSW) 2.0.2.
Only a small subset of the standard is supported: the operations
GetCapabilities, DescribeRecord, GetRecords and GetRecordById, with records
in the ISO 19115 profile. The profile option is not evaluated; the profile
is always ISO.
The catalog is collected after the configuration: every object in the tree
that has metadata with a catalogUid and is public becomes a record. A link
to the GetRecordById URL of the record is added to its metaLinks. If the
object or its map has an extent and a CRS, the WGS84 extent is added, and the
initial scale of the closest map becomes the spatial resolution.
GetRecords supports an FES filter in Query/Constraint/Filter of an XML
request; without a filter all records are returned. GetRecordById looks up
a record by the id parameter.
Templates:
templates/iso/getCapabilities.cx.py:ows.GetCapabilities.templates/iso/describeRecord.cx.py:ows.DescribeRecord.templates/iso/getRecords.cx.py:ows.GetRecords.templates/iso/getRecordById.cx.py:ows.GetRecordById.
References:
OpenGIS Catalogue Service Implementation Specification 2.0.2 (http://portal.opengeospatial.org/files/?artifact_id=20555)
Example:
owsServices+ {
type "csw"
uid "my_csw"
metadata {
title "Catalog"
abstract "Catalog of the geodata"
}
}
projects+ {
access "allow all"
metadata.catalogUid "my_project"
}
Source code: gws.plugin.ows_server.csw
Subpackages¶
Package Contents¶
- class gws.plugin.ows_server.csw.Config¶
Bases:
gws.base.ows.server.service.ConfigCatalogue service that publishes metadata records.
- class gws.plugin.ows_server.csw.Object¶
Bases:
gws.base.ows.server.service.ObjectCSW service that publishes the metadata of public objects as catalog records.
- mdMap: dict[str, gws.Metadata]¶
Catalog records by catalog UID.
- protocol¶
- supportedVersions = ['2.0.2']¶
- collect_metadata()¶
Collect the catalog records from all objects in the tree into
mdMap.
- configure()¶
- configure_metadata()¶
- configure_operations()¶
- configure_templates()¶
- handle_describe_record(sr: gws.base.ows.server.request.Object)¶
Handle the DescribeRecord operation.
- Parameters:
sr – Service request.
- Returns:
The record schema description.
- handle_get_capabilities(sr: gws.base.ows.server.request.Object)¶
Handle the GetCapabilities operation.
- Parameters:
sr – Service request.
- Returns:
The capabilities document.
- handle_get_record_by_id(sr: gws.base.ows.server.request.Object)¶
Handle the GetRecordById operation.
- Parameters:
sr – Service request.
- Returns:
A response with the record given by the
idparameter, or with no records.
- handle_get_records(sr: gws.base.ows.server.request.Object)¶
Handle the GetRecords operation.
Returns all records that match the filter of the request.
- Parameters:
sr – Service request.
- Returns:
The search results document.
- init_request(req)¶
- parse_xml_request(xml)¶
- post_configure()¶