PyOpenWorm.mapper module

exception PyOpenWorm.mapper.UnmappedClassException[source]

Bases: Exception

class PyOpenWorm.mapper.Mapper(base_class_names, base_namespace=None, imported=(), name=None, **kwargs)[source]

Bases: PyOpenWorm.module_recorder.ModuleRecordListener, PyOpenWorm.configure.Configureable

Keeps track of relationships between classes, between modules, and between classes and modules

decorate_class(self, cls)[source]

Extension point for subclasses of Mapper to apply an operation to all mapped classes

load_module(self, module_name)[source]

Loads the module.

lookup_class(self, cname)[source]

Gets the class corresponding to a fully-qualified class name

DecoratedMappedClasses = None

Maps RDF types to properties of the related class

MappedClasses = None

Maps classes to decorated versions of the class

base_modules = None

The base class for objects that will be mapped.

Defined once the module containing the class is loaded

base_namespace = None

Modules that have already been loaded