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 advertisedNAMESPACE: dict of all applicable namespaces to outputschemaXPATH_MAPPINGS: dict of pycsw core queryables mapped to the equivalent XPath of the outputschemawrite_record: function which returns a record as anlxml.etree.Elementobject
Add the name of the file to __init__.py:__all__. The new outputschema is now supported in pycsw.
![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.](https://portal.opengeospatial.org/public_ogc/compliance/Certified_OGC_Compliant_Logo_Web.gif)
