def request(self, kvp):
        """process OAI-PMH request"""
        kvpout = {'service': 'CSW', 'version': '2.0.2', 'mode': 'oaipmh'}
        LOGGER.debug('Incoming kvp: %s' % kvp)
        if 'verb' in kvp:
            if 'metadataprefix' in kvp:
                self.metadata_prefix = kvp['metadataprefix']
                try:
                    kvpout['outputschema'] = self._get_metadata_prefix(kvp['metadataprefix'])
                except __HOLE__:
                    kvpout['outputschema'] = kvp['metadataprefix']
            else:
                self.metadata_prefix = 'csw-record'
            LOGGER.info('metadataPrefix: %s' % self.metadata_prefix)
            if kvp['verb'] in ['ListRecords', 'ListIdentifiers', 'GetRecord']:
                kvpout['request'] = 'GetRecords'
                kvpout['resulttype'] = 'results'
                kvpout['typenames'] = 'csw:Record'
                kvpout['elementsetname'] = 'full'
            if kvp['verb'] in ['Identify', 'ListMetadataFormats', 'ListSets']:
                kvpout['request'] = 'GetCapabilities'
            elif kvp['verb'] == 'GetRecord':
                kvpout['request'] = 'GetRecordById'
                if 'identifier' in kvp:
                    kvpout['id'] = kvp['identifier']
                if ('outputschema' in kvpout and
                    kvp['metadataprefix'] == 'oai_dc'):  # just use default DC
                    del kvpout['outputschema']
            elif kvp['verb'] in ['ListRecords', 'ListIdentifiers']:
                if 'resumptiontoken' in kvp:
                    kvpout['startposition'] = kvp['resumptiontoken']
                if ('outputschema' in kvpout and
                   kvp['verb'] == 'ListIdentifiers'):  # simple output only
                    pass #del kvpout['outputschema']
                if ('outputschema' in kvpout and
                    kvp['metadataprefix'] in ['dc', 'oai_dc']):  # just use default DC
                    del kvpout['outputschema']


                start = end = None
                LOGGER.info('Scanning temporal parameters')
                if 'from' in kvp:
                    start = 'dc:date >= %s' % kvp['from']
                if 'until' in kvp:
                    end = 'dc:date <= %s' % kvp['until']
                if any([start is not None, end is not None]):
                    if all([start is not None, end is not None]):
                        time_query = '%s and %s' % (start, end)
                    elif end is None:
                        time_query = start
                    elif start is None:
                        time_query = end
                    kvpout['constraintlanguage'] = 'CQL_TEXT'
                    kvpout['constraint'] = time_query
        LOGGER.debug('Resulting parameters: %s' % kvpout)
        return kvpout
dataset/ETHPy150Open geopython/pycsw/pycsw/oaipmh.py/OAIPMH.request