|  | # Cheshire3 Objects: Selector

## Description

A Selector is a simple wrapper around an XPath or other means of selecting data from a parsed structure in a Record

## Implementations

There are no pre-configured out-of-the-box ready Selectors as these are completely data dependent.

## API

Module: cheshire3.selector
Classes:

- SimpleSelector
  Abstract base class for Selectors.
- XPathSelector
  Selects data based on an XPath expression.
- SpanXPathSelector
  Selector that allows selection of a span between two given XPath expressions - starts at the first and ends at the second. Two XPaths must be configured, although both can be the same in which case each node acts as a start and stop node.
- MetadataSelector
  Selector that specifies an attribute or function to select data from Record.
- TransformerSelector
  Selector that applies a configured Transformer to the Record and returns the result as the selected data.

Methods:

Function | Parameters | Returns | Description
--- | --- | --- | ---
__init__ | config, parent |  |
process_record | session, record | list of lists of selected data.

### Sub Packages

Package: graph
Module: cheshire3.graph.selector
Classes:

- SparqlSelector
  Selects data from a GraphRecord based on a SPARQL query.