Aller au contenu

Catalog Service for the Web (CSW)

The CSW end point exposes the metadata records in your catalog in XML format using the OGC CSW protocol (version 2.0.2).

Two protocols are available:

  • CSW: Provides the ability to search and publish metadata for data, services and related information.
  • CSW-T: Provides an interface for creating, modifying and deleting catalog records via the CSW protocol.

Configuration

See Configuring CSW for details of how to configure the CSW end point.

URL

The following URL is the standard end point for the catalog (substitute your GeoNetwork URL):

Generally, the VERSION and SERVICE parameter are also added, along with the REQUEST parameter as detailed below:

Requests

The full set of requests supported by GeoNetwork can be found in CSW test, in the Settings section of the Admin Dashboard.

See Configuring CSW for more details of this function.

When using the GetRecords operation for searching, 2 types of parameter can be use for searching:

  • The list of queryable listed in the GetCapabilities document
  • The fields in the index

Example of a request using a standard queryable:

<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
                service="CSW" version="2.0.2">
  <csw:Query typeNames="csw:Record">
    <csw:Constraint version="1.1.0">
      <Filter xmlns="http://www.opengis.net/ogc">
        <PropertyIsEqualTo>
          <PropertyName>OnlineResourceType</PropertyName>
          <Literal>OGC:WFS-1.1.0-http-get-feature</Literal>
        </PropertyIsEqualTo>
      </Filter>
    </csw:Constraint>
  </csw:Query>
</csw:GetRecords>

Example of a request using an index field name:

<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
                service="CSW" version="2.0.2">
  <csw:Query typeNames="csw:Record">
    <csw:Constraint version="1.1.0">
      <Filter xmlns="http://www.opengis.net/ogc">
        <PropertyIsEqualTo>
          <PropertyName>linkProtocol</PropertyName>
          <Literal>OGC:WMS</Literal>
        </PropertyIsEqualTo>
      </Filter>
    </csw:Constraint>
  </csw:Query>
</csw:GetRecords>

The mapping between CSW standard queryable and the index fields are defined in web/src/main/webapp/WEB-INF/config-csw.xml.