baseObjects.Transformer

|  | ## Cheshire3 Object Model: Class Transformer

Module baseObjects :: Class Transformer

## Class Transformer
source code

Object Tree:

               object --+
                        |
    configParser.C3Object --+
                            |
                           Transformer

Known Subclasses:
  textmining.tmTransformer.PosTransformer, transformer.CSVTransformer, transformer.FilepathTransformer, transformer.GRS1Transformer, transformer.GrsMapTransformer, transformer.LxmlXsltTransformer, transformer.XmlRecordStoreTransformer, transformer.XmlTransformer, transformer.XsltTransformer

A Transformer is the opposite of a Parser. It takes a Record and produces a Document. In many cases this can be handled by an XSLT implementation but other instances might include one that returns a binary file based on the information in the record. Transformers might be used in an indexing chain, but are more likely to be used to render a record in a format or schema requested by the end user.
Instance Methods

process_record(self, session, rec) Take a Record, transform it and return a new Document object.
Inherited from `configParser.C3Object`: `__init__`, `auth_function`, `get_config`, `get_default`, `get_object`, `get_path`, `get_setting`, `log_function`, `unauth_function`, `unlog_function` Inherited from `configParser.C3Object` (private): `_getDomFromFile`, `_handleConfigNode`, `_parseIncludes`, `_recurseSubConfigs`, `_verifyDefault`, `_verifyOption`, `_verifySetting` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables

Inherited from `configParser.C3Object`: `configStore`, `defaults`, `functionLogger`, `id`, `name`, `objectType`, `objects`, `parent`, `paths`, `permissionHandlers`, `settings`, `subConfigs`, `unresolvedObjects` Inherited from `configParser.C3Object` (private): `_includeConfigStores`, `_objectRefs` Inherited from `object`: `__class__`

Method Details

### process_record(self, session, rec) | source code
Take a Record, transform it and return a new Document object.