configParser.C3Object

|  | ## Cheshire3 Object Model: Class C3Object

Module configParser :: Class C3Object

## Class C3Object
source code

Object Tree:

    object --+
             |
            C3Object

Known Subclasses:
  baseObjects.Database, baseObjects.DocumentFactory, baseObjects.ObjectStore, baseObjects.Extractor, baseObjects.Index, baseObjects.IndexStore, baseObjects.Logger, baseObjects.Normalizer, baseObjects.Parser, baseObjects.PreParser, baseObjects.ProtocolMap, baseObjects.QueryFactory, baseObjects.Server, baseObjects.Transformer, baseObjects.User, baseObjects.Workflow, baseObjects.XPathProcessor, baseStore.SimpleStore, xpathProcessor.SimpleXPathProcessor, baseStore.SrbStore

Instance Methods

__init__(self, session, topNode, parentObject=None) The constructor for all Cheshire3 objects take the same arguments: session: A Session object topNode: The <config> or <subConfig> domNode for the configuration parent: The object that provides the scope for this object.
_getDomFromFile(self, session, fileName) Read in an XML file from disk to get the configuration for this object.
_handleConfigNode(self, session, node)
_parseIncludes(self, session, path)
_recurseSubConfigs(self, session, child)
_verifyDefault(self, type, value)
_verifyOption(self, type, value)
_verifySetting(self, type, value)
auth_function(self, name) Add an authorisation layer on top of a named function.
get_config(self, session, id) Return a configuration for the given object.
get_default(self, session, id, default=None) Return the default value for an option on this object
get_object(self, session, id) Return an object with the given id within this object's scope, or search upwards for it.
get_path(self, session, id, default=None) Return the named path
get_setting(self, session, id, default=None) Return the value for a setting on this object.
log_function(self, name) Set a named function to log invocations.
unauth_function(self, name) Remove the authorisation requirement from the named function.
unlog_function(self, name) Remove the logging from a named function.
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables

_includeConfigStores |
_objectRefs |
configStore |
defaults |
functionLogger |
id |
name |
objectType |
objects |
parent |
paths |
permissionHandlers |
settings |
subConfigs |
unresolvedObjects |
Inherited from `object`: `__class__`

Method Details

### __init__(self, session, topNode, parentObject=None) (Constructor) | source code
The constructor for all Cheshire3 objects take the same arguments: session: A Session object topNode: The <config> or <subConfig> domNode for the configuration parent: The object that provides the scope for this object. Overrides: object.__init__

### _getDomFromFile(self, session, fileName) | source code
Read in an XML file from disk to get the configuration for this object.

### _handleConfigNode(self, session, node) | source code

### _parseIncludes(self, session, path) | source code

### _recurseSubConfigs(self, session, child) | source code

### _verifyDefault(self, type, value) | source code

### _verifyOption(self, type, value) | source code

### _verifySetting(self, type, value) | source code

### auth_function(self, name) | source code
Add an authorisation layer on top of a named function.

### get_config(self, session, id) | source code
Return a configuration for the given object.

### get_default(self, session, id, default=None) | source code
Return the default value for an option on this object

### get_object(self, session, id) | source code
Return an object with the given id within this object's scope, or search upwards for it.

### get_path(self, session, id, default=None) | source code
Return the named path

### get_setting(self, session, id, default=None) | source code
Return the value for a setting on this object.

### log_function(self, name) | source code
Set a named function to log invocations.

### unauth_function(self, name) | source code
Remove the authorisation requirement from the named function.

### unlog_function(self, name) | source code
Remove the logging from a named function.

Class Variable Details

    ### _includeConfigStores Value:
        []

    ### _objectRefs Value:
        []

    ### configStore Value:
        None

    ### defaults Value:
        {}

    ### functionLogger Value:
        None

    ### id Value:
        ''

    ### name Value:
        ''

    ### objectType Value:
        ''

    ### objects Value:
        {}

    ### parent Value:
        None

    ### paths Value:
        {}

    ### permissionHandlers Value:
        {}

    ### settings Value:
        {}

    ### subConfigs Value:
        {}

    ### unresolvedObjects Value:
        {}