pycsw | Home | Demos | Docs | Issue Tracker | FAQ | Download

### Navigation

- next
- previous |
- Documentation »

# Profile Plugins

## Overview

pycsw allows for the implementation of profiles to the core standard. Profiles allow specification of additional metadata format types (i.e. ISO 19139:2007, NASA DIF, INSPIRE, etc.) to the repository, which can be queried and presented to the client. pycsw supports a plugin architecture which allows for runtime loading of Python code.

All profiles must be placed in the `server/plugins/profiles` directory.

## Requirements

    pycsw/
     server/
       plugins/
       __init__.py # empty
       profiles/ # directory to store profiles
         __init__.py # empty
         profile.py # defines abstract profile object (properties and methods) and functions to load plugins
         apiso/ # profile directory
           __init__.py # empty
           apiso.py # profile code
           ... # supporting files, etc.

## Abstract Base Class Definition

All profile code must be instantiated as a subclass of `profile.Profile`. Below is an example to add a `Foo` profile:

    from server.plugins.profiles import profile

    class FooProfile(profile.Profile):
        profile.Profile.__init__(self,
            name='foo',
            version='1.0.3',
            title='My Foo Profile',
            url='http://example.org/fooprofile/docs',
            namespace='http://example.org/foons',
            typename='foo:RootElement',
            outputschema=http://example.org/foons',
            prefixes=['foo'],
            model=model,
            core_namespaces=namespaces,
            added_namespaces={'foo': 'http://example.org/foons'}
            repository=REPOSITORY['foo:RootElement'])

Your profile plugin class (`FooProfile`) must implement all methods as per `profile.Profile`. Profile methods must always return `lxml.etree.Element` types, or `None`.

## Enabling Profiles

All profiles are disabled by default. To specify profiles at runtime, set the `server.profiles` value in the Configuration to the name of the package (in the `server/plugins/profiles` directory). To enable multiple profiles, specify as a comma separated value (see Configuration).

## Testing

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

# Supported Profiles

## ISO Metadata Application Profile (1.0.0)

### Overview

The ISO Metadata Application Profile (APISO) is a profile of CSW 2.0.2 which enables discovery of geospatial metadata following ISO 19139:2007 and ISO 19119:2005/PDAM 1.

### Configuration

No extra configuration is required.

### Querying

> - typename: gmd:MD_Metadata
> - outputschema: http://www.isotc211.org/2005/gmd

### Enabling APISO Support

To enable APISO support, add `apiso` to `server.profiles` as specified in Configuration.

### Testing

A testing interface is available in `tester/index.html` which contains tests specific to APISO to demonstrate functionality. See Tester for more information.

## INSPIRE Extension

### Overview

APISO includes an extension for enabling INSPIRE Discovery Services 3.0 support. To enable the INSPIRE extension to APISO, create a `[metadata:inspire]` section in the main configuration with `enabled` set to `true`.

### Configuration

[metadata:inspire]

- enabled: whether to enable the INSPIRE extension (`true` or `false`)
- languages_supported: supported languages (see http://inspire.ec.europa.eu/schemas/common/1.0/enums/enum_eng.xsd, simpleType `euLanguageISO6392B`)
- default_language: the default language (see http://inspire.ec.europa.eu/schemas/common/1.0/enums/enum_eng.xsd, simpleType `euLanguageISO6392B`)
- date: date of INSPIRE metadata offering (in ISO 8601 format)
- gemet_keywords: a comma-seperated keyword list of GEMET INSPIRE theme keywords about the service (see http://inspire.ec.europa.eu/schemas/common/1.0/enums/enum_eng.xsd, complexType `inspireTheme_eng`)
- conformity_service: the level of INSPIRE conformance for spatial data sets and services (`conformant`, `notConformant`, `notEvaluated`)
- contact_organization: the organization name responsible for the INSPIRE metadata
- contact_email: the email address of entity responsible for the INSPIRE metadata
- temp_extent: temporal extent of the service (in ISO 8601 format). Either a single date (i.e. `yyyy-mm-dd`), or an extent (i.e. `yyyy-mm-dd/yyyy-mm-dd`)

## Directory Interchange Format (DIF) 9.7

### Overview

The Directory Interchange Format (DIF) is a metadata format supported by the NASA Global Change Master Directory.

### Configuration

No additional configuration is required.

### Querying

> - typename: dif:DIF
> - outputschema: http://gcmd.gsfc.nasa.gov/Aboutus/xml/dif/

### Enabling DIF Support

To enable DIF support, add `dif` to `server.profiles`.

### Testing

A testing interface is available in `tester/index.html` which contains tests specific to DIF to demonstrate functionality. See Tester for more information.

## FGDC CSGDM 1998

### Overview

The FGDC CSDGM Application Profile is a profile of CSW 2.0.2 which enables discovery of geospatial metadata following FGDC:CSDGM 1998 metadata.

### Configuration

No additional extra configuration is required.

### Querying

> - typename: fgdc:metadata
> - outputschema: http://www.opengis.net/cat/csw/csdgm

### Enabling FGDC Support

To enable fgdc support, add `fgdc` to `server.profiles`.

### Testing

A testing interface is available in `tester/index.html` which contains tests specific to FGDC to demonstrate functionality. See Tester for more information.

## CSW-ebRIM Registry Service - Part 1: ebRIM profile of CSW

### Overview

The CSW-ebRIM Registry Service is a profile of CSW 2.0.2 which enables discovery of geospatial metadata following the ebXML information model.

### Configuration

No extra configuration is required.

### Querying

> - typename: rim:RegistryObject
> - outputschema: urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0

### Enabling ebRIM Support

To enable ebRIM support, add `ebrim` to `server.profiles` as specified in Configuration.

### Testing

A testing interface is available in `tester/index.html` which contains tests specific to ebRIM to demonstrate functionality. See Tester for more information.

## Atom Syndication Format 1.0

### Overview

The Atom Syndication Format is used in RSS feeds as well as OpenSearch.

### Configuration

No additional configuration is required.

### Querying

> - typename: atom:entry
> - outputschema: http://www.w3.org/2005/Atom

### Enabling Atom Support

To enable Atom support, add `atom` to `server.profiles`.

### Testing

A testing interface is available in `tester/index.html` which contains tests specific to Atom to demonstrate functionality. See Tester for more information.

### Navigation

- next
- previous |
- Documentation »