Output Schema Plugins

Overview

pycsw allows for extending the implementation of output schemas to the core standard. outputschemas allow for a client to request metadata in a specific format (ISO, Dublin Core, FGDC, NASA DIF and Atom are default).

All outputschemas must be placed in the pycsw/plugins/outputschemas directory.

Requirements

pycsw/
  plugins/
  __init__.py # empty
  outputschemas/
    __init__.py # __all__ is a list of all provided outputschemas
    atom.py # default
    dif.py # default
    fgdc.py # default

Implementing a new outputschema

Create a file in pycsw/plugins/outputschemas, which defines the following:

  • NAMESPACE: the default namespace of the outputschema which will be advertised
  • NAMESPACE: dict of all applicable namespaces to outputschema
  • XPATH_MAPPINGS: dict of pycsw core queryables mapped to the equivalent XPath of the outputschema
  • write_record: function which returns a record as an lxml.etree.Element object

Add the name of the file to __init__.py:__all__. The new outputschema is now supported in pycsw.

Testing

New outputschemas must add examples to the Tester interface, which must provide example requests specific to the profile.

Table Of Contents

Previous topic

Profile Plugins

Next topic

GeoNode Configuration

This Page

This product conforms to the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web], Revision 2.0.2. OGC, OGC®, and CERTIFIED OGC COMPLIANT are trademarks or registered trademarks of the Open Geospatial Consortium, Inc. in the United States and other countries.

This product conforms to the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web], Revision 2.0.2. OGC, OGC®, and CERTIFIED OGC COMPLIANT are trademarks or registered trademarks of the Open Geospatial Consortium, Inc. in the United States and other countries.

OSGeo Project in Incubation